// 巨菜的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[5]; unsigned int b; scanf("%s%d", a, &b); if (a[0] == 'C') { p.flip(b); } else { puts(str[p.test(b)]); } } return 0; } |
Double click to view unformatted code.