Submission #1151157

#TimeUsernameProblemLanguageResultExecution timeMemory
1151157ShadowSharkAncient Machine (JOI21_ancient_machine)C++20
Compilation error
0 ms0 KiB
#include "Anna.h" #include <bits/stdc++.h> using namespace std; void Anna(int N, std::vector<char> S) { int firstX = -1; for (int i = 0; i < N; i++) { if (S[i] == 'X') { firstX = i; break; } } for (int i = 1; i <= firstX; i++) send(1); send(0); int pre = firstX; for (int j = firstX + 1; j < N; j++) { if (S[j] == 'Z') { for (int k = 2; k <= j - pre; k++) send(1); send(0); pre = j; } } }
#include "Bruno.h" #include <bits/stdc++.h> void Bruno(int N, int L, std::vector<int> A) { bool mark[200005]; memset(mark, false, sizeof mark); int firstX = 1; for (int i = 0; i < L; i++) if (A[i] == 1) firstX++; else break; int pre = firstX, cnt = 0; for (int j = firstX; j < L; j++) { if (A[j] == 1) cnt++; else { int nxt = pre + cnt + 1; for (int i = nxt - 1; i >= pre && !mark[i]; i--) { Remove(i - 1); mark[i] = true; } pre = nxt; } } for (int i = 1; i <= N; i++) if (!mark[i]) { mark[i] = true; Remove(i - 1); } }

Compilation message (stderr)

# 1번째 컴파일 단계

Anna.cpp: In function 'void Anna(int, std::vector<char>)':
Anna.cpp:15:9: error: 'send' was not declared in this scope; did you mean 'Send'?
   15 |         send(1);
      |         ^~~~
      |         Send
Anna.cpp:16:5: error: 'send' was not declared in this scope; did you mean 'Send'?
   16 |     send(0);
      |     ^~~~
      |     Send