This is a implementation based doubt related to C++. While I was solving a problem on Codeforces, I found this issue , I first wrote solution as mentioned in \'solution1\' , whi