Submission #429119

#TimeUsernameProblemLanguageResultExecution timeMemory
429119abdzagPacking Biscuits (IOI20_biscuits)C++17
0 / 100
45 ms460 KiB
#include<bits/stdc++.h> #include<unordered_map> #include<unordered_set> #include "biscuits.h" #define rep(i,a,b) for(int i=int(a);i<int(b);i++) #define rrep(i,a,b) for(int i=int(a);i>int(b);i--) #define trav(a,v) for(auto& a: v) #define sz(v) v.size() #define all(v) v.begin(),v.end() #define vi vector<int> typedef long long ll; typedef long double ld; typedef unsigned long long ull; const long long inf = 2e9; using namespace std; long long count_tastiness(long long x, std::vector<long long> a) { ll ans = 1; vector<ll> cur; rep(i, 1, 1e5 + 1) { cur = a; bool done = true; rep(j, 0, 18) { if (!((1 << j) & i))continue; rrep(o, j - 1, -1) { if (a[j] >= x)break; a[j] += (a[o] - x) / (1 << (j - o)); } if (a[j] < x) { done = false; break; } } ans += done; } return ans; }
#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...