提交时间:2022-05-06 22:50:43
运行 ID: 49416
#include <bits/stdc++.h> using namespace std; int main() { int N(0); cin >> N; int first(0); cin >> first; int last(first); for (int i(1); i != N; ++i) cin >> last; cout << (N & 1 ? max(first, last) : min(first, last)); return 0; }