festival.cpp: In function 'std::vector<int> max_coupons(int, std::vector<int>, std::vector<int>)':
festival.cpp:10:25: error: 'N' was not declared in this scope
10 | vector<int> ans,use(N, 0);
| ^
festival.cpp:15:9: error: 'inti' was not declared in this scope; did you mean 'int'?
15 | for(inti = 1; i <= 4; i++) sort(mp[i].begin(), mp[i].end());
| ^~~~
| int
festival.cpp:15:19: error: 'i' was not declared in this scope
15 | for(inti = 1; i <= 4; i++) sort(mp[i].begin(), mp[i].end());
| ^
festival.cpp:20:6: error: expected ';' after struct definition
20 | }
| ^
| ;
festival.cpp:27:45: error: conflicting declaration 'std::priority_queue<max_coupons(int, std::vector<int>, std::vector<int>)::item, std::vector<max_coupons(int, std::vector<int>, std::vector<int>)::item>, max_coupons(int, std::vector<int>, std::vector<int>)::cmp> pq'
27 | priority_queue<item, vector<item>, cmp> pq;
| ^~
festival.cpp:16:52: note: previous declaration as 'std::priority_queue<int, std::vector<int>, std::greater<int> > pq'
16 | priority_queue<int, vector<int>, greater<int>> pq;
| ^~
festival.cpp: In lambda function:
festival.cpp:33:20: error: no matching function for call to 'std::priority_queue<int, std::vector<int>, std::greater<int> >::push(<brace-enclosed initializer list>)'
33 | pq.push({t, mp[t][pt].se, mp[t][pt].fi});
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/queue:64,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86,
from festival.cpp:2:
/usr/include/c++/11/bits/stl_queue.h:640:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = int; _Sequence = std::vector<int>; _Compare = std::greater<int>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = int]'
640 | push(const value_type& __x)
| ^~~~
/usr/include/c++/11/bits/stl_queue.h:640:30: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const int&'}
640 | push(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_queue.h:648:7: note: candidate: 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = int; _Sequence = std::vector<int>; _Compare = std::greater<int>; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = int]'
648 | push(value_type&& __x)
| ^~~~
/usr/include/c++/11/bits/stl_queue.h:648:25: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<int, std::vector<int>, std::greater<int> >::value_type&&' {aka 'int&&'}
648 | push(value_type&& __x)
| ~~~~~~~~~~~~~^~~
festival.cpp: In function 'std::vector<int> max_coupons(int, std::vector<int>, std::vector<int>)':
festival.cpp:43:19: error: request for member 'idx' in 'it', which is of non-class type 'int'
43 | if(use[it.idx]) continue;
| ^~~
festival.cpp:44:16: error: request for member 'idx' in 'it', which is of non-class type 'int'
44 | use[it.idx] = 1;
| ^~~
festival.cpp:45:25: error: request for member 'p' in 'it', which is of non-class type 'int'
45 | cost = (cost-it.p)*it.t;
| ^
festival.cpp:45:31: error: request for member 't' in 'it', which is of non-class type 'int'
45 | cost = (cost-it.p)*it.t;
| ^
festival.cpp:46:26: error: request for member 'idx' in 'it', which is of non-class type 'int'
46 | ans.push_back(it.idx);
| ^~~