Submission #1207115

#TimeUsernameProblemLanguageResultExecution timeMemory
1207115tkm_algorithms비스킷 담기 (IOI20_biscuits)C++20
0 / 100
1095 ms328 KiB
/** * In the name of Allah * We are nothing and you're everything **/ #include <bits/stdc++.h> #include "biscuits.h" using namespace std; using ll = long long; #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() //#define int long long const char nl = '\n'; ll count_tastiness(ll x, vector<ll> a) { int y = 10, n = sz(a), res = 0; vector<ll> onki = a; for (int i = 1; i <= y; ++i) { int ok = 1; for (int k = 1; k <= x; ++k) { int need = i; for (int t = n-1; t >= 0; --t)while (a[t] > 0 && (1ll<<t) <= need && need > 0)need -= (1ll<<t), a[t] -= 1; if (need > 0) { ok = 0; break; } } res += ok; a = onki; //if (ok) //cout << i << " "; } //cout << nl; return res+1; } //int32_t main() { //ios::sync_with_stdio(0); //cin.tie(0); //cout << count_tastiness(2, {2, 1, 2}); //return 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...