Cod sursa(job #2088296)
Utilizator | Data | 14 decembrie 2017 22:04:17 | |
---|---|---|---|
Problema | Hashuri | Scor | 30 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.43 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("hashuri.in") ;
ofstream fout("hashuri.out") ;
bool t[1000002] ;
int main()
{
int n , i , tp , x ;
fin >> n ;
for ( i = 1 ; i <= n ; i++ )
{
fin >> tp >> x ;
if ( tp == 1 )
t[x] = true ;
else if ( tp == 2 )
t[x] = false ;
else if ( tp == 3 )
fout << t[x] << '\n' ;
}
}