今天去老校区找她,不想带电脑了,所以没时间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. BZOJ 1831: [AHOI2008]逆序对

    题目大意: 给出一个序列,有几个位置上的数字任意.求最小的逆序对数. 题解: 自己决定放置的数一定是单调不降的.不然把任意两个交换一下就能证明一定会增加逆序对. 然后就可以DP了,f[i][j]表示第 ...

  2. 使用 RMAN 同步数据库

    使用 RMAN同步数据库 使用 RMAN 同步数据库 一.概述 二 操作步骤 (一).把生产库置为归档模式 (二).启动rman做数据库0级备份 (三).修改生产库数据库到未归档 (四).拷贝备份集到 ...

  3. 资产管理软件 GLPI的安装(转)

     资产管理系统GLPI的安装 2010-07-05 16:20:31 标签:休闲 资产管理系统 GLPI 职场 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则 ...

  4. Matplotlib基础图形之散点图

    Matplotlib基础图形之散点图 散点图特点: 1.散点图显示两组数据的值,每个点的坐标位置由变量的值决定 2.由一组不连续的点组成,用于观察两种变量的相关性(正相关,负相关,不相关) 3.例如: ...

  5. Centos 6.5升级openssl到1.1.0f版本

    wget https://www.openssl.org/source/openssl-1.1.0f.tar.gz ./config --prefix=/usr/local/openssl share ...

  6. Sequence Models

    Sequence Models This is the fifth and final course of the deep learning specialization at Coursera w ...

  7. NYOJ-258/POJ-2559/HDU-1506 Largest Rectangle in a Histogram,最大长方形,dp或者单调队列!

                                         Largest Rectangle in a Histogram 这么经典的题硬是等今天碰到了原题现场懵逼两小时才会去补题.. ...

  8. Python升级版本2.6到2.7

    CentOS 6 系统默认 Python 版本是:2.6.6 平时在使用中遇到很多的库要求是 2.7.x 版本的库,比如使用 ConfigParser 库,在 2.6 版本库就不支持没有 value ...

  9. 使用Unity做2.5D游戏教程(一)

    最近在研究Unity 3D,看了老外Marin Todorov写的教程很详细,就翻译过来以便自己参考,翻译不好的地方请多包涵. 如果你不了解2.5D游戏是什么,它基本上是个3D游戏而你可以想象是压扁的 ...

  10. BZOJ 3238 [Ahoi2013]差异 ——后缀自动机

    后缀自动机的parent树就是反串的后缀树. 所以只需要反向构建出后缀树,就可以乱搞了. #include <cstdio> #include <cstring> #inclu ...