Language: C++

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
#define LL long long
#define ull unsigned long long
#define mp make_pair
#define N 100009
const LL INF = 0x3f3f3f3f;
using namespace std;

int main()
{
    LL h[N];
    LL n, a, b;

    bool judge(LL mid)
    {
        LL ans = mid;
        for(int i = 1; i <= n; i++)
        {
            LL tm = h[i] - b*mid;
            if(tm > 0)
            {
                LL cnt = tm / (a - b) + (tm % (a - b) == 0 ? 0 : 1);
                ans -= cnt;
                if(ans < 0)
                    return false;
            }
        }
        return true;
    }

    int main()
    {
        scanf("%lld%lld%lld", &n, &a, &b);
        for(int i = 1; i <= n; i++)
            scanf("%lld", &h[i]);
        LL l = 0, r = INF;
        LL ans = INF;
        while(l <= r)
        {
            LL mid = (l + r)>>1;
            if(judge(mid))
                ans = mid, r = mid - 1;
            else
                l = mid + 1;
        }
        printf("%lld\n", ans);
        return 0;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:96:5: error: a function-definition is not allowed here before '{' token
   96 |     {
      |     ^
a.cc:112:13: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
  112 |     int main()
      |             ^~
a.cc:112:13: note: remove parentheses to default-initialize a variable
  112 |     int main()
      |             ^~
      |             --
a.cc:112:13: note: or replace parentheses with braces to value-initialize a variable
a.cc:113:5: error: a function-definition is not allowed here before '{' token
  113 |     {
      |     ^