# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
602832 | MohamedFaresNebili | 비스킷 담기 (IOI20_biscuits) | C++14 | 1081 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
/// #pragma GCC optimize ("Ofast")
/// #pragma GCC target ("avx2")
/// #pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using ii = pair<ll, ll>;
using vi = vector<int>;
#define ff first
#define ss second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lb lower_bound
const int oo = 1000 * 1000 * 1000 + 7;
ll count_tastiness(ll X, vector<ll> A) {
int K = A.size(); ll res = 0;
ll C = 0, pw[60]; pw[0] = 1;
for(int l = 1; l < 60; l++)
pw[l] = pw[l - 1] * 2;
for(int l = 0; l < K; l++)
C += pw[l] * A[l];
int Y = C / X;
for(int l = 0; l * X <= C; l++) {
int T = 0; bool O = 1;
for(int i = 0; i < K && O; i++) {
if(!(l & (1 << i))) {
T += A[i]; T /= 2;
continue;
}
T += A[i];
if(T < X) O = 0;
T -= X; T /= 2;
}
res += O;
}
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... |