# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
518564 | 2022-01-24T06:55:08 Z | aurims | Swimming competition (LMIO18_plaukimo_varzybos) | C++14 | 1 ms | 332 KB |
#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); int ans = -1; // bruteforce // subt #1 states a == b int trck = 0; int mn = 1e6+1; int mx = -1; for(int i = 0; i < n; i++) { if(i % a == 0) mn = t[i]; if(i % a == a-1) mx = t[i]; ans = max(ans, mx-mn); } cout << ans; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 296 KB | Output is correct |
3 | Correct | 1 ms | 208 KB | Output is correct |
4 | Incorrect | 0 ms | 208 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 332 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |