criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Arrays;
import java.util.Scanner;
 
public class Main{
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
 
        int n = sc.nextInt();
 
        int[] arr = new int[n];
        int sum = 0;
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
            sum += arr[i];
        }
 
        if (sum % 10 != 0) System.out.println(sum);
        else {
            Arrays.sort(arr);
            for (int i : arr) {
                if (i % 10 != 0) {
                    System.out.println(sum - i);
                    return;
                }
            }
 
            System.out.println(0);
        }
    }
}
 

Compiler output:
Main.java:3: error: illegal character: '\u00a0'
?
^
Main.java:5: error: illegal character: '\u00a0'
?
^
Main.java:8: error: illegal character: '\u00a0'
?
^
Main.java:10: error: illegal character: '\u00a0'
?
^
Main.java:17: error: illegal character: '\u00a0'
?
^
Main.java:27: error: illegal character: '\u00a0'
?
^
Main.java:32: error: illegal character: '\u00a0'
?
^
Main.java:32: error: reached end of file while parsing
?
 ^
8 errors
Language: C

#include<stdio.h>

int main(void){
	int N,i,min=101;
	int s[100];
	int point;
	
	scanf("%d",&N);
	
	i=0;
	
	while(i<N){
		scanf("%d",&s[i]);
		if(s[i]%10!=0 && min>s[i]){
			min=s[i];
		}
		i++;
	}       
	
	for(i=0;i<N;i++){
		sum+=s[i];
	}
	
	if(point%10!=0){
		printf("%d\n",point);
	}else if(min!=101){
		printf("%d\n",point-min);
	}else{
		printf("0\n");
	}
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:21:17: error: 'sum' undeclared (first use in this function)
   21 |                 sum+=s[i];
      |                 ^~~
main.c:21:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

///#pragma GCC optimize ("O2") ///G++ÓÃ£¬
///#pragma comment(linker, "/STACK:36777216")///C++ÓÃ
///#pragma comment(linker, "/STACK:102400000,102400000")///C++ÓÃ£¬·ÀÖ¹Õ»Òç³ö
#include <bits/stdc++.h>
//#include <unordered_map>
//#include <unordered_set>
using namespace std;


#define debug       cout << "***********************" << endl
#define Bug(s)      cout << "s = " << s << endl
#define mem(a,b)    memset(a, b, sizeof(a))
#define lson        l, mid, rt<<1
#define rson        mid + 1, r, rt<<1|1
#define For(i, x, n)  for(int i = (x) ; i < (n) ; ++i)
#define Forr(i, x, n) for(int i = (x) ; i <= (n) ; ++i)
#define Rep(i, x, n)  for(int i = (x) ; i > (n) ; --i)
#define Repp(i, x, n) for(int i = (x) ; i >= (n) ; --i)
#define highint( n )  ceil( n )
#define lowint( n )   floor( n )
#define SERU(x)       floor((double) x + 0.5 )
#define lowbit(x)     (x & (-x))

#define all(x)      (x).begin(), (x).end()
#define SZ(x)       (int)(x).size()
#define FA(i, a, x) for (__typeof((x).begin()) i=(a); i!=(x).end(); ++i)
#define RA(i, x)    FA(i, (x).begin(), x)
#define FDA(i, a, x)  for (__typeof((x).rbegin()) i=(x).rbegin(); i!=(a); ++i)
#define RDA(i, x)   FDA(i, (x).rend(), x)
#define P(v, x)     (v.find(x) != v.end())
#define Pos(v, x)   (find(all(v), x) != v.end())
#define UN(a)       sort(all(a)), a.erase(unique(all(a)), a.end())
#define REV(a)      reverse(all(a))
#define mp(a, b)    make_pair(a, b)
#define p(a, b)     pair<int, int>(a, b)
#define sf1i(x)     scanf("%d", &x)
#define sf1l(x)     scanf("%I64d", &x)
#define sf2i(x, y)  scanf("%d%d", &x, &y)
#define sf2l(x, y)  scanf("%I64d%I64d", &x, &y)
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define ll long long
#define eps 1e-8



int a[101];
int v[12345];
int main(){
    int n;
    cin >> n;
    int res = 0;
    int c = 0;
    memset(v, 0, sizeof(v));
    For(i, 0, n){
        cin >> a[i];
        v[a[i]] = 1;
    }
    for(int i = 0; i < n; ++i){
        for(int j = c; j >= 0; j --){
            if(v[j]){
                    v[j + a[i]] = 1;
            }
        }
        c += a[i] ;
    }
    for(int i = c; i > 0; --i)
    if(v[i] && (i % 10 != 0){
        res = i;
        break;
    }
    if(res % 10 == 0)cout << 0 << endl;
    else cout << res << '\n';
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:70:29: error: expected ';' before '{' token
   70 |     if(v[i] && (i % 10 != 0){
      |                             ^
      |                             ;
a.cc:74:5: error: expected primary-expression before 'if'
   74 |     if(res % 10 == 0)cout << 0 << endl;
      |     ^~
a.cc:73:6: error: expected ')' before 'if'
   73 |     }
      |      ^
      |      )
   74 |     if(res % 10 == 0)cout << 0 << endl;
      |     ~~
a.cc:70:7: note: to match this '('
   70 |     if(v[i] && (i % 10 != 0){
      |       ^
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  cin >> n;

  vector<int> ss(n);
  for (int i = 0; i < n; i++) {
    cin >> ss[i];
  }

  int sum = 0;
  int minNot10 = 1000];
  for (int i = 0; i < n; i++) {
    sum += ss[i];
    if (ss[i] % 10 != 0 && ss[i] < minNot10) minNot10 = ss[i];
  }

  int ans;
  if (sum % 10 == 0 && minNot10 % 10 == 0) {
    ans = 0;
  } else if (sum % 10 == 0) {
    ans = sum - minNot10;
  } else {
    ans = sum;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: expected ',' or ';' before ']' token
   19 |   int minNot10 = 1000];
      |                      ^
Language: C++

#include<bits/stdc++.h>
#define maxn 100010 
using namespace std;
LL seg[maxn],a,b,d,n;
bool ok(int k){
	int ans=0;
	for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
		ans+=((seg[i]-k*b-1)/d+1);
		if(ans>k) return false;
	}
	if(ans<=k) return true;
	return false;
}
int main(){
	cin>>n>>a>>b;
	d=a-b;
	for(int i=1;i<=n;i++) scanf("%lld",&seg[i]);
	sort(seg+1,seg+1+n);
	int l=0,r=1002000009LL,mid,res;
	while(l<=r){
		mid=(l+r)>>1;
		if(ok(mid)){
			res=mid;
			r=mid-1;
		}
		else l=mid+1;
	}
	cout<<res<<endl;
	return 0;
}

Compiler output:
a.cc:4:1: error: 'LL' does not name a type
    4 | LL seg[maxn],a,b,d,n;
      | ^~
a.cc: In function 'bool ok(int)':
a.cc:7:19: error: 'n' was not declared in this scope
    7 |         for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
      |                   ^
a.cc:7:27: error: 'seg' was not declared in this scope
    7 |         for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
      |                           ^~~
a.cc:7:35: error: 'LL' was not declared in this scope
    7 |         for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
      |                                   ^~
a.cc:7:38: error: expected ';' before 'k'
    7 |         for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
      |                                      ^
      |                                      ;
a.cc:7:40: error: 'b' was not declared in this scope
    7 |         for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
      |                                        ^
a.cc:7:41: error: expected ')' before ';' token
    7 |         for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
      |            ~                            ^
      |                                         )
a.cc:7:42: error: 'i' was not declared in this scope
    7 |         for(int i=n;i>=1&&seg[i]>(LL)k*b;i--){
      |                                          ^
a.cc: In function 'int main()':
a.cc:15:14: error: 'n' was not declared in this scope; did you mean 'yn'?
   15 |         cin>>n>>a>>b;
      |              ^
      |              yn
a.cc:15:17: error: 'a' was not declared in this scope
   15 |         cin>>n>>a>>b;
      |                 ^
a.cc:15:20: error: 'b' was not declared in this scope
   15 |         cin>>n>>a>>b;
      |                    ^
a.cc:16:9: error: 'd' was not declared in this scope
   16 |         d=a-b;
      |         ^
a.cc:17:45: error: 'seg' was not declared in this scope
   17 |         for(int i=1;i<=n;i++) scanf("%lld",&seg[i]);
      |                                             ^~~
a.cc:18:14: error: 'seg' was not declared in this scope
   18 |         sort(seg+1,seg+1+n);
      |              ^~~
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class Solution {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();

        int[] arr = new int[n];
        int sum = 0;
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
            sum += arr[i];
        }

        if (sum % 10 != 0) System.out.println(sum);
        else {
            Arrays.sort(arr);
            for (int i : arr) {
                if (i % 10 != 0) {
                    System.out.println(sum - i);
                    return;
                }
            }

            System.out.println();
        }
    }
}


Compiler output:
Main.java:4: error: class Solution is public, should be declared in a file named Solution.java
public class Solution {
       ^
1 error
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for(ut i=(a);i<(ut)(b);i++)
#define REP(i,b) FOR(i,0,b)
#define ALL(c) c.begin(),c.end()
#define PB push_back
#define cat //cout << __LINE__ << endl;
using namespace std;
typedef long long LL;
typedef double ld;
typedef LL ut;
typedef vector<ut> VI;
typedef pair<ut,ut> pr;
typedef vector<pr> Vpr;
typedef pair<ut,ut> prs;
const int SIZE=2005;
const LL p=7+1e9;
const LL INF=1<<30;
const LL INFLL=1LL<<30;
inline void IN(ut &x){cin >> x;}
inline void INA(ut n,ut x[]){REP(i,n) cin >> x[i];}
inline void INE(ut m,VI edges[]){
	ut a,b;
	REP(i,m){
		cin >> a >> b;
		edges[a].PB(b);
		edges[b].PB(a);
	}
}
inline void INEC(ut m,Vpr edges[]){
	ut a,b,c;
	REP(i,m){
		cin >> a >> b >> c;
		edges[a].PB(pr(c,b));
		edges[b].PB(pr(c,a));
	}
}
LL es[20];
LL solve(LL D,LL s,LL t){
	if(s==t) return (D==0)*10;
	else if(s>t) return D==0;
	LL dia=10;
	if(s==0) dia--;
	LL ans=0;
	if(t>=11) ans+=(dia-abs(0))*solve(D,s+1,t-1));
	else FOR(i,-9,10){

		if(dia==9 && i<0) continue; 
		ans+=(dia-abs(i))*solve(D+(es[s]*i-es[t]*i),s+1,t-1);
	//	cout << ans<< " "<< D << " " << i <<" " << s << " "<< t<< endl;
	}
	return ans;
}
string rev(string s){
	reverse(ALL(s));
	return s;
}
int main(){
	LL D;
	cin >> D;
	//FOR(D,1,10000){
	LL ans=0;
	es[0]=1;
	FOR(i,1,20) es[i]=es[i-1]*10;
	FOR(i,1,20) ans+=solve(D,0,i);
	int c=0;
	REP(i,100000) if(stoi(rev(to_string(i)))-i ==D) c++;
	
	if(c!=ans or D%100==0){
		cout << c <<" " << ans << " " << D<< endl;
		//cout << ans << endl;	

	}
	//}
	return 0;
}

Compiler output:
a.cc: In function 'LL solve(LL, LL, LL)':
a.cc:44:53: error: expected ';' before ')' token
   44 |         if(t>=11) ans+=(dia-abs(0))*solve(D,s+1,t-1));
      |                                                     ^
      |                                                     ;
