# discussion on four easy problems

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.

1 Like

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

6 Likes

@an2609 What do mean by ‘best submission’? Have you looked through all other submissions?

1 Like

@tony_hager I meant in terms of running time. 0.00 sec

2 Likes

JULY CHALLENGE

Problem1 : Andrash and Stipendium (EGRANDR)

Solution : https://www.codechef.com/viewsolution/10657863 (Just a cakewalk)

Problem2 : Chefland and Electricity ( CHEFELEC)(Just Read the whole array and put your eyes on new arising 1)

Problem3 : Chef and Robots Competition (CHEFARC)

Solution : Using Bfs simultaneously on both starting and end point
https://www.codechef.com/viewsolution/10740823

1 Like

Can Somebody help me about what’s wrong with my solution for JULY challenge problem [chef and tetris]
1
and my approach was to check out 4 possible values so that we can make all array elements equal

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
2nd question
https://www.codechef.com/viewsolution/10792318

1 Like

hi, check this input.

9

101010101

1 3 4 8 9 11 15 21 30

output should be 10

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.

1 Like

check this input:

5

10001

1 6 10 13 14

output should be 8 (one wire from coordinate 6 to coordinate 14)