My idea of removing segments is of course only correct if I process them in the input order, which may not work for the n log n + k algorithm (I don't know how it works).
hm... it's a sweepline algorithm where your event points are in increasing order along some line (like x-axis)... I can't ...
Search found 18 matches
- Mon Sep 26, 2005 7:29 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10902 - Pick-up Sticks
- Replies: 24
- Views: 17857
- Mon Sep 26, 2005 6:28 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10902 - Pick-up Sticks
- Replies: 24
- Views: 17857
Read it more carefully, the worst case is actually (n+k)log n (page 8 ) - there is also a reference to an algorithm that is k + n log n.
These are both *worse* in the worst case than n^2 (k is already in n^2), furthermore for this problem it seems that the algorithm needs to be chosen according to ...
These are both *worse* in the worst case than n^2 (k is already in n^2), furthermore for this problem it seems that the algorithm needs to be chosen according to ...
- Sun Sep 25, 2005 4:25 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10901 - Ferry Loading III
- Replies: 54
- Views: 32537
Re: 10901(Ferry Loading III) I am getting Wrong Answer
Please give me some Sample Input And Output For this Problem.
did you read the other thread?
try this input; cars can leave earlier even though they arrived later than other cars...
input:
1
3 5 7
0 left
1 left
2 left
3 left
5 left
5 right
11 right
output:
5
15
15
15
25
10
20
as a ...
did you read the other thread?
try this input; cars can leave earlier even though they arrived later than other cars...
input:
1
3 5 7
0 left
1 left
2 left
3 left
5 left
5 right
11 right
output:
5
15
15
15
25
10
20
as a ...
- Sat Sep 24, 2005 10:36 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10901 - Ferry Loading III
- Replies: 54
- Views: 32537
- Sat Sep 24, 2005 4:53 am
- Forum: Volume 109 (10900-10999)
- Topic: 10901 - Ferry Loading III
- Replies: 54
- Views: 32537
- Fri Sep 23, 2005 11:47 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10901 - Ferry Loading III
- Replies: 54
- Views: 32537
10901 - Ferry Loading III
According to the problem statement for Ferry Loading III:
The arrival times for each test case are strictly increasing.
for me "strictly increasing" means that each car arrives at a unique time. Obviously, that is not the case... Am i just reading this wrong or should the problem statement get ...
The arrival times for each test case are strictly increasing.
for me "strictly increasing" means that each car arrives at a unique time. Obviously, that is not the case... Am i just reading this wrong or should the problem statement get ...
- Mon Aug 08, 2005 11:58 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10891 - Game of Sum
- Replies: 33
- Views: 18563
- Mon Mar 07, 2005 11:48 am
- Forum: Volume 108 (10800-10899)
- Topic: 10802 - Lex Smallest Drive
- Replies: 36
- Views: 17971
- Mon Mar 07, 2005 8:44 am
- Forum: Volume 108 (10800-10899)
- Topic: 10802 - Lex Smallest Drive
- Replies: 36
- Views: 17971
- Thu Oct 21, 2004 8:40 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10745 - Dominant Strings
- Replies: 38
- Views: 23145
- Wed Oct 20, 2004 5:47 pm
- Forum: Volume 107 (10700-10799)
- Topic: 10745 - Dominant Strings
- Replies: 38
- Views: 23145
Re: Bah
P.S. for those that still do not understand the problem statement, here is a simplified version:
Given strings A and B. B dominates A if BOTH conditions below are satisfied:
- Every distinct character in A also appears in B
- Any character that appears multiple times in A must appear at least ...
- Thu Oct 07, 2004 6:51 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10142 - Australian Voting
- Replies: 82
- Views: 45636
- Sat Sep 04, 2004 2:44 pm
- Forum: Volume 106 (10600-10699)
- Topic: 10608 - Friends
- Replies: 75
- Views: 39149
- Wed Jul 23, 2003 9:25 am
- Forum: Volume 103 (10300-10399)
- Topic: 10397 - Connect the Campus
- Replies: 75
- Views: 38469
- Tue Jul 22, 2003 6:06 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10334 - Ray Through Glasses
- Replies: 19
- Views: 12716