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 "deliveries.h"
int deliveries[2];
int dist;
void init(int N, std::vector<int> U, std::vector<int> V, std::vector<int> T, std::vector<int> W) {
dist=T[0];
deliveries[0]=W[0];
deliveries[1]=W[1];
}
long long max_time(int S, int X) {
deliveries[S]=X;
if(deliveries[0]==deliveries[1]){
return dist*deliveries[0]*2;
}
if(deliveries[0]>deliveries[1]){
return dist*deliveries[1]*2;
}
return dist*(deliveries[0]+1)*2;
}
# | 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... |