Блог пользователя A.K.Goharshady

Автор A.K.Goharshady, 14 лет назад, По-английски
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

Разбор задач Codeforces Beta Round 57 (Div. 2)
  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится

14 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
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?
14 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится
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 :(