제출 #1039366

#제출 시각아이디문제언어결과실행 시간메모리
1039366fv3추월 (IOI23_overtaking)C++17
9 / 100
2 ms452 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #include "overtaking.h" ll 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] + (ll)W[0] * (ll)S[i]; return; } ll arrival_time(ll Y) { for (int i = 1; i < M; i++) { if (Y + (ll)S[i-1] * X > arrival[i-1] && Y + (ll)S[i] * X < arrival[i]) return arrival[i] + (L - (ll)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...