Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
61753 邸礼诚 19众数 C++ Compile Error 0 MS 0 KB 257 2023-12-10 16:33:28

Tests(0/0):


Code:

#include<iostream> using amespace std; int main() { int t[1001]={0}; int n,shu; cin>>n; for(int i=0;i<n;i++){ cin>>shu; t[shu]++; } int zs=1; for(int i=1;i<=1000;i++){ if(t[i]>t[zs]){ zs=i; } } cout<<zs; return 0; }


Run Info:

Main.cc:2:8: error: expected nested-name-specifier before 'amespace'
 using  amespace std;
        ^
Main.cc: In function 'int main()':
Main.cc:7:2: error: 'cin' was not declared in this scope
  cin>>n;
  ^
Main.cc:7:2: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:18:2: error: 'cout' was not declared in this scope
  cout<