제출 #1216230

#제출 시각아이디문제언어결과실행 시간메모리
1216230shmax메시지 (IOI24_message)C++20
10 / 100
338 ms848 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...