PROBLEM: CodeChef: Practical coding for everyone
This is my AC soln
CodeChef: Practical coding for everyone
I tried solving this problem using one loop and getting WA in last test
CodeChef: Practical coding for everyone
Can someone tell me the mistake in my second soln?
Try this
4 0 4 0
working fine
Try this
4 4 4 4
0 0 0 0
0 4 4 0
1 3 3 1
4 0 0 4
working fine
Look for last test case to pass,
sum=(nx)+(my).
You have to check only sum%2==0.
Just put this condition and check your last test case will show AC
Try test case-
1 0 0 0
Your solution fails for this tc
1 Like
Thanx bro…I totally forgot that case …
Yes I now it, but if you check sum%2==0 your last test case will pass,
https://www.codechef.com/viewsolution/30734939
For this test case
0 1 0 0
Answer is no
This code prints yes
https://www.codechef.com/viewsolution/30749542