# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1123038 | Mousa_Aboubaker | Message (IOI24_message) | C++20 | 0 ms | 0 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;
}