Language: C++

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

int main()
{
    int m,n,i;
    while(cin>>m)
    {
        int s=0;
        n=0;
        for(i=0;i<m;i++)
        {
            cin>>x;
            s+=x;
            if(x%10!=0)
            {
                n+=x;
            }
        }
        cout<<max(s,n)<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: 'x' was not declared in this scope
   13 |             cin>>x;
      |                  ^
Language: C

#include <bits/stdc++.h>

using namespace std;

#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplece_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define Edge pair< i_i, int>
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; scanf("%lld", &x);
#define int2(x, y) int x, y; scanf("%lld %lld", &x, &y);
#define fir first
#define sec second
#define ffir first.first
#define fsec first.second
#define sfir second.first
#define ssec second.second
 
//int dxy[5] = {0, 1, 0, -1, 0};
// assign

int rev(int n)
{
    int ret = 0;
    while (n) {
        ret *= 10;
        ret += n % 10;
        n /= 10;
    }
    return ret;
}

int count(int n)
{
    int ret = 1;
    n /= 10;
    while (n) {
        ret++;
        n /= 10;
    }
    return ret;
}

signed main()
{
    Int(n);

    int ket = count(n);

    int ans = 0;
    for (int i = n + pow(10, ket-1); i < pow(10, ket); i++) {
        if (i % 10 && i - n == rev(i)) {
            ans++;
            //     cout << i << endl;
        }
    }
    cout << ans << endl;
    return 0;
}



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++

///#pragma GCC optimize ("O2") ///G++ÓÃ£¬
///#pragma comment(linker, "/STACK:36777216")///C++ÓÃ
///#pragma comment(linker, "/STACK:102400000,102400000")///C++ÓÃ£¬·ÀÖ¹Õ»Òç³ö
#include <bits/stdc++.h>
//#include <unordered_map>
//#include <unordered_set>
using namespace std;


#define debug       cout << "***********************" << endl
#define Bug(s)      cout << "s = " << s << endl
#define mem(a,b)    memset(a, b, sizeof(a))
#define lson        l, mid, rt<<1
#define rson        mid + 1, r, rt<<1|1
#define For(i, x, n)  for(int i = (x) ; i < (n) ; ++i)
#define Forr(i, x, n) for(int i = (x) ; i <= (n) ; ++i)
#define Rep(i, x, n)  for(int i = (x) ; i > (n) ; --i)
#define Repp(i, x, n) for(int i = (x) ; i >= (n) ; --i)
#define highint( n )  ceil( n )
#define lowint( n )   floor( n )
#define SERU(x)       floor((double) x + 0.5 )
#define lowbit(x)     (x & (-x))

#define all(x)      (x).begin(), (x).end()
#define SZ(x)       (int)(x).size()
#define FA(i, a, x) for (__typeof((x).begin()) i=(a); i!=(x).end(); ++i)
#define RA(i, x)    FA(i, (x).begin(), x)
#define FDA(i, a, x)  for (__typeof((x).rbegin()) i=(x).rbegin(); i!=(a); ++i)
#define RDA(i, x)   FDA(i, (x).rend(), x)
#define P(v, x)     (v.find(x) != v.end())
#define Pos(v, x)   (find(all(v), x) != v.end())
#define UN(a)       sort(all(a)), a.erase(unique(all(a)), a.end())
#define REV(a)      reverse(all(a))
#define mp(a, b)    make_pair(a, b)
#define p(a, b)     pair<int, int>(a, b)
#define sf1i(x)     scanf("%d", &x)
#define sf1l(x)     scanf("%I64d", &x)
#define sf2i(x, y)  scanf("%d%d", &x, &y)
#define sf2l(x, y)  scanf("%I64d%I64d", &x, &y)
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define ll long long
#define eps 1e-8

int a[101];

int main(){
    int T, n;
    cin >> n;
    int res = 0;
    For(i, 0, n){
        cin >> a[i];
        res += a[i];
    }
    if(res % 10 != 0){
        cout << res << endl;
        return 0;
    }
    int ans = 0;
    sort(a, a + n);
    For(i, 0, n){
        if(res % 10 == 0)res -= a[i];
        if(res % 10 != 0))break;
    }
    cout << res << '\n';
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:26: error: expected primary-expression before ')' token
   65 |         if(res % 10 != 0))break;
      |                          ^
Language: C++

/*
  
                                _oo0oo_
                               088888880
                               88" . "88
                               (| -_- |)
                                0\ = /0
                             ___/'---'\___
                           .' \\\\|     |// '.
                          / \\\\|||  :  |||// \\
                         /_ ||||| -:- |||||- \\
                        |   | \\\\\\  -  /// |   |
                        | \_|  ''\---/''  |_/ |
                        \  .-\__  '-'  __/-.  /
                      ___'. .'  /--.--\  '. .'___
                   ."" '<  '.___\_<|>_/___.' >'  "".
                  | | : '-  \'.;'\ _ /';.'/ - ' : | |
                  \  \ '_.   \_ __\ /__ _/   .-' /  /
              ====='-.____'.___ \_____/___.-'____.-'=====
                                '=---='

            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
             AC  AC  AC  AC  AC  AC  AC  AC  AC  AC  AC  AC
     
*/
#define OJ
#include <bits/stdc++.h>
#define pb push_back
#define _1 first
#define _2 second
#define FOR(i,a,b) for(int i=a;i<(b);i++)
#define FORN(i,b) for(int i=0;i<(b);i++)
#define reset(a,b) memset(a,b,sizeof(a))
#define MAX(a,b)  a>b?a:b
#define MIN(a,b)  a>b?b:a
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pair<int,int> > vii;

struct cmp
{
  bool operator()(const long int &a,const long int &b)
  {
    return a>b;
  }
};
int main()
{
	#ifndef OJ
	freopen("abc.in","r",stdin);
	freopen("abc.out","w",stdout);
	#endif
  long int n,ans=0;
  long int i,j,k,l;
  priority_queue <long int,vector <long int>,cmp>q;
  scanf("%ld",&n);
  for(i=1;i<=n;i++)
   {
    scanf("%ld",&j);
    ans+=j;
    q.push(j);
   }
   while(ans%10==0)
   {
    if(q.empty()) break;
    i=q.top();
    q.pop();
    if((ans-i)%10==0) continue
    ans-=i;
   }
  if(ans%10==0) printf("0");
  else printf("%ld",ans);
	#ifndef OJ
	fclose(stdin);
	fclose(stdout);
	#endif
}

Compiler output:
a.cc: In function 'int main()':
a.cc:71:31: error: expected ';' before 'ans'
   71 |     if((ans-i)%10==0) continue
      |                               ^
      |                               ;
   72 |     ans-=i;
      |     ~~~
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
		List<Integer> inputList = new ArrayList<Integer>();


		while (sn.hasNextLine()) {
		    String str = sn.nextLine();
		    inputList.add(Integer.parseInt(str));
		}

		int num = inputList.get(0);
		List<Integer> pointList = inputList.subList(1, inputList.size());
		int sum = 0;


		//sum all points
		for(int point: pointList){
			sum += point;
		}

		if(sum % 10 == 0){
			int min = calcMinNumber(inputList);

			if(min == -1){
				sum = 0;
			}else{
				sum -= min;
			}
		}

		System.out.println(sum);
	}


	private static int calcMinNumber(List<Integer> list){
		int min = -1;

		for(int elem : list){
			if((elem < min) && (elem % 10 != 0)){
				min = elem;
			}
		}

		return min;
	}

}

