#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;
long long X=0;
bool vis[NN];
void dfs(int node,int p){
vis[node]=true;
for (auto u:adj[node]){
if (vis[u]) continue;
int y=Move(u);
if (y) X|=(1LL<<(u%60));
dfs(u,node);
}
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));
dfs(P,-1);
for (int i=0;i<m;i++) adj[i].clear();
return X;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1036 KB |
Output is correct |
2 |
Correct |
1 ms |
1040 KB |
Output is correct |
3 |
Correct |
1 ms |
1060 KB |
Output is correct |
4 |
Correct |
1 ms |
1044 KB |
Output is correct |
5 |
Correct |
1 ms |
1052 KB |
Output is correct |
6 |
Correct |
0 ms |
1052 KB |
Output is correct |
7 |
Correct |
1 ms |
1060 KB |
Output is correct |
8 |
Correct |
2 ms |
1056 KB |
Output is correct |
9 |
Correct |
1 ms |
1060 KB |
Output is correct |
10 |
Correct |
1 ms |
1056 KB |
Output is correct |
11 |
Correct |
3 ms |
1120 KB |
Output is correct |
12 |
Correct |
1 ms |
1236 KB |
Output is correct |
13 |
Correct |
1 ms |
1044 KB |
Output is correct |
14 |
Correct |
2 ms |
1044 KB |
Output is correct |
15 |
Correct |
1 ms |
1044 KB |
Output is correct |
16 |
Correct |
1 ms |
1044 KB |
Output is correct |
17 |
Correct |
2 ms |
1052 KB |
Output is correct |
18 |
Correct |
2 ms |
1312 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
18 ms |
4952 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
1040 KB |
Output is correct |
2 |
Correct |
1 ms |
1056 KB |
Output is correct |
3 |
Correct |
1 ms |
1048 KB |
Output is correct |
4 |
Incorrect |
2 ms |
1340 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
18 ms |
4956 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
20 ms |
5068 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |