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>
#define MAX (int)40
using namespace std;
int main()
{
int n, a, b;
cin >> n >> a >> b;
int t[MAX];
for(int i = 0; i < n; i++) cin >> t[i];
sort(t, t+n);
//for(int i = 0; i < n; i++) cout << t[i] << ' ';
int ans1 = t[n-1] - t[n/2];
int ans2 = t[n/2-1] - t[0];
cout << max(ans1, ans2);
return 0;
}
# | 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... |