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