# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
747735 | Rafi22 | 비스킷 담기 (IOI20_biscuits) | C++14 | 1 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define ll long long
ll mod=1000000007;
int inf=1000000007;
ll infl=1000000000000000007;
const int K=67;
ll ile[K][K];
ll count_tastiness(ll x, vector<ll>a)
{
int k=sz(a);
for(int i=0;i<k;i++)
{
ll c=0;
for(int j=i;j<k;j++)
{
c=c/2+a[j];
ile[i][j]=c;
}
}
vector<pair<ll,pair<ll,int>>>V;
V.pb({0,{0,-1}});
for(int i=0;i<k;i++)
{
for(auto [p,z]:V)
{
ll a=z.st;
int j=z.nd;
if(a>=(1LL<<i)) break;
ll q=p/(1LL<<(i-j))+ile[j+1][i];
if(q<x) break;
V.pb({q-x,{a+(1LL<<i),i}});
}
}
return sz(V);
}
/*int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cout<<count_tastiness(2, {2, 1, 2});
return 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... |