제출 #444459

#제출 시각아이디문제언어결과실행 시간메모리
444459yungyaoA Difficult(y) Choice (BOI21_books)C++17
0 / 100
4 ms200 KiB
using namespace std; #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <utility> #include <memory.h> #include <map> #include <set> typedef long long LL; typedef pair<int,int> pii; #define pb push_back #define mkp make_pair #define iter(x) x.begin(),x.end() const int maxn = 0; #include "books.h" #define mid (LB + RB)/2 void solve(int n,int k,LL a,int s){ LL v[1010]; for (int i=1;i<=n;++i) v[i] = skim(i); for (int j=2;j<n;++j){ for (int i=1;i<j;++i){ if (v[i] + v[j] >= a*2) break; int k = lower_bound(v+j+1,v+n+1,a - v[i] - v[j]) - v; if (k == n+1) continue; int sum = v[i] + v[j] + v[k]; if (sum <= a*2 and sum >= a) {answer({i,j,k}); return;} } } impossible(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...