wh1te_whale's blog

By wh1te_whale, history, 7 years ago, In English

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

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

»
7 years ago, # |
  Vote: I like it +1 Vote: I do not like it

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