(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

Submission #1082784

#TimeUsernameProblemLanguageResultExecution timeMemory
1082784beaconmcPacking Biscuits (IOI20_biscuits)C++14
0 / 100
1082 ms600 KiB
#include "biscuits.h" #include <bits/stdc++.h> typedef long long ll; #define FOR(i,x,y) for(ll i=x; i<y; i++) #define FORNEG(i,x,y) for(ll i=x; i>y; i--) using namespace std; long long count_tastiness(long long x, std::vector<long long> a) { vector<ll> temp = a; ll ans = 0; if (x > 100005) return 1; FOR(req,0,100005){ a = temp; bool flag = false; FOR(k,0,x){ ll sus = 0; FORNEG(i,a.size()-1, -1){ while (sus + (1<<i) <= req && a[i]) sus += (1<<i), a[i]--; } if (sus != req){ flag = true; break; } } if (!flag)ans++; } 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...