Search found 80 matches

by Quantris
Fri May 28, 2004 8:27 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14114

I think the problem here is that (ss >> panc[pancs]) returns false if the stringstream hits the end of the stream (that is, the string ends with the last number, with no space after it), so pancs++ doesn't execute the last time. the way I avoided this was to just add a space (or newline) to the end ...
by Quantris
Fri May 28, 2004 5:25 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14114

120 (Flapjacks) input

Does the input for 120 sometimes have extra spaces at the end of the line, and sometimes not? I think that this is the case since that is the only thing I changed between WA and AC, and if so, I think there should be either a warning in the problem, or the input should be standardised to remove such...
by Quantris
Fri Jan 30, 2004 9:40 am
Forum: Volume 3 (300-399)
Topic: 350 - Pseudo-Random Numbers
Replies: 56
Views: 16654

If you look at the way I did it, I used the numbers 'L' as the array index, and the term # as the value, this way you don't need to waste time using that for loop everytime. however, it does give me WA...I don't think it's a problem with the idea though, just the implementation of some special case ...
by Quantris
Sat Jan 24, 2004 4:52 am
Forum: Volume 3 (300-399)
Topic: 350 - Pseudo-Random Numbers
Replies: 56
Views: 16654

not sure why this keeps getting WA

so, what's the issue with this solution...I can't find any more errors in it! All the test cases I made up seem to work fine. [cpp] #include <iostream> using namespace std; int main() { int* encountered; int Z, I, M, L, c; c = 1; cin >> Z >> I >> M >> L; while ((Z != 0) || (I != 0) || (M != 0) || (L...
by Quantris
Sat Dec 27, 2003 4:55 am
Forum: Volume 1 (100-199)
Topic: 104 - Arbitrage
Replies: 223
Views: 14843

Are you getting WA for prob 104?

Hi, I just started trying these programming challenges a few days ago...I find them pretty tough! But that's why I like them! Anyway, if, like me, you keep getting WA on question 104, here's a test case that may help you...my first program gave the correct answer for all test cases I could find, but...

Go to advanced search