| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84798 | 杜奕辰 | 选择排序 | C++ | Compile Error | 0 MS | 0 KB | 466 | 2024-07-16 14:37:56 |
#include<bits/stdc++.h> using namespace std; int main() { int m[2000]; int n; cin>>n; int min,k,t; for(int i=0;i<=n;i++){ cin>>m[i]; } for(int i=0; i<10-1; i++) { min=m[i]; k=i; for(int j=i+1; j<10; j++) { if(min>m[i]) { min=m[j]; k=j; } } t=m[i]; m[i]=m[j]; m[j]=t; } return 0; }
Main.cc: In function 'int main()':
Main.cc:23:16: error: 'j' was not declared in this scope
m[i]=m[j];
^