# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
707610 | 2023-03-09T14:17:03 Z | Specialistas13 | Swimming competition (LMIO18_plaukimo_varzybos) | C++17 | 1 ms | 212 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long #define FAST_IO cin.tie(nullptr); ios_base::sync_with_stdio(0) int main() { FAST_IO; int n, a, b, current=0, maxi=0, ans=1e7; cin>>n>>a>>b; vector<int> numbers; for (int i=0; i<n; i++){ int a; cin>>a; numbers.push_back(a); } sort(numbers.begin(), numbers.end()); cout<<max(numbers[a-1]-numbers[0], numbers[n-1]-numbers[a]); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |