Wrong and weak test cases for SANSKAR

@admin

Testcases for SANSKAR are weak and wrong. My completely brute forced code gives WA rather than TLE. When I modified my code to make it greedy, it passed all test cases.

Here is one example where my brute code gives yes but ac’ed code gives no.

1

7 3

1 1 2 2 2 5 5

Please see into this. I think test cases are wrong. Thanks.

9 Likes

it will be yes as total sum is 18. 18/3=6. all 3 followers should have 6 so it will be 5+1 5+1 2+2+2 so a yes

my accepted code also gives “no” on above test case.
Also, if I input sorted array, it gives “no” and with unsorted array, it gives “yes”.

my AC solution gives a yes. so you can’t say surely that a correct code gives WA. However i do agree that wrong greedy solution are giving AC.

Haha… Lucky You @ashish1610!!

Seems Codechef focuses more on corner test cases…!

But please do not display your cases publicly at the time when contest is going on if you have any problem please mail to admin but all this leads to a discussion about the approach for solution, and i think it do not go good with the rules of codechef…!!

Sir my code is write but evry time one of the test case is wrong help

my code is running flawlessly on my machine, but here I don’t know… its generating Runtime Error(NZEC)
however this is my first time here. plz help, Im using python3

.

Hello friends :slight_smile:
I’m also facing the same problem. I’ve tried many test cases on my local machine and my code always gives the correct answer. My code is getting only 3 AC’s. Please help me. Here is the link to my code - CodeChef: Practical coding for everyone

Please write to feedback@codechef.com instead of forum…

2 Likes

Yeah I know but my accepted code gives no.

Already mailed them.

sorry :wink: you cannot ask for help during ongoing contest… keep trying :slight_smile:

Sorry, you cannot ask for help during an ongoing contest :slight_smile:

Now, I did random_shuffle on the input array and my code works for that case also and all the test cases. Test cases for this problem are really weak.

1 Like

thats true…

Read FAQ’s FAQ | CodeChef for NZEC…

@karnikamit

how will your code respond if sum if array is 0 ?

@rishabprsd7 I looked into the link you gave, but no help :confused: 0 sanskars means it can be given to all the followers :stuck_out_tongue:

are you importing psyco?