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

Compile Error

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