Cod sursa(job #3277727)
| Utilizator | Data | 17 februarie 2025 12:33:24 | |
|---|---|---|---|
| Problema | Hashuri | Scor | 30 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.59 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream in("hashuri.in");
ofstream out("hashuri.out");
const int MOD = 666103;
bool nigga[100000];
int main()
{
int n;
in >> n;
while(n--){
int op, x;
in >> op >> x;
if(op == 1){
nigga[x % MOD] = true;
}
if(op == 2){
nigga[x % MOD] = false;
}
if(op == 3){
if(nigga[x % MOD] == true)
out << 1 << '\n';
else
out << 0 << '\n';
}
}
return 0;
}
