jack9104's blog

By jack9104, history, 5 years ago, In English

I am trying to do an interactive question, thinking to type last code, I put the "cout << endl" into a method, but it got ILE. Link:ILE. But when I move it out, the ILE problem disappears. Link:WA Does anyone know what the reason is or a link that explains this problem? Because I can't find any past answers in CF.

Thanks a lot. Appreciate any answer or suggestions on how to improve the way I ask questions.

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
5 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Just Give space after "?" & "!"

  • »
    »
    5 years ago, hide # ^ |
    ← Rev. 2  
    Vote: I like it 0 Vote: I do not like it

    Thanks. But is that the reason I get ILE? ( I think the problem is in the flush part and not the output part, I mean, that no matter what I output, if I remember to flush, the server won't be there waiting for another input). Wouldn't it give WA instead? Or does the server requires the same format of input, else it will wait?

»
5 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

change

cout << "!" << " " << minx << " " << miny << " " << maxx << " " << maxy << "\n";

to

cout << "!" << " " << minx << " " << miny << " " << maxx << " " << maxy << endl;

in the line 88.

but your solution is still wrong.

endl flushes the output but "\n" doesn't