Search found 20 matches

by sluga
Thu Sep 21, 2006 11:20 am
Forum: Volume 110 (11000-11099)
Topic: 11081 - Strings
Replies: 35
Views: 19041

For those who keep on getting TLE... I just reallized that my algorithm ( which was also O( 2 * n^3 ) ) kept on getting TLE just beacuse I used C++ strings. I usually scanf into a buffer and than write something like: string s = buff; In my code, I only used the [] operator and it was TLE. Then, ins...
by sluga
Tue Sep 05, 2006 1:02 am
Forum: Volume 110 (11000-11099)
Topic: 11066 - Aragorn
Replies: 7
Views: 2842

The last input is not legal because it is unsorted, so the output is also wrong. When you sort it, the correct output is 5.40

In the third input from the end, the clouds start at (1, 7), but they should always start at (0, y) and mountains are longer than clouds, so this is also an illegal input.
by sluga
Fri Aug 25, 2006 12:44 pm
Forum: Volume 110 (11000-11099)
Topic: 11065 - A Gentlemen's Agreement
Replies: 19
Views: 8513

Could someone write here the 6 intersection sets in the last example in the sample input? I only find 2 of them, no matter what I do ( I even searched for sets using O( 2^n ) algorithm ). Those I find are: 0 3 4 7 1 2 5 6 ( edit ) I realize my mistake now... I thought the first number was the number...
by sluga
Mon Aug 07, 2006 12:55 am
Forum: Volume 110 (11000-11099)
Topic: 11060 - Beverages
Replies: 96
Views: 31040

I had the same output when i did topological sort. This is the key sentence: In the case there is no relation between two beverages Dilbert should start drinking the one that appears first in the input. It means that because juice is the first drink in the input that isn't preceeded by some other dr...
by sluga
Sun Aug 06, 2006 11:21 pm
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10358

got ACC, thanks
by sluga
Sun Aug 06, 2006 11:07 pm
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10358

It seems my code has a bug somewhere... I was affraid it was precision error, but this is much easier to solve :)

One more question: does the opponent always use maximum allowed number of soldiers?
by sluga
Sun Aug 06, 2006 10:56 pm
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10358

Thank you very much!
by sluga
Sun Aug 06, 2006 10:52 pm
Forum: Volume 110 (11000-11099)
Topic: 11061 - Playing War
Replies: 41
Views: 10358

Could someone give me your outputs for these inputs?

5
10
20
50
100
150
200
250
300
450
500
750
789
901
945
1000
0
by sluga
Tue May 16, 2006 7:13 pm
Forum: Volume 105 (10500-10599)
Topic: 10574 - Counting Rectangles
Replies: 23
Views: 9064

Does the judge use -O2 option when compiling c++ code?
My code runs signifantly slower when compiled without -O2
by sluga
Tue May 16, 2006 10:07 am
Forum: Volume 105 (10500-10599)
Topic: 10574 - Counting Rectangles
Replies: 23
Views: 9064

I am also getting TLE, but my code runs in about 1.36 seconds for ten test cases where n = 5000 on my laptop. There are at most ten test cases, and at most 5000 points ( I've checked this ), so it should be ACC on the judge. I don't believe my laptop is 10 times faster than the judge server :) Here ...
by sluga
Fri Apr 07, 2006 1:43 pm
Forum: Volume 1 (100-199)
Topic: 190 - Circle Through Three Points
Replies: 126
Views: 18551

I didn't explicitly take care of printing +0.000 or -0.000, and got P.E.
I solved one problem here on ACM in which you have to judge some outputs. It stated that if al numerals are correct, but some letters are wrong, this is considered P.E. I believe this is the case here.
by sluga
Wed Apr 05, 2006 8:31 am
Forum: Off topic (General chit-chat)
Topic: How old are you? Statistics.
Replies: 121
Views: 174206

I am sixteen, well seventeen in three days :)
Started actualy submiting about a year ago.
I've solved 400+ problems so far

http://acm.uva.es/cgi-bin/OnlineJudge?AuthorInfo:45377
by sluga
Mon Mar 27, 2006 11:44 pm
Forum: Volume 6 (600-699)
Topic: 631 - Microzoft Calendar
Replies: 11
Views: 5956

631 Microzoft calendar - need some inputs/outputs!

I am trying to solve this problem, but I can't get ACC. I hate this kind of problems, but would really like to solve this one. (personaly, this is one of the most ugly problems I have ever seen) Please, post some inputs and clarifications ( if you can think of any ) because I am doing something wron...
by sluga
Wed Mar 22, 2006 1:07 am
Forum: Volume 6 (600-699)
Topic: 631 - Microzoft Calendar
Replies: 11
Views: 5956

Which years before doors are considered leap? Those like 4bd or those like 5bd? I am asking because for example, 5bd is 8 years before 4, which is a leap year.
by sluga
Mon Mar 20, 2006 10:06 am
Forum: Volume 6 (600-699)
Topic: 635 - Clock solitaire
Replies: 8
Views: 3645

Thanks! :)

Go to advanced search