CHECHOC - Editorial

Missed the base case (all the time ):slight_smile: .

16 Likes

1*1 case costed me 100 points.

37 Likes

guys i have tried explaining but went really fast, so first read the question and then watch(if you still dont get it) (0.00 sec solution)
English Explanation
Hindi Explaination

10 Likes

best explanation

1 Like

I am getting correct outputs during dry run but shows WA when I submit it. Can you please tell me what’s wrong.
https://www.codechef.com/viewsolution/36019737

This submission gets ac : CodeChef: Practical coding for everyone
But This doesnt get ac: CodeChef: Practical coding for everyone

The question clearly says sum cant be greater than y, Then how is the second one not ac

The minimum of x and y should have gotten ac, if(x>y) then answer is y or else x, But Second link gives WA
pls correct me if i am wrong

2 Likes

yeah same with me. In luchtime also just because of a base case my solution wasn’t accepted. :frowning:

2 Likes

Can anyone tell me what’s wrong with my solution?
https://www.codechef.com/viewsolution/36018600

Can anyone give me a counter example for this submission?

Can anyone help with my code?
https://www.codechef.com/viewsolution/35986525

Is there a way we can see the test case used during the contest? This problem gave me a hard time, haha.

2 Likes

When n==m==1 then answer is always x, you should use all you can because it has no adjacent pairs

14 Likes

Please tell me what’s wrong in my code?
https://www.codechef.com/viewsolution/36012029

Why does a brute-force like this fail? i think all cases are covered.
Link

The problem except the base case(n=1)?
https://www.codechef.com/viewsolution/35986231

nice editorials

1 Like

@tengiz05, you just made me realize why my code wasn’t working. :frowning: I was outputting the minimum of (y, x) for n == m == 1.

3 Likes

Sorry it can’t be make public I guess.

Very noice editorial

1 Like

3 3 20 19

1 Like