Submission #953407

#TimeUsernameProblemLanguageResultExecution timeMemory
953407alo_54Race (IOI11_race)C++14
0 / 100
1 ms2396 KiB
#include <bits/stdc++.h> using namespace std; int best_path(int n, int k, int h[][2], int L[]) { int arr[110]; for (int i = 0; i < n-1; i++) { arr[h[i][0]] = L[i]; } int minEdges = 1e9; for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { int d = 0; for (int k = i; k < j; k++) { d += arr[k]; } if (d == k) { minEdges = min(minEdges, j-i); //cout<<minEdges<<endl; } } } return minEdges; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...