# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
747778 | Rafi22 | 비스킷 담기 (IOI20_biscuits) | C++14 | 2 ms | 1176 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;
ll ile[67][67];
ll count_tastiness(ll x, vector<ll>a)
{
int k=sz(a);
for(int i=0;i<60;i++)
{
ll c=0;
for(int j=i;j<60;j++)
{
c/=2;
if(j<k) c+=a[j];
ile[i][j]=c;
}
}
vector<pair<ll,pair<ll,int>>>V;
V.pb({0,{0,-1}});
for(int i=0;i<60;i++)
{
for(auto [p,z]:V)
{
ll a=z.st;
int j=z.nd;
if(j==i) break;
ll q=p/(1LL<<(i-j))+ile[j+1][i];
//if(q<x) break;
if(q>=x) 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(1, {5})<<endl;
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... |