QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#834075 | #9237. Message | hansiyuan | 0 | 0ms | 0kb | C++17 | 601b | 2024-12-27 10:59:50 | 2024-12-27 10:59:52 |
Judging History
answer
#include "message.h"
#include<bits/stdc++.h>
using namespace std;
vector<vector<bool>> G;
vector<bool> _0(31,0),_1(31,1);
void send_message(vector<bool> A,vector<bool> C){
int id = G.size();
G.push_back(A);
for(int i=0;i<=15;i++){
if(id>>i&1) send_packet(_1);
else send_packet(_0);
}
}
vector<bool> receive_message(vector<vector<bool>> A){
int id=0;
for(int i=0;i<=15;i++){
int c0=0,c1=0;
for(int j=0;j<31;j++)
if(A[i][j]==0) c0++;
else c1++;
if(c1>c0) id|=(1<<i);
}
return G[id];
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Instance #1 Runtime Error
Test #1:
score: 0
Instance #1 Runtime Error
Manager to Aisha
Aisha to Manager
Manager to Basma
Basma to Manager
Manager to Checker
0 ing with message 'manual RTE, cant read int from grader' Quitting with result code 1
result:
Subtask #2:
score: 0
Instance #1 Runtime Error
Test #8:
score: 0
Instance #1 Runtime Error
Manager to Aisha
Aisha to Manager
Manager to Basma
Basma to Manager
Manager to Checker
0 ing with message 'manual RTE, cant read int from grader' Quitting with result code 1