problem link : https://codeforces.com/problemset/problem/1335/C
solution link : https://codeforces.com/contest/1335/submission/93038111
I just had a question in my mind .
In that solution at first I didn’t assigned mp.size() to p then It was showing weird behavior.But after assignment it is working properly.
Can someone here explain me what’s actually happening if we replace p with mp.size() ?