| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1351851 | Jawad_Akbar_JJ | 비스킷 담기 (IOI20_biscuits) | C++17 | 1094 ms | 484 KiB |
#include <iostream>
#include <vector>
using namespace std;
long long count_tastiness(long long x, vector<long long> c){
int ans = 0, sum = 0, k = c.size();
for (int i=0;i<k;i++)
sum += c[i]<<i;
for (int y=1;y * x <= sum;y++){
vector<long long> C = c;
int t = 1;
for (int j = 18, l = k - 1;j + 1; j--){
while (l > j)
l--;
if ((y & (1<<j)) == 0)
continue;
long long req = x;
while (req > 0 and l >= 0){
int kk = min(req, C[l]);
C[l] -= kk;
req -= kk;
req *= 2;
if (C[l] == 0)
l--;
}
if (req > 0)
t = 0;
}
ans += t;
}
return ans + 1;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
