# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
429336 | DanerZein | Packing Biscuits (IOI20_biscuits) | C++14 | 2 ms | 332 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX_Y=10;
long long count_tastiness(long long x, std::vector<long long> a) {
ll res=0;
ll bis[30];
for(int y=0;y<=MAX_Y;y++){
memset(bis,0,sizeof bis);
for(int j=0;j<a.size();j++) bis[j]=a[j];
bool sw=0;
for(int j=0;j<=20;j++){
ll ne;
if(y&(1<<j)){
ne=x;
if(bis[j]<x){
sw=1;
break;
}
}
else{
ne=0;
}
bis[j+1]+=((bis[j]-ne)/2);
}
if(!sw) 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... |