제출 #600863

#제출 시각아이디문제언어결과실행 시간메모리
600863alextodoranStranded Far From Home (BOI22_island)C++17
컴파일 에러
0 ms0 KiB
/**
 ____ ____ ____ ____ ____
||a |||t |||o |||d |||o ||
||__|||__|||__|||__|||__||
|/__\|/__\|/__\|/__\|/__\|

**/

#include <bits/stdc++.h>
#include "communication.h"

using namespace std;

typedef long long ll;

int send (int s);
void encode (int N, int X) {
    while (N > 0) {
        if (send(1) == 0) {
            send(X % 2);
            N /= 2;
            X /= 2;
        }
    }
}

int receive ();
pair <int, int> decode (int N) {
    int X = 0;
    int bit = 0;
    while (N > 0) {
        if (receive() == 0) {
            X += (receive() << bit);
            N /= 2;
            bit++;
        }
    }
    return make_pair(X, X);
}

컴파일 시 표준 에러 (stderr) 메시지

island.cpp:10:10: fatal error: communication.h: No such file or directory
   10 | #include "communication.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.