今天去老校区找她,不想带电脑了,所以没时间A题了

/*******************************************************************/

As Easy As A+B

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 45926    Accepted Submission(s): 19620

Problem Description
These
days, I am thinking about a question, how can I get a problem as easy
as A+B? It is fairly difficulty to do such a thing. Of course, I got it
after many waking nights.
Give you some integers, your task is to sort these number ascending (升序).
You should know how easy the problem is now!
Good luck!
 
Input
Input
contains multiple test cases. The first line of the input is a single
integer T which is the number of test cases. T test cases follow. Each
test case contains an integer N (1<=N<=1000 the number of integers
to be sorted) and then N integers follow in the same line.
It is guarantied that all integers are in the range of 32-int.
 
Output
For each case, print the sorting result, and one line one case.
 
Sample Input
2
3 2 1 3
9 1 4 7 2 5 8 3 6 9
 
Sample Output
1 2 3
1 2 3 4 5 6 7 8 9
 
Author
lcy
 
Recommend
We have carefully selected several similar problems for you:  1096 1090 1004 1029 1091
 #include<math.h>
#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
using namespace std;
#define N 111555 int a[N],n; int main()
{
int t;cin>>t;
while(t--)
{
cin>>n;
for(int i=;i<n;i++)cin>>a[i];
sort(a,a+n);
int i;
for(i=;i<n-;i++)
printf("%d ",a[i]);
printf("%d\n",a[i]); } return ; } //freopen("1.txt", "r", stdin);
//freopen("2.txt", "w", stdout);
//**************************************

HDU 1040 As Easy As A+B [补]的更多相关文章

  1. hdu 1040 As Easy As A+B

    As Easy As A+B Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) T ...

  2. HDU 1040 As Easy As A+B(排序)

    As Easy As A+B Problem Description These days, I am thinking about a question, how can I get a probl ...

  3. HDU 1040.As Easy As A+B【排序】【如题(水!水!水!)】【8月24】

    As Easy As A+B Problem Description These days, I am thinking about a question, how can I get a probl ...

  4. HDU 1040 As Easy As A+B (排序。。。水题)

    题意:给定n个数,让你从小到大排序. 析:不说什么了. 代码如下: #include <cstdio> #include <iostream> #include <cst ...

  5. hdu 1040 As Easy As A+B(排序)

    题意:裸排序 思路:排序 #include<iostream> #include<stdio.h> #include<algorithm> using namesp ...

  6. HDU 5572 An Easy Physics Problem (计算几何+对称点模板)

    HDU 5572 An Easy Physics Problem (计算几何) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5572 Descripti ...

  7. 2018 HDU多校第四场赛后补题

    2018 HDU多校第四场赛后补题 自己学校出的毒瘤场..吃枣药丸 hdu中的题号是6332 - 6343. K. Expression in Memories 题意: 判断一个简化版的算术表达式是否 ...

  8. 2018 HDU多校第三场赛后补题

    2018 HDU多校第三场赛后补题 从易到难来写吧,其中题意有些直接摘了Claris的,数据范围是就不标了. 如果需要可以去hdu题库里找.题号是6319 - 6331. L. Visual Cube ...

  9. hdu 5058 So easy

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5058 So easy Description Small W gets two files. Ther ...

随机推荐

  1. 关于EF使用脏读(连接会话开始执行设置隔离级别)

    SQL Server中事物隔离级别Read Uncommitted和with(nolock) 注意:应该使用后者(修改后的版本):

  2. ThreadLocal 的分析

    http://blog.csdn.net/LHQJ1992/article/details/52451136 个人感觉这是所有关于ThreadLocal里中最靠谱的一篇文章. ps:其实官方文档才是最 ...

  3. pycharm调整字体大小

    问题:pycharm的默认字体比较小,看起来费眼睛 解决办法: 1.打开 file-->settings 2.Editor-->font 注意:没有修改过的需求先保存一下才能修改size

  4. HDU 5536 Chip Factory

    Chip Factory Time Limit: 18000/9000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)T ...

  5. Caffe 不同版本之间layer移植方法

    本系列文章由 @yhl_leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/52185521 (前两天这篇博客不小心被 ...

  6. Azure Storage Blob文件名区分大小写

    最近在使用Azure Storage的时候发现Storage的命名是区分大小写的,导致我们系统在更新图片的时候有时候更新不上,最终通过判断处理文件名解决. 因此我们在使用Storage需要注意一下文件 ...

  7. [BZOJ1583] [Usaco2009 Mar]Moon Mooing 哞哞叫(队列)

    传送门 思想有点像蚯蚓那个题 #include <cstdio> #define N 4000001 #define LL long long #define min(x, y) ((x) ...

  8. 西南民大oj 1762 我的式子不可能那么难写 【波兰式】

    描述 啦啦啦.作为一个苦逼的程序猿.?.请看下图... 现在老总想让你帮他儿子写个简单计算器(他儿子小学3年级,嘘!),写不出来就扣奖金..快帮他写吧... 给一个包含+-*/()的正确的表达式.要你 ...

  9. BZOJ 2463: [中山市选2009]谁能赢呢?【博弈】

    这题不科学~~本以为鬼谷子的钱袋是能在BZOJ写的最短的程序了,这题还要短…..好吧,思考难度神马的还是有点的(至少对我这种蒟蒻来说).很明显这是道博弈论的题目,在纸上画出了n=1~4的博弈树,发现b ...

  10. ⑨要写信(codevs 1697)

    题目描述 Description 琪露诺(冰之妖精)有操控冷气的能力.能瞬间冻结小东西,比普通的妖精更危险.一直在释放冷气的她周围总是非常寒冷. 由于以下三点原因…… 琪露诺的符卡 冰符“Icicle ...