(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

제출 #1083842

#제출 시각아이디문제언어결과실행 시간메모리
1083842ZeroCool비스킷 담기 (IOI20_biscuits)C++14
100 / 100
11 ms1468 KiB
#include "biscuits.h" #include <bits/stdc++.h> using namespace std; using ll = long long; const ll N = 60 + 2; const ll INF = 1e18; ll dp[N]; long long count_tastiness(long long x, std::vector<long long> A) { fill(dp, dp+N, 1); A.resize(N); for(int i = 1;i<N;i++)A[i] = (A[i] << i) + A[i-1]; for(int i = 0;i<N;i++){ ll k = INF; for(int j = i-1;j>=0;j--){ k = min(k, A[j]); if(x <= (k >> j)){ dp[i] += dp[j]; k -= (x << j); } } } return dp[N-1]; }
#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...