QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#818849 | #9237. Message | hansiyuan# | Compile Error | / | / | C++14 | 639b | 2024-12-18 10:01:37 | 2024-12-18 10:01:44 |
Judging History
This is the latest submission verdict.
- [2024-12-18 10:01:44]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2024-12-18 10:01:37]
- Submitted
answer
#include "message.h"
#include <bits/stdc++.h>
using namespace std;
int n;
vector<bool> A,B;
vector<bool> T;
void send_message(vector<bool> S,vector<bool> C){
n = S.size();
for(int i=0;i<=30;i++)
A.push_back(0),B.push_back(1);
for(int i=0;i<n;i++){
if(S[i]==0) send_packet(A);
else send_packet(B);
}
}
vector<bool> receive_message(vector<vector<bool>> R){
for(int i=0;i<n;i++){
int c0=0,c1=0;
for(int j=0;j<=30;j++)
if(R[i][j]) c1++;
else c0++;
if(c0>c1) T.push_back(0);
else T.push_back(1);
}
return T;
}
详细
stub.cpp: In function ‘int {anonymous}::sz(const C&)’: stub.cpp:27:52: error: ‘size’ is not a member of ‘std’; did you mean ‘size_t’? 27 | template<class C> int sz(const C& c) { return std::size(c); } | ^~~~ | size_t stub.cpp: In function ‘void {anonymous}::write_int_array(const int*, int)’: stub.cpp:70:13: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ 70 | if (int ret = fwrite(arr, sizeof(int), len, fout); len != ret) { | ^~~ stub.cpp: In function ‘void {anonymous}::read_int_array(int*, int)’: stub.cpp:105:13: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ 105 | if (int ret = fread(arr, sizeof(int), len, fin); len != ret) { | ^~~