Pagini recente » Cod sursa (job #3144381) | Cod sursa (job #20081) | Cod sursa (job #2697183) | Cod sursa (job #1312181) | 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";
}
}
}