| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 466998 | armand | Packing Biscuits (IOI20_biscuits) | C++14 | 1083 ms | 332 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include <algorithm>
using namespace std;
int check_y(long long x, std::vector<long long> a, int y)
{
	if (x > y*a[0])
		return 0;
	int i, k = a.size();
	for (i = 0; i < k; i++)
		if ((1 << i) > y)
			break;
	i--;
	long long t = y * x;
	while (i>=0) {
		long long p = t / (1 << i);
		t -= min(a[i], p)*(1 << i);
		if (t == 0)
			return 1;
		i--;
	}
	return t == 0;
}
long long count_tastiness(long long x, std::vector<long long> a) 
{
	int k = a.size();
	int res = 1;
	for (int y = 1; y <= 100000; y++)
		res += check_y(x, a, y);
	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... | ||||
