답안 #164762

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
164762 2019-11-23T08:34:31 Z maruii Meetings (JOI19_meetings) C++14
29 / 100
241 ms 1144 KB
#include "meetings.h"
#include <bits/stdc++.h>
using namespace std;

vector<int> edge[2001];
int deg[301], vis[301];

void dfs(int x) {
	vis[x] = 1;
	for (auto i : edge[x]) deg[i]--;
	for (auto i : edge[x]) {
		if (deg[i] == 0 && vis[i] == 0) {
			Bridge(min(x, i), max(x, i));
			dfs(i);
		}
	}
}
	
void Solve(int N) {
	if (N > 300) assert(0);
	for (int i = 1; i < N; ++i) {
		edge[0].push_back(i);
		for (int j = i + 1; j < N; ++j) {
			int x = Query(0, i, j);
			if (x != j) edge[x].push_back(j);
			if (x != i) edge[x].push_back(i);
		}
	}
	for (int i = 0; i < N; ++i) {
		sort(edge[i].begin(), edge[i].end());
		edge[i].erase(unique(edge[i].begin(), edge[i].end()), edge[i].end());
		for (auto j : edge[i]) deg[j]++;
	}
	dfs(0);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 380 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 4 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 380 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 4 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 3 ms 504 KB Output is correct
15 Correct 3 ms 504 KB Output is correct
16 Correct 3 ms 376 KB Output is correct
17 Correct 3 ms 504 KB Output is correct
18 Correct 3 ms 376 KB Output is correct
19 Correct 3 ms 504 KB Output is correct
20 Correct 3 ms 376 KB Output is correct
21 Correct 3 ms 380 KB Output is correct
22 Correct 3 ms 424 KB Output is correct
23 Correct 3 ms 376 KB Output is correct
24 Correct 3 ms 376 KB Output is correct
25 Correct 3 ms 508 KB Output is correct
26 Correct 3 ms 376 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 380 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 380 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 4 ms 376 KB Output is correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 3 ms 504 KB Output is correct
15 Correct 3 ms 504 KB Output is correct
16 Correct 3 ms 376 KB Output is correct
17 Correct 3 ms 504 KB Output is correct
18 Correct 3 ms 376 KB Output is correct
19 Correct 3 ms 504 KB Output is correct
20 Correct 3 ms 376 KB Output is correct
21 Correct 3 ms 380 KB Output is correct
22 Correct 3 ms 424 KB Output is correct
23 Correct 3 ms 376 KB Output is correct
24 Correct 3 ms 376 KB Output is correct
25 Correct 3 ms 508 KB Output is correct
26 Correct 3 ms 376 KB Output is correct
27 Correct 133 ms 936 KB Output is correct
28 Correct 134 ms 1016 KB Output is correct
29 Correct 135 ms 896 KB Output is correct
30 Correct 139 ms 1012 KB Output is correct
31 Correct 138 ms 964 KB Output is correct
32 Correct 133 ms 936 KB Output is correct
33 Correct 131 ms 1008 KB Output is correct
34 Correct 139 ms 1020 KB Output is correct
35 Correct 144 ms 1144 KB Output is correct
36 Correct 147 ms 984 KB Output is correct
37 Correct 218 ms 760 KB Output is correct
38 Correct 241 ms 804 KB Output is correct
39 Correct 222 ms 760 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 4 ms 1016 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -