Search found 67 matches

by Erik
Thu Sep 07, 2006 2:00 pm
Forum: Volume 105 (10500-10599)
Topic: 10505 - Montesco vs Capuleto
Replies: 73
Views: 37647

Hi,

my accepted program outputs

Code: Select all

2
4
6
2
0
Cu, Erik :)
by Erik
Thu Sep 07, 2006 7:44 am
Forum: Volume 6 (600-699)
Topic: 661 - Blowing Fuses
Replies: 67
Views: 20760

Hi, if(amp>l) max=amp; l=amp; I think you mixed something up there. You don't use max at all. Think it over. if(amp>=c) { printf("Sequence %ld\nFuse was blown.\n\n",s); break; } The fuse does not blow when the currect reaches c. It blows when the current goes beyond c. Secondly, according to the bre...
by Erik
Wed Sep 06, 2006 10:43 pm
Forum: Volume 110 (11000-11099)
Topic: 11063 - B2-Sequence
Replies: 73
Views: 40672

Hi,

I'm sorry - of course it's in the output, but it didn't survive to be copied here into the forum ;)

Cu, Erik :)
by Erik
Tue Sep 05, 2006 2:48 pm
Forum: Volume 102 (10200-10299)
Topic: 10245 - The Closest Pair Problem
Replies: 92
Views: 11989

Hi,

your output is correct.
Maybe you forgot about floating-point input values?

Cu, Erik :)
by Erik
Tue Sep 05, 2006 7:55 am
Forum: Bugs and suggestions
Topic: 10057 - Typo
Replies: 1
Views: 1183

10057 - Typo

Hi,

problem description says
All the numbers will be less that 65536.
Shouldn't it read "than"?

Cu, Erik :)
by Erik
Mon Sep 04, 2006 11:48 pm
Forum: Volume 110 (11000-11099)
Topic: 11063 - B2-Sequence
Replies: 73
Views: 40672

Hi, my AC program outputs: Case #1: It is not a B2-Sequence. Case #2: It is not a B2-Sequence. Case #3: It is not a B2-Sequence. Case #4: It is not a B2-Sequence. Case #5: It is a B2-Sequence. Case #6: It is not a B2-Sequence. Case #7: It is not a B2-Sequence. Case #8: It is not a B2-Sequence. Case ...
by Erik
Mon Sep 04, 2006 11:41 pm
Forum: Bugs and suggestions
Topic: 731 - Wrong Pascal Output
Replies: 1
Views: 1595

731 - Wrong Pascal Output

Hi, the problem description says The output is to be formatted as two columns with the values of x and y(x) printed as in the C printf or the Pascal writeln. printf("%6.2f %16.12f\n", x, psix ) writeln(x:6:2, psix:16:2) But the formatting :16:2 in pascal means a width of 16, but only two digits afte...
by Erik
Mon Sep 04, 2006 8:11 am
Forum: Volume 7 (700-799)
Topic: 728 - Scatter Point Plot
Replies: 10
Views: 4837

Thanks, the points out of range tricked me.
Now I got AC.
by Erik
Sun Sep 03, 2006 9:05 pm
Forum: Algorithms
Topic: algorithm to determine that polygon is star-shaped
Replies: 7
Views: 2797

Hi, So - can there be cases when this proposal doesn't work? This depends on what you want to do. Of course you can check this way if the polygon is either convex or concave. But you were asking to determine if it is star-shaped. And a star may sure be concave. As Cosmin.ro said, it's all about half...
by Erik
Sat Sep 02, 2006 9:17 pm
Forum: Volume 7 (700-799)
Topic: 723 - Comment Removal
Replies: 16
Views: 10177

Hi, I tried all testcases in this topic and my program produced correct output. After many tests I discovered that my program finds a string-constant in the input which is not terminated at the end of the line. Could anyone verify this? Of course it should not happen as it is invalid pascal. Hence I...
by Erik
Thu Aug 31, 2006 5:48 pm
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7735

:oops:
After many hours of testing I finally realized that I messed up the I/O.
On my machine I work with files for acm and hence use conditional compilation. I messed that up so it worked for me but not the judge.
:oops:
by Erik
Thu Aug 31, 2006 5:11 pm
Forum: Bugs and suggestions
Topic: 10002: Wrong Input
Replies: 1
Views: 1279

10002: Wrong Input

Hi, in the forum for Volume C are many topics for 10002 pointing out that in contrast to the task description, there are instances with at least three points colinear in the input. I tried myself and indeed there are. That's very bad as the description says No three points are aligned in any polygon...
by Erik
Tue Aug 29, 2006 5:11 pm
Forum: Algorithms
Topic: Smallest period
Replies: 1
Views: 1291

Hi, first of all your algorithm is in o(n^2), as check is in o(n). You should have stringlen/len loops and each strcmp needs o(len), hence check is o(stringlen). I solved this one using KMP running in o(n) in total. Basically you calculate iteratively the longest real prefix of the string which is a...
by Erik
Tue Aug 29, 2006 4:29 pm
Forum: Volume 1 (100-199)
Topic: 138 - Street Numbers
Replies: 93
Views: 7735

138: WA

Hi,

I got the solution for problem 138 and I'm sure it is right.
That's as all outputs obey the desired property and they correspond with the outputs given on other threads.

Could anyone who solved this problem please check my solution? I could send it as private message.

Cu, Erik :)
by Erik
Wed Aug 23, 2006 12:41 pm
Forum: Volume 110 (11000-11099)
Topic: 11060 - Beverages
Replies: 96
Views: 33565

Hi,
In the case there is no relation between two beverages Dilbert should start drinking the one that appears first in the input.
Cu, Erik :D

Go to advanced search