제출 #414736

#제출 시각아이디문제언어결과실행 시간메모리
414736milleniumEeeeA Difficult(y) Choice (BOI21_books)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "books.h" // start my defines #define fr first #define sc second #define pii pair<int, int> #define pb push_back #define szof(s) (int)s.size() #define all(s) s.begin(), s.end() //#define ll long long template<class T>void umax(T &a,T b){if(a < b)a = b;} template<class T>void umin(T &a,T b){if(b < a)a = b;} // finish my defines #ifndef EVAL #include "grader.cpp" #endif using namespace std; // answer(vector <int> v) // skim(int i) const int MAXN = (int)1e5 + 5; ll arr[MAXN]; void solve(int N, int K, ll A, int S) { for (int i = 1; i <= N; i++) { arr[i] = skim(i); } int cur = 0; for (int i = 1; i <= N; i++) { for (int j = i + 1; j <= N; j++) { for (int k = j + 1; k <= N; k++) { cur = arr[i] + arr[j] + arr[k]; if (A <= cur && cur <= A + A) { answer({i, j, k}); return; } } } } impossible(); }

컴파일 시 표준 에러 (stderr) 메시지

books.cpp:27:1: error: 'll' does not name a type; did you mean 'all'?
   27 | ll arr[MAXN];
      | ^~
      | all
books.cpp:29:26: error: 'll' has not been declared
   29 | void solve(int N, int K, ll A, int S) {
      |                          ^~
books.cpp: In function 'void solve(int, int, int, int)':
books.cpp:31:3: error: 'arr' was not declared in this scope
   31 |   arr[i] = skim(i);
      |   ^~~
books.cpp:37:11: error: 'arr' was not declared in this scope
   37 |     cur = arr[i] + arr[j] + arr[k];
      |           ^~~