博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hdu 1040 As Easy As A+B
阅读量:6538 次
发布时间:2019-06-24

本文共 1358 字,大约阅读时间需要 4 分钟。

As Easy As A+B

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)

Total Submission(s): 60774    Accepted Submission(s): 26130

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
 
这个题目完全没有难度,学会了sort就可以了
看代码就ok了
#include 
#include
#include
#include
#include
#include
using namespace std;int a[10005];int main() { int t,n; cin>>t; while(t--) { cin>>n; for(int i=0;i
>a[i]; } sort(a,a+n); for(int i=0;i

转载于:https://www.cnblogs.com/52why/p/6564567.html

你可能感兴趣的文章
Android存储方式之SQLite的使用
查看>>
springcloud ribbon 客户端负载均衡用法
查看>>
洛谷P1287 盒子与球 数学
查看>>
自定义starter
查看>>
Bootstrap vs Foundation如何选择靠谱前端框架
查看>>
vue-cli脚手架一些插件安装elementui和axios
查看>>
[Gradle] 在 Eclipse 下利用 gradle 构建系统
查看>>
JAVAWEB 一一 Hibernate(框架)
查看>>
与、或、异或、取反、左移和右移
查看>>
jQuery根据元素值删除数组元素的方法
查看>>
Linux基础学习(14)--日志管理
查看>>
vue常用的指令
查看>>
matlab练习程序(随机游走图像)
查看>>
Linux命令行下运行java.class文件
查看>>
input文本框实现宽度自适应代码实例
查看>>
C#基本数据类型 <思维导图>
查看>>
POJ3321 Apple Tree (树状数组)
查看>>
protocol buffers的编码原理
查看>>
行为型设计模式之命令模式(Command)
查看>>
减少死锁的几个常用方法
查看>>