제출 #237082

#제출 시각아이디문제언어결과실행 시간메모리
237082Aldas25Swimming competition (LMIO18_plaukimo_varzybos)C++14
0 / 100
5 ms384 KiB
#include <bits/stdc++.h> using namespace std; #define FAST_IO ios_base::sync_with_stdio(0); cin.tie(nullptr) #define FOR(i, a, b) for (int i = (a); i <= (b); i++) typedef long long ll; const int MAXN = 1000100; const ll INF = 1e16; int n, a, b; ll dp[MAXN], t[MAXN]; int main() { FAST_IO; cin >> n >> a >> b; FOR(i, 1, n) cin >> t[i]; FOR(i, 1, n) dp[i] = INF; FOR(i, a, n) FOR(j, max(0,i-b), i-a) dp[i] = min(dp[i], max(dp[j],t[i]-t[j+1])); cout << dp[n] << "\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...