제출 #1038973

#제출 시각아이디문제언어결과실행 시간메모리
1038973fv3추월 (IOI23_overtaking)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #include "overtaking.h" int L, N, M; ll X; vector<ll> T; vector<int> W, S; vector<ll> arrival; void init(int l, int n, vector<ll> t, vector<int> w, int x, int m, vector<int> s) { L = l; N = n; T = t; W = w; X = x; M = m; S = s; arrival = vector<ll>(M); for (int i = 0; i < M; i++) arrival[i] = T[0] + W[0] * S[i]; return; } ll arrival_time(ll Y) { for (int i = 1; i < M; i++) { if (Y + S[i-1] * X > arrival[i-1] && Y + S[i] * X <= arrival[i]) return arrival[i] + (L - S[i]) * X; } return Y + X * L; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...