ZOJ 2970 Faster, Higher, Stronger(排序)
来源:互联网 发布:家庭ktv 知乎 编辑:程序博客网 时间:2024/06/05 00:47
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2970重点内容
给出几个数字 根据要求输出最大或最小值
#include<iostream>#include<cstdio>#include<set>#include<string>#include<string.h>#include<cstring>#include<vector>#include<map>#include<queue>#include<stack>#include<cctype>#include<algorithm>#define mt(a) memset(a,0,sizeof a)#define fl(a,b,c) fill(a,b,c)#define inf 1000000000+7using namespace std;typedef long long ll;int ans[3000];int main(){ int T; cin >> T; while (T--) { string type; cin >> type; int n; cin >> n; for (int i = 0; i < n; i++) { scanf("%d", &ans[i]); } sort(ans, ans + n); if (type == "Faster") printf("%d\n", ans[0]); else printf("%d\n", ans[n - 1]); } return 0;}
0 0
- ZOJ 2970 Faster, Higher, Stronger(排序)
- ZOJ 2970 Faster, Higher, Stronger
- zoj-2970-Faster, Higher, Stronger
- ZOJ 2970Faster, Higher, Stronger
- [查找最大最小]ZOJ 2970 Faster, Higher, Stronger
- ZOJ-2970-Faster, Higher, Stronger【5th浙江省赛】
- ZJU oj 2970 Faster, Higher, Stronger(水题)
- zoj2970----------------Faster, Higher, Stronger
- Faster, Higher, Stronger
- zoj2970 Faster, Higher, Stronger
- ZOJ2970-Faster, Higher, Stronger
- F - Faster, Higher, Stronger --- (first qualifying)
- 2014ACM集训13级PK赛5-Faster, Higher, Stronger
- The 5th Zhejiang Provincial Collegiate Programming Contest---ProblemF:Faster, Higher, Stronger
- YOLO9000: Better, Faster, Stronger
- YOLO9000: Better,Faster,Stronger
- YOLO9000: Better, Faster, Stronger
- 【笔记】YOLO9000: Better, Faster, Stronger
- BSOJ1478:多边形面积 凸包
- 一起看代码来玩玩QT之01Hello world
- Ionic基础——幻灯指令 ion-slide-box
- iOS(CoreGraphics)画带箭头的框
- 大淘营淘宝店铺宝贝复制专家3.56 破解记录 不怕升级
- ZOJ 2970 Faster, Higher, Stronger(排序)
- Sql server中cursor的使用
- python开发_常用的python模块及安装方法
- 一些java小细节问题
- leetcode笔记--Odd Even Linked List
- 枚举设备栈
- 一次服务器环境搭建的记录(nginx+php+subversion)
- 手动编译源码升级gcc4.8.2
- 关于eclipse中recycleview/cardview的引入(环境搭建)