Search found 284 matches

by Stefan Pochmann
Tue Oct 22, 2002 2:49 am
Forum: C++
Topic: Bigint
Replies: 37
Views: 17138

I disagree. Why don't you like classes? They're a way to make your code cleaner, which can lead to code with less bugs and that you understand and finish faster. Plus, if you do it right (i.e. use a nice interface) they are perfect for ready-to-use-for-copy-and-paste.
by Stefan Pochmann
Thu Oct 17, 2002 7:18 pm
Forum: Volume 103 (10300-10399)
Topic: 10355 - Superman
Replies: 9
Views: 3332

I spoke to somebody from Waterloo (where the problem was used four years ago) and he said that they don't care about little errors like that, so that in their local contest we would've gotten our solutions accepted... Still, I'd like to know if anybody has written a program that calculates the examp...
by Stefan Pochmann
Wed Oct 16, 2002 4:01 pm
Forum: Volume 103 (10300-10399)
Topic: 10355 - Superman
Replies: 9
Views: 3332

10355 - Superman

Not yet in the problemset, but from the latest online contest: The Superman problem, where he jumps over buildings. For the second example, I get an angle of 67.08 instead of 67.07. Can anybody explain to me how to get to the 67.07? In particular, I'd be interested in seeing a solution that computes...
by Stefan Pochmann
Mon Oct 14, 2002 9:46 pm
Forum: Other words
Topic: Integral cast
Replies: 9
Views: 2867

Ok, so at least it's not part of a larger expression, so it's not a parentheses-problem. But the difference between sqrt and log is very important! sqrt will never return something negative, so I doubt that floor-or-not-floor makes a difference. But log can easily return negative numbers and then yo...
by Stefan Pochmann
Sat Oct 12, 2002 4:47 pm
Forum: Volume 8 (800-899)
Topic: 835 - Square of Primes
Replies: 22
Views: 11462

Don't they have dictionaries where you come from? ;-)

It means you show the smallest solution first, then the second smallest, ..., then the largest.

In this problem, two solutions are compared lexicographically line by line (if I remember correctly...).
by Stefan Pochmann
Sat Oct 12, 2002 4:43 pm
Forum: Other words
Topic: Integral cast
Replies: 9
Views: 2867

Dominik: I don't believe that those two give different values. Could we see the context, please? And do they still behave the same way when you put extra parentheses around the expressions? I.e. compare
((long int)sqrt(2.0))
and
((long int)floor(sqrt(2.0)))
by Stefan Pochmann
Sat Oct 12, 2002 4:37 pm
Forum: Other words
Topic: Past Contest Info "404 Not Found"
Replies: 2
Views: 1567

I just wanted to post this, too... is anybody working on it? What's wrong?
by Stefan Pochmann
Mon Oct 07, 2002 7:52 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 18749

You could use getc or getchar or something like that to read single characters. Or even fread to read large blocks. Or maybe read the numbers as strings. In all of these cases, you have to write your own code to transform the single digits to the whole numbers. Furthermore, try using int instead of ...
by Stefan Pochmann
Sun Oct 06, 2002 5:53 pm
Forum: Volume 103 (10300-10399)
Topic: 10370 - Above Average
Replies: 62
Views: 18749

How long do you need with your current program? I need 10 milliseconds, but I think that's only because I use the fairly slow cin of C++. Maybe try using scanf or write your own input function.
by Stefan Pochmann
Sat Oct 05, 2002 2:26 pm
Forum: Other words
Topic: General maximum time limit of 5 seconds for online contests
Replies: 9
Views: 1790

General maximum time limit of 5 seconds for online contests

In every online contest, the server is virtually dead. Dead, dead, dead! Mails get lost, the website takes forever to load. Why? Because there are always solutions that run forever, which usually means the full 30 seconds. And that's not the fault of the contestants, but of the problem setters. I de...
by Stefan Pochmann
Mon Aug 19, 2002 4:20 pm
Forum: Other words
Topic: creating an online bulletin board system
Replies: 14
Views: 5103

R.I.P. Perl

After learning PHP, I have to say: Use PHP, not Perl. - I like the language syntax/semantics itself much more than in Perl, especially when it comes to classes/objects and other types. - You can embed it in HTML (yes, I know there's embedded Perl, too, but PHP is really intended for this purpose). -...
by Stefan Pochmann
Wed Jul 17, 2002 7:13 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 11582

Ok, I see. Sorry then... That unnecessary extra c stuff confused me. Also, you said sth like "The following procedure computes ac mod n [...]". This is a partly wrong (It's no multiplication, but an exponentiation) and partly counter-intuitive (It computes (a^b)%n, not (a^c)%n) description. I know n...
by Stefan Pochmann
Sun Jul 14, 2002 4:50 pm
Forum: Volume 3 (300-399)
Topic: 374 - Big Mod
Replies: 79
Views: 11582

I doubt that this is from the book. There are way too many mistakes. For example, c is never really used, only to change its own value. That doesn't make sense.
by Stefan Pochmann
Sat Jul 13, 2002 5:48 pm
Forum: Other words
Topic: Thanks Everybody
Replies: 7
Views: 2906

What do you mean with "coefficient"? Moreover the check has been done after rounding to two decimal places. So diffrence 4.001 and 3.999 is same That specification should've definitely been in the problem statement. And is -3.005 rounded to -3.00 or -3.01? Moreover there could be also that CLASSICAL...
by Stefan Pochmann
Sat Jul 13, 2002 11:22 am
Forum: Volume 1 (100-199)
Topic: 139 - Telephone Tangles
Replies: 66
Views: 8165

Right, I should've seen it. Now try this:

088925 Broad-wood$ 81
03 Arrow.town$ 38
0061 Australia$ 140
0911 N

Go to advanced search