Search found 3 matches

by AdamWG
Wed Jul 26, 2006 6:26 pm
Forum: Volume 3 (300-399)
Topic: 306 - Cipher
Replies: 74
Views: 18425

Hi all,

I'm getting Wrong Answer, but my output is correct for all the test cases I've found on the board. I can't think of any corner cases where my program will fail. Any suggestions?
by AdamWG
Mon Jul 17, 2006 1:13 am
Forum: Volume 3 (300-399)
Topic: 305 - Joseph
Replies: 41
Views: 3776

mf wrote:Input may contain repeated values of k, and if your code recomputes output every time then it'll easily time-out. (Just imagine a file with, say, a thousand of 13's).
Aha, I hadn't thought of that. I'll try this.

Thanks.
by AdamWG
Sun Jul 16, 2006 7:38 pm
Forum: Volume 3 (300-399)
Topic: 305 - Joseph
Replies: 41
Views: 3776

Actually there is a way to solve this problem without precalculation! Here's how I've solved it, but I'm too lazy to re-derive my solution now. The code solves the case k=13 in less than a second. <snip> My solution is very similar to this, although slightly more optimized (since it eliminates many...

Go to advanced search