Cod sursa(job #2690265)
Utilizator | Data | 23 decembrie 2020 14:50:21 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.38 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
const int N = 100000;
int n, op, x;
bitset <100001> H[20001];
int main(){
f >> n;
while(n--){
f >> op >> x;
if(op == 1) H[x / N][x % N] = 1;
if(op == 2) H[x / N][x % N] = 0;
if(op == 3) g << H[x / N][x % N] << "\n";
}
}