# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
707610 | Specialistas13 | Swimming competition (LMIO18_plaukimo_varzybos) | C++17 | 1 ms | 212 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |