| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 824075 | drdilyor | 비스킷 담기 (IOI20_biscuits) | C++17 | 1076 ms | 18616 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "biscuits.h"
using namespace std;
using ll = long long;
const int T = 120;
long long count_tastiness(long long x, std::vector<long long> a) {
int k = a.size();
int ans = 0;
int sum = 0;
for (int i = 0; i < k; i++)
sum += a[i] << i;
for (int y = 0; y <= sum / x; y++) {
auto b = a;
vector<int> done(x, 0);
for (int i = k-1; i >= 0; i--) {
for (int j = 0; j < x; j++) {
while (done[j] + (1 << i) <= y && b[i]) {
b[i]--;
done[j] += (1 << i);
}
}
}
bool ok = true;
for (int i : done) ok &= i == y;
ans += ok;
}
return ans;
}
| # | 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... | ||||
