| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 306111 | MrDomino | 비스킷 담기 (IOI20_biscuits) | C++14 | 1091 ms | 384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
bool check(ll y, ll x, vector<ll> a)
{
/// can I form the number y x times???
int n = (int) a.size();
if (log2(y) >= n)
{
return 0;
}
ll have = 0;
ll need = 0;
for (int i = 0; i < n; i++)
{
have += a[i] * (1LL << i);
if (y & (1LL << i))
{
need += x * (1LL << i);
}
if (have < need)
{
return 0;
}
}
return 1;
}
ll count_tastiness(ll x, vector<ll> a)
{
ll sol = 0;
for (ll y = 0; y <= (ll) 5e5; y++)
{
sol += check(y, x, a);
}
return sol;
}
| # | 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... | ||||
