Search found 28 matches

by pochmann
Mon Mar 11, 2002 4:04 pm
Forum: Volume 102 (10200-10299)
Topic: 10234 - Frequent Substrings
Replies: 25
Views: 8908

I just checked it, and it's true: Output it as lowercase. That even corrected my "Presentation Error".
by pochmann
Thu Feb 28, 2002 6:57 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 26243

Linux / g++
by pochmann
Thu Feb 28, 2002 6:56 am
Forum: Volume 4 (400-499)
Topic: 458 - The Decoder
Replies: 71
Views: 14929

Yes you are. But the key is always 7. Maybe that's your problem. Wasn't stated in the description, very bad.

Stefan
by pochmann
Thu Feb 28, 2002 6:11 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 26243

C8H10N4O2: I just saw that you only output the test cases that don't contain 'A'. Maybe a problem with your conversion of 'A' to 0?

Stefan
by pochmann
Thu Feb 28, 2002 6:05 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 26243

Shahid: Lines not longer than 5000.

C8H10N4O2: On my computer, you only output lowercase letters.

Stefan
by pochmann
Thu Feb 28, 2002 5:35 am
Forum: C
Topic: round to the nearest integer
Replies: 4
Views: 2913

I think it always worked fine for me. Can we see your self-written function?

Stefan
by pochmann
Thu Feb 28, 2002 5:26 am
Forum: Volume 6 (600-699)
Topic: 616 - Coconuts, Revisited
Replies: 37
Views: 11664

Btw, you can find the solution to this problem in the American Mathematical Monthly of the year 1928 :wink: Too bad, fully solved 74 years ago... How did I find out? Well, you might see a pattern in the solutions. And then the website http://www.research.att.com/~njas/sequences/ was really helpful. ...
by pochmann
Thu Feb 28, 2002 5:20 am
Forum: Volume 4 (400-499)
Topic: 458 - The Decoder
Replies: 71
Views: 14929

The input contains characters outside of ASCII range, that is, larger than 127. Maybe you use signed char and don't translate it when it's smaller than 32+7 or sth like that?

If that doesn't help, would you mind posting your solution?

Stefan
by pochmann
Thu Feb 28, 2002 4:57 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17144

Correction to previous post: of course you should always calculate C(N,N-M) instead of C(N,M) if M>N/2. Otherwise you can get higher temporary values, even with my modification.

Stefan

P.S. double should also work fine and has the advantage over "long long int" to really be in standard c/c++.
by pochmann
Thu Feb 28, 2002 4:52 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 17144

int is totally sufficient, guys! You just have to be a bit clever. Hint example:

If you want to multiply (41*40*39)/(1*2*3) with (38/4), then you can first divide it by 2 and then multiply it by 19.

This way you never have temporary values that are higher than the end result.

Stefan
by pochmann
Wed Feb 27, 2002 8:55 pm
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30300

I think in newer Java versions, BigInteger is implemented in 100% pure Java, so one could simply copy&paste its sourcecode into his/her own program. If you use a base as small as 10000, a short[] would also suffice, doesn't have to be an int[]. Maybe it's not only smaller but also faster, because it...
by pochmann
Wed Feb 27, 2002 9:55 am
Forum: Volume 4 (400-499)
Topic: 495 - Fibonacci Freeze
Replies: 222
Views: 30300

In Java I'd go for BigInteger, but that's currently disabled. So I'd go for char arrays or int arrays. In char arrays, you'd usually represent a number as a string, one char per digit. It makes things easier to store the number reversed, so number[0] holds the last digit. In this problem you only ha...
by pochmann
Wed Feb 27, 2002 6:36 am
Forum: Volume 3 (300-399)
Topic: 306 - Cipher
Replies: 74
Views: 18382

No need to hate it. In fact, I think it's a very beautiful one.

In your second algorithm: When you've found the cycle of the first position, what do you do with the other positions in the cycle? Do you search their cycles again or use the information already obtained?

Stefan
by pochmann
Wed Feb 27, 2002 6:25 am
Forum: Other words
Topic: Who knows how to write an online judge system?
Replies: 6
Views: 3422

If you're doing it for interest, you'll surely find a lot of stuff you can play with :wink: For convenience? I don't know. If you have the problems and in/outputs anyway, then why bothering using an online judge? On the other hand, read http://acm.uva.es/p/universities.html (also reachable from the ...
by pochmann
Tue Feb 26, 2002 2:00 pm
Forum: Other words
Topic: Who knows how to write an online judge system?
Replies: 6
Views: 3422

First a question: Why do you want to do this? For example, if you want to setup a contest, it might be easier to let the Valladolid people run it. Or look at PC^2 (http://www.ecs.csus.edu/pc2/). Same thing if you have some problems you'd just like to state. The spainers specifically ask for problems...

Go to advanced search