Submission #603902

#TimeUsernameProblemLanguageResultExecution timeMemory
603902almothana05Flight to the Ford (BOI22_communication)C++17
0 / 100
10 ms236 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); send(0); } } std::pair<int, int> decode(int N) { int numm , nummer , nummi; numm = receive(); nummer = receive(); nummi = receive(); 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 'std::pair<int, int> decode(int)':
communication.cpp:39:1: warning: control reaches end of non-void function [-Wreturn-type]
   39 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...