Search found 2 matches

by lwisne
Sat Jul 31, 2004 10:07 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 13931

Thanks! For anyone who cares, I used the wrong variable in the line: main.push_back(atoi(curString.substr(idx, main.size()-idx).c_str())); It should have been curString.size() instead of main.size(). Dont you just hate it when you make a blatant typo and the program still magically works for 99% of ...
by lwisne
Fri Jul 30, 2004 10:40 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 13931

120 WA

I have no clue why this gives WA...can anyone help? [cpp] #include <iostream> #include <deque> #include <string> #include <algorithm> using namespace std; int main() { deque<int> main, temp, sorted; char curInput[100]; string curString; int idx, endIdx, dummy; while(cin.getline(curInput, 100)) { mai...

Go to advanced search