Search found 52 matches

by liulike
Mon Nov 20, 2006 10:39 am
Forum: Volume 120 (12000-12099)
Topic: 12096 - The SetStack Computer
Replies: 8
Views: 4451

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!
by liulike
Mon Oct 30, 2006 6:44 pm
Forum: Volume 111 (11100-11199)
Topic: 11144 - S.O.S.
Replies: 13
Views: 4960

shanto86 wrote:well i used 1e-6 instead of 1e-8. i think it will work for 1e-8 as well... but as A and B both may contain at most .5 so it does not matter!
Thank you very much!
It is not the precision problem:(
Just my stupid error in computation for the area of polygon.
by liulike
Sat Oct 28, 2006 3:53 pm
Forum: Volume 111 (11100-11199)
Topic: 11144 - S.O.S.
Replies: 13
Views: 4960

Thanks:)

So where did you use 1e-8 which the problem statement mentioned? Only to compare the distance with 30?
by liulike
Sat Oct 28, 2006 6:53 am
Forum: Volume 111 (11100-11199)
Topic: 11144 - S.O.S.
Replies: 13
Views: 4960

Thank you!
I have considered this case, but still WA :(
by liulike
Sat Oct 28, 2006 3:29 am
Forum: Volume 111 (11100-11199)
Topic: 11144 - S.O.S.
Replies: 13
Views: 4960

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...
by liulike
Fri Oct 27, 2006 5:24 pm
Forum: Volume 111 (11100-11199)
Topic: 11144 - S.O.S.
Replies: 13
Views: 4960

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
by liulike
Fri Oct 27, 2006 3:04 pm
Forum: Volume 111 (11100-11199)
Topic: 11129 - An antiarithmetic permutation
Replies: 21
Views: 15783

Cool.. let n=13, first consider 2 0. now, you've 2 insert 4 and (4,2,0) forms an arithmetic progression. so, insert 4 in the middle of (2,0) so the sequence will be : 2 4 0. then, it's 6. two arithmetic progression with 6 are (2,4,6) && (0,3,6). since i put all odd numbers right of 0 and there cant ...
by liulike
Fri Oct 27, 2006 3:03 pm
Forum: Volume 111 (11100-11199)
Topic: 11144 - S.O.S.
Replies: 13
Views: 4960

11144 - S.O.S.

Is there any trick input for this problem? thx:)
by liulike
Fri Oct 27, 2006 5:37 am
Forum: Volume 111 (11100-11199)
Topic: 11129 - An antiarithmetic permutation
Replies: 21
Views: 15783

to sunny:

What the relationship between pi, pj and pk. Could you give out some detailed explanation about your algorithm?

Thanks :D
by liulike
Thu Oct 26, 2006 9:28 am
Forum: Volume 111 (11100-11199)
Topic: 11129 - An antiarithmetic permutation
Replies: 21
Views: 15783

How to solve it? thx!
by liulike
Thu Oct 26, 2006 9:26 am
Forum: Volume 111 (11100-11199)
Topic: 11129 - An antiarithmetic permutation
Replies: 21
Views: 15783

How to solve it? thx!
by liulike
Tue Oct 24, 2006 2:13 pm
Forum: Volume 111 (11100-11199)
Topic: 11134 - Fabled Rooks
Replies: 12
Views: 5940

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...
by liulike
Sat Sep 24, 2005 5:13 pm
Forum: Volume 109 (10900-10999)
Topic: 10913 - Walking on a Grid
Replies: 23
Views: 12378

ac now
Thank you :)
by liulike
Sat Sep 24, 2005 5:13 am
Forum: Volume 109 (10900-10999)
Topic: 10913 - Walking on a Grid
Replies: 23
Views: 12378

10913 - Walking on a Grid

dp? :o
by liulike
Mon Aug 08, 2005 5:08 am
Forum: Volume 108 (10800-10899)
Topic: 10887 - Concatenation of Languages
Replies: 49
Views: 18647

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

Go to advanced search