# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
44994 | SpaimaCarpatilor | Worst Reporter 3 (JOI18_worst_reporter3) | C++17 | 1054 ms | 262144 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int N, M, D[500009], t[500009];
const int INF = 1e9 + 5;
int getPos (int T, int i)
{
int times = T / t[i];
if (1LL * times * D[i] - i > INF) return INF;
return -i + times * D[i];
}
int main ()
{
//freopen ("input", "r", stdin);
//freopen ("output", "w", stdout);
scanf ("%d %d", &N, &M), D[0] = 1, t[0] = 1;
for (int i=1; i<=N; i++)
{
scanf ("%d", &D[i]);
int k = D[i] / D[i - 1];
if (D[i] % D[i - 1] != 0) k ++;
D[i] = k * D[i - 1];
if (k <= INF / t[i - 1]) t[i] = k * t[i - 1];
else t[i] = INF;
}
컴파일 시 표준 에러 (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... |