Pagini recente » Cod sursa (job #838324) | Istoria paginii runda/simulare67/clasament | Cod sursa (job #1746104) | Cod sursa (job #1601770) | Cod sursa (job #1415936)
#include <iostream>
#include <fstream>
#include <map>
std::map<int,int> m;
int main( int argc, char* argv[] )
{
std::ifstream input("hashuri.in");
std::ofstream output("hashuri.out");
int N;
input >> N;
for ( int i = 0; i < N; ++i )
{
int opt, value;
input >> opt >> value;
if ( opt == 1 )
{
m[value] = 1;
}
if ( opt == 2 )
{
m[value] = 0;
}
if ( opt == 3 )
{
output << m[value] << "\n";
}
}
input.close();
output.close();
return 0;
}