Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92387 | 令狐文丽 | 19从小到大进行排序 | C++ | Wrong Answer | 1 MS | 660 KB | 704 | 2024-10-02 20:06:33 |
#include<iostream> using namespace std; int main(){ /** int n,i,t; int a[101]={0}; cin>>n; for(i =0;i < n;i ++){ cin>>t; a[t]++; } for(i=0;i < 100;i++){ if(a[i] == 1) break; } cout<<i<<endl; int n,a[200001],temp; cin>>n; for(int i =0;i < n;i++){ cin>>a[i]; } for(int j =1;j < n-1;j++){ for(int i =0;i < n-j;i++){ if(a[i] >a[i+1] ){ temp = a[i]; a[i] = a[i+1]; a[i + 1]= temp; } } } for(int i =0;i < n;i ++){ cout<<a[i]<<" "; }**/ int a[100001] = {0}; int n,i; cin>>n; for(i =0;i <n;i++){ int t; cin>>t; a[t]++; } i =0; while(a[i]==0) i++; cout<<i; a[i]--; cout<<endl; return 0; }
------Input------
84 35 82 92 33 82 13 5 59 39 89 67 56 72 48 94 16 52 91 6 63 12 77 73 76 25 59 87 23 70 53 63 80 23 27 85 20 60 89 29 71 44 80 43 21 80 46 64 69 45 44 75 8 73 10 39 76 72 74 4 40 21 69 60 73 22 38 85 6 78 80 100 20 29 55 64 77 5 49 11 10 80 79 100 22
------Answer-----
4 5 5 6 6 8 10 10 11 12 13 16 20 20 21 21 22 22 23 23 25 27 29 29 33 35 38 39 39 40 43 44 44 45 46 48 49 52 53 55 56 59 59 60 60 63 63 64 64 67 69 69 70 71 72 72 73 73 73 74 75 76 76 77 77 78 79 80 80 80 80 80 82 82 85 85 87 89 89 91 92 94 100 100
------Your output-----
4