I have discussed the four easy problems of july’16 long challenge that I have solved fully. You are welcome to discuss about your approach on these problems.
My approach to question https://www.codechef.com/JULY16/problems/CHEFTET …
Since we have to use all the elements of array B so we can easily find “sum” of all the elements of array B and array A…
if(sum%n!=0) then ans is -1…
else we have to check if we can get the sum equal to sum/n…
Here’s the link to my approach https://www.codechef.com/viewsolution/10785468 …
I got the best submission for this question
@an2609 What do mean by ‘best submission’? Have you looked through all other submissions?
@tony_hager I meant in terms of running time. 0.00 sec
Solution : https://www.codechef.com/viewsolution/10657863 (Just a cakewalk)
Solution : Using Bfs simultaneously on both starting and end point
Can Somebody help me about what’s wrong with my solution for JULY challenge problem [chef and tetris]
and my approach was to check out 4 possible values so that we can make all array elements equal
but I am getting wrong answer for 7th and 12th task
my solution : https://www.codechef.com/viewsolution/10812639
hi you have post very informative question. for best c programming training institute please visit the following link.c programming training
I didn’t go through your code, but I’m guessing that you’re not checking if the last element in ‘B’ has been used. I got WA in those tasks because of that.
@hemanth_1: I have checked the code and I’m using the last element of array B
hi you have post a very good information.thank you for sharing this.
bigdata analytics training
can anyone tell me for which test case i am getting wrong for all.i have tested all the test case but ts failing for all my soln
codechef long challenge july 2016
hi, check this input.
1 3 4 8 9 11 15 21 30
output should be 10
your program gives 4.
Can someone help me figure out why my solution isn’t being accepted, I’ve tried alot of test cases. https://www.codechef.com/viewsolution/10829172.
check this input:
1 6 10 13 14
output should be 8 (one wire from coordinate 6 to coordinate 14)
your program gives 9.
A O(n) solution to CHEFTET : https://www.codechef.com/viewsolution/10780779
Can someone please post the approach to solve CHEF and ELECTRICITY?
Can you help me find the problem with my code for Chef and Electricity: https://www.codechef.com/viewsolution/10810212 .
I tested it around and worked perfectly fine but when I submit it there seems to be some mistake as it returns WA on all the tests.