Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117500 谭思宸 奇怪的国家 C++ Compile Error 0 MS 0 KB 282 2025-04-19 11:24:58

Tests(0/0):


Code:

#include<iostream> #include<cstring> using namespac std; int main(){ char m[50],n[50]; cin>>m>>n; int k=strlen(m); for(int i=0;i<k;i++){ if(m[i]==n[i]){ cout<<"1"; }else{ cout<<"0"; } } return 0; }


Run Info:

Main.cc:3:7: error: expected nested-name-specifier before 'namespac'
 using namespac std;
       ^
Main.cc: In function 'int main()':
Main.cc:6:5: error: 'cin' was not declared in this scope
     cin>>m>>n;
     ^
Main.cc:6:5: 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:10:12: error: 'cout' was not declared in this scope
            cout<<"1";
            ^
Main.cc:10:12: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^
Main.cc:12:12: error: 'cout' was not declared in this scope
            cout<<"0";
            ^
Main.cc:12:12: note: suggested alternative:
In file included from Main.cc:1:0:
/usr/include/c++/5/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^