| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1311904 | eri16 | 메시지 (IOI24_message) | C++20 | 486 ms | 904 KiB |
#include <bits/stdc++.h>
#include "message.h"
using namespace std;
using ll = long long;
void send_message(vector<bool> M, vector<bool> C){
ll n = C.size();
vector <bool> truth(31,true);
vector <bool> lie(31,false);
ll index=-1;
for (int i=0; i<31; i++){
if (C[i]){send_packet(lie);}
else{send_packet(truth);index=i;}
}
for (int i=0; i<M.size(); i++){
vector <bool> ans = lie;
ans[index]=true;
send_packet(ans);
}
}
vector<bool> receive_message(vector<vector<bool>> R){
ll idx=-1;
for (int i=0; i<31; i++){
ll sm = 0;
for (int j=0; j<31; j++){
if (R[i][j]){sm++;}
}
if (sm>=16){idx=i;}
}
vector <bool> ans;
for (int i=31; i<R.size(); i++){
if (R[i][idx]){ans.push_back(true);}
else{ans.push_back(false);}
}
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
