이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include"communication.h"
#include <bits/stdc++.h>
#define IO_OP ios::sync_with_stdio(0), cin.tie(0)
#define F first
#define S second
#define V vector
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef V<int> vi;
const int INF = 1e9 + 7;
vi aux({1, 2, 3, 4, 5, 6, 7, 5, 1, 2, 3, 4, 5});
vi aux2({1, 2, 3, 4, 5, 6, 7, 5, 1, 2, 3, 4, 5});
void encode(int n, int x) {
x--;
send(x & 1);
send(x >> 1 & 1);
}
std::pair<int, int> decode(int n) {
int bit1 = receive();
int bit2 = receive();
vi tt;
for(int i = 0; i < 3; i++)
if((i & 1) == bit1 || (i >> 1 & 1) == bit2) {
tt.PB(i + 1);
}
return {tt[0], tt.back()};
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |