Cod sursa(job #807421)
| Utilizator | Data | 4 noiembrie 2012 18:25:54 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva educationala | Marime | 0.43 kb |
#include <fstream>
#include <map>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hahuri.out");
int main(){
map <int,bool> hash;
int operationsnr;
int operation,operand;
in>>operationsnr;
while(operationsnr--){
in>>operation>>operand;
switch(operation){
case 1:
hash[operand]=true;
break;
case 2:
hash[operand]=false;
break;
case 3:
out<<hash[operand]<<"\n";
}
}
}