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<stdio.h>
main()
{
int i,j,m,n;
scanf("%d",&n);
while(n--)
{
int a[];
scanf("%d",&m);
for(i=;i<m;i++)
{
scanf("%d",&a[i]);
}
for(i=;i<m;i++)
{
for(j=i;j<m;j++)
{
if(a[i]>a[j])
{
int h;
h=a[i];a[i]=a[j];a[j]=h; //冒泡~~
}
}
}
for(i=;i<m;i++)
{
if(i==)
printf("%d",a[i]);
else
printf(" %d",a[i]);
}
printf("\n"); }
}

As Easy As A+B的更多相关文章

  1. 【转】Windows下使用libsvm中的grid.py和easy.py进行参数调优

    libsvm中有进行参数调优的工具grid.py和easy.py可以使用,这些工具可以帮助我们选择更好的参数,减少自己参数选优带来的烦扰. 所需工具:libsvm.gnuplot 本机环境:Windo ...

  2. Struts2 easy UI插件

    一.easy UI是类似于jQuery UI的插件库,它提供了丰富的各种常用插件:tree.datagrid... tree插件: 语法:$(selector).tree([settings]); 常 ...

  3. Easy UI常用插件使用

    一.easy UI是类似于jQuery UI的插件库,它提供了丰富的各种常用插件:tree.datagrid... tree插件: 语法:$(selector).tree([settings]); 常 ...

  4. UVA-11991 Easy Problem from Rujia Liu?

    Problem E Easy Problem from Rujia Liu? Though Rujia Liu usually sets hard problems for contests (for ...

  5. CodeForces462 A. Appleman and Easy Task

    A. Appleman and Easy Task time limit per test 1 second memory limit per test 256 megabytes input sta ...

  6. easy ui插件

    简介: easy UI是类似于jQuery UI的插件库 注意:多脚本同时使用时,注意脚本冲突问题. 常用插件: 1.tree插件(tree插件实现动态树形菜单) 2.datagrid插件(datag ...

  7. 用TPP开启TDD的easy模式

    Test-Drived Development 测试驱动开发三步曲:写一个失败的测试用例->编写生产代码通过这个测试用例(transformation)->重构(refactor).重构是 ...

  8. Easy Sysprep更新日志-skyfree大神

    Easy Sysprep更新日志: Skyfree 发表于 2016-1-22 13:55:55 https://www.itsk.com/forum.php?mod=viewthread&t ...

  9. [官方软件] Easy Sysprep v4.3.29.602 【系统封装部署利器】(2016.01.22)--skyfree大神

    [官方软件] Easy Sysprep v4.3.29.602 [系统封装部署利器](2016.01.22) Skyfree 发表于 2016-1-22 13:55:55 https://www.it ...

  10. [原创] Easy SysLite V1.2 (2016.5.29更新,新增加WIN10支持,一个程序适配所有系统减肥)

    [原创] Easy SysLite V1.2 (2016.5.29更新,新增加WIN10支持,一个程序适配所有系统减肥) nohacks 发表于 2016-5-29 17:12:51 https:// ...

随机推荐

  1. 自己主动下载源代码_并编译_打包_部署_重新启动服务的Shell脚本

    这里面Shell的各个操作含义,可參考我三年前的这篇文章:http://blog.csdn.net/jadyer/article/details/7960802 #!/bin/sh APP_NAME= ...

  2. Data Structure(3)——软考阶段学习小结

    数据结构计算机等级考试中有,自考中有,软考中同样有,可见其内容的重要程度,今天对软考阶段视频学习内容的总结,同样是对前面学习内容的回顾,同样是对后面学习的铺垫. 中结:原本因为之前有过类似的总结,这次 ...

  3. 最受欢迎的8位Java大师

    面是8位Java牛人,他们为Java社区编写框架.产品.工具或撰写书籍改变了Java编程的方式. P.S 以下排名纯属个人喜好. 1. Tomcat & Ant创始人 James Duncan ...

  4. App.config和Web.config配置文件的自定义配置节点

    前言 昨天修改代码发现了一个问题,由于自己要在WCF服务接口中添加了一个方法,那么在相应调用的地方进行更新服务就可以了,不料意外发生了,竟然无法更新.左查右查终于发现了问题.App.config配置文 ...

  5. Ubuntu 14.04安装Sogou输入法

    在http://pinyin.sogou.com/linux/?r=pinyin页面可下载对应的的deb包.在http://pinyin.sogou.com/linux/help.php页面有搜狗输入 ...

  6. hdu4753

    很简单的位模拟(bit-mask),可惜队友读题误以为很难,没有及时跟我交流,不然应该很早就可以出了. 很容易看出来,总共才16个点.24条边.用一个int类型数字就可以描述这个图了,按照16点的关系 ...

  7. QF——OC的多态,动态绑定及实现原理

    多态: 封装,继承,多态是面向对象的三大特征. 那多态到底是什么呢? 多态:允许不同的类定义相同的方法,OC能自己判断当前类所对应的方法,不会混乱. 动态类型:程序直到运行时才确定对象的类型. 动态绑 ...

  8. 对于一些css样式的巧妙方法进行总结。

    针对之前遇到过的一些特殊样式的实现,我今天做个总结,目的有二:一是将这些方法记录下来,以便将来需要用到时查找使用.二为将这些大神们智慧的结晶发扬光大,让广大前端程序猿们能够少走弯路.此贴为更新帖,以后 ...

  9. SVG image xlink:href 设置失败

    公司比较频繁的业务需求,需要在地图上面,标注地区的信息,考虑到兼容性问题,在实际开发中是通过raphael.js绘制地图信息,进行相关交互 产品部门同事辛苦的画SVG地图,可配置地图块与实际地区cod ...

  10. chrome实现全浏览器跨域ajax请求

    如图,在chrome快捷方式上打开属性栏,在‘目标’栏加上后缀--disable-web-security --user-data-dir.即可实现在此浏览器上所有网页的跨域请求.