Search found 284 matches

by Stefan Pochmann
Tue Mar 05, 2002 3:25 am
Forum: Other words
Topic: online judge doesn
Replies: 1
Views: 1631

It probably means that the server has a problem. Nothing unusual, just be patient and wait until it works again.
by Stefan Pochmann
Tue Mar 05, 2002 3:20 am
Forum: Volume 6 (600-699)
Topic: 652 - Eight
Replies: 22
Views: 8025

- There are 9! = 362880 configurations, so you can represent one with a single int. A queue of 362880 ints is not too large. - You have a bool-array to tell whether you've visited a configuration already to prevent loops. - You only store the predecessor of a configuration, not the whole path. After...
by Stefan Pochmann
Tue Mar 05, 2002 3:14 am
Forum: Volume 102 (10200-10299)
Topic: 10230 - Savage Garden
Replies: 11
Views: 4796

I'm not sure I understand what you mean with your last posting. Do you mean you tried it and your program still worked fine?

Please post the requested example output, maybe that will tell us more...
by Stefan Pochmann
Mon Mar 04, 2002 8:22 am
Forum: Volume 102 (10200-10299)
Topic: 10230 - Savage Garden
Replies: 11
Views: 4796

I don't think there's a trap. And the input is as easy as it can get. Are you sure your program is correct? Can we see your output for, lets say, "5 20 14"? Or maybe you should check decreasing sizes in the input. This is always a good technique: reverse the order of the test cases (of course here w...
by Stefan Pochmann
Sat Mar 02, 2002 2:13 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25588

Maybe you're just too restrictive on the length of the string? Try 5000 instead of 50.
by Stefan Pochmann
Fri Mar 01, 2002 8:11 am
Forum: Volume 2 (200-299)
Topic: 296 - Safebreaker
Replies: 13
Views: 3508

Don't know. Could you please post your input and output in the form specified in the problem? I'd like to help you, but I won't convert it when you already have it.

Stefan
by Stefan Pochmann
Fri Mar 01, 2002 8:04 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25588

C8H10N4O2, I think your problem might be that you compare a "character" with it's predecessor at position -1. And if that happens to be a zero and your character is an "A", that's a problem. So I believe you access data outside of the array, which would explain the different behaviour on your machine.
by Stefan Pochmann
Fri Mar 01, 2002 8:00 am
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25588

Sorry, no. That was about Shahid's program. Your problem still is that for example with the input

5
aAb
bBc
cCd
aAb
bBc

your output is

Bbc
Bcb
bBc
bcB
cBb
cbB
Ccd
Cdc
cCd
cdC
dCc
dcC
Bbc
Bcb
bBc
bcB
cBb
cbB
by Stefan Pochmann
Fri Mar 01, 2002 1:21 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 20394

Maybe you have the same problem as the other guy just some days ago. Did you read that discussion? Try if this helps:

x:=trunc(po*100+0.5);

Stefan
by Stefan Pochmann
Thu Feb 28, 2002 1:47 pm
Forum: C
Topic: round to the nearest integer
Replies: 4
Views: 2902

Hmm, looks good. I can't really imagine why this should differ to rint(...). Maybe you had a value close to x.5 and your subtractions cause rounding errors that result in a different value than rint(), which will probably not do any computation. But with this, my advice can only be: "Good *luck* nex...
by Stefan Pochmann
Thu Feb 28, 2002 12:39 pm
Forum: Volume 1 (100-199)
Topic: 199 - Partial differential equations
Replies: 15
Views: 4321

Hi, can somebody please explain to me how to get the value of vector "b" in the sample output? I can't even get it right on paper. I get values close to those, but only close. My matrix "a" is perfect. In (7), I get these values: P1: 0 + 36 - 4P1 + 54 + 4P4 = 20 + 18 + 21 + 16 So I get a "-15" here,...
by Stefan Pochmann
Thu Feb 28, 2002 12:24 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25588

Read the problem description carefully about the order of the 52 characters.

Your output for baBACc is wrong, for example.

Stefan
by Stefan Pochmann
Thu Feb 28, 2002 11:36 am
Forum: Volume 3 (300-399)
Topic: 369 - Combinations
Replies: 101
Views: 16738

Because that's the slow, space-hungry, and most importantly, the ugly variant :wink:

Stefan

P.S. "slow" of course only if the number of test cases is small, I know... but then it's still ugly.
by Stefan Pochmann
Thu Feb 28, 2002 11:27 am
Forum: Volume 1 (100-199)
Topic: 136 - Ugly Numbers
Replies: 156
Views: 17651

Linear solution, Chris? Sure, why not. But I'm sure you want to find out yourself how it can be done. Moreover, I don't really want to publish my solution here. Thank you so much for asking this question. I've always been totally in love with this problem. And thanks to you I now tried to do it in O...

Go to advanced search