View Code of Problem 3876

// 巨菜的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);
    rep(i, 0, 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;
}
/*
Main.cc: In function 'int main()':
Main.cc:20:9: error: 'i' was not declared in this scope
     rep(i, 0, q) {
         ^
Main.cc:20:16: error: 'rep' was not declared in this scope
     rep(i, 0, q) {
                ^
*/

Double click to view unformatted code.


Back to problem 3876