As Easy As A+B

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

水题不解释:

#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
int t,n;
scanf("%d",&t);
while(t--){
scanf("%d",&n);
int f[1010];
for(int i=0;i<n;i++)
scanf("%d",&f[i]);
sort(f,f+n);
for(int i=0;i<n;i++){
if(i!=0) printf(" ");
printf("%d",f[i]);
}
printf("\n");
}
return 0;
}

HDU 1040.As Easy As A+B【排序】【如题(水!水!水!)】【8月24】的更多相关文章

  1. 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 ...

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

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

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

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

  4. 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 ...

  5. HDU 1040 As Easy As A+B [补]

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

  6. hdu 5695 百度熊教体育 拓扑排序 好题

    Gym Class Time Limit: 6000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total S ...

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

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

  8. HDU 1285 确定比赛名次(拓扑排序模板)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1285 题目大意:有N个比赛队(1<=N<=500),编号依次为1,2,3,....,N进行 ...

  9. hdu 5288||2015多校联合第一场1001题

    pid=5288">http://acm.hdu.edu.cn/showproblem.php?pid=5288 Problem Description OO has got a ar ...

随机推荐

  1. [iOS翻译]《iOS7 by Tutorials》在Xcode 5里使用单元測试(上)

    简单介绍: 单元測试是软件开发的一个重要方面.毕竟,单元測试能够帮你找到bug和崩溃原因,而程序崩溃是Apple在审查时拒绝app上架的首要原因. 单元測试不是万能的,但Apple把它作为开发工具包的 ...

  2. iOS-UIApplication详解

    UIApplication简介 UIApplication对象是应用程序的象征. 每一个应用程序都有自己的UIApplication对象,而且是单例. 一个iOS程序启动后创建的第一个对象就是UIAp ...

  3. notepad++ 插件推荐——快速定位文件

    介绍Notepad++的文章很多,我这里就不赘述了.简言之,是一个轻便的文本编辑工具.结合丰富的插件,可以实现很多功能,可以成为一个轻量级的IDE,用来做脚本开发非常合适. 这里介绍几个插件可以用来进 ...

  4. centos 出现的问题

    1.DNS问题,导致yum没得源 echo "nameserver 8.8.8.8">>/etc/resolv.conf 2.CentOS 7最小化安装后找不到‘ifc ...

  5. Centos7 minimal 系列之rabbitmq的理解(九)

    一.前言 传送门:rabbitmq安装 第一次接触消息队列,有很多不熟悉的地方,可能也有很多写的不对的,大家一起学习. RabbitMQ是一个在AMQP基础上完成的,可复用的企业消息系统. 使用场景: ...

  6. 洛谷P1291 [SHOI2002]百事世界杯之旅(期望DP)

    题目描述 “……在2002年6月之前购买的百事任何饮料的瓶盖上都会有一个百事球星的名字.只要凑齐所有百事球星的名字,就可参加百事世界杯之旅的抽奖活动,获得球星背包,随声听,更克赴日韩观看世界杯.还不赶 ...

  7. Activity全屏沉浸状态

    public class MainActivity extends AppCompatActivity { private static final String TAG = "MainAc ...

  8. java和android文件加密小结

    最近遇到一个文件加密的问题,自己读写的,安全性虽然还可以,但是速度慢,影响体验. Cipher虽然速度相当快,但是android和java有某些api存在不兼容: 问题解决: 方法引用自:https: ...

  9. UNP学习笔记1——基本TCP套接字编程

    1 套接字地址结构 大多数套接字函数都需要一个指向套接字地址结构的指针作为参数.每个协议族都定义了自己的套接字结构.这些套接字的结构以sockaddr_开头,以每个协议族唯一的后缀名结尾. 1.1 I ...

  10. RocketMQ学习笔记(12)----RocketMQ的Consumer API简介

    由于消息的消费方式有两种,所以两种方式也有不同的API: 1. PushConsumer的配置 1. consumerGroup: 默认值为DEFAULT_CONSUMER,Consumer组名,多个 ...