Pagini recente » Cod sursa (job #3221973) | Rating Violeta Grecea (viogrecea) | Cod sursa (job #2438726) | Cod sursa (job #615142) | 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";
}
}
}