Submission #603897

#TimeUsernameProblemLanguageResultExecution timeMemory
603897almothana05Flight to the Ford (BOI22_communication)C++17
Compilation error
0 ms0 KiB
#include"communication.h" #include"bits/stdc++.h" using namespace std; void encode(int N, int X) { if(X == 2){ send(0); send(1); send(1); } else{ send(1); send(0); sned(0); } } std::pair<int, int> decode(int N) { int numm , nummer , nummi; numm = receive(); nummer = receive(); nummi = recieve(); if(numm == 0){ if(nummer == 0 && nummi == 0){ return {1 , 3}; } else{ return {1, 2}; } } if(numm == 1){ if(nummer == 1 && nummi == 1){ return {1 , 2}; } else{ return {1, 3}; } } }

Compilation message (stderr)

communication.cpp: In function 'void encode(int, int)':
communication.cpp:14:9: error: 'sned' was not declared in this scope; did you mean 'send'?
   14 |         sned(0);
      |         ^~~~
      |         send
communication.cpp: In function 'std::pair<int, int> decode(int)':
communication.cpp:22:13: error: 'recieve' was not declared in this scope; did you mean 'receive'?
   22 |     nummi = recieve();
      |             ^~~~~~~
      |             receive
communication.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type]
   39 | }
      | ^