Select Training Set | CodeChef ICPC 2019 OCTOBER online(1st round)

Can any body tell me how in this code iterator.second.first and iterator.first.second is accessing

https://www.codechef.com/viewsolution/28151490

https://www.codechef.com/viewsolution/28151490

This recent thread might be of some use:

2 Likes

could you explain it.second.first I only know about it.second usage

According to what I think,

Given:

map<a, pair<b,c>>
it.second = pair<b,c>
it.second.first = pair<b,c>.first = b
3 Likes

Thanks :smile:

1 Like