HDU 1040.As Easy As A+B【排序】【如题(水!水!水!)】【8月24】
As Easy As A+B
Give you some integers, your task is to sort these number ascending (升序).
You should know how easy the problem is now!
Good luck!
the same line.
It is guarantied that all integers are in the range of 32-int.
2
3 2 1 3
9 1 4 7 2 5 8 3 6 9
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】的更多相关文章
- 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 ...
- HDU 1040 As Easy As A+B (排序。。。水题)
题意:给定n个数,让你从小到大排序. 析:不说什么了. 代码如下: #include <cstdio> #include <iostream> #include <cst ...
- hdu 1040 As Easy As A+B(排序)
题意:裸排序 思路:排序 #include<iostream> #include<stdio.h> #include<algorithm> using namesp ...
- 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 ...
- HDU 1040 As Easy As A+B [补]
今天去老校区找她,不想带电脑了,所以没时间A题了 /*******************************************************************/ As Ea ...
- hdu 5695 百度熊教体育 拓扑排序 好题
Gym Class Time Limit: 6000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total S ...
- HDU 5572 An Easy Physics Problem (计算几何+对称点模板)
HDU 5572 An Easy Physics Problem (计算几何) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=5572 Descripti ...
- HDU 1285 确定比赛名次(拓扑排序模板)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1285 题目大意:有N个比赛队(1<=N<=500),编号依次为1,2,3,....,N进行 ...
- hdu 5288||2015多校联合第一场1001题
pid=5288">http://acm.hdu.edu.cn/showproblem.php?pid=5288 Problem Description OO has got a ar ...
随机推荐
- 笔试题&面试题:给定n个数,要求比較次数1.5n同一时候找出最大值和最小值
写出一个算法,对给定的n个数的序列,返回序列中的最大和最小的数. 设计出一个算法,仅仅须要运行1.5n次比較就能找到序列中最大和最小的数吗?是否能再少? 分析:要求比較次数为1.5n,使用一般的逐个遍 ...
- Unity3D摄像机尾随人物
这里的镜头主要是从人物的背后尾随的. 首先新建一个C#脚本,命名为MyFollow,然后把下面代码粘贴进去.保存: using UnityEngine; using System.Collection ...
- jQuery插件 -- Cookie插件
Cookie是站点设计者放置在client的小文本文件.Cookie能为用户提供非常多的使得,比如购物站点存储用户以前浏览过的产品列表.或者门户站点记住用户喜欢选择浏览哪类新闻. 在用户同意的情况下. ...
- inconsistent line endings 解决方法
I'm using Unity 3D in combination with Visual Studio 2008 on a Windows 7 64 bit system. When savi ...
- Gretna2.0 使用过程中遇到的问题
在做Normalize的时候,报错"Cannot find T1 image (e.g. *.dcm in T1 Directory), Please Check again!", ...
- idea 中web项目 用自带tomcat启动问题,
严重: Exception sending context initialized event to listener instance of class com.zenointel.logserve ...
- hdoj--2098--分拆素数和(枚举)
分拆素数和 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Subm ...
- dell台式机设置U盘启动步骤
在开机启动看见DELL的标志后,连续按F12键进入BIOS界面,然后按照界面进行操作,操做完成后保存退出,然后再按F12键选择U盘启动. 注意硬盘模式需要选择为disabled.
- c# byte转化为string
byte[] bt = new byte[] { 10, 11, 33, 44, 2 }; string str=string.Join(",",bt.Select(t=>t ...
- Book 动态规划
虽然之前学过一点点,但是还是不会------现在好好跟着白书1.4节学一下—————— (1)数字三角形 d(i,j) = max(d(i+1,j),d(i+1,j+1)) + a[i][j] hdu ...