Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160391 Kevin 排序 C++ Compile Error 0 MS 0 KB 426 2026-09-17 17:53:43

Tests(0/0):


Code:

#include<iostream> #include<iomanip> using namespace std; int main() { int a[105]; int ot,n; cin>>ot; for(int op=1;op<=t;op++){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<n;i++){ for(int j=i+1;j<=n;j++){ if(a[i]>a[j]){ int t=a[i]; a[i]=a[j]; a[j]=t; } } } for(int i=1;i<=n;i++){ cout<<a[i]<<" "; } cout<<endl; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:19: error: 't' was not declared in this scope
  for(int op=1;op<=t;op++){
                   ^