Problem swords
User wrizz69
Submission Time 2024-12-18 11:39:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

swords.cpp: In function ‘int main()’:
swords.cpp:5:12: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘first’
5 | #define fi first
| ^~~~~
swords.cpp:11:42: note: in expansion of macro ‘fi’
11 | for(int i = 0;i < n;i++) cin >> p[i].fi >> p[i].se;
| ^~
swords.cpp:6:12: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘second’
6 | #define se second
| ^~~~~~
swords.cpp:11:53: note: in expansion of macro ‘se’
11 | for(int i = 0;i < n;i++) cin >> p[i].fi >> p[i].se;
| ^~
swords.cpp:12:12: error: request for member ‘begin’ in ‘p’, which is of non-class type ‘std::vector<std::pair<int, int> > [n]’
12 | sort(p.begin(), p.end());
| ^~~~~
swords.cpp:12:23: erro