1 条题解
-
0
还算简单。
#include <bits/stdc++.h> using namespace std; int n,a[105]; int main() { cin >> n; for(int i=1;i<=n;i++) { cin >> a[i]; } sort (a+1,a+n+1); for(int i=n;i>=1;i--) { cout << a[i] << " "; if(i>n-2) { cout << 500 << endl; } else if(i>n-6) { cout << 300 << endl; } else if(i>n-10) { cout << 100 << endl; } else { cout << 0 << endl; } } return 0; }
- 1
信息
- ID
- 962
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 2
- 标签
- 递交数
- 31
- 已通过
- 23
- 上传者