Cod sursa(job #2422690)

Utilizator StefanSanStanescu Stefan StefanSan Data 19 mai 2019 17:07:33
Problema Hashuri Scor 30
Compilator cpp-64 Status done
Runda Arhiva educationala Marime 0.41 kb
#include <iostream>
#include <string.h>
#include <cmath>
#include <algorithm>
#include <fstream>
#include <vector>
#define MAX 2000000

using namespace std;

ifstream in("hashuri.in");
ofstream out("hashuri.out");

int a[MAX], n, x, y;

int main(){
	in >> n;
	while (n != 0) {
		n--;
		in >> x >> y;
		if (x == 1)a[y] = 1;
		if (x == 2)a[y] = 0;
		if (x == 3) out << a[y] << endl;;
	}


}