# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
881929 | irmuun | Overtaking (IOI23_overtaking) | C++17 | 3564 ms | 600 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "overtaking.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
int l,n,x,m;
vector<ll>t;
vector<int>w,s;
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;
}
ll arrival_time(ll Y){
if(n==1){
ll e[2],nxt[2];
e[0]=t[0];
e[1]=Y;
for(int i=1;i<m;i++){
nxt[0]=e[0]+1ll*(s[i]-s[i-1])*w[0];
nxt[1]=e[1]+1ll*(s[i]-s[i-1])*x;
if(e[0]<e[1]){
nxt[1]=max(nxt[1],nxt[0]);
# | 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... |