# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
114106 | Saboon | Worst Reporter 3 (JOI18_worst_reporter3) | C++14 | 1961 ms | 31424 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = 1e9 + 10;
const int maxn = 5e5 + 10;
ll a[maxn], b[maxn];
int d[maxn];
int myplace(int idx, int time){
return (time / a[idx]) * b[idx] - idx;
}
int main(){
ios_base::sync_with_stdio(false);
int n, Q;
cin >> n >> Q;
for (int i = 1; i <= n; i++)
cin >> d[i];
// i-th person moves b[i] units forward every a[i] unit of time
a[1] = b[1] = d[1];
for (int i = 2; i <= n; i++){
int lo = 0, hi = inf;
while (hi - lo > 1){
int mid = (lo + hi) >> 1;
if (1ll * mid * b[i - 1] < d[i])
lo = mid;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |