Pagini recente » Cod sursa (job #2934926) | Cod sursa (job #2713756) | Cod sursa (job #2481971) | Cod sursa (job #2828925) | Cod sursa (job #2343068)
#include <bits/stdc++.h>
using namespace std ;
ifstream in ("hashuri.in") ;
ofstream out ("hashuri.out") ;
int n , tip , x ;
map < int , bool > m ;
int main ()
{
in >> n ;
while ( n -- )
{
in >> tip >> x ;
if ( tip == 1 ) if ( m.find( x ) == m.end() ) m [ x ] = 1 ;
if ( tip == 2 ) m.erase( x ) ;
if ( tip == 3 ) out << ( m.find( x ) != m.end() ) << '\n' ;
}
}