hpuoj 【1349】三个数求最大值 【水题】
来源:互联网 发布:电脑软件学校招生 编辑:程序博客网 时间:2024/04/18 10:46
1349: 三个数求最大值 [水题]
时间限制: 1 Sec 内存限制: 128 MB提交: 150 解决: 126
题目描述
随便输入三个数,求最大值。
输入
输入a,b,c三个数(所有的数都在int范围内)
输出
三个数中最大的数。
样例输入
1 2 3
样例输出
3解析: sort排序,简单粗暴程序如下:#include<cstdio>#include<algorithm>using namespace std;bool cmp(int a,int b){return a>b;}int main(){int a[3];for(int i=0;i<3;i++) scanf("%d",&a[i]);sort(a,a+3,cmp);printf("%d\n",a[0]);return 0;}
阅读全文
0 0
- hpuoj 【1349】三个数求最大值 【水题】
- 三个数求最大值
- 求三个数中的最大值
- 求三个数中的最大值
- 任意三个数求最大值
- 三个数之间求最大值
- 输入三个数,求最大值
- 求三个数最大值 新法
- 求三个数的最大值
- 求三个数中的最大值
- 求三个数的最大值
- 求三个数中最大值:
- xynuoj 三个数求最大值
- 用sql求三个数的最大值
- C语言:求三个数的最大值
- 任意三个数求最大值和最小值
- 求三个数最大值的伪代码
- 写出求三个数最大值的流程图
- C#批量为图片添加边框、日期、宝宝信息
- Tensorflow学习记录(一)
- X86、X64和X86_64区别
- matlab中的协方差函数
- Python Module
- hpuoj 【1349】三个数求最大值 【水题】
- Dinic模板(附带当前弧优化)
- C_栈的应用----迷宫求解
- eclipse中maven添加mina-core:x.x.x:bundle编译报错问题
- Ubuntu: ldconfig作用
- CSS Sprites
- shell运算符详解
- 前端调用后台的数据
- 【Java基础】InputStream 、 InputStreamReader和BufferedReader