/ Vijos /

记录详情

Compile Error

foo.cc:3:1: error: 'string' does not name a type
    3 | string ans;
      | ^~~~~~
foo.cc: In function 'int main()':
foo.cc:5:5: error: 'cin' was not declared in this scope
    5 |     cin>>n;
      |     ^~~
foo.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
  +++ |+#include <iostream>
    1 | using namespace std;
foo.cc:8:9: error: 'string' was not declared in this scope
    8 |         string a;
      |         ^~~~~~
foo.cc:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
  +++ |+#include <string>
    1 | using namespace std;
foo.cc:11:14: error: 'a' was not declared in this scope
   11 |         cin>>a>>b>>c>>d>>e>>f;
      |              ^
foo.cc:16:13: error: 'ans' was not declared in this scope
   16 |             ans=a;
      |             ^~~
foo.cc:20:5: error: 'cout' was not declared in this scope
   20 |     cout<<ans<<endl<<mx<<endl<<sum;
      |     ^~~~
foo.cc:20:5: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:20:11: error: 'ans' was not declared in this scope
   20 |     cout<<ans<<endl<<mx<<endl<<sum;
      |           ^~~
foo.cc:20:16: error: 'endl' was not declared in this scope
   20 |     cout<<ans<<endl<<mx<<endl<<sum;
      |                ^~~~
foo.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
  +++ |+#include <ostream>
    1 | using namespace std;
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
C++
递交时间
2023-10-15 13:12:23
评测时间
2023-10-15 13:12:23
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes