| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 881909 | irmuun | Overtaking (IOI23_overtaking) | C++17 | 0 ms | 348 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],rl[2];
bool flag=false;
if(Y<=t[0]||x<=w[0]){
return l*x;
}
e[0]=t[0];
e[1]=Y;
bool swap=false;
for(ll i=1;i<m;i++){
e[0]=e[0]+1ll*(s[i]-s[i-1])*w[i];
e[1]=e[1]+1ll*(s[i]-s[i-1])*x;
if(!swap&&e[1]<=e[0]){
e[1]=e[0];
swap=true;
}
}
return e[1];
}
return 0ll;
}Compilation message (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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
