festival.cpp: In function 'std::vector<int> max_coupons(int, std::vector<int>, std::vector<int>)':
festival.cpp:22:15: error: expected initializer before '-' token
   22 |         int s - P.size();
      |               ^
festival.cpp:23:29: error: 's' was not declared in this scope
   23 |         for (int i = 0; i < s; i++)
      |                             ^
festival.cpp:25:22: error: '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type' {aka 'struct std::pair<int, int>'} has no member named 'push_back'
   25 |                 p[i].push_back({P{i}, i});
      |                      ^~~~~~~~~
festival.cpp:25:34: error: expected '}' before '{' token
   25 |                 p[i].push_back({P{i}, i});
      |                                ~ ^
festival.cpp:25:34: error: expected ')' before '{' token
   25 |                 p[i].push_back({P{i}, i});
      |                               ~  ^
      |                                  )
festival.cpp:25:40: error: expected ')' before '}' token
   25 |                 p[i].push_back({P{i}, i});
      |                               ~        ^
      |                                        )
festival.cpp:25:41: error: expected primary-expression before ')' token
   25 |                 p[i].push_back({P{i}, i});
      |                                         ^
festival.cpp: At global scope:
festival.cpp:27:13: error: expected constructor, destructor, or type conversion before '(' token
   27 |         sort(p,begin(), p.end());
      |             ^
festival.cpp:29:9: error: expected unqualified-id before 'for'
   29 |         for (int i = 0; i < s; i++)
      |         ^~~
festival.cpp:29:29: error: 's' was not declared in this scope
   29 |         for (int i = 0; i < s; i++)
      |                             ^
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:29: error: 's' was not declared in this scope
festival.cpp:29:25: error: 'i' does not name a type
   29 |         for (int i = 0; i < s; i++)
      |                         ^
festival.cpp:29:32: error: 'i' does not name a type
   29 |         for (int i = 0; i < s; i++)
      |                                ^
festival.cpp:39:5: error: expected unqualified-id before 'for'
   39 |     for (int i = 0; i < j; i++)
      |     ^~~
festival.cpp:39:21: error: 'i' does not name a type
   39 |     for (int i = 0; i < j; i++)
      |                     ^
festival.cpp:39:28: error: 'i' does not name a type
   39 |     for (int i = 0; i < j; i++)
      |                            ^
festival.cpp:43:9: error: expected unqualified-id before 'return'
   43 |         return ans;
      |         ^~~~~~
festival.cpp:44:1: error: expected declaration before '}' token
   44 | }
      | ^
festival.cpp: In function 'std::vector<int> max_coupons(int, std::vector<int>, std::vector<int>)':
festival.cpp:26:9: warning: control reaches end of non-void function [-Wreturn-type]
   26 |         }
      |         ^