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 ...
随机推荐
- 利用PYTHON设计计算器功能
通过利用PYTHON 设计处理计算器的功能如: 1 - 2 * ( (60-30 +(-40/5) * (9-2*5/3 + 7 /3*99/4*2998 +10 * 568/14 ))- (-4*3 ...
- android.telephony.SmsManager 短信笔记
android 几种发送短信的方法 http://www.oschina.net/question/163910_27409 <uses-permission android:name=&quo ...
- table可更改th大小的jQuery插件
(function ($) { $.fn.resizetable = function () { var tableObj = $(this); var inResizeRange = false; ...
- 正则表达式 Pattern & Matcher
1 compile and pattern Pattern类用于创建一个正则表达式,也可以说创建一个匹配模式,它的构造方法是私有的,不可以直接创建,但可以通过Pattern.complie(Strin ...
- 嵌套json
今天一个客户问怎样把表中相同键值对应的文本按照一定顺序拼接起来.如果使用SQL实现将非常麻烦,并且效率低下.GP4.1以后提供了一个函数array_agg可以方便快捷,高效的实现该功能 比如原始查询是 ...
- android网络编程之HttpUrlConnection的讲解--实现文件断点下载
1.没有实现服务器端,下载地址为网上的一个下载链接. 2.网络开发不要忘记在配置文件中添加访问网络的权限 <uses-permission android:name="android. ...
- iOS中静态库-.a文件生成和使用
最近在使用使用一个网上的Demo的时候. 出现另一令人烦恼的问题 . 就是它里面有嵌套的工程. 如下图所示. 工程里面还嵌套有一个工程. 真的是让人煞费苦心 …其实这个问题看起来并不是很难, 如果是一 ...
- AutoMapper 自动映射工具
先引用对应的DLL. 11.转换匿名对象 结合LINQ映射新的实体类. using System;using System.Collections.Generic;using System.Linq; ...
- 好用的API文档--在线版
安卓在线api http://www.android-doc.com/reference/packages.html
- 避免IE执行AJAX时,返回JSON出现下载文件
<bean id="mappingJacksonHttpMessageConverter" class="org.springframework.http.conv ...