Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N, M;
  cin >> N >> M;
  priority_queue<pair<uint64_t, uint64_t>, vector<pair<uint64_6, uint64_t>>, greater<pair<uint64_t, uint64_t>>> pq;
  uint64_t want = 0;
  uint64_t cost = 0;

  for(int i = 0; i < N; i++){
    uint64_t A, B;
    cin >> A >> B;
    pq.push(make_pair(A, B));                 //最小値に関するpriority_queueにpush
  }

   while(1){
    pair<uint64_6, uint64_t> tmp = pq.top();
    
    if(tmp.second + want < M){             //当店の栄養ドリンクは買い占めできる
      want += tmp.second;
      cost += tmp.first * tmp.second;
    }else{                                                             //買い占めすると目標本数をオーバー
      cost += tmp.first * (M - want);
      break;
    }
    pq.pop();
  }

 
  cout << cost << endl;
  return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:56: error: 'uint64_6' was not declared in this scope; did you mean 'uint64_t'?
    7 |   priority_queue<pair<uint64_t, uint64_t>, vector<pair<uint64_6, uint64_t>>, greater<pair<uint64_t, uint64_t>>> pq;
      |                                                        ^~~~~~~~
      |                                                        uint64_t
a.cc:7:66: error: template argument 1 is invalid
    7 |   priority_queue<pair<uint64_t, uint64_t>, vector<pair<uint64_6, uint64_t>>, greater<pair<uint64_t, uint64_t>>> pq;
      |                                                                  ^~~~~~~~
a.cc:7:74: error: template argument 1 is invalid
    7 |   priority_queue<pair<uint64_t, uint64_t>, vector<pair<uint64_6, uint64_t>>, greater<pair<uint64_t, uint64_t>>> pq;
      |                                                                          ^~
a.cc:7:74: error: template argument 2 is invalid
a.cc:7:111: error: template argument 2 is invalid
    7 |   priority_queue<pair<uint64_t, uint64_t>, vector<pair<uint64_6, uint64_t>>, greater<pair<uint64_t, uint64_t>>> pq;
      |                                                                                                               ^
a.cc:14:8: error: request for member 'push' in 'pq', which is of non-class type 'int'
   14 |     pq.push(make_pair(A, B));                 //最小値に関するpriority_queueにpush
      |        ^~~~
a.cc:18:39: error: request for member 'top' in 'pq', which is of non-class type 'int'
   18 |     pair<uint64_6, uint64_t> tmp = pq.top();
      |                                       ^~~
a.cc:20:12: error: request for member 'second' in 'tmp', which is of non-class type 'int'
   20 |     if(tmp.second + want < M){             //当店の栄養ドリンクは買い占めできる
      |            ^~~~~~
a.cc:21:19: error: request for member 'second' in 'tmp', which is of non-class type 'int'
   21 |       want += tmp.second;
      |                   ^~~~~~
a.cc:22:19: error: request for member 'first' in 'tmp', which is of non-class type 'int'
   22 |       cost += tmp.first * tmp.second;
      |                   ^~~~~
a.cc:22:31: error: request for member 'second' in 'tmp', which is of non-class type 'int'
   22 |       cost += tmp.first * tmp.second;
      |                               ^~~~~~
a.cc:24:19: error: request for member 'first' in 'tmp', which is of non-class type 'int'
   24 |       cost += tmp.first * (M - want);
      |                   ^~~~~
a.cc:27:8: error: request for member 'pop' in 'pq', which is of non-class type 'int'
   27 |     pq.pop();
      |        ^~~