Submission #400674

#TimeUsernameProblemLanguageResultExecution timeMemory
400674ioiTraffic (IOI10_traffic)C++14
0 / 100
1 ms308 KiB
#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 = sum , ans = 0 ; long long sum2 = 0 ; for(int i = 1 ; i < N ; i ++){ sum2 += pp[i - 1]; sum -= pp[i - 1] ; if(max(sum , sum2) < mn) mn = max(sum , sum2) , ans = i ; } return ans ; return N/2; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...