# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
463453 | osmanallazov | Traffic (IOI10_traffic) | C++14 | 341 ms | 53316 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 "traffic.h"
#include<bits/stdc++.h>
using namespace std;
int LocateCentre(int n, int p[], int s[], int d[]){
long long sum=0,sum1=0,s1[n],s2[n],res[n],mini=1e9;
for(int i=0;i<n;i++){
sum=sum+p[i];
s1[i]=sum-p[i];
}
for(int i=0;i<n;i++){
s2[i]=sum-s1[i]-p[i];
}
for(int i=0;i<n;i++){
res[i]=max(s1[i],s2[i]);
}
for(int i=0;i<n;i++){
mini=min(res[i],mini);
}
for(int i=0;i<n;i++){
if(mini==res[i]){
return i;
}
}
}
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... |