Submission #863488

#TimeUsernameProblemLanguageResultExecution timeMemory
863488Ahmed_SolymanA Difficult(y) Choice (BOI21_books)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "books.h" using namespace std; typedef long long ll; // // --- Sample implementation for the task books --- // // To compile this program with the sample grader, place: // books.h books_sample.cpp sample_grader.cpp // in a single folder and run: // g++ books_sample.cpp sample_grader.cpp // in this folder. // void solve(int n, int k, long long a, int s) { // TODO implement this function vector<ll>v; for(int i=1;i<=n;i++){ v.push_back(skim(i)); } for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ ll sum=v[i]+v[j]; int z=upper_bound(v.begin(),v.end(),a*2-sum)-v.begin(); z--; while(z==i || z==j)k--; if(z<0 || v[i]+v[j]+v[z]<){ continue; } answer({i+1,j+1,k+1}); return; } } impossible(); }

Compilation message (stderr)

books.cpp: In function 'void solve(int, int, long long int, int)':
books.cpp:29:38: error: expected primary-expression before ')' token
   29 |             if(z<0 || v[i]+v[j]+v[z]<){
      |                                      ^