// 巨菜的ACMer #include <bits/stdc++.h> using namespace std; const int N = int(5e6+5); bitset<N> p; const char str[2][5] = { "No", "Yes" }; int main() { int n, q; p.flip(); scanf("%d%d", &n, &q); while(q--) { char a; unsigned int b; scanf("%c%d", &a, &b); if (a == 'C') { p.flip(b); } else { puts(str[p.test(b)]); } } return 0; } |
Double click to view unformatted code.