제출 #28836

#제출 시각아이디문제언어결과실행 시간메모리
28836aybala경주 (Race) (IOI11_race)C++11
0 / 100
2 ms248 KiB
#include "race.h" int best_path(int N, int K, int H[][2], int L[]) { int i,j,k; int ans=N+1; for(i=0;i<N;i++){ for(j=i+1;j<N;j++){ long long x=0; for(k=i;k<j;k++){ x+=(long long)L[k]; } if(x==K && ans>j-i+1) ans=j-i; } } if(ans==N+1) ans=-1; N=ans; return N; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...