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.

blog link

1 Like

My approach to question CodeChef: Practical coding for everyone
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 CodeChef: Practical coding for everyone
I got the best submission for this question :stuck_out_tongue:

6 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)

Solution : https://www.codechef.com/viewsolution/10721936

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
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

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

Can someone help me figure out why my solution isn’t being accepted, I’ve tried alot of test cases. CodeChef: Practical coding for everyone.

1 Like

A O(n) solution to CHEFTET : CodeChef: Practical coding for everyone

1 Like

Can someone please post the approach to solve CHEF and ELECTRICITY?

1 Like

Can you help me find the problem with my code for Chef and Electricity: CodeChef: Practical coding for everyone .
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.

@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

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, check this input.

9

101010101

1 3 4 8 9 11 15 21 30

output should be 10

your program gives 4.

check this input:

5

10001

1 6 10 13 14

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

your program gives 9.