提交时间:2022-04-11 13:16:13
运行 ID: 48266
//game #include<bits/stdc++.h> using namespace std; int n; int a[105]; int main() { cin>>n; for(int i=1;i<=n;i++) cin>>a[i]; if(n%2==0) cout<<min(a[1],a[n])<<endl; else cout<<max(a[1],a[n])<<endl; return 0; }