| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 81179 | 石晋骁 | 处理随机数 | C++ | Wrong Answer | 0 MS | 264 KB | 391 | 2024-07-12 10:42:40 |
#include<bits/stdc++.h> using namespace std; int a[101]; int main(){ int n,b,h; cin >> n; for(int i =1;i <= n;i++){ cin >> a[i]; } b = a[1]; for (int k =1;k <= n;k++){ for(int j =2;j <= n;j++){ if(a[j] > b){ b = a[j]; h = j; }else if(a[j] == b){ a[j] = 0; } } cout << b; a[h] = 0; } return 0; }
------Input------
9 10 29 39 67 58 48 29 57 23
------Answer-----
8 10 23 29 39 48 57 58 67
------Your output-----
676767676767676767