acwatle037's blog

By acwatle037, history, 5 weeks ago, In English

Hello there!! In today's contest there is one question and I submitted my solution but it is not working correctly and I am not able to figure out why it is not working. I am not able to see the test case in jury verdict also because of the seen limit on the cases. So please can anyone help me to figure out why this is not working as I already spent more than 3 hrs on this. Thank You

My solution link: http://codeforces.com/contest/1512/submission/112575208

 
 
 
 
  • Vote: I like it
  • -7
  • Vote: I do not like it

»
5 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I think you should first cover all "one question mark" cases and then check all "two question marks" cases. Otherwise you might end up giving away too many 0s whereas you might have needed them later on in some "one question mark" case and you won't have any left.

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Do the 2 question mark case after you complete assigning middle element of an odd length string

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Try this

8 3

????0??0?00

ans: 00100100100