Problem swords
User igupta
Submission Time 2023-03-07 15:42:33
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:15:11: error: request for member ‘push_back’ in ‘s’, which is of non-class type ‘std::vector<std::pair<int, int> > [n]’
15 | s.push_back({a,b});
| ^~~~~~~~~
swords.cpp:17:12: error: request for member ‘begin’ in ‘s’, which is of non-class type ‘std::vector<std::pair<int, int> > [n]’
17 | sort(s.begin(),s.end());
| ^~~~~
swords.cpp:17:22: error: request for member ‘end’ in ‘s’, which is of non-class type ‘std::vector<std::pair<int, int> > [n]’
17 | sort(s.begin(),s.end());
| ^~~
swords.cpp:19:23: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘second’
19 | int maxy = s[n-1].second;
| ^~~~~~
swords.cpp:21:17: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘second’
21 |