Submission #1123038

#TimeUsernameProblemLanguageResultExecution timeMemory
1123038Mousa_AboubakerMessage (IOI24_message)C++20
Compilation error
0 ms0 KiB
#include "message.h" #include <bits/stdc++.h> using namespace std; void send_message(vector<bool> M, vector<bool> C) { for(auto i: M) send_packet(vector<bool>({31, i})); } vector<bool> receive_message(vector<vector<bool>> R) { vector<bool> res; for(auto i: R) { int cnt0 = 0; for(auto j: i) cnt0 += not j; if(cnt0 >= 16) res.push_back(false); else res.push_back(true); } return res; }

Compilation message (stderr)

message.cpp: In function 'void send_message(std::vector<bool>, std::vector<bool>)':
message.cpp:8:49: error: narrowing conversion of '31' from 'int' to 'bool' [-Wnarrowing]
    8 |                 send_packet(vector<bool>({31, i}));
      |                                                 ^