I think this is a simple adhoc problem.....
but i got TLE in the contest :(
can any one give me any clue.....
thanx for advance.
For solve this problem, i'm used Suffix Tree to find words, for example 'a abba a c a' = 1 2 1 3 1, and with this I know the max number of different words = 3 in ...
Search found 43 matches
- Wed Oct 20, 2010 9:19 pm
- Forum: Volume 118 (11800-11899)
- Topic: 11860 - Document Analyzer
- Replies: 15
- Views: 7005
- Mon Oct 01, 2007 6:42 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11297 - Census
- Replies: 24
- Views: 28865
- Mon Oct 01, 2007 2:23 am
- Forum: Volume 112 (11200-11299)
- Topic: 11297 - Census
- Replies: 24
- Views: 28865
Re: 11297 - Census
From the problem statement:
In the first line you will find N (0 <= N <= 500)
But in the first line of sample input I see 5 5
Assuming that the problem desription is good I've got RTE for my program. It indicates that the description is wrong. It's really confusing, what is the second number ...
In the first line you will find N (0 <= N <= 500)
But in the first line of sample input I see 5 5
Assuming that the problem desription is good I've got RTE for my program. It indicates that the description is wrong. It's really confusing, what is the second number ...
- Sat Feb 24, 2007 10:18 am
- Forum: Volume 111 (11100-11199)
- Topic: 11165 - Galactic Travel
- Replies: 6
- Views: 3434
- Sat Feb 24, 2007 9:52 am
- Forum: Volume 111 (11100-11199)
- Topic: 11165 - Galactic Travel
- Replies: 6
- Views: 3434
11165 - Galactic Travel
any hint ?? I don't understand , How to solve it
?

- Tue Feb 20, 2007 6:25 am
- Forum: Volume 105 (10500-10599)
- Topic: 10559 - Blocks
- Replies: 37
- Views: 17124
- Thu Feb 15, 2007 1:06 am
- Forum: Volume 111 (11100-11199)
- Topic: 11149 - Power of Matrix
- Replies: 42
- Views: 25892
- Wed Feb 14, 2007 7:44 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11087 - Divisibility Testing
- Replies: 36
- Views: 21973
- Mon Jan 01, 2007 8:11 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10559 - Blocks
- Replies: 37
- Views: 17124
Re: More I/O's
My Accepted Output is :
Case 1: 4957
Case 2: 2
Case 3: 5
Case 4: 18
Case 5: 48400
Case 6: 10
Case 7: 22
Case 8: 29
Case 9: 1
Case 10: 258
Case 11: 16
Case 12: 18
More Input:
20
200
2 5 1 1 1 5 3 5 1 7 5 7 2 1 5 4 7 7 3 1 2 1 1 3 7 3 4 4 3 1 7 5 2 6 5 2 5 1 2 5 2 6 5 2 1 2 1 7 6 4 5 3 5 1 6 ...
Case 1: 4957
Case 2: 2
Case 3: 5
Case 4: 18
Case 5: 48400
Case 6: 10
Case 7: 22
Case 8: 29
Case 9: 1
Case 10: 258
Case 11: 16
Case 12: 18
More Input:
20
200
2 5 1 1 1 5 3 5 1 7 5 7 2 1 5 4 7 7 3 1 2 1 1 3 7 3 4 4 3 1 7 5 2 6 5 2 5 1 2 5 2 6 5 2 1 2 1 7 6 4 5 3 5 1 6 ...
- Mon Sep 11, 2006 6:53 am
- Forum: Volume 105 (10500-10599)
- Topic: 10559 - Blocks
- Replies: 37
- Views: 17124
Re: 10559
Try This:
1
165
1 2 3 2 1 1 5 1 1 1 1 10 1 4 4 41 4 4 1 43 4 4 4 41 4 4 42 4 4 1 13 1 1 1 2 3 2 1 11 1 1 1 1 1 19 1 4 4 41 4 4 1 4 34 4 4 24 4 4 4 4 4 11 1 1 1 1 21 3 2 1 12 1 1 1 1 15 1 1 44 4 4 4 4 1 4 41 4 4 14 4 4 4 4 4 12 1 1 1 1 20 3 2 1 1 1 1 1 1 1 1 1 4 4 4 4 4 1 4 4 4 4 4 4 4 4 4 4 1 1 1 ...
1
165
1 2 3 2 1 1 5 1 1 1 1 10 1 4 4 41 4 4 1 43 4 4 4 41 4 4 42 4 4 1 13 1 1 1 2 3 2 1 11 1 1 1 1 1 19 1 4 4 41 4 4 1 4 34 4 4 24 4 4 4 4 4 11 1 1 1 1 21 3 2 1 12 1 1 1 1 15 1 1 44 4 4 4 4 1 4 41 4 4 14 4 4 4 4 4 12 1 1 1 1 20 3 2 1 1 1 1 1 1 1 1 1 4 4 4 4 4 1 4 4 4 4 4 4 4 4 4 4 1 1 1 ...
- Sat Aug 12, 2006 2:58 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11070 - The Good Old Times
- Replies: 42
- Views: 21177
Re: 11079 : The Good Old Times
input:
100
-10+2+2
Correct output
100.000
-6.000
your output is
0.000
4.000
100
-10+2+2
Correct output
100.000
-6.000
your output is
0.000
4.000
- Wed Aug 02, 2006 8:30 am
- Forum: Volume 102 (10200-10299)
- Topic: 10248 - The Integer All-time Champ
- Replies: 11
- Views: 9667
INPUT
My AC Output
Code: Select all
11 11
11 12
21 31
Code: Select all
11
112
22123024252627282931
- Sun Jul 16, 2006 2:34 am
- Forum: Volume 1 (100-199)
- Topic: 173 - Network Wars
- Replies: 29
- Views: 6177
- Mon Jun 05, 2006 7:36 am
- Forum: Volume 110 (11000-11099)
- Topic: 11047 - The Scrooge Co Problem
- Replies: 31
- Views: 19675
- Wed Mar 22, 2006 2:23 am
- Forum: Volume 105 (10500-10599)
- Topic: 10595 - Knight on the Bee Board
- Replies: 17
- Views: 13374
Directions =D
Code: Select all
int dx[13] = {-1, +1, 2, 3, 3, +2, -1, 1, -3, -2, -2, -3 };
int dy[13] = {-2, -3, -3, -2, -1, 1, 3, 2, 2, 3, -1, +1 };