I just rewrote the problem from scratch, submitted, and got an 'Accepted'! The only think that I can think of that is different (don't have access to the old version at the moment) is that I used loops this time rather than use std::string's resize function to create the strings. Maybe, there is ...
No, you don't wrap long lines; the maximum line length (for an eight digit number) is 8*12+7=103 characters. Your output looks good, apart from the wrapping. Are you sure you fill up every line to it's full length, also for 5 and 6 as the last digit? Are you sure you don't print an extra column of ...
Can someone please help me figure out what is going on with this problem. Do we have to handle wrap for numbers that won't fit in 80 columns? (I've tried it with and without wrap to no avail). Every test case that I can think up works fine. Is the problem statement really that clear that I'm missing ...