This is the problem . https://codeforces.me/contest/1867/problem/C In one solution i am deleting the #define which are not used and in the program and the program gets accepted . But in another the #define function are given but is of no use But it's Idleness limit exceeded on test 1. These are the two solution== Correct one= https://codeforces.me/contest/1867/submission/226153692 Wrong One= https://codeforces.me/contest/1867/submission/226154349
std::endl
is equivalent to\n
+std::flush
. In interactive problems, you want to flush the output stream everytime you ask a query. Your template replacesstd::endl
with\n
which is usually not an issue (and even increases speed) but is something to be weary of in interactive problems.You can't do this in interactive problems: