| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 699810 | cig32 | 비스킷 담기 (IOI20_biscuits) | C++17 | 1085 ms | 340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "biscuits.h"
#include "bits/stdc++.h"
using namespace std;
vector<long long> b;
bool check(long long x, long long y) {
int k = b.size();
__int128 prev = 0;
__int128 prod = x;
prod *= y;
for(int i=k-1; i>=0; i--) {
__int128 c = y / (1ll << i);
c *= x;
c -= prev / (1ll << i);
c = min(c, (__int128) b[i]);
prev += c * (1ll << i);
}
if(prev == prod) return 1;
return 0;
}
long long count_tastiness(long long x, std::vector<long long> a) {
b = a;
long long answer = 0;
for(long long y=0; y<=100000; y++) {
answer += check(x, y);
}
return answer;
}
| # | 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... | ||||
