
http://uva.onlinejudge.org/index.php?op ... tegory=298
The prefix of one string is also the substring of one string. It is reasonable that we need to check all the prefixes.ptargino wrote:The test cases of this problems are wrong. Actually, you just need to verify if each substring is prefix of the original. I've done this way and got AC.
Code: Select all
14
6
26
61
12
Code: Select all
Cut.
Numbers are okay.camara wrote:Output:
15
Impossible
15
Impossible
1500