| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1352853 | adam17 | Flight to the Ford (BOI22_communication) | C++20 | 10 ms | 2840 KiB |
#include <utility>
int send(int s);
int receive();
void encode(int N, int X) {
send((X == 3) ? 1 : 0);
send((X == 2) ? 1 : 0);
send((X == 2) ? 1 : 0);
send((X == 3) ? 1 : 0);
}
std::pair<int,int> decode(int N) {
int a = receive(), b = receive(), c = receive(), d = receive();
if ((a + b + c + d == 0) || (a > b) || (c < d)) {
return std::pair<int,int>{1, 3};
}
if ((a < b) || (c > d)) {
return std::pair<int,int>{1, 2};
}
return std::pair<int,int>{2, 3};
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
