#include <cstring>
#include <string.h>
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#define ll long long
#define PII pair<int, int>
#define MSI map<string,int>
#define TLE ios::sync_with_stdio(0),cin.tie(0)
#define mod 1000000007
const int INF = 0x3f3f3f3f;
using namespace std;
int main() {
TLE;
int n, a[100005];
float Mid= 0;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i];
if (a[n] < a[1]) swap(a[n], a[1]);
if (n & 1) cout << a[n] << " " << a[n / 2 + 1] << " " << a[1] << endl;
else {
if ((a[n / 2 + 1] + a[n / 2])&1)
printf("%d %.1lf %d", a[n], (double)((a[n / 2 + 1] + a[n / 2]) / 2.0), a[1]);
else
printf("%d %d %d", a[n], (a[n / 2 + 1] + a[n / 2]) / 2, a[1]);
}
}
CCF 201903-1 小中大
最新推荐文章于 2024-04-29 16:22:36 发布