| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1367881 | Almonther | 메시지 (IOI24_message) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ll long long
//std::vector<bool> send_packet(std::vector<bool> A)
void send_message(std::vector<bool> M, std::vector<bool> C){
for(int i=0;i<M.size();i++){
vector<bool>a;
for(int j=0;j<31;j++){
if(M[i]) a.push_back(1);
else a.push_back(0);
}
send_packet(a);
}
}
std::vector<bool> receive_message(std::vector<std::vector<bool>> R) {
vector<bool>ans;
for(auto i:R){
ll od=0,ev=0;
for(auto j:i){
if(j) od++;
else ev++;
}
if(od>ev) ans.push_back(1);
else ans.push_back(0);
}
return ans;
}
// int main(){
// calculate_costs({15, 12, 2, 10, 21},
// {5, 4, 5, 6, 3},
// {1, 2, 2, 3, 2},
// {5, 9, 1})
// }