I can confirm this. Dont bother with KMP, suffix tree or whatsoever.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.
Search found 95 matches
- Sun Apr 19, 2009 5:35 am
- Forum: Volume 106 (10600-10699)
- Topic: 10679 - I Love Strings!!
- Replies: 101
- Views: 51061
Re: 10679 - I love Strings!!!
- Sat Dec 29, 2007 1:39 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10905 - Children's Game
- Replies: 66
- Views: 27246
- Tue Dec 25, 2007 8:14 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10226 - Hardwood Species
- Replies: 121
- Views: 41729
With the new judge server, I tried my old code (<30 lines) and it gets accepted in 2.2s. So it is possible to use STL map to get AC now, using the way described by Larry (3 years ago). Remember to use gets to read input, using cin will cause TLE. It feels so good to solve a problem after 3.5 years! ...
- Sun Jul 29, 2007 6:35 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11247 - Income Tax
- Replies: 50
- Views: 22055
- Wed May 02, 2007 4:00 am
- Forum: Volume 9 (900-999)
- Topic: 993 - Product of digits
- Replies: 19
- Views: 12925
- Sun Mar 04, 2007 8:08 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11189 - A Simple Pendulum
- Replies: 7
- Views: 2869
11189 - A Simple Pendulum
Can anybody offer some hint?
- Wed Jan 10, 2007 5:35 am
- Forum: Volume 102 (10200-10299)
- Topic: 10226 - Hardwood Species
- Replies: 121
- Views: 41729
- Tue Jan 09, 2007 2:45 pm
- Forum: Volume 1 (100-199)
- Topic: 109 - SCUD Busters
- Replies: 96
- Views: 27198
There is only 1 test case in this problem. 10 400 30 410 30 420 30 430 30 430 40 430 50 430 60 400 50 425 34 428 40 20 38 26 24 23 31 15 25 3 2 11 35 28 46 48 30 32 7 47 44 41 9 17 32 34 1 23 7 38 28 39 14 3 26 16 31 38 41 7 18 6 42 373 391 398 243 399 205 372 296 377 254 377 382 395 214 379 186 375...
- Thu Jan 04, 2007 12:30 am
- Forum: Bugs and suggestions
- Topic: Author Statictic
- Replies: 54
- Views: 14980
- Tue Jan 02, 2007 8:57 am
- Forum: Volume 111 (11100-11199)
- Topic: 11149 - Power of Matrix
- Replies: 42
- Views: 20848
- Sat Nov 04, 2006 11:38 pm
- Forum: Volume 3 (300-399)
- Topic: 332 - Rational Numbers from Repeating Fractions
- Replies: 83
- Views: 22515
Hmm. Well my version of gcc compiles and runs atof() with doubles, but produces some weird results if I don't include <stdlib.h>. If I do, everything is ok. But maybe some C-guru (mf, krzysztof, misof) can explain that. On my computer it works well without including cstdlib, but I'm getting WA on t...
- Sat Nov 04, 2006 8:20 pm
- Forum: Volume 5 (500-599)
- Topic: 574 - Sum It Up
- Replies: 46
- Views: 15503
- Sat Nov 04, 2006 4:53 am
- Forum: Volume 2 (200-299)
- Topic: 271 - Simply Syntax
- Replies: 46
- Views: 13597
To all people who are getting TLE, there is an algorithm posted on Methods to Solve website. It takes 0.5s to run.
http://www.comp.nus.edu.sg/~stevenha/pr ... y%20Syntax
http://www.comp.nus.edu.sg/~stevenha/pr ... y%20Syntax
- Fri Nov 03, 2006 5:33 am
- Forum: Volume 108 (10800-10899)
- Topic: 10880 - Colin and Ryan
- Replies: 45
- Views: 29173
- Fri Nov 03, 2006 4:34 am
- Forum: Volume 111 (11100-11199)
- Topic: 11105 - Semi-prime H-numbers
- Replies: 16
- Views: 12564