festival.cpp: In function 'std::vector<int> max_coupons(int, std::vector<int>, std::vector<int>)':
festival.cpp:8:10: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
8 | p[i].first = P[i];
| ^
festival.cpp:9:10: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
9 | p[i].second = i;
| ^
festival.cpp:11:12: error: 'struct std::pair<int, int>' has no member named 'begin'
11 | sort(p.begin(), p.end());
| ^~~~~
festival.cpp:11:23: error: 'struct std::pair<int, int>' has no member named 'end'
11 | sort(p.begin(), p.end());
| ^~~
festival.cpp:15:13: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
15 | if(p[i].first<=A) {
| ^
festival.cpp:16:17: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
16 | A-=p[i].first;
| ^
festival.cpp:17:26: error: no match for 'operator[]' (operand types are 'std::pair<int, int>' and 'int')
17 | v.push_back(p[i].second);
| ^