Pagini recente » Cod sursa (job #1975923) | Cod sursa (job #1432110) | Cod sursa (job #2594040) | Cod sursa (job #2673486) | Cod sursa (job #807422)
Cod sursa(job #807422)
#include <fstream>
#include <map>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.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";
}
}
}