| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 126674 | abacaba | Ronald (COCI17_ronald) | C++14 | 60 ms | 1372 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 15;
int n, m, p[N], sz[N];
bool g[N][N], used[N], was[N];
int find(int v) {
	if(v == p[v])
		return v;
	return p[v] = find(p[v]);
}
void unio(int a, int b) {
	a = find(a);
	b = find(b);
	if(a != b) {
		if(sz[a] < sz[b])
			swap(a, b);
		p[b] = a;
		sz[a] += sz[b];
	}
}
bool dfs(int v, bool rev) {
	used[v] = true;
	if(rev)
		for(int i = 1; i <= n; ++i) {
			g[i][v] ^= 1;
			g[v][i] ^= 1;
		}
	for(int i = 1; i <= n; ++i)
		if(i != v && !g[i][v])
			if(used[i] || !dfs(i, 1))
				return false;
	return true;
}
 
int main() {
	scanf("%d%d", &n, &m);
	for(int i = 1; i <= n; ++i)
		p[i] = i, sz[i] = 1;
	for(int i = 1; i <= m; ++i) {
		int u, v;
		scanf("%d%d", &u, &v);
		unio(u, v);
		g[u][v] = g[v][u] = true;
	}
	for(int i = 1; i <= n; ++i) {
		if(!was[find(i)]) {
			memset(used, 0, sizeof(used));
			bool flag1 = dfs(i, 0);
			memset(used, 0, sizeof(used));
			bool flag2 = dfs(i, 1);
			if(!flag1 && !flag2) {
				puts("NE");
				return 0;
			}
			was[find(i)] = true;
		}
	}
	puts("DA");
    return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
