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)提供评测服务