Compiler output:
Main.java:36: error: cannot find symbol
	private static int calcMinNumber(List<Integer> list){
	                                 ^
  symbol:   class List
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sn = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sn = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		List<Integer> inputList = new ArrayList<Integer>();
		^
  symbol:   class List
  location: class Main
Main.java:4: error: cannot find symbol
		List<Integer> inputList = new ArrayList<Integer>();
		                              ^
  symbol:   class ArrayList
  location: class Main
Main.java:13: error: cannot find symbol
		List<Integer> pointList = inputList.subList(1, inputList.size());
		^
  symbol:   class List
  location: class Main
6 errors
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class main {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
		List<Integer> inputList = new ArrayList<Integer>();


		while (sn.hasNextLine()) {
		    String str = sn.nextLine();
		    inputList.add(Integer.parseInt(str));
		}

		int num = inputList.get(0);
		List<Integer> pointList = inputList.subList(1, inputList.size());
		int sum = 0;


		//sum all points
		for(int point: pointList){
			sum += point;
		}

		if(sum % 10 == 0){
			int min = calcMinNumber(inputList);

			if(min == -1){
				sum = 0;
			}else{
				sum -= min;
			}
		}

		System.out.println(sum);
	}


	private static int calcMinNumber(List<Integer> list){
		int min = -1;

		for(int elem : list){
			if((elem < min) && (elem % 10 != 0)){
				min = elem;
			}
		}

		return min;
	}

}

