#include "Joi.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++){
if(i > 60) {
MessageBoard(i, 0);
continue;
}
if(X & (1 << i))
MessageBoard(i, 1);
else
MessageBoard(i, 0);
}
}
#include "Ioi.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
typedef long long ll;
const int NN = 10123;
int what[NN];
vector<int> g[NN];
bool u[NN];
void dfs(int x) {
u[x] = 1;
for(auto to : g[x]) {
if(u[to]) continue;
what[to] = Move(to);
dfs(to);
}
}
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
memset(what, -1, sizeof what);
for(int i = 0; i < M; i ++) {
g[A[i]].pb(B[i]);
g[B[i]].pb(A[i]);
}
what[P] = V;
dfs(P);
ll tmp = 0;
for(int i = 0; i < N; i ++)
assert(u[i] == 1);
for(int i = 0; i < 61; i ++)
tmp += (1ll << i) * what[i];
return tmp;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
1200 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
30 ms |
3292 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
4096 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
23 ms |
4096 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
25 ms |
4208 KB |
Wrong Answer [7] |
2 |
Halted |
0 ms |
0 KB |
- |