# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
959593 | 12345678 | 비스킷 담기 (IOI20_biscuits) | C++17 | 1045 ms | 428 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int kx=65, nx=1e5+5;
long long count_tastiness(long long x, std::vector<long long> a) {
ll res=0;
vector<ll> c(kx);
for (int i=0; i<a.size(); i++) c[i]=a[i];
for (ll i=0; i<nx; i++)
{
if (i*x>nx) break;
bool f=0;
vector<ll> tmp(kx);
for (int j=0; j<20; j++) tmp[j]=c[j];
for (int j=0; j<x; j++)
{
ll cur=i, idx=20;
while (idx>=0&&cur>0)
{
if (!tmp[idx]||(1<<idx)>cur) --idx;
else if ((tmp[idx]*(1<<idx))<cur) cur-= tmp[idx]*(1<<idx), tmp[idx]=0;
else tmp[idx]-=(cur/(1<<idx)), cur=cur%(1<<idx);
//if (i==7) cout<<"here "<<idx<<' '<<cur<<'\n';
}
/*
if (i==7)
{
cout<<"cur "<<cur<<'\n';
cout<<"debug : ";
for (int k=0; k<4; k++) cout<<tmp[k]<<' ';
cout<<'\n';
}*/
if (cur!=0)
{
f=1;
break;
}
}
if (!f) res++;
}
return res;
}
컴파일 시 표준 에러 (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... |