답안 #741873

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
741873 2023-05-15T03:09:32 Z vjudge1 게임 (APIO22_game) C++17
60 / 100
1014 ms 32048 KB
#include "game.h"
#include<bits/stdc++.h>
using namespace std;
int n, m, i, k;
bool vis[1010][30100];
vector<int> v[30001];
bool ans;
void init(int N, int K) {
	n = N;
	k = K;
	for(i = 0; i < k; i++)
        vis[i][i]=1;
}
void dfs(int x){
	if(ans) return;
	if(x <= i){
		ans=1;
		return;
	}
	if(vis[i][x]) return;
	vis[i][x] = 1;
	for(int it: v[x]) dfs(it);
}
int add_teleporter(int u, int p){
	v[u].push_back(p);
	for(i=0;i<k;i++){
		if(vis[i][u]){
			dfs(p);
		}
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 976 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 1360 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1360 KB Output is correct
6 Correct 1 ms 1360 KB Output is correct
7 Correct 1 ms 1360 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 976 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 1360 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1360 KB Output is correct
6 Correct 1 ms 1360 KB Output is correct
7 Correct 1 ms 1360 KB Output is correct
8 Correct 1 ms 992 KB Output is correct
9 Correct 1 ms 976 KB Output is correct
10 Correct 1 ms 976 KB Output is correct
11 Correct 1 ms 976 KB Output is correct
12 Correct 1 ms 976 KB Output is correct
13 Correct 1 ms 976 KB Output is correct
14 Correct 1 ms 1104 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 976 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 1104 KB Output is correct
19 Correct 1 ms 1104 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 976 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 1360 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1360 KB Output is correct
6 Correct 1 ms 1360 KB Output is correct
7 Correct 1 ms 1360 KB Output is correct
8 Correct 1 ms 992 KB Output is correct
9 Correct 1 ms 976 KB Output is correct
10 Correct 1 ms 976 KB Output is correct
11 Correct 1 ms 976 KB Output is correct
12 Correct 1 ms 976 KB Output is correct
13 Correct 1 ms 976 KB Output is correct
14 Correct 1 ms 1104 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 976 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 1104 KB Output is correct
19 Correct 1 ms 1104 KB Output is correct
20 Correct 1 ms 976 KB Output is correct
21 Correct 1 ms 1360 KB Output is correct
22 Correct 2 ms 1360 KB Output is correct
23 Correct 2 ms 1064 KB Output is correct
24 Correct 6 ms 3280 KB Output is correct
25 Correct 8 ms 2292 KB Output is correct
26 Correct 5 ms 1488 KB Output is correct
27 Correct 11 ms 3376 KB Output is correct
28 Correct 6 ms 3024 KB Output is correct
29 Correct 13 ms 3284 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 976 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 1360 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1360 KB Output is correct
6 Correct 1 ms 1360 KB Output is correct
7 Correct 1 ms 1360 KB Output is correct
8 Correct 1 ms 992 KB Output is correct
9 Correct 1 ms 976 KB Output is correct
10 Correct 1 ms 976 KB Output is correct
11 Correct 1 ms 976 KB Output is correct
12 Correct 1 ms 976 KB Output is correct
13 Correct 1 ms 976 KB Output is correct
14 Correct 1 ms 1104 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 976 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 1104 KB Output is correct
19 Correct 1 ms 1104 KB Output is correct
20 Correct 1 ms 976 KB Output is correct
21 Correct 1 ms 1360 KB Output is correct
22 Correct 2 ms 1360 KB Output is correct
23 Correct 2 ms 1064 KB Output is correct
24 Correct 6 ms 3280 KB Output is correct
25 Correct 8 ms 2292 KB Output is correct
26 Correct 5 ms 1488 KB Output is correct
27 Correct 11 ms 3376 KB Output is correct
28 Correct 6 ms 3024 KB Output is correct
29 Correct 13 ms 3284 KB Output is correct
30 Correct 24 ms 2760 KB Output is correct
31 Correct 67 ms 6164 KB Output is correct
32 Correct 33 ms 2436 KB Output is correct
33 Correct 14 ms 2128 KB Output is correct
34 Correct 685 ms 19804 KB Output is correct
35 Correct 813 ms 32048 KB Output is correct
36 Correct 69 ms 3900 KB Output is correct
37 Correct 767 ms 22280 KB Output is correct
38 Correct 783 ms 30580 KB Output is correct
39 Correct 1014 ms 30876 KB Output is correct
40 Correct 798 ms 20800 KB Output is correct
41 Correct 651 ms 20628 KB Output is correct
42 Correct 599 ms 28832 KB Output is correct
43 Correct 768 ms 25888 KB Output is correct
44 Correct 664 ms 21236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 976 KB Output is correct
2 Correct 1 ms 976 KB Output is correct
3 Correct 1 ms 1360 KB Output is correct
4 Correct 1 ms 1104 KB Output is correct
5 Correct 1 ms 1360 KB Output is correct
6 Correct 1 ms 1360 KB Output is correct
7 Correct 1 ms 1360 KB Output is correct
8 Correct 1 ms 992 KB Output is correct
9 Correct 1 ms 976 KB Output is correct
10 Correct 1 ms 976 KB Output is correct
11 Correct 1 ms 976 KB Output is correct
12 Correct 1 ms 976 KB Output is correct
13 Correct 1 ms 976 KB Output is correct
14 Correct 1 ms 1104 KB Output is correct
15 Correct 1 ms 1104 KB Output is correct
16 Correct 1 ms 976 KB Output is correct
17 Correct 1 ms 1104 KB Output is correct
18 Correct 1 ms 1104 KB Output is correct
19 Correct 1 ms 1104 KB Output is correct
20 Correct 1 ms 976 KB Output is correct
21 Correct 1 ms 1360 KB Output is correct
22 Correct 2 ms 1360 KB Output is correct
23 Correct 2 ms 1064 KB Output is correct
24 Correct 6 ms 3280 KB Output is correct
25 Correct 8 ms 2292 KB Output is correct
26 Correct 5 ms 1488 KB Output is correct
27 Correct 11 ms 3376 KB Output is correct
28 Correct 6 ms 3024 KB Output is correct
29 Correct 13 ms 3284 KB Output is correct
30 Correct 24 ms 2760 KB Output is correct
31 Correct 67 ms 6164 KB Output is correct
32 Correct 33 ms 2436 KB Output is correct
33 Correct 14 ms 2128 KB Output is correct
34 Correct 685 ms 19804 KB Output is correct
35 Correct 813 ms 32048 KB Output is correct
36 Correct 69 ms 3900 KB Output is correct
37 Correct 767 ms 22280 KB Output is correct
38 Correct 783 ms 30580 KB Output is correct
39 Correct 1014 ms 30876 KB Output is correct
40 Correct 798 ms 20800 KB Output is correct
41 Correct 651 ms 20628 KB Output is correct
42 Correct 599 ms 28832 KB Output is correct
43 Correct 768 ms 25888 KB Output is correct
44 Correct 664 ms 21236 KB Output is correct
45 Runtime error 12 ms 10256 KB Execution killed with signal 11
46 Halted 0 ms 0 KB -