Hello for everyone in codeforces. In this last contest I sent two identical solutions only , one gave me Wrong Answer in test case 1, although in my computer it was good but I sent that same solution with one more command (cout << "";) which I see insignificant and should not vary the result and gives Accepted . I do not know what could have happened, please could you help me understand my mistake. Thank you in advance.
these are my shipments :
1-Wrong Answer in test case one
2-Accepted
Auto comment: topic has been updated by jmrh_1 (previous revision, new revision, compare).
Auto comment: topic has been updated by jmrh_1 (previous revision, new revision, compare).
Auto comment: topic has been updated by jmrh_1 (previous revision, new revision, compare).
Auto comment: topic has been updated by jmrh_1 (previous revision, new revision, compare).
You probably have undefined behavior somewhere. Try running it in a debugger.
pos
is uninitialized when this line executes:if (k > pos) { cout << "NO"; }
.