제출 #1199625

#제출 시각아이디문제언어결과실행 시간메모리
1199625liza경주 (Race) (IOI11_race)C++20
0 / 100
0 ms328 KiB
#include "race.h" #include <bits/stdc++.h> int best_path(int N, int K, int H[][2], int L[]) { long long sum=0; int j =0; long long rez=1e18; int c=0; for(int i = 0; i < N-1; i++) { sum+=L[i]; while(sum > K) { sum-=L[j]; j++; } if(sum==K) { c=1; if(i-j+1 < rez) rez = i-j+1; } } if(c==0) return -1; return rez; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...