Compiler output:
Main.java:5: error: class main is public, should be declared in a file named main.java
public class main {
       ^
1 error
Language: Java

public class C_Bugged {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
		List<Integer> inputList = new ArrayList<Integer>();


		while (sn.hasNextLine()) {
		    String str = sn.nextLine();
		    inputList.add(Integer.parseInt(str));
		}

		int num = inputList.get(0);
		List<Integer> pointList = inputList.subList(1, inputList.size());
		int sum = 0;


		//sum all points
		for(int point: pointList){
			sum += point;
		}

		if(sum % 10 == 0){
			int min = calcMinNumber(inputList);

			if(min == -1){
				sum = 0;
			}else{
				sum -= min;
			}
		}

		System.out.println(sum);
	}


	private static int calcMinNumber(List<Integer> list){
		int min = -1;

		for(int elem : list){
			if((elem < min) && (elem % 10 != 0)){
				min = elem;
			}
		}

		return min;
	}

}

Compiler output:
Main.java:1: error: class C_Bugged is public, should be declared in a file named C_Bugged.java
public class C_Bugged {
       ^
Main.java:36: error: cannot find symbol
	private static int calcMinNumber(List<Integer> list){
	                                 ^
  symbol:   class List
  location: class C_Bugged
Main.java:3: error: cannot find symbol
		Scanner sn = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class C_Bugged
Main.java:3: error: cannot find symbol
		Scanner sn = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class C_Bugged
Main.java:4: error: cannot find symbol
		List<Integer> inputList = new ArrayList<Integer>();
		^
  symbol:   class List
  location: class C_Bugged
Main.java:4: error: cannot find symbol
		List<Integer> inputList = new ArrayList<Integer>();
		                              ^
  symbol:   class ArrayList
  location: class C_Bugged
Main.java:13: error: cannot find symbol
		List<Integer> pointList = inputList.subList(1, inputList.size());
		^
  symbol:   class List
  location: class C_Bugged
7 errors
Language: C++

#include <iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#define N 300000
#define maxn 1000000000
using namespace std;
int tt;
int a[N];
struct ss{int i,x;}sum[N];
bool cmp(ss s1,ss s2){if(s1.x!=s2.x)return s1.x<s2.x;return s1.i<s2.i;}
int lbt(int x){return x &(-x);}
int s[N];
int n,k;
long long ask(int x)
{
    long long ret=0;
   for(int i=x;i;i-=lbt(i))ret+=s[i];
    return ret;
}
void add(int x)
{
    for(int i=x;i<=n;i+=lbt(i))s[i]++;
}
int main()
{
    scanf("%d%d",&n,&k);
    sum[0].x=0;
    
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&a[i]);
        a[i]-=k;
        sum[i].x=sum[i-1].x+a[i];
        sum[i].i=i+1;
    }
    n++;
    sum[n].i=1;sum[n].x=0;
    sort(sum+1,sum+n+1,cmp);
    long long ans=0;
    for(int i=1;i<=n;i++)
    {
        ans+=ask(sum[i].i);
        add(sum[i].i);
    }
    cout<<ans;
}
//a0,a1,a2,a3,a4,a5,a6
//f(a-b)
//(a-b)^(c-b)
/*
 1 2 3 4 5 0 P (p+1,p+q)  p                q
0 1 2 3 4 5 6 1 1 1 1 1 0 0 0 0 0 0 1  1 1 1 1
1 2 3 4 5 6 7 8
...
3 0
1 2
4 5
 */

Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   39 |     sort(sum+1,sum+n+1,cmp);
      |     ^~~~
      |     sqrt
