Sicily 13916. Smallest Box
来源:互联网 发布:matlab遗传算法cae 编辑:程序博客网 时间:2024/06/06 14:19
13916. Smallest Box
Constraints
Time Limit: 1 secs, Memory Limit: 32 MB
Description
Input
Output
Sample Input
样例一:33 45 74 3样例二:41 55 110 55 10
Sample Output
样例一:16样例二:81
Hint
Problem Source
2015年每周一赛第三场
// Problem#: 13916// Submission#: 3638792// The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License// URI: http://creativecommons.org/licenses/by-nc-sa/3.0/// All Copyright reserved by Informatic Lab of Sun Yat-sen University#include <iostream>#include <algorithm>using namespace std;int main() { int n, min_x = 101, min_y = 101, max_x = 0, max_y = 0; cin >> n; while (n--) { int tx, ty; cin >> tx >> ty; min_x = min(tx, min_x); max_x = max(tx, max_x); min_y = min(ty, min_y); max_y = max(ty, max_y); } cout << max(max_x - min_x, max_y - min_y) * max(max_x - min_x, max_y - min_y) << endl; return 0;}
0 0
- Sicily 13916. Smallest Box
- Sicily 1239.Smallest Differencev
- Sicily 1239. Smallest Differencev
- sicily 1239. Smallest Differencev
- Sicily 1910. Box
- 10215 - The Largest/Smallest Box ...
- [uva] 10215 - The Largest/Smallest Box ...
- UVa 10215 - The Largest/Smallest Box ...
- UVa Problem 10215 The Largest/Smallest Box... (最大/最小的盒子)
- box
- Box
- box
- Box
- Box
- Box
- Box
- Smallest multiple
- Smallest Difference
- Qt数据库总结
- Spring3工具类
- sorting - insert sort
- 漫谈C语言及如何学习C语言
- 自然语言处理(nlp)的主要范畴
- Sicily 13916. Smallest Box
- 进口印度神油阿育吠陀情趣用品男红油防早泄保健延时增大按摩精油
- Android开发基础之Worker线程向Main线程发送消息
- Sicily 7907. Flipper
- Sicily 1401. Children of the Candy Corn
- html5视频和表单
- 在OSX中制作加密压缩文件
- Github超详细图文攻略-Git客户端下载安装
- 基于项目管理的理念来执行减肥项目