Extremely weak test cases in JULY 16 CHEFTET

please clarify the JULY CHALLENGE problem 02 , test case number 2.

Well , this was a disaster , first I have to assume that some element from B can remain in B . Thanks to this thread . Second , I have to assume that we can use same element of b multiple times . Since it is once in a blue moon mistake by tester and author so no offence to codechef .

1 Like

So it seems they added new test cases:-

08/07/2016, 1234 hrs IST: Test data of problem CHEFTET was weak. We have put all the submissions for rejudge. Please resubmit your solution if you are affected by it. We really regret the inconvenience.

Thankfully my solution wasnā€™t affected.

@admin So, what is it finally, do we have to use all the elements of b? And can we use the same element of b multiple times?

4 Likes

Now anybody tell me that can B contain some elements at the end ?

My solution assumes we have to use all elements of b and passes.

1 Like

The problem statement should be updated
There is too much confusion about whether B can retain some elements or if the same element can be used multiple times. Else it is not clear.

So, can we use elements of b multiple times?

thanks rajan for informationā€¦
but why not codechef clear this according to question B will fall on A in this scenerio one element of B can fall on unique element of
A so that element of B canā€™t be reusedā€¦
such type of information less question kills time this is really irritatingā€¦

So , is your roommatesā€™s solution still accepted ? :stuck_out_tongue:

no ā€¦ not yet :stuck_out_tongue:

no u need to use each element only onceā€¦some subtasks failed because of that

no all B elements must fallā€¦ that is why i got wrong too

In the problem statement of CHEFTET its written that:-
ā€œarray B is falling on array A, such that number Bi is directly above the number Ai initially.ā€
ā€œIf element Bi falls on Ai, Ai gets increased by Bi.ā€
So that means Bi must fall on Ai then only Ai increases and if Bi falls on any of Ai-1 or Ai+1 then it doesnt increases as per problem statement but in test case no 2 last both 10ā€™s are falling on same number 1.
What does that means will anyone tell me.??

by telling the complexity, you kinda revealed the entire algorithm :stuck_out_tongue:

if(sum % n == 0 && (sum/n == a[0] || sum/n == a[0] + b[0] || sum/n == a[0] + b[1] || sum/n == a[0] + b[0] +b[1])) printf("%lld\n",sum/n);
else printf("-1\n");

^these were those 2 lines, which got 100. :stuck_out_tongue:

https://www.codechef.com/viewsolution/10754867

This was the 2 lines of code of my roommate giving 100 :stuck_out_tongue: