제출 #1210817

#제출 시각아이디문제언어결과실행 시간메모리
1210817islam_2010경주 (Race) (IOI11_race)C++20
0 / 100
0 ms328 KiB
#pragma GCC optimize("O3") #include "race.h" #include <bits/stdc++.h> using namespace std; const int sz = 1e5+5; int best_path(int n, int k, int h[][2], int l[]){ int s = 0; int mn = INT_MAX; int le = 0; for(int i = 0; i < n-1; i++){ s+=l[i]; while(s>k){ s-=l[le++]; }if(s == k){ mn = min(mn, i-le+1); } }return (mn == INT_MAX ? -1 : 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...