Idleness issue in Interactive problems :(

Revision en1, by formidablechief27, 2024-03-02 15:34:13

I was confident I had solved yesterday's C question correctly. But could not clear the idleness verdict even after flushing the output. What can be the reasons my flush didn't work as expected ?? I tried all ways fflush(stdout), cout.flush() and even just endl. None of them could clear pretest 2. All gave me idleness issues.

void response(int x, int y) {
    cout << "! " << x << " " << y << endl;
    cout.flush();
}
 
int query(int x, int y) {
    cout << "? " << x << " " << y << endl;
    cout.flush();
    int res = ini();
    return res;
}

Complete submission : 249149514

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English formidablechief27 2024-03-02 15:34:13 667 Initial revision (published)