Facing problem in september long challenge

My code according to me is correct. I am getting correct answer for all test cases i could try with but still codechef is not accepting it. Is posting a link of my problem in forum allowed? I am participating in a challenge for the first time so maybe my logic is correct but i am wrong somewhere else.

Your code is almost correct, you missed some case…

Try to generate more tests with hands and paper. Maybe you misread the statement, so read it more carefully.

P.S. Don’t publish your solution in forum.

I’ve read the statement a 100 times and i tried thousands of test cases. I am getting the correct answer every time . Please suggest something. It’s been like 7-8 hours that i’ve been trying.

Are you stuck with CHEFADV?!

Try to write the solution once again from scratch, and think about every variable.

nopes,its magichf

Posting a link of your problem in any public location is not allowed. Especially not in this forum. See the “Rules and Regulations” for the competition and the code of conduct (look for “ongoing contest”).

You should be able to see whether other people have successfully solved the problem, which may give you some assurance of what is possible.

I am stuck in the CHEFADV problem

Cant think of all the possible cases.

Can X and Y be 1 1?

Can we avoid any one of the actions??

You got AC :slight_smile:

Hmmmm. Theres a rumor for a very deadly and strict mod who often wanders around the forums. Be careful he doesnt catch you two :wink:

2 Likes

The limits are given in the problem. N,M,X,Y can each be as small as 1, and as large as 10^9. It seems clear to me that none of the possible actions (problem/push-up/install) are compulsory - you can choose to do them zero times.

I’ve done it!!! Thanks for your help. There was one test case that i was ignoring.

If you want to thank us, then go and solve all the 8 problems in this long challenge!!

@mgch Can you please explain why 2 2 1 2 is being treated as chefirnemo in problem chef and adventures?

@joffan but how can knowledge/power =0? We have initialized them to one and i don’t think that we can decrease the knowledge/power?

I agree that the problem statement only gives methods of increasing knowledge and power. Since the starting value of both is 1, neither can ever be zero.

Am I in some system where only odd words of my remarks are visible, and you have to guess what the other words joining them together are? I suggest you slowly and carefully re-read what I said previously.

//