#include "Joi.h"
void Joi(int N, int M, int A[], int B[], long long X, int T) {
for(int i = 0; i < 60; ++i)
MessageBoard(i, (X >> i) & 1);
for(int i = 60; i < N; ++i)
MessageBoard(i, 0);
}
#include "Ioi.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10010;
bool values[MAXN], flg[MAXN];
vector<int> g[MAXN];
void dfs(int v)
{
for(const int &u : g[v])
if(!flg[u])
{
flg[u] = true;
values[u] = Move(u);
dfs(u);
Move(v);
}
}
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
for(int i = 0; i < M; ++i)
g[A[i]].push_back(B[i]), g[B[i]].push_back(A[i]);
values[P] = V;
dfs(P);
long long ans = 0;
for(int i = 0; i < 60; ++i)
ans |= (values[i] << i);
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
1016 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
31 ms |
3008 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
1144 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
31 ms |
3032 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
31 ms |
3032 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |