Compile Error

foo.cc:2:7: error: expected nested-name-specifier before ‘namespce’
    2 | using namespce std;
      |       ^~~~~~~~
foo.cc: In function ‘int main()’:
foo.cc:7:9: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
    7 |         cin>>h>>r;
      |         ^~~
      |         std::cin
In file included from stdc++.h:146:
/nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iostream:62:18: note: ‘std::cin’ declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
foo.cc:11:9: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
   11 |         cout<<t
      |         ^~~~
      |         std::cout
/nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/iostream:63:18: note: ‘std::cout’ declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~

信息

递交者
类型
自测
题目
P1000 大象喝水
语言
C++
递交时间
2025-07-19 18:04:14
评测时间
2025-07-19 18:04:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes