답안 #741870

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
741870 2023-05-15T03:07:34 Z vjudge1 게임 (APIO22_game) C++17
60 / 100
600 ms 6632 KB
#include "game.h"
#include<bits/stdc++.h>
using namespace std;
int n, m, i, k;
bitset<30001> vis[1001];
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 1380 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 1380 KB Output is correct
8 Correct 1 ms 976 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 1380 KB Output is correct
8 Correct 1 ms 976 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 2 ms 1360 KB Output is correct
22 Correct 2 ms 1360 KB Output is correct
23 Correct 1 ms 976 KB Output is correct
24 Correct 5 ms 2768 KB Output is correct
25 Correct 7 ms 1872 KB Output is correct
26 Correct 5 ms 1404 KB Output is correct
27 Correct 10 ms 2768 KB Output is correct
28 Correct 8 ms 2768 KB Output is correct
29 Correct 11 ms 2768 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 1380 KB Output is correct
8 Correct 1 ms 976 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 2 ms 1360 KB Output is correct
22 Correct 2 ms 1360 KB Output is correct
23 Correct 1 ms 976 KB Output is correct
24 Correct 5 ms 2768 KB Output is correct
25 Correct 7 ms 1872 KB Output is correct
26 Correct 5 ms 1404 KB Output is correct
27 Correct 10 ms 2768 KB Output is correct
28 Correct 8 ms 2768 KB Output is correct
29 Correct 11 ms 2768 KB Output is correct
30 Correct 20 ms 1920 KB Output is correct
31 Correct 30 ms 4848 KB Output is correct
32 Correct 20 ms 2420 KB Output is correct
33 Correct 18 ms 1836 KB Output is correct
34 Correct 568 ms 6632 KB Output is correct
35 Correct 506 ms 6196 KB Output is correct
36 Correct 82 ms 2256 KB Output is correct
37 Correct 450 ms 5720 KB Output is correct
38 Correct 433 ms 5332 KB Output is correct
39 Correct 458 ms 5376 KB Output is correct
40 Correct 550 ms 6492 KB Output is correct
41 Correct 395 ms 5744 KB Output is correct
42 Correct 299 ms 5716 KB Output is correct
43 Correct 600 ms 6540 KB Output is correct
44 Correct 487 ms 6492 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 1380 KB Output is correct
8 Correct 1 ms 976 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 2 ms 1360 KB Output is correct
22 Correct 2 ms 1360 KB Output is correct
23 Correct 1 ms 976 KB Output is correct
24 Correct 5 ms 2768 KB Output is correct
25 Correct 7 ms 1872 KB Output is correct
26 Correct 5 ms 1404 KB Output is correct
27 Correct 10 ms 2768 KB Output is correct
28 Correct 8 ms 2768 KB Output is correct
29 Correct 11 ms 2768 KB Output is correct
30 Correct 20 ms 1920 KB Output is correct
31 Correct 30 ms 4848 KB Output is correct
32 Correct 20 ms 2420 KB Output is correct
33 Correct 18 ms 1836 KB Output is correct
34 Correct 568 ms 6632 KB Output is correct
35 Correct 506 ms 6196 KB Output is correct
36 Correct 82 ms 2256 KB Output is correct
37 Correct 450 ms 5720 KB Output is correct
38 Correct 433 ms 5332 KB Output is correct
39 Correct 458 ms 5376 KB Output is correct
40 Correct 550 ms 6492 KB Output is correct
41 Correct 395 ms 5744 KB Output is correct
42 Correct 299 ms 5716 KB Output is correct
43 Correct 600 ms 6540 KB Output is correct
44 Correct 487 ms 6492 KB Output is correct
45 Runtime error 3 ms 2524 KB Execution killed with signal 11
46 Halted 0 ms 0 KB -