답안 #726377

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
726377 2023-04-18T19:35:21 Z 1ne 게임 (IOI14_game) C++14
0 / 100
0 ms 212 KB
#include "game.h"
#include <bits/stdc++.h>
using namespace std;

vector<set<int>>adj;
vector<int>res;
vector<vector<int>>connected;
void initialize(int n) {
	adj.resize(n);
	res.resize(n,n - 1);
	connected.resize(n,vector<int>(n,0));
}

int hasEdge(int u, int v) {
	 if (connected[u][v])return 1;
	 if ((res[u] == 1 && res[v] >= 1) || (res[v] == 1 && res[u] >= 1)){
	 	connected[u][v] = 1;
	 	connected[v][u] = 1;     
	 	res[u]--;
	 	res[v]--;
	 }
	 return connected[u][v];
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -