比赛 |
noip2016普及练习2 |
评测结果 |
EEEEEEEEEE |
题目名称 |
排序测试 |
最终得分 |
0 |
用户昵称 |
Phosphorus15 |
运行时间 |
0.696 s |
代码语言 |
C++ |
内存使用 |
0.31 MiB |
提交时间 |
2016-11-07 19:19:14 |
显示代码纯文本
#include <iostream>
#include <cstdio>
#include <algorithm>
//using std::cin;
using std::cout;
using std::endl;
using std::sort;
struct input{
input & operator >>(int & i){
static bool flag;
i = 0;
char c = getchar();
flag = false;
while(!((c>='0'&&c<='9')||c=='-')) c = getchar();
if(c=='-'){
flag = true;
}
while(c>='0'&&c<='9'){i = i * 10 + (c-'0');c = getchar();}
i = (flag)?-i:i;
}
input & operator >>(long long & i){
static bool flag;
i = 0;
char c = getchar();
flag = false;
while(!((c>='0'&&c<='9')||c=='-')) c = getchar();
if(c=='-'){
flag = true;
}
while(c>='0'&&c<='9'){i = i * 10 + (c-'0');c = getchar();}
i = (flag)?-i:i;
}
input & operator >>(char & c){
c = getchar();
while(!(c=='L'||c=='R')) c = getchar();
}
};
input cin;
int run(){
freopen("sorttest.in","r",stdin);
freopen("sorttest.out","w+",stdout);
int n;
long long seq[2000001];
cin>>n;
for(int x=0;x!=n;x++)
cin>>seq[x];
sort(seq,seq+n);
for(int x=0;x!=n;x++)
cout<<seq[x]<<' ';
cout<<endl;
return 0;
}
int rvalue = run();
int main(int argc,char ** argv){
return 0;
}