Problem Link - here
WA solution Link - here
Just changed the way of checking then got AC, solution Link - here
Please help to find flaw in that WA solution
Thank You
Problem Link - here
WA solution Link - here
Just changed the way of checking then got AC, solution Link - here
Please help to find flaw in that WA solution
Thank You
You need to add check on line 60
while(idx < v.size() and i+v[idx]-1<=s.size())
Invalid access can give WA or RE. C++ is weird if proper care is not taken. Accepted Code.
Thanks a lot…!!
I was just finding error in logic because of WA verdict.