Submission #600864

#TimeUsernameProblemLanguageResultExecution timeMemory
600864alextodoranStranded Far From Home (BOI22_island)C++17
Compilation error
0 ms0 KiB
/** ____ ____ ____ ____ ____ ||a |||t |||o |||d |||o || ||__|||__|||__|||__|||__|| |/__\|/__\|/__\|/__\|/__\| **/ #include <bits/stdc++.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); }

Compilation message (stderr)

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/crt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
/usr/bin/ld: /tmp/ccVNapDA.o: in function `encode(int, int)':
island.cpp:(.text+0x16): undefined reference to `send(int)'
/usr/bin/ld: island.cpp:(.text+0x41): undefined reference to `send(int)'
/usr/bin/ld: /tmp/ccVNapDA.o: in function `decode(int)':
island.cpp:(.text+0x69): undefined reference to `receive()'
/usr/bin/ld: island.cpp:(.text+0x91): undefined reference to `receive()'
collect2: error: ld returned 1 exit status