# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
644028 | someone | Worst Reporter 3 (JOI18_worst_reporter3) | C++14 | 542 ms | 22972 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 1 << 19, INF = 1e18 + 42;
int n, q, period[N];
int dicho(int t, int obj) {
int ans = -1;
for(int i = 18; i >= 0; i--)
if(period[ans + (1 << i)] * (t / period[ans + (1 << i)]) - ans - (1 << i) >= obj)
ans += (1 << i);
return ans;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n >> q;
n++;
period[0] = 1;
for(int i = 1; i < n; i++) {
cin >> period[i];
period[i] = ((period[i] + period[i-1] - 1) / period[i-1]) * period[i-1];
}
for(int i = n; i < N; i++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |