1294 - Mini-Spreadsheet
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
1294 - Mini-Spreadsheet
Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
-
- New poster
- Posts: 9
- Joined: Wed Jan 13, 2016 3:24 am
Re: 1294 - Mini-Spreadsheet
According to my assert() logic, I am not processing all input.
Using other asserts, each cell's input agrees with the input spec as I understand it. If anyone can process all input without skipping anything, that would be good to know...
Code: Select all
for (row = 1; row <= 10; ++row) {
row_ids["r" + number[row]] = row;
row_ids["R" + number[row]] = row;
}
while (std::cin >> token) {
if (row_ids.count(token) == 1) {
//...read 10 cells worth of content
}
// THIS ASSERT causes fault
else assert(false); // not row id
}