Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,M,tmp1,tmp2,get;
  long int cost;
  vector<int> A;
  vector<int> B;
  
  cin >> N >> M;
  for(int i=0;i<N;i++){
    cin >> tmp1 >>tmp2;
    A.push_back(tmp1);
    B.push_back(tmp2);
  }
  
  cost=0;
  get=0;
  int min,tmp_num;
  while{
    min= *min_element(A.begin(),A.end());
    tmp_num = B[min];
    if(tmp_num => (M-get)){
      cost += A[min]*(M-get);
      break;
    }else{
      cost += A[min]*B[min];
      get += A[min];
      remove(A,min);
      remove(B,min);
    }
  }(get=>M);
  
  cout << cost;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:8: error: expected '(' before '{' token
   20 |   while{
      |        ^
      |        (
a.cc:20:8: error: expected primary-expression before '{' token
a.cc:20:8: error: expected ')' before '{' token
   20 |   while{
      |        ^
      |        )
a.cc:23:17: error: expected primary-expression before '>' token
   23 |     if(tmp_num => (M-get)){
      |                 ^
a.cc:29:13: error: no matching function for call to 'remove(std::vector<int>&, int&)'
   29 |       remove(A,min);
      |       ~~~~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:788:5: note: candidate: 'template<class _FIter, class _Tp> _FIter std::remove(_FIter, _FIter, const _Tp&)'
  788 |     remove(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algo.h:788:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:86:
/usr/include/c++/14/pstl/glue_algorithm_defs.h:224:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::remove(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  224 | remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:224:1: note:   candidate expects 4 arguments, 2 provided
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/stdio.h:158:12: note: candidate: 'int remove(const char*)'
  158 | extern int remove (const char *__filename) __THROW;
      |            ^~~~~~
/usr/include/stdio.h:158:12: note:   candidate expects 1 argument, 2 provided
a.cc:30:13: error: no matching function for call to 'remove(std::vector<int>&, int&)'
   30 |       remove(B,min);
      |       ~~~~~~^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:788:5: note: candidate: 'template<class _FIter, class _Tp> _FIter std::remove(_FIter, _FIter, const _Tp&)'
  788 |     remove(_ForwardIterator __first, _ForwardIterator __last,
      |     ^~~~~~
/usr/include/c++/14/bits/stl_algo.h:788:5: note:   candidate expects 3 arguments, 2 provided
/usr/include/c++/14/pstl/glue_algorithm_defs.h:224:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, _ForwardIterator> std::remove(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
  224 | remove(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
      | ^~~~~~
/usr/include/c++/14/pstl/glue_algorithm_defs.h:224:1: note:   candidate expects 4 arguments, 2 provided
/usr/include/stdio.h:158:12: note: candidate: 'int remove(const char*)'
  158 | extern int remove (const char *__filename) __THROW;
      |            ^~~~~~
/usr/include/stdio.h:158:12: note:   candidate expects 1 argument, 2 provided
a.cc:32:9: error: expected primary-expression before '>' token
   32 |   }(get=>M);
      |         ^