Problem A
Problem A
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 104 Accepted Submission(s) : 32
#include <iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int a[];
int i,ans;
int cmp(int a,int b)
{
return a>b;
}
int main()
{
int t=;
while(~scanf("%d",&a[]))
{
t++;
for(i=;i<=;i++)
scanf("%d",&a[i]); sort(a,a+,cmp); //先排序
ans=a[]+a[];
printf("Case %d: %d\n",t,ans);
// printf("**%d\n",0x7fffffff);
}
return ;
}
Problem A的更多相关文章
- 1199 Problem B: 大小关系
求有限集传递闭包的 Floyd Warshall 算法(矩阵实现) 其实就三重循环.zzuoj 1199 题 链接 http://acm.zzu.edu.cn:8000/problem.php?id= ...
- No-args constructor for class X does not exist. Register an InstanceCreator with Gson for this type to fix this problem.
Gson解析JSON字符串时出现了下面的错误: No-args constructor for class X does not exist. Register an InstanceCreator ...
- C - NP-Hard Problem(二分图判定-染色法)
C - NP-Hard Problem Crawling in process... Crawling failed Time Limit:2000MS Memory Limit:262144 ...
- Time Consume Problem
I joined the NodeJS online Course three weeks ago, but now I'm late about 2 weeks. I pay the codesch ...
- Programming Contest Problem Types
Programming Contest Problem Types Hal Burch conducted an analysis over spring break of 1999 and ...
- hdu1032 Train Problem II (卡特兰数)
题意: 给你一个数n,表示有n辆火车,编号从1到n,入站,问你有多少种出站的可能. (题于文末) 知识点: ps:百度百科的卡特兰数讲的不错,注意看其参考的博客. 卡特兰数(Catalan):前 ...
- BZOJ2301: [HAOI2011]Problem b[莫比乌斯反演 容斥原理]【学习笔记】
2301: [HAOI2011]Problem b Time Limit: 50 Sec Memory Limit: 256 MBSubmit: 4032 Solved: 1817[Submit] ...
- [LeetCode] Water and Jug Problem 水罐问题
You are given two jugs with capacities x and y litres. There is an infinite amount of water supply a ...
- [LeetCode] The Skyline Problem 天际线问题
A city's skyline is the outer contour of the silhouette formed by all the buildings in that city whe ...
- PHP curl报错“Problem (2) in the Chunked-Encoded data”解决方案
$s = curl_init(); curl_setopt($s, CURLOPT_POST, true); curl_setopt($s, CURLOPT_POSTFIELDS, $queryStr ...
随机推荐
- 华中农业大学新生赛C题
http://acm.hzau.edu.cn/problem.php?id=1099 题意: 输入两个整数 l 和 n,代表半径和output的保留小数点位数. 输出圆的面积,保留n位小数. 一开始觉 ...
- 12C dbca silent
dbca needs a template file to create a database. These template can be found in $ORACLE_HOME/assista ...
- Base64技术:把对象转变成字符串
需求:在安卓移动端和服务器进行数据交互的时候,有些时候需要上传,下载文件.如果所有的参数都变成字符串,会更加方便. 原理:Base64只是把byte[]数组进行了编码,然后再解码的过程,文档内容无法直 ...
- 《JavaScript高级程序设计》读书笔记 ---操作符二
关系操作符 小于(<).大于(>).小于等于(<=)和大于等于(>=)这几个关系操作符用于对两个值进行比较,比较的规则与我们在数学课上所学的一样.这几个操作符都返回一个布尔值, ...
- Loadrunner中参数和变量的使用
//字符串复制strcpy(str,"Hello ") ; //字符串连接strcat(str,"World !");lr_message("str: ...
- “Cannot load php5apache2_4.dll into server”问题的解决方法
摘要 PHP5.5.0+Apache Httpd 2.4.3,完成配置文件的修改后,启动Apache服务器,报Cannot load php5apache2_4.dll into server错误,记 ...
- OpenCV中Mat的列向量归一化
OpenCV中Mat的列向量归一化 http://blog.csdn.net/shaoxiaohu1/article/details/8287528 OpenCV中Mat的列向量归一化 标签: Ope ...
- Git撤销暂存区stage中的内容
$ git add readme.txt提交到了stage中. $ git statusOn branch masterChanges to be committed: (use "git ...
- WisKey的眼神
WisKey的眼神 Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Sub ...
- 【Machine Learning in Action --2】K-近邻算法改进约会网站的配对效果
摘自:<机器学习实战>,用python编写的(需要matplotlib和numpy库) 海伦一直使用在线约会网站寻找合适自己的约会对象.尽管约会网站会推荐不同的人选,但她没有从中找到喜欢的 ...