Language: C++

#include <iostream>
#include <queue>
#include <cmath>
using namespace std;

struct data {
    double a;
    int orig;
    int d;

    data(int aa, int dd) {
        a = (double)aa / dd;
        orig = aa;
        d = dd;
    }

    bool operator<(const data& other) const {
        return a < other.a;
    }
};

int main(void) {
    priority_queue<data> q;
    int n, k;
    cin >> n >> k;
    for(int i = 0; i < n; i++) {
        int a;
        cin >> a;
        q.push(data(a, 1));
    }
    for(int i = 0; i < k; i++) {
        const data &dat = q.top();
        int a = dat.orig;
        int d = dat.d + 1;
        q.pop();
        q.push(data(a, d));
    }

    cout << (long long)ceil(q.top().a) << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: template argument 1 is invalid
   23 |     priority_queue<data> q;
      |                        ^
a.cc:23:24: error: template argument 2 is invalid
a.cc:23:24: error: template argument 3 is invalid
a.cc:29:11: error: request for member 'push' in 'q', which is of non-class type 'int'
   29 |         q.push(data(a, 1));
      |           ^~~~
a.cc:29:16: error: reference to 'data' is ambiguous
   29 |         q.push(data(a, 1));
      |                ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:8: note:                 'struct data'
    6 | struct data {
      |        ^~~~
a.cc:32:15: error: reference to 'data' is ambiguous
   32 |         const data &dat = q.top();
      |               ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:8: note:                 'struct data'
    6 | struct data {
      |        ^~~~
a.cc:33:17: error: 'dat' was not declared in this scope; did you mean 'data'?
   33 |         int a = dat.orig;
      |                 ^~~
      |                 data
a.cc:35:11: error: request for member 'pop' in 'q', which is of non-class type 'int'
   35 |         q.pop();
      |           ^~~
a.cc:36:11: error: request for member 'push' in 'q', which is of non-class type 'int'
   36 |         q.push(data(a, d));
      |           ^~~~
a.cc:36:16: error: reference to 'data' is ambiguous
   36 |         q.push(data(a, d));
      |                ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:6:8: note:                 'struct data'
    6 | struct data {
      |        ^~~~
a.cc:39:31: error: request for member 'top' in 'q', which is of non-class type 'int'
   39 |     cout << (long long)ceil(q.top().a) << endl;
      |                               ^~~