i am seeing that now, today was not a good day i guess :(. thankyou for your help.
AC
1
4
0 0 0 1
Your code gives wrong answer for this
1
7
1 0 1 0 0 0 1
Your code gives wrong answer for this case
OMG thank you!!
Doesn’t the constraints say A1 = An = 1 though?
You are correct. I am sorry I ignored the constraint, although my code managed that.
You can try
1
5
1 0 1 0 1
I am guessing this part of your code caused the error
if(zerocount == 2)
{
if(n%2 == 0)
cout << “No\n”;
else
cout << “Yes\n”;
}
what does “games” mean in prerequisite ?
I want to know time complexity of my code. I used two loop and solution should be in O(N).
Here is my code solution
Yeah you can check my solution i just implemented everything and it was 100pts
O(NlogN) as U have used sort() function…
Cool, I thought that I’d get TLE so I didn’t try. That was stupid.
Yeah , that makes sense. Thanks again
Thanks, I am thinking about inner while loop. Is it less then logn?
Somebody please help ! Idk whats wrong with the code… the logic though is perfect.
https://www.codechef.com/viewsolution/37291601
Thank You so much Bro
Your code is wrong for n=1… Please check at input
1
1
0
Here answer is yes but yours gives No…
Values of m and m2 remains same while m should be 1…correct it
How?
It will print " no".
Nice Editorial.
If possible provide the editorials of the rest of the questions
Same here
my 1st test case of second subtask is failing .can someone help?
https://www.codechef.com/viewsolution/37268217
can anyone suggest me for which test cases the answer is wrong.