QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#819052 | #9237. Message | dongyc666# | Compile Error | / | / | C++17 | 470b | 2024-12-18 11:59:11 | 2024-12-18 11:59:12 |
Judging History
answer
#include<bits/stdc++.h>
#include "message.h"
using namespace std;
void send_message(vector<bool>M,vector<bool>C){
for(int i=0;i<S;++i){
vector<bool>v(31);
for(int j=0;j<31;++j)v[j]=M[i];
send_packet(v);
}
}
vector<bool>receive_message(vector<vector<bool>>R){
vector<bool>ans;
for(auto lcy:R){
int cnt0=0,cnt1=0;
for(auto x:lcy)cnt0+=(x==0),cnt1+=(x==1);
if(cnt0>cnt1)ans.emplace_back(0);
else ans.emplace_back(1);
}
return ans;
}
详细
answer.code: In function ‘void send_message(std::vector<bool>, std::vector<bool>)’: answer.code:6:23: error: ‘S’ was not declared in this scope 6 | for(int i=0;i<S;++i){ | ^