Problem with SUMQ from JUNE17.

The program allocates 0.0M and takes 0.0s execution time. A lot of solutions are facing the same problem. Are the test cases fine? Or is there something which is not clearly mentioned in the question?

There is no problem with testcases,Even i thought the same but after struglling fod hours got AC!

Once gothrough this link,for some wrong submissions it is showing 0M.

1 Like

I tried to solve just the subtask #1. But still the same.

Looks like someone needs to brainstorm a little.

Thanks for the reply!

You might have done silly mistake,you better check the whole code once.It took me 5 hours to find out my silly mistake.

Have been doing the same for the last couple of days. But will give it a try again. XD

@hruday968, is the problem statement fine? I mean there are no hidden secrets, right??

I feel the problem setter should atleast reply that " There is no problem from our side." so that people dont get anxious and have to discuss these topics at discuss.



You said that you have passed subtask 1,then you can understand whether there is any hidden secret or not.

I hadn’t earlier. Just did that a while ago. So will figure something out for subtask 2 as well.

Look at this :,hb11

Bro there is no problem with that question, when i first submitted the ans no test case was correct, but after few modification and using same logic as i used in first try i got AC.
And when ever there is wrong answer it show 0.0M Memory and 0.0s execution time.,ashcode0605

Yes, as said above WA is given 0 memory and 0 execition time, the actual time and memory required to run your code is displayed once you get an AC. I hope that helps. :slight_smile:

Not always but in most cases.

1 Like

There is no problem with the question or test cases. Although, mostly I feel the same whenever I get stuck on codechef (my excuse for not trying hard when I don’t want to ;)). But trust me, codechef is one of the best coding platforms with very least errors on problems or test cases. Banged my head on the wall for half a day to finally solve this SUMQ problem (which clearly shows that I need to work on my speed).

1 Like

are elements input in sorted order?

don’t assume anything that is not mentioned in the question and you can ask your doubts in the comment section of that question

i got 30 points,is there is any mathematical shortcut or just optimization?
PS- not asking for any code

I’m getting 30 points only, I followed the same procedure for calculating the sum…but I still can’t identify the bug … please help !!!
Here is my code:

python 3.4:

solve this using basic-math,sort(nlogn) and simple observations