Search found 52 matches
- Mon Nov 20, 2006 10:39 am
- Forum: Volume 120 (12000-12099)
- Topic: 12096 - The SetStack Computer
- Replies: 8
- Views: 5974
12096 - The SetStack Computer
(Although it hasn't been available) In the last contest, I got MLE again and again for it. I used a set and a fixed size stack to implemet it, and destructor to release the memory recursively. What's the trick for it? Is there better implement? Thank you!
- Mon Oct 30, 2006 6:44 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11144 - S.O.S.
- Replies: 13
- Views: 6117
- Sat Oct 28, 2006 3:53 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11144 - S.O.S.
- Replies: 13
- Views: 6117
- Sat Oct 28, 2006 6:53 am
- Forum: Volume 111 (11100-11199)
- Topic: 11144 - S.O.S.
- Replies: 13
- Views: 6117
- Sat Oct 28, 2006 3:29 am
- Forum: Volume 111 (11100-11199)
- Topic: 11144 - S.O.S.
- Replies: 13
- Views: 6117
Two buildings are neighbor if their minimum distance be less than 30 (meters). How to determine this mnimum distance between the polygons? We use Set_A to represent all the line segments of polygon A, and Set_B to represent all the line segments of polygon B, then the minimum distance between polyg...
- Fri Oct 27, 2006 5:24 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11144 - S.O.S.
- Replies: 13
- Views: 6117
What's the correct output for this:
Code: Select all
3
4
4 0 0 0 1 1 1 1 0
3 2 2 3 2 3 3
4 21 0 22 0 22 1 21 1
3 33 2 33 3 34 3
0
15
4
4 0 0 0 1 1 1 1 0
3 2 2 3 2 3 3
4 21 0 22 0 22 1 21 1
3 33 2 33 3 34 3
0
4
4
4 0 0 0 1 1 1 1 0
3 2 2 3 2 3 3
4 21 0 22 0 22 1 21 1
3 33 2 33 3 34 3
2
4
- Fri Oct 27, 2006 3:04 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11129 - An antiarithmetic permutation
- Replies: 21
- Views: 19868
- Fri Oct 27, 2006 3:03 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11144 - S.O.S.
- Replies: 13
- Views: 6117
11144 - S.O.S.
Is there any trick input for this problem? thx:)
- Fri Oct 27, 2006 5:37 am
- Forum: Volume 111 (11100-11199)
- Topic: 11129 - An antiarithmetic permutation
- Replies: 21
- Views: 19868
- Thu Oct 26, 2006 9:28 am
- Forum: Volume 111 (11100-11199)
- Topic: 11129 - An antiarithmetic permutation
- Replies: 21
- Views: 19868
- Thu Oct 26, 2006 9:26 am
- Forum: Volume 111 (11100-11199)
- Topic: 11129 - An antiarithmetic permutation
- Replies: 21
- Views: 19868
- Tue Oct 24, 2006 2:13 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11134 - Fabled Rooks
- Replies: 12
- Views: 6984
You can do it in O(NlogN). You can solve for the columns and rows independently, as you mentioned. For assigning the rooks to different columns, here is a hint, in the form of questions :) You can ignore 1 below, if you know an O(N^2) solution aleady. 1) Let x = how many rooks can be assigned to th...
- Sat Sep 24, 2005 5:13 pm
- Forum: Volume 109 (10900-10999)
- Topic: 10913 - Walking on a Grid
- Replies: 23
- Views: 14184
- Sat Sep 24, 2005 5:13 am
- Forum: Volume 109 (10900-10999)
- Topic: 10913 - Walking on a Grid
- Replies: 23
- Views: 14184
- Mon Aug 08, 2005 5:08 am
- Forum: Volume 108 (10800-10899)
- Topic: 10887 - Concatenation of Languages
- Replies: 49
- Views: 24325
My output is as follow:
Code: Select all
Case 1: 6
Case 2: 1
Case 3: 24
Case 4: 7
Case 5: 0
Case 6: 1
Case 7: 0