제출 #575049

#제출 시각아이디문제언어결과실행 시간메모리
575049MajidA Difficult(y) Choice (BOI21_books)C++17
0 / 100
3 ms1092 KiB
#include<bits/stdc++.h> #include<books.h> using namespace std; using ll = long long; using db = double; #define pb push_back #define sz(vec) ((ll)vec.size()) #define all(vec) vec.begin(), vec.end() #define f first #define s second const int MOD = 1e9 + 7; const ll BIGINF = ((ll)1e18) + 7; #define Speeed ios::sync_with_stdio(0);cin.tie(NULL); cout.tie(NULL); void solve(int n, int k, ll a, int s){ vector<ll> vec(n+1); for(ll i = 1; i <= n; i++){ vec[i] = skim(i); } ll sum = 0; vector<int> temp; for(ll i = 1; i <= n; i++){ if(sum < a or sz(temp) < k){ if(sz(temp)<k){ if(sum + vec[i] <= 2*a){ sum+=vec[i]; temp.pb(i); } } } } if(sum>=a and sum<=2*a and sz(temp)==k){ answer(temp); } else impossible(); // answer(temp); } // // int main(){ // // solve(5, 3, 10, 0); // }
#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...