Possible change like codeforces?

As in codeforces , there is an option to view the testcases for which your code is not giving the right output. Is it possible that such an option can be made in codechef to? Or does there already exist one, If yes then how can i access it? I believe that it may help many people understand where there approach failed after the contest because its always not the case that your approach matches with the editorial. I know you can ask the same doubt in discussion but it would save a lot of time if the testcases were given since then we can check our codes ourselves. This is my suggestion. I would love to see your suggestions too.

Thanks

12 Likes

dream of every cc coder that wont be fulfilled :disappointed:

5 Likes

If you can create a BFS, just test your code against that. This is even useful when in live competition. If not, take an AC solution and test it against yours.

3 Likes

But say the problem is of graph theory. Then how will u generate random tc’s for this problem (taking into consideration that adjacency list has to be constructed) ?

1 Like

so can you help me with this INOI 2020 department strengths WA help

Just like the setter of the problem would create. :slightly_smiling_face:

2 Likes

It’s a bit of a mess, but here’s my initial submission of BACREP, complete with brute-force implemention; optimised implementation, and testcase generator (search for --test).

3 Likes

Bro but if u know what the edge cases are for the problem then do i even need to ask for help?

It’s not 100% guaranteed, but small-ish random testcases uncover edge-cases shockingly quickly in my experience. The only things they tend not to help with are:

  1. TLEs (obviously)
  2. Uncovering integer overflow, but there are other ways of detecting that.
3 Likes

@ssjgz I agree with you but sometimes the error is just not visible to the eye even after testing 100’s of cases.

2 Likes

I think that’s very rare, though; and it doesn’t have to be visible to the eye: as soon as the brute-force and optimised solutions don’t match, you have your testcase :slight_smile:

2 Likes

Yeah it is but wouldnt it be so much convinient if an option like that did exist? And if other sites like codeforces can put an option like that then i guess that it might not be that hard? I may be wrong though.

1 Like

I think it’s probably a deliberate design decision, and one I agree with, frankly - people don’t give you nice, neat testcases in interviews, nor when you working as a programmer.

2 Likes

@ssgz but say the constraints of the problem are 10^{18} and the brute force is O(N). And say my code is working for most of the tc’s except the large one > 10^9. Will i even have to optimise the brute force for that? And if yes then it’ll be really tiresome. Atleast for me. And believe me this error has happened with me a lot of time.

That generally doesn’t happen and the even never happened with me. If you write an optimised code that doesn’t work for n>1e9 , then there are high chances it will have a tc n<1e9 where it will not work.

2 Likes

Yeah, as with @akshitm16, I can’t think of a time when the size of the testcase was the difference between AC and WA, except for cases of integer overflow, as mentioned :man_shrugging:

2 Likes

In my opinion, Code Chef should allow the people to view the test cases just like Code Forces does for the problems in the practice section. Even I have been struggling to find the test case where my solution is going wrong in ACCBIP problem from the previous Long Challenge.
EDIT - As far as the fact is considered that it happens very rarely, the issue is that when you get a verdict like that, it becomes super difficult for majority of the people to debug that case.

what are your views @everule1 @vijju123 @galencolin @therealnishuz @ssrivastava990 @admin @pushkarmishra

It will be dream only

why
see this problem statement and must see sample input output https://www.codechef.com/ABCC2020/problems/GFPOOL

is there any limitations or community guidelines on codechef?
as platform there should be @admin please before having live at least review the problem statements, characters used in them !

Bro in one line : They don’t fulfill this condition.So just deal with it , if this happens almost everyone happy , but not gonna happen , so no hope.