This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "race.h"
#include <bits/stdc++.h>
using namespace std;
int best_path(int N, int K, int H[][2], int L[])
{
int ans = INT32_MAX;
for(int i = 0; i < N; ++i){
int act = 0;
int s = 0;
for(int j = i; j < N; ++j){
if(act + L[j] > K) break;
act += L[j];
s++;
}
if(act == K) {
ans = min(ans, s);
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |