Search found 49 matches

by horape
Sun Feb 08, 2004 6:41 pm
Forum: Volume 103 (10300-10399)
Topic: 10304 - Optimal Binary Search Tree
Replies: 24
Views: 12665

Re: Limit of running time - 10304

Recently the running time on almost all the problems is 10s. When I solve problem 10304, I found out that some people got AC though their programs ran over 10s. I'm so confused that why they didn't get TLE when their programs got rejudged? It seems that when they change the time limit, there is no ...
by horape
Sun Feb 08, 2004 3:06 pm
Forum: Volume 100 (10000-10099)
Topic: 10005 - Packing polygons
Replies: 49
Views: 15608

Horape I dont get what do you mean by "test". I also went through all the pairs, and for each pair I found the MINIMUM ANGLE from a 3rd point to the line segment. I needed minimum angles for two cases separately : for "above" the line segment and for "below". Did you do smth like this? I guess my G...
by horape
Sun Feb 08, 2004 5:11 am
Forum: Volume 6 (600-699)
Topic: 615 - Is It A Tree?
Replies: 71
Views: 23947

Re: 615 what's the tricky input

New(User) wrote:?
Nice post :-)

Try:

Code: Select all

1 1
0 0

1 2
1 2
0 0

1 2
2 1
0 0

1 2
3 4
4 3
0 0

-1 -1
Saludos,
HoraPe
by horape
Sun Feb 08, 2004 2:23 am
Forum: Volume 100 (10000-10099)
Topic: 10005 - Packing polygons
Replies: 49
Views: 15608

Re: 10005 (Packing Polygons) VERY fast solutions

The thing is - My solution is N^3. I am #326 of 331 in the promlems list with 1.68s. So please, enlighten my butt, tell me about how to solve it fast. P.S. I d really appreciate that. My solution is O(N^3) too, and runs on 0.004 seconds. For each pair of points i calc the circle of radius R that ha...
by horape
Sun Feb 08, 2004 2:11 am
Forum: Volume 100 (10000-10099)
Topic: 10018 - Reverse and Add
Replies: 169
Views: 20394

Re: 10018 - How to reverse an int?

OutCaster wrote:Hey guys

what's the basic algorithm to reverse and int in Java?

Thanks
Something like:

Code: Select all

while (N) {
  R = R*10+N%10;
  N /= 10;
  }
should work.

Saludos,
HoraPe
by horape
Thu Feb 05, 2004 1:33 pm
Forum: Volume 3 (300-399)
Topic: 323 - Jury Compromise
Replies: 10
Views: 3651

Didn't read your code, but check that the blank lines are as specified (between cases, no blank line at the end of the output) 323's special corrector doesn't handle PE correctly.

Saludos,
HoraPe
by horape
Tue Feb 03, 2004 6:38 am
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 14955

However, we all should post here English and only English! :-) Moreover, you are a member of Algorithmic Team... so you should give good examples :D Yes, english is to be preferred, and that's what my reply said, but it is corteous to answer in the same language that the question was done. If you l...
by horape
Tue Feb 03, 2004 5:29 am
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 14955

Dmytro Chernysh wrote:Was it Spanish? ;-) Or Espaniol :D
Yes. Espa
by horape
Tue Feb 03, 2004 2:06 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 37159

tlucz wrote:I found, why my program gave WA. That was a long line in my program:

My mail klient wrap this line.

...

So, you must watch on too long lines.
Or use other mail client. Submitting with the web form is even better.

Saludos,
HoraPe
by horape
Mon Feb 02, 2004 2:26 pm
Forum: Volume 106 (10600-10699)
Topic: 10622 - Perfect P-th Powers
Replies: 47
Views: 24371

Re: (Something...) Powers. From Waterloo contest.

Funny, but I was having problems with that task. Please help me with this: 1. Is magnitude of x the same as |x|? 2. I guess I could use some good tests to find where my program lies to me. We needed 18 tries to get it working (yes, i'm a bit trigger happy when i get angry :D ) 1. Yes. 2147483647 32...
by horape
Mon Feb 02, 2004 7:03 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 37159

horape wrote: BFS can revisit a node even with no cycles.
BFS won't revisit nodes only if graph is a tree.

An undirected graph has no cycles iff it is a tree, maybe your mistake comes from that.

A directed graph can have no cycles and not be a tree.

Saludos,
HoraPe
by horape
Mon Feb 02, 2004 7:00 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 37159

The following code wrong answers on 10000: ... This code times out, and the only thing that is changed is that this code has no checking for revisiting nodes. ... [/cpp] So either the sample data has cycles or I'm missing something obvious :) Didn't mean to cause a panic. Data has no cycles. BFS ca...
by horape
Mon Feb 02, 2004 6:56 am
Forum: Volume 105 (10500-10599)
Topic: 10583 - Ubiquitous Religions
Replies: 33
Views: 14955

Re: 10583

El idioma de este foro es ingles, por favor trata de usarlo. No entiendo por que es WA, creo que el problemas se resuelve de este modo: ... Prueba con: 20 20 12 4 6 11 17 7 10 7 7 17 10 16 14 16 19 15 10 13 9 17 18 2 10 12 8 18 9 19 9 15 17 8 5 15 12 17 19 11 4 3 0 0 El resultado correcto es 3, tu p...
by horape
Fri Jan 30, 2004 4:47 pm
Forum: Volume 106 (10600-10699)
Topic: 10612 - Paper Folding
Replies: 1
Views: 1341

Re: 10612 - Paper folding

horape wrote:(b's don't alter X coordinate)
My bad, b's do alter X coordinate.

Saludos,
HoraPe
by horape
Thu Jan 29, 2004 8:40 pm
Forum: Volume 6 (600-699)
Topic: 612 - DNA Sorting
Replies: 122
Views: 16952

I had asked Carlos and he told me the rejudgement was wrong, please wait, it'll be rejudged again soon.

Saludos,
HoraPe

Go to advanced search