제출 #683124

#제출 시각아이디문제언어결과실행 시간메모리
683124mseebacherTraffic (IOI10_traffic)C++17
0 / 100
0 ms212 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; #define MAXI (int)1e5 #define pb(x) push_back(x) int LocateCentre(int n,int p[],int s[],int d[]){ ll left[n+1]; ll right[n+1]; left[0] = 0; right[0] = 0; ll miniRechts = 1e18; ll miniLinks = 1e18; for(int i = 0;i<n;i++){ left[i+1] = left[i] + p[i]; right[i+1] = right[i] + p[n-i-1]; } int node = 0; for(int i = 1;i<n;i++){ if(miniRechts > right[i] && miniLinks > left[i]){ miniRechts = right[i]; miniLinks = left[i]; node = i; } } return node; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...