foo.cc: In function 'int main()':
foo.cc:6:8: error: 'cin' was not declared in this scope
6 | int n; cin>>n;
| ^~~
foo.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <cmath>
+++ |+#include <iostream>
2 | using namespace std;
foo.cc:10:1: error: 'cout' was not declared in this scope
10 | cout<<GetLength(y)<<endl;
| ^~~~
foo.cc:10:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:10:21: error: 'endl' was not declared in this scope
10 | cout<<GetLength(y)<<endl;
| ^~~~
foo.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
1 | #include <cmath>
+++ |+#include <ostream>
2 | using namespace std;
foo.cc: In function 'int GetLength(int)':
foo.cc:22:8: error: 'cin' was not declared in this scope
22 | int n; cin>>n;
| ^~~
foo.cc:22:8: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
foo.cc:26:1: error: 'cout' was not declared in this scope
26 | cout << (int)len + 1;
| ^~~~
foo.cc:26:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
[Hydro](https://hydro.ac)提供评测服务