# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
400673 | ioi | Traffic (IOI10_traffic) | C++14 | 1 ms | 204 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 pp[], int S[], int D[]) {
long long sum = 0 ;
for(int i = 0 ;i < N ; i ++)
sum += pp[i];
long long mn = 1e18 , ans ;
long long sum2 = 0 ;
for(int i = 0 ; i < N ; i ++){
sum2 += pp[i];
sum -= pp[i] ;
if(max(sum , sum2) < mn)
mn = max(sum , sum2) , ans = i ;
}
return ans ;
return N/2;
}
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... |