#include "message.h"
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <limits.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii> vii;
typedef map<int, int> mii;
typedef vector<vl> vvl;
typedef pair<ll, ll> pll;
typedef vector<pll> vpl;
#define F first
#define S second
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
#define pb push_back
#define forn(i, x, n) for (ll i = x; i < n; i++)
#define fornl(i, x, n) for(ll i = x; i >= n; i--)
#define all(x) x.begin(), x.end()
#define mod 1000000007
#define inf 10000000000000
void send_message(const vector<bool> M, vector<bool> C) {
forn(i, 0, M.size()){
vb a(31, M[i]);
send_packet(a);
}
}
vector<bool> receive_message(vector<vector<bool>> R) {
vb a;
forn(i, 0, R.size()){
ll qo = 0, qn = 0;
forn(j, 0, 31){
if(R[i][j] == 0) qo++;
else qn++;
}
if(qo > qn) a.pb(0);
else a.pb(1);
}
return a;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |