제출 #1306611

#제출 시각아이디문제언어결과실행 시간메모리
1306611Davdav1232Flight to the Ford (BOI22_communication)C++20
컴파일 에러
0 ms0 KiB
#include"communication.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef vector<pii> vii; void encode(int n, int x){ x--; while(n>3){ return; int a=1; int l=0; while(a<n){ a*=2; l++; } //this is the log //fib } if(x==0){ send(0); send(0); send(0); send(0); } if(x==1){ send(0); send(1); send(1); send(0); } if(x==2){ send(1); send(0); send(0); send(1); } } pii decode(int n){ while(n>3){ return {0, 0}; // } int a, b, c, d; a=recieve(); b=recieve(); c=recieve(); d=recieve(); if(a==0 && b==1){ //1 0 not possible return {2, 1}; } if(a==1 && b==0){ return {1, 3}; } if(a==1 && b==1){ return {2, 3}; } if(c==1 && d==0){ //1 0 not possible return {2, 1}; } if(c==0 && d==1){ return {1, 3}; } if(c==1 && d==1){ return {2, 3}; } //now they are 0, 0 which means it can't be 0110 return {1, 3}; //a and b are 0. if I tried to send 1, that means }

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

communication.cpp: In function 'pii decode(int)':
communication.cpp:53:7: error: 'recieve' was not declared in this scope; did you mean 'receive'?
   53 |     a=recieve();
      |       ^~~~~~~
      |       receive