The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally decided to build an electoral wall for placing the…
C++ 的易踩坑点 随时补充 STL不能边循环边erase() //自己写的求交集RE了 for (set <int> ::iterator it = s.begin(); it != s.end(); it++) if (*it == x) s.erase(it); //RE 解决办法:用vector记录要删除的元素,新开一个对vector的循环,操作set即可. 使用unique()/lower_bound()时的重定义操作符<要满足严格小于(若相等要返回false). priori…