# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
592210 | farhan132 | Packing Biscuits (IOI20_biscuits) | C++17 | 1089 ms | 49888 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll , ll> ii;
#define ff first
#define ss second
#define pb push_back
#define in insert
unordered_map < ll , ll > mp[61];
vector < ll > a; ll x;
ll DP(ll pos, ll val){
if(pos >= a.size() && val == 0) return 1;
if(pos < a.size()){
val += a[pos];
}
if(mp[pos].count(val)) return mp[pos][val];
ll ret = DP(pos + 1, val / 2);
if(val >= x){
ret += DP(pos + 1, (val - x)/2);
}
return mp[pos][val] = ret;
}
long long count_tastiness(long long _x, std::vector<long long> _a) {
for(ll i = 0; i <= 60; i++) mp[i].clear();
a = _a; x = _x;
return DP(0, 0);
}
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |