제출 #139445

#제출 시각아이디문제언어결과실행 시간메모리
139445reda경주 (Race) (IOI11_race)C++14
0 / 100
2 ms380 KiB
#include <bits/stdc++.h> using namespace std ; int best_path(int N,int K,int H[][2] , int L [] ) { int start = -1; int endr = -1; int mn = 1e9+7; for(int i = 0; i < N; i++) { int currentSum = 0; for(int j = i; j <N&& (j-i+1) < mn; j++) { currentSum += L[j]; if(currentSum == K) { start = i; endr = j; mn = endr- start + 1; break; } } } return mn; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...