First of all, let me feed you all the details:
- Problem: 1008A
- Hack #: 468003
- Submission: http://mirror.codeforces.com/contest/1008/submission/40270051
- Input: "ae"
- Output(desirable): NO
- Output(obtained): YES
In the above-mentioned solution, there is a block of logic as mentioned below:
if(!flag['a' - *(s.end() - 1)] && *(s.end() - 1) != 'n')
{
cout<<"NO"<<endl;
return 0;
}
Here, we can see that first condition in the if statement is wrong. So I targeted that statement for my hack with the input "ae". Here we can see that the program will try to access flag['a'-'e'] which doesn't exist and hence should return false and should go inside the if block and print NO.
But as per the verdict of the hack, output was YES which is quite contradictory. Also, the same solution yielded the desirable output (i.e NO) on main test 23 with the similar kind of input.
Thus, I am requesting testers demon1999 and winger to kindly look into this matter.
Thank you.