제출 #1367881

#제출 시각아이디문제언어결과실행 시간메모리
1367881Almonther메시지 (IOI24_message)C++20
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>

using namespace std;

#define ll long long
//std::vector<bool> send_packet(std::vector<bool> A)


void send_message(std::vector<bool> M, std::vector<bool> C){
    for(int i=0;i<M.size();i++){
        vector<bool>a;
        for(int j=0;j<31;j++){
            if(M[i]) a.push_back(1);
            else a.push_back(0);
        }
        send_packet(a);
    }
}
std::vector<bool> receive_message(std::vector<std::vector<bool>> R) {
    vector<bool>ans;
    for(auto i:R){
        ll od=0,ev=0;
        for(auto j:i){
            if(j) od++;
            else ev++;
        }
        if(od>ev) ans.push_back(1);
        else ans.push_back(0);
    }
    return ans;
}
// int main(){
//     calculate_costs({15, 12, 2, 10, 21},
//                 {5, 4, 5, 6, 3},
//                 {1, 2, 2, 3, 2},
//                 {5, 9, 1})
// }

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

message.cpp: In function 'void send_message(std::vector<bool>, std::vector<bool>)':
message.cpp:16:9: error: 'send_packet' was not declared in this scope
   16 |         send_packet(a);
      |         ^~~~~~~~~~~