이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "overtaking.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector <ll>;
using vi = vector <int>;
int l, n, x, m;
vll t;
vi w, s;
// bus i moves 1 km in w[i] s/km
void init (int l, int n, vll t, vi w, int x, int m, vi s) {
::l = l, ::n = n, ::t = t, ::w = w, ::x = x, ::m = m, ::s = s;
assert(::m == 2);
assert(::s[0] == 0 && ::s[1] == ::l);
}
ll arrival_time (ll y) {
ll maxN = ll(x)+y*ll(l);
for (ll i = 0; i < n; i++) {
if (t[i] < y) maxN = max(maxN, t[i]+ll(w[i])*ll(l));
}
return maxN;
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |