제출 #981382

#제출 시각아이디문제언어결과실행 시간메모리
981382tamir1Traffic (IOI10_traffic)C++17
50 / 100
231 ms37664 KiB
#include "traffic.h" #include <bits/stdc++.h> #define ll long long using namespace std; ll mx,pr[1000005]; int loc; int LocateCentre(int N, int pp[], int S[], int D[]) { mx=1e18; loc=-1; for(int i=1;i<=N;i++){ pr[i]=pr[i-1]+pp[i-1]; } for(int i=1;i<=N;i++){ ll m=max(pr[N]-pr[i],pr[i-1]); if(m<mx){ mx=m; loc=i-1; } } return loc; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...