제출 #377697

#제출 시각아이디문제언어결과실행 시간메모리
377697meperdonas203Traffic (IOI10_traffic)C++17
50 / 100
348 ms12008 KiB
#include "traffic.h" #include<bits/stdc++.h> using namespace std; int LocateCentre(int N, int pp[], int S[], int D[]) { for(int i=1;i<N;i++){ pp[i]+=pp[i-1]; } int menor=INT_MAX; int ciudad=N; for(int i=0;i<N;i++){ int maximo=max(pp[i-1],pp[N-1]-pp[i]); if(menor>maximo){ ciudad=i; menor=maximo; } } return ciudad; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...