#include "message.h"
using namespace std;
constexpr int PACKET_SIZE = 31;
void send_message(vector<bool> msg, vector<bool> controlled) {
for (bool val : msg)
send_packet(vector<bool>(PACKET_SIZE, val));
}
vector<bool> receive_message(vector<vector<bool>> packets) {
vector<bool> msg;
for (auto &packet : packets) {
int cnt = count(packet.begin(), packet.end(), true);
msg.push_back(2*cnt >= PACKET_SIZE);
}
return msg;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |