Submission #1123674

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11236742024-12-04 01:26:39math_rabbit_1028Message (IOI24_message)C++20
Compilation error
0 ms0 KiB
#include "message.h"
using namespace std;
vector<bool> add_blank(vector<bool> A, vector<bool> C) {
vector<bool> ret;
reverse(A.begin(), A.end());
for (int i = 0; i < 31; i++) {
if (C[i]) ret.push_back(0);
else {
ret.push_back(A.back());
A.pop_back();
}
}
assert(A.empty());
return ret;
}
void send_message(vector<bool> M, vector<bool> C) {
int S = (int)(M.size());
vector<bool> T(31, 1), F(31, 0);
for (int i = 0; i < 30; i++) {
if (C[i]) send_packet(T);
else send_packet(F);
}
for (int i = 0; i < S; i += 16) {
vector<bool> A(16, 0);
for (int j = 0; j < 16; j++) {
A[j] = (i+j < S) ? M[i+j] : 0;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

message.cpp: In function 'std::vector<bool> add_blank(std::vector<bool>, std::vector<bool>)':
message.cpp:14:9: error: 'assert' was not declared in this scope
   14 |         assert(A.empty());
      |         ^~~~~~
message.cpp:2:1: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?
    1 | #include "message.h"
  +++ |+#include <cassert>
    2 | using namespace std;
message.cpp: In function 'std::vector<bool> rem_blank(std::vector<bool>, std::vector<bool>)':
message.cpp:50:9: error: 'assert' was not declared in this scope
   50 |         assert(ret.size() == 16);
      |         ^~~~~~
message.cpp:50:9: note: 'assert' is defined in header '<cassert>'; did you forget to '#include <cassert>'?