제출 #941528

#제출 시각아이디문제언어결과실행 시간메모리
941528XiaoyangA Difficult(y) Choice (BOI21_books)C++17
0 / 100
4 ms708 KiB
#include "books.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; #define fi first #define se second #define pll pair<ll,ll> #define pb push_back #define debug(x) cerr<<#x<<"="<<x<<endl; #define MP make_pair #define rep(i,a,b) for(ll i=a;i<b;i++) #define SZ(x) (ll)x.size() #define ALL(x) x.begin(),x.end() #define endl "\n" const ll inf=1e18; const ll maxn=1e5+5; ll diff[maxn]; void solve(int n, int k, long long A, int s) { // TODO implement this function rep(i,1,n+1){ diff[i]=skim(i); } diff[n+2]=inf; rep(i,1,n-1){ rep(j,i+1,n){ ll sum=diff[i]+diff[j]; ll id=upper_bound(diff+j,diff+n,2*A-sum)-diff-1; if(id==n-1)continue; else{ vector<int>ans; ans.pb(i); ans.pb(j); ans.pb(id); answer(ans); 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...