Submission #1157735

#TimeUsernameProblemLanguageResultExecution timeMemory
1157735arkanefuryShopping (JOI21_shopping)C++20
Compilation error
0 ms0 KiB
#include "Anna.h" #include <vector> namespace { int N, L, R; int a[105]; int count = 0, ans = 0, sum = 0, k = 0; } // namespace void InitA(int N, int L, int R) { ::N = N; ::L = L; ::R = R; for(int i = 0; i < 8; i ++){ a[i] = ((L >> i) & 1); } count = 0; } void ReceiveA(bool x){ if(x)sum += (1 << count); count ++; if(count == 10)a[k] = sum, k ++, count = 0; if(k == N){ int ans = 1e9; for(int i = L; i <= R; i ++)ans = std::min(ans, a[i]); } } int Answer() { return ans; }
#include "Bruno.h" #include <vector> namespace { int N; int variable_example[1000000]; int count; bool FunctionExample(bool P) { return !P; } } // namespace void InitB(int N, std::vector<int> P) { ::N = N; for(int i = 0; i < N; i++){ for(int j = 0, j < 10)SendB(P[i] >> j & 1); } } void ReceiveB(bool y){ }

Compilation message (stderr)

# 2번째 컴파일 단계

Bruno.cpp: In function 'void InitB(int, std::vector<int>)':
Bruno.cpp:19:21: error: expected ';' before '<' token
   19 |     for(int j = 0, j < 10)SendB(P[i] >> j & 1);
      |                     ^~
      |                     ;
Bruno.cpp:19:22: error: expected primary-expression before '<' token
   19 |     for(int j = 0, j < 10)SendB(P[i] >> j & 1);
      |                      ^
Bruno.cpp:19:26: error: expected ';' before ')' token
   19 |     for(int j = 0, j < 10)SendB(P[i] >> j & 1);
      |                          ^
      |                          ;