Cod sursa(job #2341950)
Utilizator | Data | 12 februarie 2019 13:48:10 | |
---|---|---|---|
Problema | Hashuri | Scor | 70 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva educationala | Marime | 0.33 kb |
#include <fstream>
#include <unordered_map>
using namespace std;
ifstream f("hashuri.in");
ofstream g("hashuri.out");
unordered_map<long long,int>v;
int t,op;
long long a;
int main(int argc, char *argv[]) {
f>>t;
while(t--)
{
f>>op>>a;
if(op==1)
{
v[a]=1;
}
else if(op==2)
{
v[a]=0;
}
else {
g<<v[a]<<'\n';
}
}
}