N coordinates (x, y) and m (c, d)
C = 0, find the number of x = d and delete these points;
C = 1, find the number of y = d and delete these points.
Multi- ing of map + multiset
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Include
# Include
Using namespace std; # define inf 1e8 # define eps 1e-8 # define ll _ int64 # define maxn 100001 # define mol %7map
> X, Y; int main () {int n, m; while (scanf ("% d", & n, & m) & n & m) {int x, y, c, d; X. clear (); Y. clear (); // multiset
: Iterator it; while (n --) {scanf ("% d", & x, & y); X [x]. insert (y); Y [y]. insert (x) ;}while (m --) {scanf ("% d", & c, & d); if (c = 0) {multiset
: Iterator it; printf ("% d \ n", X [d]. size (); for (it = X [d]. begin (); it! = X [d]. end (); it ++) // Delete the number of y x = d. Y [* it]. erase (d); X [d]. clear ();} else {multiset
: Iterator it; printf ("% d \ n", Y [d]. size (); for (it = Y [d]. begin (); it! = Y [d]. end (); it ++) // Delete the x number of y = d X [* it]. erase (d); Y [d]. clear () ;}} printf ("\ n") ;}return 0 ;}