7 条题解
-
1
桶
#include <iostream> #define ll long long using namespace std; int a[1000000]; int main(){ std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); ll m=1000000; int n; cin >> n; int x; for(int i=1;i<=n;i++){ cin >> x; a[x]++; } for(int i=0;i<=m;i++){ for(int j=1;j<=a[i];j++){ cout << i << " "; } } return 0; }
信息
- ID
- 54
- 时间
- 1100ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- 递交数
- 2974
- 已通过
- 809
- 上传者