제출 #657598

#제출 시각아이디문제언어결과실행 시간메모리
657598TimDeeA Difficult(y) Choice (BOI21_books)C++17
컴파일 에러
0 ms0 KiB
void solve(int n, int k, ll A, int s) { if (s!=n) return; vector<ll> a(n); for (int i=0; i<n; ++i) a[i]=skim(i+1); if (k==3) { for (int i=0; i<n; ++i) { for (int j=i+1; j<n; ++j) { int l=j+1, r=n; while (l<r) { int mid=(l+r)>>1; if (1ll*a[i]+1ll*a[j]+1ll*a[mid]<A) l=mid+1; else r=mid; } if (1LL*a[i]+1LL*a[j]+1LL*a[r]<=2*A) { answer({i+1,j+1,r+1}); return; } } } impossible(); } }

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

books.cpp:1:26: error: 'll' has not been declared
    1 | void solve(int n, int k, ll A, int s) {
      |                          ^~
books.cpp: In function 'void solve(int, int, int, int)':
books.cpp:3:2: error: 'vector' was not declared in this scope
    3 |  vector<ll> a(n);
      |  ^~~~~~
books.cpp:3:9: error: 'll' was not declared in this scope
    3 |  vector<ll> a(n);
      |         ^~
books.cpp:3:13: error: 'a' was not declared in this scope
    3 |  vector<ll> a(n);
      |             ^
books.cpp:4:31: error: 'skim' was not declared in this scope
    4 |  for (int i=0; i<n; ++i) a[i]=skim(i+1);
      |                               ^~~~
books.cpp:16:6: error: 'answer' was not declared in this scope
   16 |      answer({i+1,j+1,r+1});
      |      ^~~~~~
books.cpp:21:3: error: 'impossible' was not declared in this scope
   21 |   impossible();
      |   ^~~~~~~~~~