(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 #1075612

#TimeUsernameProblemLanguageResultExecution timeMemory
1075612Hugo1729Packing Biscuits (IOI20_biscuits)C++17
0 / 100
2 ms1116 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll k,X; ll A[1001]={0}; ll solve(int ptr, ll val){ if(val==0&&ptr>=X){ // cout << ptr << ' ' << val << ' ' << 1 << '\n'; return 1; } ll sus1=0,sus2=0; sus1=solve(ptr+1,A[ptr+1]+(val>>1)); if(val-X>=0){ sus2=solve(ptr+1,A[ptr+1]+((val-X)>>1)); } // cout << ptr << ' ' << val << ' ' << sus1+sus2 << '\n'; return sus1+sus2; } ll count_tastiness(ll x, vector<ll> a) { // cout << "\n\n"; k=a.size(); for(int i=0;i<k;i++)A[i]=a[i]; X=x; return solve(0,A[0]); 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...