对于set<pair<int,int>>,我怎么才能在set中查找一个知道first值但不知道second值的元素?
2条回答 默认 最新
- tanjunming2020 2023-03-07 18:58关注
在网上找到一个,用s.lower_bound((first,0))就行了
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用
对于set<pair<int,int>>,我怎么才能在set中查找一个知道first值但不知道second值的元素?
在网上找到一个,用s.lower_bound((first,0))就行了