Submission #574990

#TimeUsernameProblemLanguageResultExecution timeMemory
574990m_fenaisA Difficult(y) Choice (BOI21_books)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
void solve(int N, int K, long long A, int S) {
  vector<int> v;
  for(int i=1; i<=N; i++){
    v.push_back(skim(i));
  }
  for(int i=0; i<v.size()-2; i++)
  {
    int cnt = v[i] + v[i+1] + v[i+2];
    if(cnt <= A*2 && cnt >= A)
    {
      vector<int> ans;
      ans.push_back(i+1);
      ans.push_back(i+2);
      ans.push_back(i+3);
      answer(ans);
    }
  }
  impossible();
}

Compilation message (stderr)

books.cpp: In function 'void solve(int, int, long long int, int)':
books.cpp:6:17: error: 'skim' was not declared in this scope
    6 |     v.push_back(skim(i));
      |                 ^~~~
books.cpp:8:17: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |   for(int i=0; i<v.size()-2; i++)
      |                ~^~~~~~~~~~~
books.cpp:17:7: error: 'answer' was not declared in this scope
   17 |       answer(ans);
      |       ^~~~~~
books.cpp:20:3: error: 'impossible' was not declared in this scope
   20 |   impossible();
      |   ^~~~~~~~~~