#include"communication.h"
#include <bits/stdc++.h>
using namespace std;
void encode(int N, int X) {
for (int i = 0; i < 30; i++){
int t = (X >> i) & 1;
if (!send(t)) send(t);
}
}
pair<int, int> decode(int N) {
int res = 0;
for (int i = 0; i < 30; i++){
if (receive()) res |= 1 << i;
}
return make_pair(res, res);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
200 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
197 ms |
200 KB |
Not correct |
2 |
Halted |
0 ms |
0 KB |
- |