| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1214353 | thangdz2k7 | 비스킷 담기 (IOI20_biscuits) | C++20 | 1096 ms | 21384 KiB |
#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
long long count_tastiness(long long x, vector <long long> a){
int k = a.size();
while (k < 60){
k ++;
a.push_back(0);
}
unordered_map <long long, long long> dp;
dp[0] = 1;
for (int i = 0; i < k; ++ i){
unordered_map <long long, long long> new_dp;
for (auto tmp : dp){
for (long long choose : {0ll, x}) if (tmp.first + a[i] >= choose){
long long remains = (tmp.first + a[i] - choose) / 2;
new_dp[remains] += tmp.second;
}
}
swap(dp, new_dp);
}
long long ans = 0;
for (auto tmp : dp) ans += tmp.second;
return ans;
}
| # | 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... | ||||
