Submission #657605

#TimeUsernameProblemLanguageResultExecution timeMemory
657605TimDeeA Difficult(y) Choice (BOI21_books)C++17
0 / 100
11 ms508 KiB
#include"books.h" #include <bits/stdc++.h> using namespace std; using ll = long long; void solve(int n, int k, ll A, int s) { if (s!=n) return; vector<ll> a(n); for (int i=0; i<n; ++i) a[i]=skim(i+1); if (k==3) { for (int i=0; i<n-2; ++i) { for (int j=i+1; j<n-1; ++j) { for (int k=i+1; j<n-1; ++k) { ll s = a[i]+a[j]+a[k]; if (s>=A && s<=2*A) { answer({i+1,j+1,k+1}); } } } } 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...