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

Автор raihatneloy, 12 лет назад, По-английски

This Solution got AC, but it gave wrong output for the input below:

3 1
a
b
c
aaaaa

The program gave output: YES but I think the output should be: NO

Am I right? If I'm, then the data set may b too weak! :(

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

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

Well, it seems you're right. According to your code strings like 'aaa..a' have hash equels 0. So, HASH("baaaa") == HASH("b") and so on.

Unfortunatly, testset doesn't cover this case.