Search found 6 matches

by vkubushyn
Thu Dec 06, 2007 2:23 am
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 29105

Wow, ok it got AC now. Thanks a lot, I'll know not to count the '\r' anymore. I hate it when a correct program gets WA because of a compatibility error ;(.
by vkubushyn
Wed Dec 05, 2007 10:33 pm
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 29105

Hmmm, I get 1 for that input. That's correct isn't it?
by vkubushyn
Wed Dec 05, 2007 8:52 am
Forum: Volume 104 (10400-10499)
Topic: 10405 - Longest Common Subsequence
Replies: 103
Views: 29105

Help pls

Hi I also get WA, and have no idea why. My program handles spaces and blank lines correctly and I think my LCS algorithm does not have a flaw. Please help. #include <iostream> #include <string> #include <stdio.h> using namespace std; char s1[1005]; char s2[1005]; void findLCS(); int main() { while(g...
by vkubushyn
Tue Dec 04, 2007 3:07 am
Forum: Volume 4 (400-499)
Topic: 498 - Polly the Polynomial
Replies: 73
Views: 13503

Wrong answer

Hey, my code for this problem seems impeccable to me, and it's solved all the examples on this forum correctly, and yet I still get WA. Can anyone tell me what's wrong with my code? I tried printing a space after each line, not printing an ending blank line, and other possible PE problems... Thanks....
by vkubushyn
Sun Dec 02, 2007 11:25 pm
Forum: Volume 112 (11200-11299)
Topic: 11225 - Tarot scores.
Replies: 9
Views: 4483

Ending blank line

You are printing an ending blank line. They count that as wrong answer. I had it also, and once I removed it it got AC. Do not print a blank line after the last hand.
by vkubushyn
Fri Oct 26, 2007 11:42 pm
Forum: Volume 2 (200-299)
Topic: 254 - Towers of Hanoi
Replies: 39
Views: 16493

Hey, I think I have a working solution to problem 254, however it times out. For any input I've tried it's run instantly, even 100 discs and an arbitrarily large number of moves that is less that (2^n)-1. My algorithm involves moving as many discs at a time as possible, so even in the case of 100 di...

Go to advanced search