#include "message.h"
using namespace std;
template<typename T>
using vec = vector<T>;
void send_message(std::vector<bool> M, std::vector<bool> C) {
std::vector<bool> A(31, 0);
for (int i = 0; i < M.size(); i++) {
send_packet(vec<bool>(31, M[i]));
}
}
std::vector<bool> receive_message(std::vector<std::vector<bool>> R) {
vec<bool> res(R.size());
for (int i = 0; i < R.size(); i++) {
int count1 = 0;
int count0 = 0;
for (int j = 0; j < R[i].size(); j++) {
if (R[i][j]) {
count1++;
} else {
count0++;
}
}
if( count1 > count0) {
res[i] = true;
} else {
res[i] = false;
}
}
return res;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |