标签:iostream scanf 学习 printf space class amp div 结构
https://pta.patest.cn/pta/test/1342/exam/4/question/27101
日常学习数据结构,水题。
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int a[100005],n; int main() { scanf("%d",&n); for(int i = 1;i <= n;i++) scanf("%d",&a[i]); sort(a+1,a+1+n); printf("%d",a[1]); for(int i = 2;i <= n;i++) printf(" %d",a[i]); printf("\n"); return 0; }
标签:iostream scanf 学习 printf space class amp div 结构
原文地址:http://www.cnblogs.com/zhurb/p/6034600.html