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

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

I found this problem on URI online judge. I am getting 30% WA when I set T=1 and TLE on all other cases. I am using Tries to solve it. Is there a different approach to solve this problem?

Problem Statement

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

»
7 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I have just sent a solution and got AC after I'd got TLE because it seems that we souldn't deal with the test cases ourselves, and should just write a program for one test case.

So, thank you for sharing this problem, and here are some hints which may help:

Let len be the length of the given string s, and n be a positive integer number.

Hint1
Hint2
Hint3