제출 #433865

#제출 시각아이디문제언어결과실행 시간메모리
433865kwongweng비스킷 담기 (IOI20_biscuits)C++17
9 / 100
1083 ms332 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll count_tastiness(ll x, vector<ll> a) { ll ans = 0; int k = a.size(); while (k < 60){ a.push_back(0); k++; } ll num = 0; for (int i = 0; i < k; i++){ ll val = (1<<i); num += val * a[i]; } for (int i = 0; i <= num; i++){ ll cur = 0; bool sol = true; for (int j = 0; j < 20; j++){ cur = cur/2 + a[j]; if (i & (1<<j)){ if (cur < x){ sol = false; break; } cur -= x; } } if (sol){ 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...