Pagini recente » Autentificare | Cod sursa (job #406291) | Cod sursa (job #2569585) | Cod sursa (job #2572131) | Cod sursa (job #807421)
Cod sursa(job #807421)
#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";
}
}
}