The 5th Zhejiang Provincial Collegiate Programming Contest---ProblemF:Faster, Higher, Stronger
来源:互联网 发布:mac玩泡泡堂 编辑:程序博客网 时间:2024/05/22 07:40
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2970
除了Faster是输出最小外,另外两个都是输出最大的。
#include<iostream>#include<algorithm>using namespace std;int main() { int t,i; string s; int n,a[10001]; cin>>t; while(t--) { cin>>s>>n; for(i=0; i<n; i++) cin>>a[i]; sort(a,a+n); if(s[0]=='F') cout<<a[0]<<endl; else cout<<a[n-1]<<endl; } return 0;}
0 0
- The 5th Zhejiang Provincial Collegiate Programming Contest---ProblemF:Faster, Higher, Stronger
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
- The 6th Zhejiang Provincial Collegiate Programming Contest->ProblemF:80ers' Memory
- The 5th Zhejiang Provincial Collegiate Programming Contest 部分题解
- The 5th Zhejiang Provincial Collegiate Programming Contest
- The 7th Zhejiang Provincial Collegiate Programming Contest
- The 6th Zhejiang Provincial Collegiate Programming Contest
- The 8th Zhejiang Provincial Collegiate Programming Contest / L - Javabeans
- The 8th Zhejiang Provincial Collegiate Programming Contest / M - Median
- The 8th Zhejiang Provincial Collegiate Programming Contest
- The 9th Zhejiang Provincial Collegiate Programming Contest
- The 10th Zhejiang Provincial Collegiate Programming Contest Solution
- The 11th Zhejiang Provincial Collegiate Programming Contest---Talented Chef
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 11th Zhejiang Provincial Collegiate Programming Contest
- The 12th Zhejiang Provincial Collegiate Programming Contest
- Linux精讲——chmod命令
- The 5th Zhejiang Provincial Collegiate Programming Contest---ProblemE:Easy Task
- Struts2防止表单重复提交
- Yii 1.x 到 Yii 2.x的细节变化
- 你当以同等的热情护卫代码
- The 5th Zhejiang Provincial Collegiate Programming Contest---ProblemF:Faster, Higher, Stronger
- JSP—九大隐式对象之out
- CF 158A Round
- python之干什么可以走的路线
- ESP8266(一)初体验
- iOS开发系列--C语言之存储方式和作用域
- Service:全面总结
- 安装hls流媒体服务器
- Codeforces Round #343 (Div. 2) C. Famil Door and Brackets(dp)