Help nedded in BINFUN (LTIME , July2020) [ Weak Test Cases]

After the contest, I submit this “https://www.codechef.com/viewsolution/36019868

Why this show WA in 1 TC.

can someone give a counter test case?

https://www.codechef.com/viewsolution/36020008
https://www.codechef.com/viewsolution/35949061
https://www.codechef.com/viewsolution/36019580
https://www.codechef.com/viewsolution/36007961
https://www.codechef.com/viewsolution/35974206

they just do brute force for N < 100 or 500 and same logic as above for higher value of N ,
so what does it means , TC’s are weak ? or something else ?

@shashwatchandr @everule1

1 Like

How could even these solution pass??..then my bruteforce also should havebeen passed :3

Yeah testcases were weak. Even my wrong submission passed
https://www.codechef.com/viewsolution/35963144

bhai tumne to kya kiya wo to samjh bhi nhi aaya :sweat_smile:

1 Like

I brute-force when N<500.
When N is higher, I assume that the maximum element of the array is part of the solution and calculate the second element in one pass. This felt intuitive, but no way of proving this. This is in fact false as it fails for a smaller testcase with N<500
We needed better testcases. I wouldn’t have solved a single problem if that was the case :stuck_out_tongue:

and my rating :weary: :weary: :weary:

Don’t worry much about rating. Even I am back in 4*

1 Like