# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
602896 | MohamedFaresNebili | Packing Biscuits (IOI20_biscuits) | C++14 | 90 ms | 15864 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
/// #pragma GCC optimize ("Ofast")
/// #pragma GCC target ("avx2")
/// #pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using ii = pair<ll, ll>;
using vi = vector<int>;
#define ff first
#define ss second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lb lower_bound
const int oo = 1000 * 1000 * 1000 + 7;
ll N; vector<ll> V;
map<ll, ll> DP[60];
ll solve(ll i, ll T) {
if(i == 60) return 1;
if(DP[i].count(T)) return DP[i][T];
ll best = 0;
if(T + V[i] >= N)
best += solve(i + 1, (T + V[i] - N) / 2);
best += solve(i + 1, (T + V[i]) / 2);
return DP[i][T] = best;
}
ll count_tastiness(ll X, vector<ll> A) {
ll K = A.size(); N = X; ll res = 0;
for(ll l = 0; l < 60; l++)
V.push_back((l < K ? A[l] : 0));
return solve(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... |