제출 #518098

#제출 시각아이디문제언어결과실행 시간메모리
518098aurimsSwimming competition (LMIO18_plaukimo_varzybos)C++14
0 / 100
1 ms332 KiB
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int t[40]; for(int i = 0; i < n; i++) cin >> t[i]; sort(t, t+n); // bruteforce int ans = -1; int k = n/a; // subt #1 states a == b for(int i = 1; i <= k; i++) { ans = max(ans, t[n/i - 1] - t[n - i*a]); } cout << ans; 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...