Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official. ×

A.K.Goharshady's blog

By A.K.Goharshady, 8 years ago, In English,
In this problem signs can be ignored in both initial and answer strings, so first we remove signs from initial strings. Then we make a list of the six possible concatenations of the 3 initial strings and convert all of them to lowercase.
For checking an answer string , we remove the signs , convert it to lowercase and check if it is just one of those 6 concatenations.

There were two really nice hack protocols , the first one is:
-------__________;
_____;
;;;;---------_
2
ab____
_______;;;

Here all concatenations become empty.

The second one was putting 0 as number of students :D

 
 
 
 
  • Vote: I like it  
  • +8
  • Vote: I do not like it  

8 years ago, # |
  Vote: I like it 0 Vote: I do not like it
i have written correct code.did the same as you have explained...but for test case 6 my code give wrong answer.
i dont know how to check my code for this test case.
can you please tell me how can i see these test cases?
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it
Thanks guys,
i got my mistake. i wasn't sorting the 3 strings i put in vector. so next_permutation wasn't creating all combinations.
missed this point :(