Language: C++

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class C_Bugged {
	public static void main(String[] args) {
		Scanner sn = new Scanner(System.in);
		List<Integer> inputList = new ArrayList<Integer>();


		while (sn.hasNextLine()) {
		    String str = sn.nextLine();
		    inputList.add(Integer.parseInt(str));
		}

		int num = inputList.get(0);
		List<Integer> pointList = inputList.subList(1, inputList.size());
		int sum = 0;


		//sum all points
		for(int point: pointList){
			sum += point;
		}

		if(sum % 10 == 0){
			int min = calcMinNumber(inputList);

			if(min == -1){
				sum = 0;
			}else{
				sum -= min;
			}
		}

		System.out.println(sum);
	}


	private static int calcMinNumber(List<Integer> list){
		int min = -1;

		for(int elem : list){
			if((elem < min) && (elem % 10 != 0)){
				min = elem;
			}
		}

		return min;
	}

}

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

#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<algorithm>
using namespace std;
int dp[105][15];
int n;
vector<int> s;
int dfs(int now, int keta);
int main() {
	int input;
	memset(dp, -1, sizeof(dp));
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> input;
		s.push_back(input);
	}
	cout << max(0,dfs(0, 0)) << endl;
}
int dfs(int now, int keta) {
	if (now >= n) {
		if (keta != 0) {
			return 0;
		}
		else {
			return -1000000;
		}
	}
	else if (dp[now][keta] != -1) {
		return dp[now][keta];
	}
	else {
		dp[now][keta] = max(dfs(now+1,keta), dfs(now+1,(keta+s[now])%10)+s[now]);
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'memset' was not declared in this scope
   13 |         memset(dp, -1, sizeof(dp));
      |         ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include<algorithm>
  +++ |+#include <cstring>
    6 | using namespace std;
a.cc: In function 'int dfs(int, int)':
a.cc:34:31: warning: control reaches end of non-void function [-Wreturn-type]
   34 |                 dp[now][keta] = max(dfs(now+1,keta), dfs(now+1,(keta+s[now])%10)+s[now]);
      |                 ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cassert>

using namespace std;

typedef unsigned int index;

int main()
{
#ifdef ONPC
:   assert(freopen("a.in", "r", stdin));
:   assert(freopen("a.out", "w", stdout));
#else
#endif
:   size_t n;
:   cin >> n;
:   vector<int> a(n);
:   for (auto &i: a)
:   :   cin >> i;
:   int sum = 0;
:   for (index i = 0; i < a.size(); i++)
:   :   sum += a[i];
:   if (sum % 10 != 0)
:   :   cout << sum << endl;
:   else
:   {
:   :   int m = (int)1e9 + 1;
:   :   for (index i = 0; i < a.size(); i++)
:   :   :   if (a[i] % 10 != 0)
:   :   :   :   m = min(m, a[i]);
:   :   if (m == 1e9 + 1)
:   :   :   cout << 0 << endl;
:   :   else
:   :   :   cout << sum - m << endl;
:   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:1: error: expected primary-expression before ':' token
   19 | :   size_t n;
      | ^
a.cc:20:1: error: expected primary-expression before ':' token
   20 | :   cin >> n;
      | ^
a.cc:21:1: error: expected primary-expression before ':' token
   21 | :   vector<int> a(n);
      | ^
a.cc:22:1: error: expected primary-expression before ':' token
   22 | :   for (auto &i: a)
      | ^
a.cc:24:1: error: expected primary-expression before ':' token
   24 | :   int sum = 0;
      | ^
a.cc:25:1: error: expected primary-expression before ':' token
   25 | :   for (index i = 0; i < a.size(); i++)
      | ^
a.cc:25:23: error: 'i' was not declared in this scope
   25 | :   for (index i = 0; i < a.size(); i++)
      |                       ^
a.cc:25:27: error: 'a' was not declared in this scope
   25 | :   for (index i = 0; i < a.size(); i++)
      |                           ^
a.cc:27:1: error: expected primary-expression before ':' token
   27 | :   if (sum % 10 != 0)
      | ^
a.cc:29:1: error: expected primary-expression before ':' token
   29 | :   else
      | ^
Language: C++

#include<iostream>
#include<iomanip>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<vector>
#include<array>
#include<string>
#include<stack>
#include<queue>
#include<algorithm>
#include<cassert>
#include<functional>
#include<random>
#include<complex>
#include<bitset>
#include<chrono>
//#include<boost/multiprecision/cpp_int.hpp>
#define int int64_t
#define uint uint64_t
#define REP(i, a, b) for (int64_t i = (int64_t)(a); i < (int64_t)(b); i++)
#define rep(i, a) REP(i, 0, a)
#define EACH(i, a) for (auto i: a)
#define ITR(x, a) for (auto x = a.begin(); x != a.end(); x++)
#define ALL(a) (a.begin()), (a.end())
#define HAS(a, x) (a.find(x) != a.end())
#define Min(x) *min_element(ALL(x))
#define Max(x) *max_element(ALL(x))
#define Unique(L) (L.erase(unique(ALL(L)), L.end()))
#define veccat(v1, v2) std::copy((v2).begin(),(v2).end(),std::back_inserter(v1)/*v1の後ろにv2を入れる*/)
#define intmax (std::numeric_limits<int64_t>::max() / 4)
using namespace std;
//typedef boost::multiprecision::cpp_int bigint;
const double EPS = 1e-9;
const double PI = acos(-1.0);


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;
	vector<int>s(N);
	rep(i, N)cin >> s[i];

	int sum = 0;
	rep(i, N)sum += s[i];
	if (sum % 10) {
		cout << sum << endl;
		return 0;
	}
	sort(ALL(s));
	rep(i, N)if (s[i] % 10) {
		cout << sum - s[i] << endl;
		return 0;
	}
	cout << 0 << endl;


	return 0;
}





Compiler output:
a.cc:20:13: error: '::main' must return 'int'
   20 | #define int int64_t
      |             ^~~~~~~
a.cc:39:1: note: in expansion of macro 'int'
   39 | int main() {
      | ^~~
Language: C++


/**
*
* Author : MeGa
*
*/
#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>
#include <unordered_map>
#include <unordered_set>
#include <string.h>

using namespace std;

vector<int>v;
int n
long long a,b;
long long solve(long long mid){

    long long aa = mid;
    long long dif = a-b;
    for(int i = 0; i < v.size(); i ++){
        long long cur = v[i]-(b*mid);
        
        if(cur > 0){
            long long val = (cur+dif -1)/ dif;
            if( val > aa)
                return false;
            else{
                 aa-= val;
            }
        }
    }
    
    return true;

}

int main(){

#ifndef ONLINE_JUDGE
    //freopen("in","r",stdin);
#endif
     ios::sync_with_stdio(false);
     cin.tie(0);
     priority_queue<pair<int,int> >pq;
     
     
     cin>>n>>a>>b;
     
     for(int i = 0 ; i < n; i ++){
        int s;
        cin>>s;
        v.push_back(s);
     }
     
     
     sort(v.begin(),v.end());

     long long left = 0  , right = 2e15;
     long long ans = 0;
     while(left < right){
         long long mid = left + (right - left)/2;
        // cerr<<mid<<endl;
         if(solve(mid)){
             right = mid-1;
             ans = mid;
         }else{
             left = mid + 1;
         }
     }
     if(solve(ans-1)){
         cout<<ans-1<<endl;
     }else{
         cout<<ans<<endl;
     }
    


     


    
   

}

Compiler output:
a.cc:47:1: error: expected initializer before 'long'
   47 | long long a,b;
      | ^~~~
a.cc: In function 'long long int solve(long long int)':
a.cc:51:21: error: 'a' was not declared in this scope; did you mean 'aa'?
   51 |     long long dif = a-b;
      |                     ^
      |                     aa
a.cc:51:23: error: 'b' was not declared in this scope
   51 |     long long dif = a-b;
      |                       ^
a.cc: In function 'int main()':
a.cc:79:11: error: 'n' was not declared in this scope; did you mean 'yn'?
   79 |      cin>>n>>a>>b;
      |           ^
      |           yn
a.cc:79:14: error: 'a' was not declared in this scope
   79 |      cin>>n>>a>>b;
      |              ^
a.cc:79:17: error: 'b' was not declared in this scope
   79 |      cin>>n>>a>>b;
      |                 ^
Language: C++

#include<cstdio>
int n,use[100005];
long long a,b,f[100005];
int check(long long x)
{
	long long k=a-b,t=0;
	for (int i=1;i<=n;i++) use[i]=b*x;
	for (int i=1;i<=n;i++) if (use[i]<f[i]) t=t+(f[i]-use[i])/k+!!((f[i]-use[i])%k);
	return x>=t;
}
long long bs(long long l,long long r)
{
	if (l==r) return l;a
	long long mid=(l+r)/2;
	if (check(mid)) return bs(l,mid);
	return bs(mid+1,r);
}
int main()
{
	scanf("%d%lld%lld",&n,&a,&b);
	for (int i=1;i<=n;i++) scanf("%lld",&f[i]);
	printf("%lld\n",bs(0ll,1000000000ll));
	return 0;
}

Compiler output:
a.cc: In function 'long long int bs(long long int, long long int)':
a.cc:13:29: error: expected ';' before 'long'
   13 |         if (l==r) return l;a
      |                             ^
      |                             ;
   14 |         long long mid=(l+r)/2;
      |         ~~~~                 
a.cc:15:19: error: 'mid' was not declared in this scope
   15 |         if (check(mid)) return bs(l,mid);
      |                   ^~~
a.cc:16:19: error: 'mid' was not declared in this scope
   16 |         return bs(mid+1,r);
      |                   ^~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<queue>
#include<deque>
#include<cmath>
#include<map>
#include<cstring>

using namespace std;
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LLINF = 1LL<<60;
#define P pair<int, int>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define print(x) cout << (x) << endl

class mint {
    long long x;
public:
    mint(long long x=0) : x((x%MOD+MOD)%MOD) {}
    mint operator-() const {
      return mint(-x);
    }
    mint& operator+=(const mint& a) {
        if ((x += a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint& operator-=(const mint& a) {
        if ((x += MOD-a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint& operator*=(const  mint& a) {
        (x *= a.x) %= MOD;
        return *this;
    }
    mint operator+(const mint& a) const {
        mint res(*this);
        return res+=a;
    }
    mint operator-(const mint& a) const {
        mint res(*this);
        return res-=a;
    }
    mint operator*(const mint& a) const {
        mint res(*this);
        return res*=a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
        return a;
    }
    // for prime MOD
    mint inv() const {
        return pow(MOD-2);
    }
    mint& operator/=(const mint& a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint& a) const {
        mint res(*this);
        return res/=a;
    }

    friend ostream& operator<<(ostream& os, const mint& m){
        os << m.x;
        return os;
    }
};
/* -- template -- */

ll f(ll a, ll b) {
    return ((a % b != 0) ? (a + b) / b : a / b);
}

int main() {
    ll N, A, B; cin >> N >> A >> B;
    ll maxv = 0;
    ll h[N]; rep(i, N) cin >> h[i], maxv = max(maxv, h[i]);
    ll ng = 0, ok = maxv / B;
    while(ng + 1 < ok) {
        ll mid = (ng + ok) / 2;
        ll cnt = 0;
        rep(i, N) {
            if(h[i] - mid * B > 0) {
                cnt += (h[i]-n*B+A-B-1)/(A - B);
            }
        }
        if(cnt > mid) {
            ng = mid;
        }else if(cnt <= mid) {
            ok = mid;
        }
    }
    cout << ok << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:93:30: error: 'n' was not declared in this scope
   93 |                 cnt += (h[i]-n*B+A-B-1)/(A - B);
      |                              ^
Language: C++

# include <bits/stdc++.h>
using namespace std;
 
typedef long long LL;
#define maxn 1e5
int n, a, b, m[maxn+3];
 
bool judge(LL x)
{
    LL sum = 0;
    for(int i=0; i<n; ++i)
    {
        LL t = (LL)m[i]-x*b;
        if(t>0)
        {
            sum += (int)ceil(t*1.0/(a-b));
            if(sum > x || sum < 0)
                return false;
        }
    }
    return true;
}
int main()
{
    while(~scanf("%d%d%d",&n,&a,&b))
    {
        int imax = 0;
        for(int i=0; i<n; ++i) scanf("%d",&m[i]), imax = max(imax, m[i]);
        LL l=0, r=imax;
        while(l<r)
        {
            LL mid = l+r>>1;
            if(judge(mid)) r=mid;
            else l=mid+1;
        }
        printf("%lld\n",r);
    }
    return 0;
}

Compiler output:
a.cc:6:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    6 | int n, a, b, m[maxn+3];
      |                    ^
a.cc:6:20: error: could not convert '(1.0e+5 + (double)3)' from 'double' to 'long unsigned int'
    6 | int n, a, b, m[maxn+3];
      |                    ^
      |                    |
      |                    double
a.cc:6:20: error: size of array 'm' has non-integral type 'double'
Language: C++

#include<iostream>
using namespace std;
 
typedef long long LL;
#define maxn  1e5
int n, a, b, m[maxn+3];
 
bool judge(LL x)
{
    LL sum = 0;
    for(int i=0; i<n; ++i)
    {
        LL t = (LL)m[i]-x*b;
        if(t>0)
        {
            sum += (int)ceil(t*1.0/(a-b));
            if(sum > x || sum < 0)
                return false;
        }
    }
    return true;
}
int main()
{
    while(scanf("%d%d%d",&n,&a,&b))
    {
        int imax = 0;
        for(int i=0; i<n; ++i) scanf("%d",&m[i]), imax = max(imax, m[i]);
        LL l=0, r=imax;
        while(l<r)
        {
            LL mid = l+r>>1;
            if(judge(mid)) r=mid;
            else l=mid+1;
        }
        printf("%lld\n",r);
    }
    return 0;
}

Compiler output:
a.cc:6:20: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
    6 | int n, a, b, m[maxn+3];
      |                    ^
a.cc:6:20: error: could not convert '(1.0e+5 + (double)3)' from 'double' to 'long unsigned int'
    6 | int n, a, b, m[maxn+3];
      |                    ^
      |                    |
      |                    double
a.cc:6:20: error: size of array 'm' has non-integral type 'double'
a.cc: In function 'bool judge(LL)':
a.cc:16:25: error: 'ceil' was not declared in this scope
   16 |             sum += (int)ceil(t*1.0/(a-b));
      |                         ^~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<cmath>
#include<ctime>
#include<algorithm>
#include<utility>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#define EPS 1e-9
#define PI acos(-1.0)
#define INF 0x3f3f3f3f
#define LL long long
const int MOD = 1E9+7;
const int N = 1000000+5;
using namespace std;
LL n,A,B;
LL h[N];
bool check(LL x){
    LL temp=x*B;
    LL sub=A-B;
    LL sum=0;
    for(LL i=n;i>=1;i--){
        if(a[i]>temp){
            if((h[i]-temp)%sub)
                sum+=(h[i]-temp)/sub+1;
            else
                sum+=(h[i]-temp)/sub;
        }
    }
    if(sum<=x)
        return true;
    return false;
}

int main() {
    scanf("%lld%lld%lld",&n,&A,&B);
    LL right=0;
    for(LL i=1;i<=n;i++){
        scanf("%lld",&h[i]);
        right+=h[i]/B+1;
    }
    sort(h+1,h+1+n);
    LL left=1;
    while(left<right){
        LL mid=(left+right)/2;
        if(check(mid))
            right=mid;
        else
            left=mid+1;
    }
    printf("%lld\n",left);
    return 0;
}


Compiler output:
a.cc: In function 'bool check(long long int)':
a.cc:30:12: error: 'a' was not declared in this scope
   30 |         if(a[i]>temp){
      |            ^
Language: C++

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<cmath>
#include<ctime>
#include<algorithm>
#include<utility>
#include<stack>
#include<queue>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#define EPS 1e-9
#define PI acos(-1.0)
#define INF 0x3f3f3f3f
#define LL long long
const int MOD = 1E9+7;
const int N = 1000000+5;
using namespace std;
LL n,A,B;
LL a[N];
bool check(LL x){
    LL temp=x*B;
    LL sub=A-B;
    LL sum=0;
    for(LL i=n;i>=1;i--){
        if(a[i]>temp){
            if((h[i]-temp)%sub)
                sum+=(h[i]-temp)/sub+1;
            else
                sum+=(h[i]-temp)/sub;
        }
    }
    if(sum<=x)
        return true;
    return false;
}

int main() {
    scanf("%lld%lld%lld",&n,&A,&B);
    LL right=0;
    for(LL i=1;i<=n;i++){
        scanf("%lld",&h[i]);
        right+=h[i]/B+1;
    }
    sort(h+1,h+1+n);
    LL left=1;
    while(left<right){
        LL mid=(left+right)/2;
        if(check(mid))
            right=mid;
        else
            left=mid+1;
    }
    printf("%lld\n",left);
    return 0;
}


Compiler output:
a.cc: In function 'bool check(long long int)':
a.cc:31:17: error: 'h' was not declared in this scope
   31 |             if((h[i]-temp)%sub)
      |                 ^
a.cc: In function 'int main()':
a.cc:46:23: error: 'h' was not declared in this scope
   46 |         scanf("%lld",&h[i]);
      |                       ^
a.cc:49:10: error: 'h' was not declared in this scope
   49 |     sort(h+1,h+1+n);
      |          ^
Language: C++

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

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: In function 'int bul(ll)':
a.cc:12:14: error: no matching function for call to 'max(ll&, int)'
   12 |     kes = max(kes, 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:12:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   12 |     kes = max(kes, 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:12:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |     kes = max(kes, 0);
      |           ~~~^~~~~~~~
Language: C++

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

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: In function 'int bul(ll)':
a.cc:12:14: error: no matching function for call to 'max(ll&, int)'
   12 |     kes = max(kes, 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:12:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   12 |     kes = max(kes, 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:12:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 |     kes = max(kes, 0);
      |           ~~~^~~~~~~~
Language: C++

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

typedef long long ll

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:6:1: error: expected initializer before 'vector'
    6 | vector<ll> arr;
      | ^~~~~~
a.cc:7:1: error: 'll' does not name a type
    7 | ll n, a, b;
      | ^~
a.cc:9:9: error: 'll' was not declared in this scope
    9 | int bul(ll x){
      |         ^~
a.cc: In function 'int main()':
a.cc:22:10: error: 'n' was not declared in this scope; did you mean 'yn'?
   22 |   cin >> n >> a >> b;
      |          ^
      |          yn
a.cc:22:15: error: 'a' was not declared in this scope
   22 |   cin >> n >> a >> b;
      |               ^
a.cc:22:20: error: 'b' was not declared in this scope
   22 |   cin >> n >> a >> b;
      |                    ^
a.cc:23:3: error: 'arr' was not declared in this scope
   23 |   arr.resize(n);
      |   ^~~
a.cc:26:3: error: 'll' was not declared in this scope
   26 |   ll l = 1;
      |   ^~
a.cc:27:5: error: expected ';' before 'r'
   27 |   ll r = 1000000000;
      |     ^~
      |     ;
a.cc:28:10: error: 'l' was not declared in this scope
   28 |   while (l < r){
      |          ^
a.cc:28:14: error: 'r' was not declared in this scope
   28 |   while (l < r){
      |              ^
a.cc:30:12: error: 'bul' cannot be used as a function
   30 |     if (bul(mid)) r = mid;
      |         ~~~^~~~~
a.cc:34:11: error: 'l' was not declared in this scope
   34 |   cout << l << endl;
      |           ^