Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
148504 张晓冉 18离开队伍后的人 C++ Compile Error 0 MS 0 KB 279 2026-02-23 14:27:49

Tests(0/0):


Code:

#include<bits/stdc++.h> using nmaespace std; int main(){ int n; int x; cin>>n; int a[1001] = {}; for(int i = 0;i > n+1;i++){ cin>>a[i]; } cin>>x; a[] -= a[x-1]; for(int i = 0;i < n;i++){ cout<<a[i]; } return 0; }


Run Info:

Main.cc:2:7: error: expected nested-name-specifier before 'nmaespace'
 using nmaespace std;
       ^
Main.cc: In function 'int main()':
Main.cc:6:5: error: 'cin' was not declared in this scope
     cin>>n;
     ^
Main.cc:6:5: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:74:0,
                 from Main.cc:1:
/usr/include/c++/5/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^
Main.cc:12:7: error: expected primary-expression before ']' token
     a[] -= a[x-1];
       ^
Main.cc:14:6: error: 'cout' was not declared in this scope
      cout<