Submission #501174

#TimeUsernameProblemLanguageResultExecution timeMemory
501174aymanrsGame (IOI14_game)C++14
0 / 100
0 ms204 KiB
#include <bits/stdc++.h>
using namespace std;
vector<vector<bool>> a;
vector<vector<int>> c;
void initialize(int n){
	a.resize(n);
	c.resize(n);
	for(auto& i : a) i.resize(n, false);
}
int hasEdge(int u, int v){
	auto uc = c[u], vc = c[v];
	uc.push_back(u);
	vc.push_back(v);
	for(int i : uc) for(int j : vc) if(!a[i][j]) return 0;
	a[u][v] = a[v][u] = true;
	for(int i : uc){
		for(int j : vc){
			c[j].push_back(i);
			c[i].push_back(j);
		}
	}
	return 1;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...