Problem lineup
User LXYSGP
Submission Time 2026-01-21 09:22:24
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lineup.cpp: In function ‘int main()’:
lineup.cpp:10:13: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘first’
10 | cin>>a[i].first>>a[i].second;
| ^~~~~
lineup.cpp:10:25: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘second’
10 | cin>>a[i].first>>a[i].second;
| ^~~~~~
lineup.cpp:11:11: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘first’
11 | mp[a[i].first] = 0;
| ^~~~~
lineup.cpp:12:18: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘second’
12 | st.insert(a[i].second);
| ^~~~~~
lineup.cpp:15:16: error: request for member ‘begin’ in ‘a’, which is of non-class type ‘std::vector<std::pair<int, int> > [n]’
15 | stable_sort(a.begin(), a.end()); //smaller->bigger