记录详情

Compile Error

foo.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         int n,k;cin>>n>>k;
      |                 ^~~
      |                 std::cin
In file included from foo.cc:1:
/nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/iostream:60:18: note: 'std::cin' declared here
   60 |   extern istream cin;           /// Linked to standard input
      |                  ^~~
foo.cc:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout<<x<<endl;
      |         ^~~~
      |         std::cout
In file included from foo.cc:1:
/nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/iostream:61:18: note: 'std::cout' declared here
   61 |   extern ostream cout;          /// Linked to standard output
      |                  ^~~~
foo.cc:7:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |         cout<<x<<endl;
      |                  ^~~~
      |                  std::endl
In file included from /nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/iostream:39,
                 from foo.cc:1:
/nix/store/wy4ywjsch9q2hj5lphqjdg9p2kf7w0ls-gcc-11.3.0/include/c++/11.3.0/ostream:684:5: note: 'std::endl' declared here
  684 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
自测
题目
P1437 3-5 迎新晚会
语言
C++
递交时间
2023-07-06 15:47:17
评测时间
2023-07-06 15:47:17
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes