I think it’s something with how judge interact with output produced in python3(Not Sure). I have 2 same solution(Algorithm wise). one in python3(AC 35 Points) and other in C++14(AC 100 Points).
It was because of TLE.
I changed res = res +…
to res+=
and it was accepted
check the code here https://ideone.com/OaN571
I did it in the same manner, although this method is a bit naive but it got me an AC, here is my implementation
https://www.codechef.com/viewsolution/21976641
Now I feel gutted. I lost points and got a bad ranking because of CodeChef error and @vijju123 won’t reply too.
@vijju123: What should be the next steps? Do you think it is okay to punish the participants for issues with the judge? We spend a lot of time trying to debug our code since we trust the verdict given by the judge.
Yes, its perfectly fine to punish participants here. You ought to read the interactive problem guides before first, which clearly state that if your code does not terminate after the judge gives a WA verdict, you can crash judge and get any verdict (except AC) which can be TLE, WA or some weird RE:XXXXXX.
I think it's something with how judge interact with output produced in python3(Not Sure).
Unless there are 0 accepted solutions n python 3, this claim cannot be explored.
In python3 here 2. In C++14 here
Its much more likely you unconsciously did a very minor change while translating to C++ code which fixed the error? Also, your way to terminate the program in python seems unnatural.
Clarifying my statement-
In case the participants code does something unexpected causing your code to crash, a -1 verdict is given. And since the program crashed, you cannot count on it to give correct verdict.
Its not possible to account for ALL possible cases. For all we know, the participant may output a string instead of number, like “Enter a number” or output some weird large number as string output any random damn thing he could xD. Hence, its not possible to make judge 100% crash proof unless all the infinite possible behaviors of thousands of coders are accounted for. But please know, the judge will work and give correct verdict if you do everything as expected, i.e. adhere to I/O format and use correct algorithm. I feel this answers your doubt?
Please report important matters/grievances to me on mail so I dont miss them. Not possible to go through every thread of forum at all times dear.
@vijju123: I think you missed the whole point again in trying to defend Codechef. You never looked at my code. I don’t even need to read the interactive problem guide in this case since it was mentioned in the problem itself and I took care to terminate the code if -1 is returned.
@ritam777 - I think you missed my entire point again in trying to defend yourself.
You never looked at my code.
I did look at it. But the code was extremely horrible. Also, there isnt any strong reason to look at the code. I am sorry if I missed anything, please reiterate that here
I took care to terminate the code if -1 is returned.
Its not terminated if its TLE. From the comments, I can see that your python solution was getting time out which was shown as WA.
The point is, if you were in doubt over -1 verdict, then ask in comments, look at previous forum posts, whats the use of shouting over it now? The contest s over, your solution will still get TLE/ WA-1 if rejudged and hence no restoration of points can be done.
And to the crux of it, I dont wanna argue over whose correct. These things disinterest me. Tell me what CAN be done to correct it, if you have grievance and I will look at it. ARguing over such things is a time waste, with lot of redundant mud throwing on me for nothing usually.
@vijju123: “The code was extremely horrible”. I know you have bragging rights since you’re a “5-star rated” coder, but I didn’t know a moderator on a public forum is allowed to make personal remarks targeting others’ coding practices. FYI I am a noob at python practices & I never studied python formally. I’m not getting paid here for writing maintainable code. I am here to test my logic. You should not be bothered about practices here.
“I am sorry if I missed anything”: Turns out you should be since you missed the point again. I said look at the code to see that I had added the -1 check.
@vijju123: You are so casual while declaring TLE was displayed as WA as if it is normal on codechef and everywhere else and it was all my fault. Is it not an issue and shouldn’t “figuring out how it CAN be corrected” be a top priority for the judging panel?
WHY DO YOU INHERENTLY EXPECT THAT APART FROM DEBUGGING THEIR OWN CODE, PEOPLE SHOULD ALSO SPEND TIME DEBUGGING YOUR JUDGE?
And why do you think I need to “defend myself”? I am here pointing out an issue with the judge right (which others have also done)? Don’t you know it’s “prosecution” vs “defence”?It’s not like “defence” vs “defence”.
There were atleast two posts by people asking what is wrong with the judge. One of the links is below (asked later during the course of the contest).
https://discuss.codechef.com/questions/142160/giving-wa-10000
There was another one asked which was prematurely closed by someone saying “contest is on, we will comment on it after contest ends”.
Both threads didn’t provide much. You expect me to just have created a third thread at that time?
Is your task not to make coder’s life a bit easier at your platform? On top of that you come and say “Yes, its perfectly fine to punish participants here”.
@vijju123: This is another example: https://discuss.codechef.com/questions/142104/wa-1000-coming-in-my-code
I could find 4-5 similar posts by different people during the contest with no concrete response. What should I have done in that case?
It is very easy to sit there and provide suggestions and not look into improving the system or compensating the coders who were facing all these issues. Instead you say you are “perfectly fine to punish” them for it.
@ritam777 I don’t think this needs to be discussed any further unless you have solution for the problem. Nothing in world is perfect. We have to live on with what we have or improve it ourselves. Peace!
TLDR, I cannot waste more of time. I have to spend it addressing real issues rather than hearing someone rant over a problem on long.
@shivam_g1470: Good to see you using my post for building your “reputation points” and registering in moderator’s good books. Nothing in the world is perfect you say. The moderators (@vijju123) are not even sorry for the panel’s mistakes. Heck they are not even sorry for personally attacking a python-noob’s coding practices (calling my code as “extremely horrible”).