Hello everybody!
I'm participating in a competition, and I just finished my program. It doesn't really matter what it does, and how. I have encountered a bug I think. I'd appreciate every kind of help, because with the problem, my solution fails for the test file.
I have to read N pieces of data, formatted "STRING_space_STRING_space_INT"
Obviously I used cin >> from >> to >> cost;
When I am finished with reading, I'm waiting for another type of input in another while loop - no COUT used there neither.
The problem : after the last reading from the first sequence, somehow the program writes an endline and then waits for the next set of input...but the test file (cannot be modified) considers it as a bad output...
Has anyone noticed something like that before? There is no space after any of the N lines from the first input sequence. It doesn't write endline before, only at the last input.
Please help me if you can, it's really important and urgent!
(example input for n=3)
NEWYORK PARIS 3
LOSANGELES DUBLIN 5
LONDON PARIS 2
_(cursor jumps here but it should be a line upper)