Cod sursa(job #2195791)
Utilizator | Data | 17 aprilie 2018 13:26:13 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.34 kb |
#pragma GCC optimize("03")
#include <bits/stdc++.h>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
int n, cod, x, mp[1000100];
int main(){
in >> n;
while(n--){
in >> cod >> x;
if(cod == 1)
mp[x] = 1;
else if(cod == 2)
mp[x] = 0;
else out << mp[x] << '\n';
}
return 0;
}