criyle/codenet-compile-errors huggingface dataset:
Language: C++

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

vector<ll> arr;
ll n, a, b;

int bul(ll x){
  int ans = x;
  for (int i = 0; i < n; i++){
    ll kes = arr[i] - b*x;
    kes = max(kes, 0);
   	ans -= kes/a + (kes%a == 0);
  }
  if (ans < 0) return 0;
  return 1;
}

int main(){
  
  cin >> n >> a >> b;
  arr.resize(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  
  ll l = 1;
  ll r = 1000000000;
  while (l < r){
    int mid = (l+r)/2;
    if (bul(mid)) r = mid;
    else l = mid-1;
  }
  
  cout << l << endl;
}


Compiler output:
a.cc:4:8: error: 'll' was not declared in this scope
    4 | vector<ll> arr;
      |        ^~
a.cc:4:10: error: template argument 1 is invalid
    4 | vector<ll> arr;
      |          ^
a.cc:4:10: error: template argument 2 is invalid
a.cc:5:1: error: 'll' does not name a type
    5 | ll n, a, b;
      | ^~
a.cc:7:9: error: 'll' was not declared in this scope
    7 | int bul(ll x){
      |         ^~
a.cc: In function 'int main()':
a.cc:20:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   20 |   cin >> n >> a >> b;
      |          ^
      |          yn
a.cc:20:15: error: 'a' was not declared in this scope
   20 |   cin >> n >> a >> b;
      |               ^
a.cc:20:20: error: 'b' was not declared in this scope
   20 |   cin >> n >> a >> b;
      |                    ^
a.cc:21:7: error: request for member 'resize' in 'arr', which is of non-class type 'int'
   21 |   arr.resize(n);
      |       ^~~~~~
a.cc:22:41: error: invalid types 'int[int]' for array subscript
   22 |   for (int i = 0; i < n; i++) cin >> arr[i];
      |                                         ^
a.cc:24:3: error: 'll' was not declared in this scope
   24 |   ll l = 1;
      |   ^~
a.cc:25:5: error: expected ';' before 'r'
   25 |   ll r = 1000000000;
      |     ^~
      |     ;
a.cc:26:10: error: 'l' was not declared in this scope
   26 |   while (l < r){
      |          ^
a.cc:26:14: error: 'r' was not declared in this scope
   26 |   while (l < r){
      |              ^
a.cc:28:12: error: 'bul' cannot be used as a function
   28 |     if (bul(mid)) r = mid;
      |         ~~~^~~~~
a.cc:32:11: error: 'l' was not declared in this scope
   32 |   cout << l << endl;
      |           ^
Language: C++

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

vector<ll> arr;
ll n, a, b;

int bul(ll x){
  int ans = x;
  for (int i = 0; i < n; i++){
    ll kes = arr[i] - b*x;
    kes = max(kes, 0);
   	ans -= kes/a + (kes%a == 0);
  }
  if (ans < 0) return 0;
  return 1;
}

int main(){
  
  cin >> n >> a >> b;
  arr.resize(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  
  ll l = 0;
  ll r = 1000000000;
  while (l < r){
    int mid = (l+r)/2;
    if (bul(mid)) r = mid;
    else l = mid-1;
  }
  
  cout << l << endl;
}

Compiler output:
a.cc:4:8: error: 'll' was not declared in this scope
    4 | vector<ll> arr;
      |        ^~
a.cc:4:10: error: template argument 1 is invalid
    4 | vector<ll> arr;
      |          ^
a.cc:4:10: error: template argument 2 is invalid
a.cc:5:1: error: 'll' does not name a type
    5 | ll n, a, b;
      | ^~
a.cc:7:9: error: 'll' was not declared in this scope
    7 | int bul(ll x){
      |         ^~
a.cc: In function 'int main()':
a.cc:20:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   20 |   cin >> n >> a >> b;
      |          ^
      |          yn
a.cc:20:15: error: 'a' was not declared in this scope
   20 |   cin >> n >> a >> b;
      |               ^
a.cc:20:20: error: 'b' was not declared in this scope
   20 |   cin >> n >> a >> b;
      |                    ^
a.cc:21:7: error: request for member 'resize' in 'arr', which is of non-class type 'int'
   21 |   arr.resize(n);
      |       ^~~~~~
a.cc:22:41: error: invalid types 'int[int]' for array subscript
   22 |   for (int i = 0; i < n; i++) cin >> arr[i];
      |                                         ^
a.cc:24:3: error: 'll' was not declared in this scope
   24 |   ll l = 0;
      |   ^~
a.cc:25:5: error: expected ';' before 'r'
   25 |   ll r = 1000000000;
      |     ^~
      |     ;
a.cc:26:10: error: 'l' was not declared in this scope
   26 |   while (l < r){
      |          ^
a.cc:26:14: error: 'r' was not declared in this scope
   26 |   while (l < r){
      |              ^
a.cc:28:12: error: 'bul' cannot be used as a function
   28 |     if (bul(mid)) r = mid;
      |         ~~~^~~~~
a.cc:32:11: error: 'l' was not declared in this scope
   32 |   cout << l << endl;
      |           ^
Language: C++

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int N;
long long A, B;
long long H[210000];
 
int main() {
 
  cin >> N >> A >> B;
  
	for (int i = 0; i < N; ++i) 
      cin >> H[i];
  
	sort(H, H+N);
  
	long long lo = 0, hi = 1e16;
  
	while (hi - lo > 1) {
	  long long mid = (lo + hi) / 2;
	  long long need = 0;
      
	  for (int i = 0; i < N; ++i) {
		long long rem = H[i] - mid * B;
        
		if (rem > 0) need += (rem + (A-B-1)) / (A-B);
	  }
      
	  if (need <= mid) hi = mid;
	  else lo = mid;
	}
	cout << hi << endl;
  }
}

Compiler output:
a.cc:36:1: error: expected declaration before '}' token
   36 | }
      | ^
Language: Java

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N=sc.nextInt();
    int A=sc.nextInt();
    int B=sc.nextInt();
    int[] h=new int[n];
    int ans =0;
    
    for(int i=0;i<N;i++){
      h[i]=sc.nextInt();
    }

    while(h[N-1] < 0){
      ans++;
      Arrays.sort(h);
      h[N-1] -= A;
      for(int i=0;i<N-1;i++){
        h[i] -= B;
      }
      Arrays.sort(h);
      if(h[N-1] < 0){
        break;
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    int[] h=new int[n];
                    ^
  symbol:   variable n
  location: class Main
1 error
Language: C++

import java.util.*;
 
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N=sc.nextInt();
    int A=sc.nextInt();
    int B=sc.nextInt();
    int[] h=new int[n];
    int ans =0;
    
    for(int i=0;i<N;i++){
      h[i]=sc.nextInt();
    }

    while(h[N-1] < 0){
      ans++;
      Arrays.sort(h);
      h[N-1] -= A;
      for(int i=0;i<N-1;i++){
        h[i] -= B;
      }
      Arrays.sort(h);
      if(h[N-1] < 0){
        break;
      }
    }
    System.out.println(ans);
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    long long n, a, b;
    cin >> n >> a >> b;
    long long h[n], begin = 1, end = 0;
    for (int i = 0; cin >> h[i]; i++) {
        end = max(end, h[i]);
    }
    end = max(1, end / b);
    while (begin < end) {
        long long mid = (begin + end) / 2, count = 0;
        for (long long i = 0; i < n; i++) {
            if (h[i] - mid * b > 0) {
                count += (h[i] - mid * b - 1) / (a - b);
            }
        }
        if (count <= mid) {
            end = mid;
        } else {
            begin = mid + 1;
        }
    }
    cout << begin;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: no matching function for call to 'max(int, long long int)'
   11 |     end = max(1, end / b);
      |           ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:11:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   11 |     end = max(1, end / b);
      |           ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N,A,B;
  cin >> N >> A >> B;
  int H[100010];
  for(int i=0;i<N;i++){
    cin >> H[i];
  }
  sort(H,H+N-1);
  int isNG = 0;
  int isOK = (H[N-1]+B-1)/B;
  while(isOK-isNG>1){
    int mid = (isOK+isNG)/2;
    int need = 0;
    for(int i=0;i<N;i++){
      if(H[i]-B*mid>0){
        need+=(H[i]-B*mid+A-B-1)/(A-B);
        if(need>mid){
          isNG=mid;
          continue;
        }
      }
    }
    isOK=mid;
  }
  cout << isOK << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   12 |   sort(H,H+N-1);
      |   ^~~~
      |   short
Language: C++

#include<iostream>
using namespace std;

int main()
{
  int N,A,B;
  cin >> N >> A >> B;
  int H[100010];
  for(int i=0;i<N;i++){
    cin >> H[i];
  }
  int isNG = 0;
  int isOK = (max(H)+B-1)/B;
  while(isOK-isNG>1){
    int mid = (isOK+isNG)/2;
    int need = 0;
    for(int i=0;i<N;i++){
      if(H[i]-B*mid>0){
        need+=(H[i]-B*mid+A-B-1)/(A-B);
        if(need>mid){
          isNG=mid;
          continue;
        }
      }
    }
    isOK=mid;
  }
  cout << isOK << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: no matching function for call to 'max(int [100010])'
   13 |   int isOK = (max(H)+B-1)/B;
      |               ~~~^~~
In file included from /usr/include/c++/14/string:51,
                 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/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
Language: C++

#include <bits/stdc++.h>

#define int long long

using namespace std;

const int MAXN = 100 * 1000 + 123;









int n, A, B, a[MAXN];

int32_t main() {
    cin >> n >> A >> B;
    A -= B;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    int dw = -1, up = 1000 * 1000 * 1000 + 123;
    while (up - dw > 1) {
        int m = (up + dw) / 2, use = 0;
        for (int i = 0; i < n; i++)
            use += max((a[i] - m * B + A - 1) / A, 0);
        if (use > m)
            dw = m;
        else
            up = m;
    }
    cout << up;
    return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:28:23: error: no matching function for call to 'max(long long int, int)'
   28 |             use += max((a[i] - m * B + A - 1) / A, 0);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:28:23: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   28 |             use += max((a[i] - m * B + A - 1) / A, 0);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:28:23: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   28 |             use += max((a[i] - m * B + A - 1) / A, 0);
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

const int N = 100 * 1000 + 10;
long long h[N], n, a, b;

bool is_val(long long t)
{
	long long cnt = 0;
	for (int i = 0; i < n; i++)
	{
		long long x = h[i];
		x -= t * b;
		if(x <= 0)
			continue;
		cnt += (x / (a - b)) + min(1, x % (a - b));
	}
	return cnt <= t;
}

long long bin_search()
{
	long long low = 0, high = 1000 * 1000 * 1000 + 5;
	while(high - low > 1)
	{
		long long mid = (low + high) / 2;
		if(is_val(mid))
			high = mid;
		else
			low = mid;
	}
	return high;
}

int main()
{
	cin >> n >> a >> b;
	for (int i = 0; i < n; i++)
		cin >> h[i];
	cout << bin_search() << endl;
}

Compiler output:
a.cc: In function 'bool is_val(long long int)':
a.cc:16:43: error: no matching function for call to 'min(int, long long int)'
   16 |                 cnt += (x / (a - b)) + min(1, x % (a - b));
      |                                        ~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:16:43: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
   16 |                 cnt += (x / (a - b)) + min(1, x % (a - b));
      |                                        ~~~^~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:16:43: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   16 |                 cnt += (x / (a - b)) + min(1, x % (a - b));
      |                                        ~~~^~~~~~~~~~~~~~~~
Language: C++

#include <stdio.h>
#include <algorithm>
using namespace std;
#define ll long long
ll n,a,b,c[100000+10];
bool f(ll x)
{
	ll i,j,sum=0;
	for(i=1;i<=n;i++)
	 {
	 	if(c[i]>b*x) sum+=(c[i]-b*x+a-1)/a;
	 }
	 return sum<=x;
}
int main()
{
	ll m,i,j,k,s,t,r;
      scanf("%lld%lld%lld",&n,&a,&b)
	 {
	 	a-=b;r=0;
	 	for(i=1;i<=n;i++)
	 	scanf("%lld",&c[i]),r+=(c[i]/b+1);
	 	ll mid,l=1;
	 	while(l<r)
	 	 {
	 	 	int mid=(l+r)/2;
	 	 	if(f(mid)) r=mid;
	 	 	else l=mid+1;
		 }
		 printf("%lld\n",l);
	 }
	 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:37: error: expected ';' before '{' token
   18 |       scanf("%lld%lld%lld",&n,&a,&b)
      |                                     ^
      |                                     ;
   19 |          {
      |          ~
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<map>
#include<set>
#include<queue>
#include<math.h>
using namespace std;
#define N (1000000000+7)
#define INF 1e16
typedef long long ll;
typedef pair<ll,ll> P;

ll n,A,B;
ll h[100010];

bool check(ll x){
    ll res=0;
    for(ll i=0;i<n;i++){
        ll t=h[i]-B*x;
        if(t<=0)continue;
        else{
            res+=t/(A-B);
            if(t%(A-B)!=0)res++;
        }
    }
    return (res>x);
}

int main(void){
    cin>>n>>A>>B;
    for(ll i=0;i<n;i++)cin>>h[i];
    ll ng=0,ok=(ll)INF;
    while(ok-ng>1){
        ll mid=(ok+ng)/2;
        if(check(mid))ng=mid;
        else okl=mid;
    }
    cout<<ok<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:14: error: 'okl' was not declared in this scope; did you mean 'ok'?
   39 |         else okl=mid;
      |              ^~~
      |              ok
Language: C++

#include<bits/stdc++.h>
using namespace std;
bool et(vector<long long> &v,long long A,long long B,long long T)
{
	long long bt=0;
	for(int i=0;i<v.size();i++)
	{
		long long tmp=max(0,(v[i]-B*T));
            bt+=(tmp+(A-B)-1)/(A-B);
		
	}

	

	if(bt<=T)
	{
		return true;
	}
	else
	{
		return false;
	}
}
main()
{
	long long N,A,B;
	cin>>N>>A>>B;
	vector<long long> v(N);
	long long mt=-1;
	for(int i=0;i<N;i++)
		{cin>>v[i];
			mt=max(mt,v[i]);
		}

	long long l= 0;
	long long r= mt/B;
	r+=1;
	while(l<r)
	{
		long long mid=(l+r)/2;
		if(et(v,A,B,mid))
		{
			r=mid-1;
		}
		else
		{
			l=mid+1;
		}
	}

	cout<<l<<"\n";

}

Compiler output:
a.cc: In function 'bool et(std::vector<long long int>&, long long int, long long int, long long int)':
a.cc:8:34: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type)'
    8 |                 long long tmp=max(0,(v[i]-B*T));
      |                               ~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:8:34: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
    8 |                 long long tmp=max(0,(v[i]-B*T));
      |                               ~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:8:34: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    8 |                 long long tmp=max(0,(v[i]-B*T));
      |                               ~~~^~~~~~~~~~~~~~
a.cc: At global scope:
a.cc:24:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   24 | main()
      | ^~~~
Language: Java

import java.util.function.IntPredicate;
import java.util.*;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        long a = scanner.nextInt();
        long b = scanner.nextInt();
        int[] h = new int[n];
        int max = 0;
        for (int i = 0; i < n; i++) {
            h[i] = scanner.nextInt();
            max = Math.max(max, h[i]);
        }
        max = (int)Math.ceil((double)max / b) + 1;
        System.out.println(binarySearch(max, t -> {
            long count = 0;
            for (double i : h) {
                if (b * t < i) {
                    count += Math.ceil((i - b * t) / (a - b));
                }
            }
            Utils.println(t, count, count <= t);
            return count > t;
        }));
    }

    static int binarySearch(int max, IntPredicate predicate) {
        int ok = 0, ng = max;
        while (Math.abs(ok - ng) > 1) {
            int mid = (ok + ng) / 2;
            if (predicate.test(mid)) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        return ok;
    }
}

Compiler output:
Main.java:25: error: cannot find symbol
            Utils.println(t, count, count <= t);
            ^
  symbol:   variable Utils
  location: class Main
1 error
Language: C++

from math import *
s=raw_input().split(' ')
n=int(s[0])
a=int(s[1])
b=int(s[2])

h=[]
s=0
for i in range(n):
	k=raw_input() 
	h.append(int(k))
	s+=int(k)

l=1; r=s;
an=-1
while r>=l:
	m=(l+r)//2
	c=0
	for i in range(n):
		if (h[i]-b*m)%(a-b)==0:
			c=c+(h[i]-b*m)//(a-b)
		else:
			c=c+((h[i]-b*m)//(a-b)+1)
	if c<=m:
		an=m;
		r=m-1
	else:
		l=m+1
#print(r,l)
print(an)

Compiler output:
a.cc:29:2: error: invalid preprocessing directive #print
   29 | #print(r,l)
      |  ^~~~~
a.cc:1:1: error: 'from' does not name a type
    1 | from math import *
      | ^~~~
a.cc:14:6: error: 'r' does not name a type
   14 | l=1; r=s;
      |      ^
a.cc:15:1: error: 'an' does not name a type
   15 | an=-1
      | ^~
a.cc:26:17: error: 'r' does not name a type
   26 |                 r=m-1
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int N, A, B, h[100000];

int search(void){
	int Min = -1, Max = 1000000000;
	while(Max > Min+1){
		ll m = (Min + Max)/2, flag = 0, cnt = 0;
		for(int i=0; i<N; i++){
			ll t = (h[i] - m*B + A - B - 1)/(A-B);
		    t = max(0, t);
            cnt += t;
        }
		if(cnt <= m) Max = m;
		else Min = m;
	}
	return Max;
}

int main(){
	cin >> N >> A >> B;
	for(int i=0; i<N; i++) cin >> h[i];
	int ans = search();
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int search()':
a.cc:12:28: error: no matching function for call to 'max(int, ll&)'
   12 |                     t = max(0, t);
      |                         ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:28: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   12 |                     t = max(0, t);
      |                         ~~~^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |                     t = max(0, t);
      |                         ~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int N, A, B, h[100000];

int search(void){
	int Min = -1, Max = 1000000000;
	while(Max > Min+1){
		ll m = (Min + Max)/2, flag = 0, cnt = 0;
		for(int i=0; i<N; i++){
			ll t = (h[i] - m*B + A - B - 1)/(A-B);
		    t = max(0, t);
            cnt += t;
        }
		if(cnt <= m) max = m;
		else min = m;
	}
	return max;
}

int main(){
	cin >> N >> A >> B;
	for(int i=0; i<N; i++) cin >> h[i];
	int ans = search();
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int search()':
a.cc:12:28: error: no matching function for call to 'max(int, ll&)'
   12 |                     t = max(0, t);
      |                         ~~~^~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:28: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'll' {aka 'long long int'})
   12 |                     t = max(0, t);
      |                         ~~~^~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:28: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   12 |                     t = max(0, t);
      |                         ~~~^~~~~~
a.cc:15:36: error: overloaded function with no contextual type information
   15 |                 if(cnt <= m) max = m;
      |                                    ^
a.cc:16:28: error: overloaded function with no contextual type information
   16 |                 else min = m;
      |                            ^
a.cc:18:16: error: cannot resolve overloaded function 'max' based on conversion to type 'int'
   18 |         return max;
      |                ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define FOR(i, a, b) for(int i=(a);i<(b);i++)
#define REP(i, n) FOR(i, 0, n)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define RREP(i, n) RFOR(i, n, 0)
#define MFOR(i, m) for(auto i=(m).begin();i!=(m).end();i++)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((int)(x).size())

typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<vll> vvll;

const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll << 60;

template<typename T>
void printv(vector<T> const& s) {
  REP(i, SZ(s)) {
    cout << s[i] << " ";
  }
  cout << endl;
}

ll n, a, b;
vll h;

bool ok(ll k) {
  ll cnt = 0;
  // cout << "k:" << k << endl;
  REP(i, n) {
    if(h[i] > b * k) cnt += (h[i] - b * k + (a-b) - 1) / (a-b);
  }
  return cnt <= k;
}

int main () {
  cin.tie(0);
  cout << setprecision(10);

  cin >> n >> a >> b;
  h.resize(n);
  su = 0;
  REP(i, n) {
    cin >> h[i];
  }
  if(n == 1) {
    cout << (h[0] + a - 1) / a << endl;
    return 0;
  }

  ll l = -1, r = 1e9+1;
  while(r - l > 1) {
    ll mid = (l + r) / 2;
    if(ok(mid)) r = mid;
    else l = mid;
  }

  cout << r << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:56:3: error: 'su' was not declared in this scope; did you mean 'se'?
   56 |   su = 0;
      |   ^~
      |   se
Language: C

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

int N;
int h[100010];
int A,B;
int ans;
int main()
{
    cin>>N>>A>>B;
    for(int i=1;i<=N;++i)
    {
        cin>>h[i];
    }
    while(true)
    {
        int f=0;
        sort(h,h+N+1);
        for(int i=1;i<=N;i++)
         {
            if( i == N)
                h[i] -= A;
            else
                h[i] -= B;
            if(h[i]<=0)
                f++;
         }
         ans++;
         if(f==N)
            break;
    }
    cout<<ans<<endl;

}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>

using namespace std;
int A,B,N;
int a[100005];

bool judge(long long x)
{
    long long sum=0;
    for(int i=0;i<N;i++)
    {
        long long t=a[i]-B*x;

        if(t>0)
        sum+=(int)ceil(t*1.0/(A-B));

        if(sum>x||sum<0)
            return false;
    }
    return true;
}
int main()
{
    int  imax=0;
 scanf("%d%d%d",&N,&A,&B);
 for(int i=0;i<N;i++)
    scanf("%d",&a[i]),imax=max(a[i],imax);
    long long l=0,r=imax;
    while(l<r)
    {
        long long mid=(l+r)/2;
        if(judge(mid))
            r=mid;
        else
            l=mid+1;
    }
    printf("%lld\n",r);
    return 0;
}


Compiler output:
a.cc: In function 'bool judge(long long int)':
a.cc:18:19: error: 'ceil' was not declared in this scope
   18 |         sum+=(int)ceil(t*1.0/(A-B));
      |                   ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;
int n, a, b, h[120000];
int main() {
	cin >> n >> a >> b ;
	for(int i = 1; i <= n; i ++ ) cin >> h[i];
	sort(h+1, h+n+1);
	ll L = 0, R = 1e15;
	while(R-L > 1) {
		ll M = (L+F) >> 1;
		ll D = b*M;
		ll cnt = 0;
		for(int i = 0; i < n; i ++ ) {
			if(h[i] <= D) continue;
			cnt += (h[i]-D-1)/(a-b)+1;
		}
		if(cnt <= M) R = M;
		else L = M;
	}
	cout << R << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: 'F' was not declared in this scope
   12 |                 ll M = (L+F) >> 1;
      |                           ^
Language: C++

#include<bits/stdc++.h>
#define N 100009
using namespace std;
typedef long long ll;
const ll INF=1e18;
ll h[100005];
ll n,a,b;
bool judge(ll mid)
{
    ll answ=mid;
    for(int i=1;i<=n;i++)
    {
        ll tm=h[i]-b*mid;
        if(tm>0)
        {
            ll cnt=tm/(a-b);
            if(tm%(a-b)!=0)
            	cnt++;
            answ-=cnt;
            if(answ<0) 
				return false;
        }
    }
    return true;
}
 
int main()
{
    cin>>n>>a>>b;
    for(int i=1;i<=n;i++) 
		cin>>h[i];
    ll l=0,r=INF;
    ll mid;
    ll ans;
    while(l<=r)
    {
        mid=(l+r)/2;
        if(judge(mid)) 
		{
			r=mid-1;
			ans=mid;
		}		
        else 
			l=mid+1;
    }
    cout<<ans;
    return 0;
}#include<bits/stdc++.h>
#define N 100009
using namespace std;
typedef long long ll;
const ll INF=1e18;
ll h[100005];
ll n,a,b;
bool judge(ll mid)
{
    ll answ=mid;
    for(int i=1;i<=n;i++)
    {
        ll tm=h[i]-b*mid;
        if(tm>0)
        {
            ll cnt=tm/(a-b);
            if(tm%(a-b)!=0)
            	cnt++;
            answ-=cnt;
            if(answ<0) 
				return false;
        }
    }
    return true;
}
 
int main()
{
    cin>>n>>a>>b;
    for(int i=1;i<=n;i++) 
		cin>>h[i];
    ll l=0,r=INF;
    ll mid;
    ll ans;
    while(l<=r)
    {
        mid=(l+r)/2;
        if(judge(mid)) 
		{
			r=mid-1;
			ans=mid;
		}		
        else 
			l=mid+1;
    }
    cout<<ans;
    return 0;
}

Compiler output:
a.cc:48:2: error: stray '#' in program
   48 | }#include<bits/stdc++.h>
      |  ^
a.cc:48:3: error: 'include' does not name a type
   48 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:52:10: error: redefinition of 'const ll INF'
   52 | const ll INF=1e18;
      |          ^~~
a.cc:5:10: note: 'const ll INF' previously defined here
    5 | const ll INF=1e18;
      |          ^~~
a.cc:53:4: error: redefinition of 'll h [100005]'
   53 | ll h[100005];
      |    ^
a.cc:6:4: note: 'll h [100005]' previously declared here
    6 | ll h[100005];
      |    ^
a.cc:54:4: error: redefinition of 'll n'
   54 | ll n,a,b;
      |    ^
a.cc:7:4: note: 'll n' previously declared here
    7 | ll n,a,b;
      |    ^
a.cc:54:6: error: redefinition of 'll a'
   54 | ll n,a,b;
      |      ^
a.cc:7:6: note: 'll a' previously declared here
    7 | ll n,a,b;
      |      ^
a.cc:54:8: error: redefinition of 'll b'
   54 | ll n,a,b;
      |        ^
a.cc:7:8: note: 'll b' previously declared here
    7 | ll n,a,b;
      |        ^
a.cc:55:6: error: redefinition of 'bool judge(ll)'
   55 | bool judge(ll mid)
      |      ^~~~~
a.cc:8:6: note: 'bool judge(ll)' previously defined here
    8 | bool judge(ll mid)
      |      ^~~~~
a.cc:74:5: error: redefinition of 'int main()'
   74 | int main()
      |     ^~~~
a.cc:27:5: note: 'int main()' previously defined here
   27 | int main()
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
#define N 100009
using namespace std;
typedef __int64 ll;
const ll INF=1e18;
ll h[100005];
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);
            if(tm%(a-b)!=0)
            	cnt++;
            ans-=cnt;
            if(ans<0) 
				return false;
        }
    }
    return true;
}
 
int main()
{
    cin>>n>>a>>b;
    for(int i=1;i<=n;i++) 
		cin>>h[i];
    ll l=0,r=INF;
    ll mid;
    while(l<=r)
    {
        mid=(l+r)/2;
        if(judge(mid)) 
			r=mid-1;	
        else 
			l=mid+1;
    }
    cout<<l;
    return 0;
}

Compiler output:
a.cc:4:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    4 | typedef __int64 ll;
      |         ^~~~~~~
      |         __int64_t
a.cc:5:7: error: 'll' does not name a type
    5 | const ll INF=1e18;
      |       ^~
a.cc:6:1: error: 'll' does not name a type
    6 | ll h[100005];
      | ^~
a.cc:7:1: error: 'll' does not name a type
    7 | ll n,a,b;
      | ^~
a.cc:8:12: error: 'll' was not declared in this scope
    8 | bool judge(ll mid)
      |            ^~
a.cc: In function 'int main()':
a.cc:29:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   29 |     cin>>n>>a>>b;
      |          ^
      |          yn
a.cc:29:13: error: 'a' was not declared in this scope
   29 |     cin>>n>>a>>b;
      |             ^
a.cc:29:16: error: 'b' was not declared in this scope
   29 |     cin>>n>>a>>b;
      |                ^
a.cc:31:22: error: 'h' was not declared in this scope
   31 |                 cin>>h[i];
      |                      ^
a.cc:32:5: error: 'll' was not declared in this scope
   32 |     ll l=0,r=INF;
      |     ^~
a.cc:33:7: error: expected ';' before 'mid'
   33 |     ll mid;
      |       ^~~~
      |       ;
a.cc:34:11: error: 'l' was not declared in this scope
   34 |     while(l<=r)
      |           ^
a.cc:34:14: error: 'r' was not declared in this scope
   34 |     while(l<=r)
      |              ^
a.cc:36:9: error: 'mid' was not declared in this scope
   36 |         mid=(l+r)/2;
      |         ^~~
a.cc:37:17: error: 'judge' cannot be used as a function
   37 |         if(judge(mid))
      |            ~~~~~^~~~~
a.cc:42:11: error: 'l' was not declared in this scope
   42 |     cout<<l;
      |           ^
Language: C++

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
#include <map>
#include <set>
#include <iomanip>
#include <math.h>
#include <stdlib.h>
#include  <list>
#include  <utility>
#include  <memory>
#include  <cstring>
#include  <fstream>
#include  <numeric>
using namespace std;
long long monst[100003];
int main(){
  long long n,a,b,ans=0;
  cin>>n>>a>>b;
  for (long long i=0;i<n;i++)
    cin>>monst[i];
  sort (monst,monst+n);
  while (monst[n-1]>0){
    ans++;
  	monst[n-1]-=a;
  	for (long long i=n-2;i>=0;i--){monst[i]<=0;monst.pop_back(monst[i]);
  	sort (monst,monst+n);
  }
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:58: error: request for member 'pop_back' in 'monst', which is of non-class type 'long long int [100003]'
   37 |         for (long long i=n-2;i>=0;i--){monst[i]<=0;monst.pop_back(monst[i]);
      |                                                          ^~~~~~~~
a.cc:42:2: error: expected '}' at end of input
   42 | }
      |  ^
a.cc:28:11: note: to match this '{'
   28 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int,int>
#define MA make_pair
#define LLI long long int
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
#define POS(i) cout<<(i?"POSSIBLE":"IMPOSSIBLE")<<endl
#define Pos(i) cout<<(i?"Possible":"Impossible")<<endl
#define co(i) cout<<i<<endl
using namespace std;
//
const int INF=1e9+7;
const int MOD=1e9+7;
//
LLI n,a,b,h[100003];
LLI om(LLI a,LLI b){
    if(a<=0){
        return -((-a)/b);
    }else{
        return (a-1)/b+1;
    }
}
 
bool solve(LLI k){
    LLI sum=0;
    FOR(i,0,n){
        sum+=max(om(h[i]-b*k,a-b),0);
    }
    return (sum<=k);
}
 
int main(){
    cin>>n>>a>>b;
    FOR(i,0,n) cin>>h[i];
    int st=0,en=INF;
    while(st+1!=en){
        int mid=(st+en)/2;
        if(solve(mid)){
            en=mid;
        }else{
            st=mid;
        }
    }
    co(en);
}


Compiler output:
a.cc: In function 'bool solve(long long int)':
a.cc:33:17: error: no matching function for call to 'max(long long int, int)'
   33 |         sum+=max(om(h[i]-b*k,a-b),0);
      |              ~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:33:17: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   33 |         sum+=max(om(h[i]-b*k,a-b),0);
      |              ~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:33:17: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   33 |         sum+=max(om(h[i]-b*k,a-b),0);
      |              ~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
using namespace std;

#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}
#define pq_pair_tB priority_queue <pair<ll,ll>, vector<pair<ll,ll> > , greater<pair<ll,ll> > > 
#define pq_pair_ts priority_queue <pair<ll,ll> > //第二成分の大きさが関係ない
template<typename X> bool exist(vector<X> vec, X item){return find(all(vec), item)!=vec.end();}
ll gcd(ll a, ll b){if(b==0)return a;return gcd(b,a%b);}
ll lcm(ll a, ll b){return a/gcd(a,b)*b;}


ll N, A, B;
vector<ll> h;

bool solve(ll n ){
    ll cnt = 0;
    rep(i,h.size()){
        if(h[i] < B*n) continue;
        cnt + = ((h[i]- n*B)/ (A-B));
        if((h[i]-n*B)%(A-B) != 0) cnt ++;
    }
    if(cnt > n) return false;
    else return true;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    cin >> N >> A >> B;
    rep(i,N){
        ll inp; cin >> inp;
        h.pb(inp);
    }
    
    ll l = 0;
    ll r = 1e14+1;
    
    while(l+1 < r){
        ll m = (l+r)/2;
        if(solve(m)) r = m;
        else l = m;
    }
    
    cout << r << endl;
    //cout << fixed << setprecision(16) << ans << endl;
    return 0;
}


Compiler output:
a.cc: In function 'bool solve(long long int)':
a.cc:37:15: error: expected primary-expression before '=' token
   37 |         cnt + = ((h[i]- n*B)/ (A-B));
      |               ^
Language: C++

#include <cstdio>
using namespace std;
typedef long long ll;
ll n, a, b, l, r=1e9, m, ans, h[100005];
 
bool f(ll p) {
	ll i, c=0;
	for(i=0; i<n; i++)
		c += h[i]>p*b ? (h[i]-p*b+a-1)/a : 0;
	return c<=p;
}
 
int main() {
	scanf("%lld%lld%lld", &n, &a, &b);
	a -= b;
	for(ll i=0; i<n; i++) scanf("%lld", &h[i]);
	while(l<=r) {
		m = (l+r) / 2;
		if(f(m)) ans = m, r = m-1;
		else l = m+1;
	}
	printf("%lld", ans);
	return 0;
}

Compiler output:
a.cc:5:1: error: extended character   is not valid in an identifier
    5 |  
      | ^
a.cc:12:1: error: extended character   is not valid in an identifier
   12 |  
      | ^
a.cc:5:1: error: '\U000000a0' does not name a type
    5 |  
      | ^
a.cc:12:1: error: '\U000000a0' does not name a type
   12 |  
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
#define int long long int

int N, A, B;
int h[100000];

bool isOk(int a) {
    int cnt = 0;
    int diff = A - B;

    rep(i, N) {
        int leave = h[i] - a * B;
        if (leave > 0) cnt += (leave + diff - 1) / diff;
    }
    return (cnt <= a);
}

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> N >> A >> B;
    rep(i, N) cin >> h[i];
    int l = 0, r = 1073741824;
    int mid = (l + r) / 2;
    while (l < r) {
        mid = (l + r ) / 2;
        if (isOk(mid)) r = mid;
        else l = mid + 1;
    }
    cout << l << endl;
    return 0;
}

Compiler output:
a.cc:9:23: error: '::main' must return 'int'
    9 | #define int long long int
      |                       ^~~
a.cc:25:1: note: in expansion of macro 'int'
   25 | int main(void)
      | ^~~
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <cmath>
#include <cstdlib>
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define MA(i,j) make_pair(i,j)
#define PA pair<int,int>
#define PB push_back
#define PQ priority_queue<int>
#define PGQ priority_queue<int,vector<int>,greater<int> >
#define VE vector<int>
#define VP vector<PA>
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
#define MOD 1000000007
#define INF 1000000007
#define PI 3.14159265358979323846
using namespace std;
//
int N,A,B;
int H[100000];
bool check(int X){
  int cnt=0;
  FOR(i,0,N){
    long long G=H[i]-B*X;
    if(G<=0){
      return true;
    }else{
      cnt+=(G+(A-B)-1)/(A-B);
    }
    if(cnt>X){
      return false;
    }
  }
  return true;
}
int main(){
  cin>>N>>A>>B;
  FOR(i,0,N){
    cin>>H[i];
  }
  sort(H,H+N,greter<int>());
  int lo=1,up=1e9;
  while(up-lo>1){
    int md=(lo+up)/2;
    if(check(md)){
      up=md;
    }else{
      lo=md;
    }
  }
  cout<<up<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:49:14: error: 'greter' was not declared in this scope
   49 |   sort(H,H+N,greter<int>());
      |              ^~~~~~
a.cc:49:21: error: expected primary-expression before 'int'
   49 |   sort(H,H+N,greter<int>());
      |                     ^~~