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 ...
随机推荐
- TortoiseGit - Gitblit使用简介
1. 增加Repository http://192.168.242.128:10101 用admin admin登陆后,点击"版本库"--> 创建版本库 填写好 " ...
- 关于No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=armv7 armv7s)使用百度地图的解决办法
出现的原因:armv7s是应用在iPhone 5 A6 的架构上的解决的方式:1,在Project target里“Architectures”设置为“Standard (armv7,armv7s)” ...
- C++常用库函数
C++常用库函数 转自:http://blog.csdn.net/sai19841003/article/details/7957115 1.常用数学函数 头文件 #include <math ...
- HTML URL编码参考(转载)
URL编码(URL encoding)的作用是将字符转化为可在因特网上安全传输的格式.URL——统一资源定位符Web浏览器通过URL从Web服务器上请求页面.URL就是网页的地址,如:http://w ...
- 动态得到WCF的代理类并生成代码
Uri uri = new Uri("http://localhost:6580/Service1.svc?wsdl"); MetadataExchange ...
- TortoiseGit保存用户名及密码
保存密码方式如下,需要setting中填写自己的名字,Email地址,并在.gitconfig中 [credential] 中设置helper = store
- java基础算法题
为了提高自己的代码能力和算法能力,我决定每天学习一道算法题,吸收前辈思想. [程序1] TestRabbit.java 题目:古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三 ...
- 欧几里得算法求最大公约数(gcd)
关于欧几里得算法求最大公约数算法, 代码如下: int gcd( int a , int b ) { if( b == 0 ) return a ; else gcd( b , a % b ) ; } ...
- JQuery_图片未加载!
JQuery_图片未加载! <html> <head> <script type="text/javascript" src="/jquer ...
- Chapter 2 Open Book——10
I sent that, and began again. 我发送了它,然后又一次重新开始写了. Mom,Everything is great. Of course it's raining. I ...