| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61122 | 冯纪尧 | 19从小到大进行排序 | C++ | Compile Error | 0 MS | 0 KB | 375 | 2023-12-02 15:43:34 |
#include<iostream> using namespace std; int a[200001]={0}; int b[200001]={0}; int main(){ int n,c=1; cin>>n; int max=0; for(int i=1;i<=n;i++){ cin>>a[i]; b[a[i]]=a[i]; if(min<a[i]){ max=b[i]; } if(a[i]==0){ c=0 } } if(c=0){ cout<<0<<' '; } for(int i=1;i<=max;i++){ if(b[i]==0){ continue; } cout<<b[i]<<' '; } }
Main.cc: In function 'int main()': Main.cc:13:13: error: the value of 'a' is not usable in a constant expression if(min