Блог пользователя vrintle

Автор vrintle, история, 5 лет назад, По-английски

Hello everyone!

Here is the link to the problem: https://codeforces.me/contest/1504/problem/B

In the 5th test case, $$$A$$$ can be converted to $$$B$$$ as:

000111 -> [000111] -> 111000
111000 -> 11[10]00 -> 110100

As, both the prefix contains equal $$$1$$$ and $$$0$$$, so I think this is correct. But, the answer says, it is impossible to convert $$$A$$$ to $$$B$$$. Why?

  • Проголосовать: нравится
  • -22
  • Проголосовать: не нравится

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

read the question again

you can select any prefix of a with an equal number of 0 and 1 symbols