# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
581930 | AlexLuchianov | Sparklers (JOI17_sparklers) | C++14 | 198 ms | 9452 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
using ll = long long;
int const nmax = 200000;
int const inf = 1000000000;
int v[5 + nmax];
ll arr[2][5 + nmax];
ll prefmin[5 + nmax], suffmin[5 + nmax];
ll prefmax[5 + nmax], suffmax[5 + nmax];
bool solve(int n, int k, int t, int speed) {
ll base = speed * t * 2LL;
int ptr = 0, ptr2 = 0;
arr[0][++ptr] = 0;
arr[1][++ptr2] = 0;
for(int i = k - 1; 1 <= i; i--) {
arr[0][++ptr] = -(v[i + 1] - v[i]);
arr[0][++ptr] = base;
}
for(int i = k + 1; i <= n; i++) {
arr[1][++ptr2] = -(v[i] - v[i - 1]);
arr[1][++ptr2] = base;
}
컴파일 시 표준 에러 (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... |