yamero's blog

By yamero, history, 2 months ago, In English

Hello I need some help regarding 1553B - Reverse String. At the third testcase in the given input output scenario, the string s is aab and string t is baaa.

If I put the chip at index 2 (on 'b') in string s and move it left twice and then once right, I can obtain the string t. Here is the process.

Put chip at index 2-> A A B

Move left -> A A B

Move left again -> A A B

Now move right -> A A B

This finally gives us BAAA. Unless I am missing something the output should be YES instead of NO. Can anyone help me sort this out? Thanks.

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

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The first operation is to go right and then go left .U can't change the order and go left first.

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    thank you, idk how i missed that part.

    • »
      »
      »
      2 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      many people did , it was announced during the contest actually for the same reason ig.