#include "Joi.h"
#include <bits/stdc++.h>
using namespace std;
void Joi(int N, int M, int A[], int B[], long long X, int T) {
for (int i=0;i<N;i++) MessageBoard(i,bool(X&(1LL<<(i%60))));
return;
}
#include "Ioi.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
const int NN=1e4+5;
vector<int> adj[NN];
int n,m,calc=1;
long long X=0;
bool vis[NN],calced[60];
void dfs(int node,int p){
vis[node]=true;
if (calc==60) return;
for (auto u:adj[node]){
if (vis[u]) continue;
if (!calced[u%60]){
calced[u%60]=1;
calc++;
}
int y=Move(u);
if (y) X|=(1LL<<(u%60));
dfs(u,node);
if (calc==60) return;
}
if (p!=-1){
int y=Move(p);
if (y) X|=(1LL<<(p%60));
}
return;
}
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
n=N,m=M;
for (int i=0;i<m;i++){
adj[A[i]].pb(B[i]);
adj[B[i]].pb(A[i]);
}
if (V) X|=(1LL<<(P%60));
calced[P%60]=true;
dfs(P,-1);
return X;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
1052 KB |
Output is correct |
2 |
Correct |
1 ms |
1036 KB |
Output is correct |
3 |
Correct |
1 ms |
1048 KB |
Output is correct |
4 |
Correct |
0 ms |
1052 KB |
Output is correct |
5 |
Correct |
1 ms |
1048 KB |
Output is correct |
6 |
Correct |
0 ms |
1052 KB |
Output is correct |
7 |
Correct |
1 ms |
1052 KB |
Output is correct |
8 |
Correct |
1 ms |
1056 KB |
Output is correct |
9 |
Correct |
0 ms |
1040 KB |
Output is correct |
10 |
Correct |
2 ms |
1036 KB |
Output is correct |
11 |
Correct |
3 ms |
1092 KB |
Output is correct |
12 |
Correct |
1 ms |
1048 KB |
Output is correct |
13 |
Correct |
1 ms |
1052 KB |
Output is correct |
14 |
Correct |
0 ms |
1052 KB |
Output is correct |
15 |
Correct |
1 ms |
1056 KB |
Output is correct |
16 |
Correct |
2 ms |
1048 KB |
Output is correct |
17 |
Correct |
2 ms |
1048 KB |
Output is correct |
18 |
Correct |
2 ms |
1048 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
2912 KB |
Output is correct |
2 |
Correct |
15 ms |
3108 KB |
Output is correct |
3 |
Correct |
15 ms |
3376 KB |
Output is correct |
4 |
Correct |
12 ms |
2224 KB |
Output is correct |
5 |
Correct |
9 ms |
2360 KB |
Output is correct |
6 |
Correct |
9 ms |
2360 KB |
Output is correct |
7 |
Correct |
10 ms |
2520 KB |
Output is correct |
8 |
Correct |
8 ms |
2368 KB |
Output is correct |
9 |
Correct |
8 ms |
2360 KB |
Output is correct |
10 |
Correct |
8 ms |
2364 KB |
Output is correct |
11 |
Correct |
9 ms |
2352 KB |
Output is correct |
12 |
Correct |
8 ms |
2332 KB |
Output is correct |
13 |
Correct |
8 ms |
2344 KB |
Output is correct |
14 |
Correct |
8 ms |
2348 KB |
Output is correct |
15 |
Correct |
9 ms |
2356 KB |
Output is correct |
16 |
Correct |
10 ms |
2364 KB |
Output is correct |
17 |
Correct |
9 ms |
2340 KB |
Output is correct |
18 |
Correct |
8 ms |
2368 KB |
Output is correct |
19 |
Correct |
8 ms |
2328 KB |
Output is correct |
20 |
Correct |
8 ms |
2620 KB |
Output is correct |
21 |
Correct |
7 ms |
2616 KB |
Output is correct |
22 |
Correct |
8 ms |
2360 KB |
Output is correct |
23 |
Correct |
9 ms |
2360 KB |
Output is correct |
24 |
Correct |
8 ms |
2364 KB |
Output is correct |
25 |
Correct |
8 ms |
2364 KB |
Output is correct |
26 |
Correct |
8 ms |
2364 KB |
Output is correct |
27 |
Correct |
8 ms |
2348 KB |
Output is correct |
28 |
Correct |
8 ms |
2360 KB |
Output is correct |
29 |
Correct |
8 ms |
2340 KB |
Output is correct |
30 |
Correct |
8 ms |
2356 KB |
Output is correct |
31 |
Correct |
1 ms |
1044 KB |
Output is correct |
32 |
Correct |
0 ms |
1056 KB |
Output is correct |
33 |
Correct |
1 ms |
1056 KB |
Output is correct |
34 |
Correct |
2 ms |
1316 KB |
Output is correct |
35 |
Correct |
1 ms |
1136 KB |
Output is correct |
36 |
Correct |
1 ms |
1056 KB |
Output is correct |
37 |
Correct |
0 ms |
1056 KB |
Output is correct |
38 |
Correct |
0 ms |
1056 KB |
Output is correct |
39 |
Correct |
0 ms |
1044 KB |
Output is correct |
40 |
Correct |
1 ms |
1044 KB |
Output is correct |
41 |
Correct |
2 ms |
976 KB |
Output is correct |
42 |
Correct |
0 ms |
1056 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
1036 KB |
Output is correct |
2 |
Correct |
2 ms |
1048 KB |
Output is correct |
3 |
Correct |
1 ms |
1040 KB |
Output is correct |
4 |
Correct |
2 ms |
1072 KB |
Output is correct |
5 |
Correct |
2 ms |
1088 KB |
Output is correct |
6 |
Correct |
2 ms |
1096 KB |
Output is correct |
7 |
Correct |
2 ms |
1088 KB |
Output is correct |
8 |
Correct |
2 ms |
1088 KB |
Output is correct |
9 |
Correct |
7 ms |
2360 KB |
Output is correct |
10 |
Correct |
7 ms |
2360 KB |
Output is correct |
11 |
Correct |
7 ms |
2368 KB |
Output is correct |
12 |
Correct |
1 ms |
1056 KB |
Output is correct |
13 |
Correct |
1 ms |
1056 KB |
Output is correct |
14 |
Correct |
1 ms |
1052 KB |
Output is correct |
15 |
Correct |
1 ms |
1148 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
17 ms |
2956 KB |
Partially correct |
2 |
Partially correct |
14 ms |
3108 KB |
Partially correct |
3 |
Partially correct |
14 ms |
3080 KB |
Partially correct |
4 |
Partially correct |
9 ms |
2360 KB |
Partially correct |
5 |
Partially correct |
9 ms |
2360 KB |
Partially correct |
6 |
Partially correct |
8 ms |
2360 KB |
Partially correct |
7 |
Partially correct |
9 ms |
2368 KB |
Partially correct |
8 |
Partially correct |
11 ms |
2236 KB |
Partially correct |
9 |
Partially correct |
8 ms |
2324 KB |
Partially correct |
10 |
Partially correct |
8 ms |
2360 KB |
Partially correct |
11 |
Partially correct |
8 ms |
2368 KB |
Partially correct |
12 |
Partially correct |
8 ms |
2596 KB |
Partially correct |
13 |
Partially correct |
7 ms |
2332 KB |
Partially correct |
14 |
Partially correct |
8 ms |
2356 KB |
Partially correct |
15 |
Partially correct |
8 ms |
2368 KB |
Partially correct |
16 |
Partially correct |
10 ms |
2368 KB |
Partially correct |
17 |
Partially correct |
8 ms |
2364 KB |
Partially correct |
18 |
Partially correct |
11 ms |
2360 KB |
Partially correct |
19 |
Partially correct |
9 ms |
2360 KB |
Partially correct |
20 |
Incorrect |
9 ms |
2624 KB |
Output isn't correct |
21 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
15 ms |
2780 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |