제출 #1298309

#제출 시각아이디문제언어결과실행 시간메모리
1298309sanduchicu메시지 (IOI24_message)C++20
컴파일 에러
0 ms0 KiB
#include <iostream> #include <vector> void send_message(std::vector<bool> M, std::vector<bool> C) { for (bool c : C) send_packet(std::vector<bool>(31, c)); for (bool m : M) send_packet(std::vector<bool>(31, m)); } std::vector<bool> receive_message(std::vector<std::vector<bool>> R) { std::vector<bool> C(31); for (int i = 0; i < 31; i++) { int count = 0; for (bool c : R[i]) { if (c) count++; else count--; } C[i] = count > 0 ? true : false; } std::vector<bool> result(R.size() - 31); for (int i = 31; i < R.size(); i++) { int count = 0; for (bool c : R[i]) { if (c) count++; else count--; } result[i] = count > 0 ? true : false; } return std::move(result); }

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

message.cpp: In function 'void send_message(std::vector<bool>, std::vector<bool>)':
message.cpp:5:26: error: 'send_packet' was not declared in this scope
    5 |         for (bool c : C) send_packet(std::vector<bool>(31, c));
      |                          ^~~~~~~~~~~
message.cpp:6:26: error: 'send_packet' was not declared in this scope
    6 |         for (bool m : M) send_packet(std::vector<bool>(31, m));
      |                          ^~~~~~~~~~~