The solution that got compilation error :
Both of the codes are exactly same, I'm getting compilation error in the below one and AC in the above one
I just replaced long long by int wherever possible and got an AC
Can anyone please tell what exactly is happening ?
Replace
make_pair(i,-1)
withmake_pair(i,-1ll)
, becausemake_pair(i,-1)
producestd::pair<long long, int>
, but you needstd::pair<long long, long long>
, which can be produced bymake_pair(i,-1ll)
.Done
It worked
Thanks