Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
155448 王顺煜 19从小到大进行排序 C++ Compile Error 0 MS 0 KB 264 2026-06-07 12:13:32

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[100001]={0},m,n; cin>>n; for(int i=1,i<=n;i++){ cin>>m; a[m]++; } for(int i=1;i<=100000;i++){ if(a[i]!=0) while(a[i]!=0){ cout<<i<<" "; a[i]--; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:15: error: expected ';' before '<=' token
  for(int i=1,i<=n;i++){
               ^
Main.cc:6:15: error: expected primary-expression before '<=' token