QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#885141 | #9237. Message | Geekmen | Compile Error | / | / | C++14 | 548b | 2025-02-06 14:11:42 | 2025-02-06 14:11:43 |
Judging History
This is the latest submission verdict.
- [2025-02-06 14:11:43]
- Judged
- Verdict: Compile Error
- Time: 0ms
- Memory: 0kb
- [2025-02-06 14:11:42]
- Submitted
answer
#include <iostream>
#include <vector>
#include "message.h"
using namespace std;
void send_message(std::vector<bool> M, std::vector<bool> C) {
int S = M.size();
for (int i = 0; i < S; i ++)
send_packet(std::vector<bool>(31, M[i]));
}
std::vector<bool> receive_message(std::vector<vector<bool>> R) {
int S = R.size();
std::vector<bool> res;
for (int i = 0; i < S; i ++) {
int C[2] = {0};
for (int j = 0; j < 31; j ++)
C[R[i][j]] ++;
if (C[0] > C[1]) res.push_back(0);
else res.push_back(1);
}
return res;
}
详细
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) { | ^~~