foo.cc: In function 'int main()':
foo.cc:5:9: 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:6:9: error: 'vector' was not declared in this scope
6 | vector<pair<int, int>>v;
| ^~~~~~
foo.cc:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
+++ |+#include <vector>
1 | using namespace std;
foo.cc:6:16: error: 'pair' was not declared in this scope
6 | vector<pair<int, int>>v;
| ^~~~
foo.cc:1:1: note: 'std::pair' is defined in header '<utility>'; did you forget to '#include <utility>'?
+++ |+#include <utility>
1 | using namespace std;
foo.cc:6:21: error: expected primary-expression before 'int'
6 | vector<pair<int, int>>v;
| ^~~
foo.cc:11:17: error: 'v' was not declared in this scope
11 | v.push_back(make_pair(x,y));
| ^
foo.cc:11:29: error: 'make_pair' was not declared in this scope
11 | v.push_back(make_pair(x,y));
| ^~~~~~~~~
foo.cc:11:29: note: 'std::make_pair' is defined in header '<utility>'; did you forget to '#include <utility>'?
foo.cc:13:14: error: 'v' was not declared in this scope
13 | sort(v.begin(), v.end(), [](const auto& v, const auto& u)
| ^
foo.cc:13:43: error: use of 'auto' in lambda parameter declaration only available with '-std=c++14' or '-std=gnu++14'
13 | sort(v.begin(), v.end(), [](const auto& v, const auto& u)
| ^~~~
foo.cc:13:58: error: use of 'auto' in lambda parameter declaration only available with '-std=c++14' or '-std=gnu++14'
13 | sort(v.begin(), v.end(), [](const auto& v, const auto& u)
| ^~~~
foo.cc: In lambda function:
foo.cc:15:23: error: request for member 'first' in 'v', which is of non-class type 'const int'
15 | if (v.first != u.first)
| ^~~~~
foo.cc:15:34: error: request for member 'first' in 'u', which is of non-class type 'const int'
15 | if (v.first != u.first)
| ^~~~~
foo.cc:16:34: error: request for member 'first' in 'v', which is of non-class type 'const int'
16 | return v.first < u.first;
| ^~~~~
foo.cc:16:44: error: request for member 'first' in 'u', which is of non-class type 'const int'
16 | return v.first < u.first;
| ^~~~~
foo.cc:18:34: error: request for member 'second' in 'v', which is of non-class type 'const int'
18 | return v.second < u.second;
| ^~~~~~
foo.cc:18:45: error: request for member 'second' in 'u', which is of non-class type 'const int'
18 | return v.second < u.second;
| ^~~~~~
foo.cc: In function 'int main()':
foo.cc:13:9: error: 'sort' was not declared in this scope; did you mean 'short'?
13 | sort(v.begin(), v.end(), [](const auto& v, const auto& u)
| ^~~~
| short
foo.cc:23:34: error: 'r' was not declared in this scope
23 | if (v[i].first > r||v[i].second>r)
| ^
foo.cc:31:29: error: 'max' was not declared in this scope
31 | l = max(l, v[i].first);
| ^~~
foo.cc:32:29: error: 'min' was not declared in this scope; did you mean 'main'?
32 | r = min(r, v[i].second);
| ^~~
| main
foo.cc:38:9: error: 'cout' was not declared in this scope
38 | cout << ans;
| ^~~~
foo.cc:38:9: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
[Hydro](https://hydro.ac)提供评测服务