Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
72405 申明宇 19从小到大进行排序 C++ Compile Error 0 MS 0 KB 330 2024-05-05 17:57:11

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main() { int x,n,m=0,d=0; cin>>x; int a[100001]={0}; for(int i=1;i<=x;i++){ cin>>n; a[n]++; } for(int i=1;i<=100001;i++){ if(a[i]==1){ a[i]=i; } } cout<<a[i]; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:18:13: error: 'i' was not declared in this scope
     cout<