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

#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
int n, h; cin >> n >> h;
vector<int> a(n), b(n); 
for (int i = 0; i < n; ++i) cin >> a[i] >> b[i];
sort(begin(a), end(a));
sort(begin(b), end(b));
int c = 0;
while (h > 0) h -= max(a[n-1], c>n-1 ? 0 : b[n-1-c]), c++;
cout << c << endl;
}
#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
int n, h; cin >> n >> h;
vector<int> a(n), b(n); 
for (int i = 0; i < n; ++i) cin >> a[i] >> b[i];
int ans = 1e9, sum = 0;
for (int i = 0; i < n; ++i) sum += b[n-1-i], ans = min(ans, max(1, (h - sum + a[n-1]-1) / a[n-1]);
cout << ans << endl;
}


Compiler output:
a.cc:20:5: error: redefinition of 'int main()'
   20 | int main()
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main()
      |     ^~~~
a.cc: In function 'int main()':
a.cc:26:98: error: expected ')' before ';' token
   26 | for (int i = 0; i < n; ++i) sum += b[n-1-i], ans = min(ans, max(1, (h - sum + a[n-1]-1) / a[n-1]);
      |                                                       ~                                          ^
      |                                                                                                  )
Language: C++

#include<algorithm>
#include<functional>
using namespace std;
int main() {
	int i;
	long long a, b,m,N,H,sum;
	m = 0;
	sum = 0;
	vector<long long> B;
	cin >> N, cin >> H;
	for (i = 0; i < N; i++) {
		cin >> a, cin >> b;
		if (a > m)m = a;
		B.push_back(b);
	}
	i = 0;
	sort(B.begin(), B.end(), greater<long long>());
	while (H > 0) {
		if (B[i] > m) {
			H -= B[i];
			sum += 1;
		}
		else {
			sum += H / m;
			if (H%m != 0)sum += 1;
			H = 0;
		}
		i++;
	}
	cout << sum << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin >> N, cin >> H;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<functional>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:30:9: error: 'cout' was not declared in this scope
   30 |         cout << sum << endl;
      |         ^~~~
a.cc:30:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:24: error: 'endl' was not declared in this scope
   30 |         cout << sum << endl;
      |                        ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<functional>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;

int main() {
  int N, H;
  int a[100000], b[100000];
  cin >> N >> H;
  int max_a = 0;
  for(int i = 0; i < N; i++) {
    cin >> a[i] >> b[i];
    if(a[i] > max_a) max_a = a[i];
  }
  sort(b, b + n);
  int cnt = 0;
  for(int i = 0; i < N; i++){
    if(b[i] > max_a){
      cnt++;
      H -= b[i];
    }
    if(H <= 0){
      cout << cnt << endl;
      return 0;
    }
  }
  if(H % max_a == 0) cout << cnt + H / max_a << endl;
  else cout << cnt + H / max_a + 1 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: 'n' was not declared in this scope
   14 |   sort(b, b + n);
      |               ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
int n, h; cin >> n >> h;
vector<int> a(n), b(n); 
for (int i = 0; i < n; ++i) cin >> a[i] >> b[i];
sort(begin(a), end(a));
sort(begin(b), end(b));
int c = 0;
while (H > 0) H -= max(a[n-1], c>n-1 ? 0 : b[n-1-c]), c++;
cout << c << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:8: error: 'H' was not declared in this scope
   13 | while (H > 0) H -= max(a[n-1], c>n-1 ? 0 : b[n-1-c]), c++;
      |        ^
Language: C++

#include <iostream>
 
using namespace std;
 
int main(){
  int N;
  int H;
  cin >> N >> H;

  int a[100000];
  int b[100000];
  int num = 0;
  int a_max = 0;
  for(num = 0;num < N;num++){  
    cin >> a[num] >> b[num];
    if(a[num] > a_max){
      a_max = a[num];
    }
  }
  sort(b, b+N);

  int result = 0;
  for(num = 0;num < N;num++){  
    if(b[num] > a_max){
      result = result + 1;
      H = H - b[num];
    }
    if(H <= 0) break;
  }

  if(H > 0){
    if(H % a_max != 0) result = result + 1;
    result = result + (H / a_max);
  }

  cout << result << endl;
  return 0;
}

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

#include <vector>
#include <iostream>
#include <iomanip>
#include <map>
#include <string.h>
#include <cstring>
#include <queue>
#include <limits>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
#include <stack>
#include <cmath>
#include <stdio.h>
#include <set>
#include <cstdio>
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)(a).size()
#define pb push_back
#define FOR(i, a) for(int i = 0; i < (a); i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef long double ld;
const int N = 1e5 + 10;
double esp = 1e-10;
int n ,h;
int a[N], b[N];
int main() {
    while (cin >> n >> h) {
        int ma = INT_MIN;
        int id = -1;
        for (int i = 0; i < n; i++) {
            cin >> a[i] >> b[i];
            if (a[i] == ma) {
                if (b[i] < b[id]) {
                    id = i;
                }
            } else if (a[i] > ma) {
                id = i;
            }
            ma = max(a[i], ma);
        }
        vector<int> vec;
        for (int i = 0; i < n; i++) {
            if (b[i] >= ma) {
                if (id != i) {
                    vec.push_back(b[i]);
                }
            }
        }
        sort(vec.begin(), vec.end());
        int res = 0;
        int t = b[id];
        int x = a[id];
        for (int i = (int)vec.size() - 1; i >= 0; i--) {
            int v = vec[i];
            if (v >= t) {
                h -= v;
                res++;
                if (h <= 0) break;
            } else {
                if (t >= h) {
                    res++;
                    break;
                } else {
                    h -= v;
                    res++;
                    if (h <= 0) break;
                }
            }
        }
        if (h > 0) {
            res++;
            h -= t;
            if (h > 0) {
                res += (h + x - 1) / x;
            }
        }
        cout << res << endl;
    }
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: 'INT_MIN' was not declared in this scope
   31 |         int ma = INT_MIN;
      |                  ^~~~~~~
a.cc:17:1: note: 'INT_MIN' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   16 | #include <cstdio>
  +++ |+#include <climits>
   17 | #define all(a) (a).begin(), (a).end()
Language: C++

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

struct katana_t
{
    bool operator<( const katana_t& right ) const {
        int t1,t2;
        if (a<b)
        {
            t1=b;
        }else
        {
            t1=a;
        }
        if (right.a<right.b)
        {
            t1=right.b;
        }else
        {
            t1=right.a;
        }
        return t1<t2
    }
    int a;
    int b;
};

int main(void){
    int n,h;
    cin >> n >> h;
    list<katana_t> katanas;
    katana_t t;
    unsigned long long int ans=0;
    for (size_t i = 0; i < n; i++)
    {
        scanf("%d %d",&(t.a),&(t.b));
        katanas.push_back(t);
    }
    katanas.sort();
    do
    {
        t = katanas.back();
        if (katanas.size()==1)
        {
            if (h<=t.b)
            {
                h-=t.b;
            }else
            {
                h-=t.a;
            }
        }
        else
        {
            if (h<=t.b)
            {
                h-=t.b;
                katanas.pop_back();
            }else
            {
                h-=t.a;
            }
        }
        ans++;
    } while(h>0);
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In member function 'bool katana_t::operator<(const katana_t&) const':
a.cc:23:5: error: expected ';' before '}' token
   23 |     }
      |     ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cstring>
#include <stdio.h>

using namespace std;
#define N_MAX 100000
long int N;
long int H;
long int b[N_MAX+1];

long int main(void){
	//scanf ("%d %d\n", &N, &H);
	cin >> N >> H;
	long int a;
	long int max_a=0;
	for (long int i=0; i<N; i++){
		//scanf ("%d %d\n", &a, &b[i]);
		cin >> a >> b[i];
		max_a = max(max_a, a);
	}

	long int turn = 0;
	for (long int i=0; i<N; i++){
		if (max_a > b[i]) continue;
		H -= b[i];
		turn++;
		if (H <= 0){
			cout << turn << "\n";
			return 0;		
		}
	}
	cout << turn + (H/ max_a) + (H%max_a==0 ? 0 : 1) << "\n";
	return 0;
}

Compiler output:
a.cc:12:6: error: '::main' must return 'int'
   12 | long int main(void){
      |      ^~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int N,H;
  cin>>N>>H;
  int a[N],b[N];
  for(int i=0;i<N;i++)cin>>a[i]>>b[i];
  int m,x;
  for(int i=0;i<N;i++){
    if(a[i]>a[x]){
      m=a[i];
      x=i;
    }
  }
  int res;
  if(H<=b[x]){
    cout<<1;
    return 0;
  }
  int c[N-1];
  int t;
  for(int i=0;i<N;i++){
    if(i==x)continue;
    c[t]=a[i];
    t++;
  }
  sort(c,c+N-1);
  int lax,lbx;
  lax=-1;lbx=-1;
  for(int i=0;i<N-1;i++){
    if(c[i]<a[x])lax=i;
    if(c[i]<b[x])lbx=i;
  }
  int r=H;
  for(int i=N-2;i>=0;i--){
    if(r<=b[x]){
      res++;
      cout<<res;
      return 0;
    }
    else if(i==lax){
      res+=(r-b[x])/a[i]+2;
      cout<<res;
      return 0;
    }
    else{
      r-=c[i];
      res++;
    }
  }
  res+=(r-b[x])/a[i]+2;
  cout<<res;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:52:19: error: 'i' was not declared in this scope
   52 |   res+=(r-b[x])/a[i]+2;
      |                   ^
Language: C++

#include<stdio.h>
#define scanf scanf_s
int main()
{
	long N, H;
	int *a, *b, *shot;
	int count = 0;

	// スペース区切りの整数の入力

	scanf("%ld %ld", &N, &H);

	a = new int[N];
	b = new int[N];
	shot = new int[N];

	for (int i = 0; i < N; i++){
		scanf("%d %d", &a[i], &b[i]);
		shot[i] = 0;
	}

	//投げの最大、振りの最大を算出
	int MaxA = 0, MaxB = 0;
	int MaxAP = 0, MaxBP = 0;

	do{
		if ((MaxA <= MaxB) && (MaxAP != MaxBP)){//投げる
			count++;
			H -= b[MaxBP];
			if (H <= 0)goto PRINT;
			a[MaxBP] = 0;
			b[MaxBP] = 0;

		}
		MaxB = 0;
		MaxAP = 0, MaxBP = 0;
		for (int i = 0; i < N; i++){
			if (b[i]>MaxB){
				MaxB = b[i];
				MaxBP = i;
			}
			if (a[i] == MaxA){
				if (i != MaxBP){
					MaxA = a[i];
					MaxAP = i;
				}
			}
			else if (count == 0 && a[i] > MaxA){//初回だけ
				MaxA = a[i];
				MaxAP = i;
			}

		}
	} while ((MaxA <= MaxB) && (MaxAP != MaxBP));
	//投げ続けて勝てる体力を算出する
	for (int i = 0; i < N; i++){
		if (b[i]>MaxA&&shot[i] == 0){
			shot[i] = 1;
			count++;
			H -= b[i];
			if (H <= 0)goto PRINT;
		}
	}
	//ひたすら切る回数
	count += (H - 1) / MaxA + 1;

PRINT:
	// 出力
	printf("%d\n", count);
	delete a;
	delete b;
	delete shot;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:15: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    2 | #define scanf scanf_s
      |               ^~~~~~~
a.cc:11:9: note: in expansion of macro 'scanf'
   11 |         scanf("%ld %ld", &N, &H);
      |         ^~~~~
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>

using namespace std;

int main(){
    long long N,H;
    cin>>N>>H;
    vector <long long>a(N);
    vector <long long>b(N);
    for(int i=0 ; i<N ; i++){
        cin>>a[i];
    	cin>>b[i];
    }
	long long a_max=0;
	long long a_m=0;
	long long b_m=0;
	long long ans=0;
	for(long long i=0 ; i<N ; i++){
		if(a[a_max]<a[i]){
			a_max=i;
		}
	}
	a_m=a[a_max];
	b_m=b[a_max];
	//a[a_max]=0;
	b[a_max]=0;
	//sort(a.begin(),a.end());
	sort(b.begin(),b.end());
	for(long long i=N-1 ; i>0 ; i--){
		if(a_m<=b[i]){
			H-=b[i];
			ans+=1;
		}
		if(H<=0){
			t=false;
			break;
		}
	}
	while(H){
		if(H<=b_m){
			ans+=1;
			break;
		}
		ans+=1;
		H-=a_m;
		if(H<=0)break;
	}
	cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:25: error: 't' was not declared in this scope
   39 |                         t=false;
      |                         ^
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>

using namespace std;

int main(){
    long long N,H;
    cin>>N>>H;
    vector <long long>a(N);
    vector <long long>b(N);
    for(int i=0 ; i<N ; i++){
        cin>>a[i];
    	cin>>b[i];
    }
	bool t=true;
	long long a_max=0;
	long long a_m=0;
	long long b_m=0;
	long long ans=0;
	for(long long i=0 ; i<N ; i++){
		if(a[a_max]<a[i]){
			a_max=i;
		}
	}
	a_m=a[a_max];
	b_m=b[a_max];
	//a[a_max]=0;
	b[a_max]=0;
	//sort(a.begin(),a.end());
	sort(b.begin(),b.end());
	for(long long i=N-1 ; i>0 ; i--){
		if(a_m<=b[i]){
			H-=b[i];
			ans+=1;
		}
		if(H<=0){
			t=false
			break;
		}
	}
	if(t){
		while(1){
			if(H<=b_m){
				ans+=1;
				break;
			}
			ans+=1;
			H-=a_m;
			if(H<=0)break;
		}
	}
	cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:32: error: expected ';' before 'break'
   40 |                         t=false
      |                                ^
      |                                ;
   41 |                         break;
      |                         ~~~~~
Language: C++

typedef long long int llint;
#include <stdio.h>

int main() {
	llint n;
	llint h;
	int a[1000000000];
	int b[1000000000];
	scanf("%lld %lld", &n, &h);
	for (int i = 0; i < n; i++) {
		scanf("%lld %lld", &a[i], &b[i]);
	}
	llint count = 0;
	//まずは全部投げつけてみる
	llint max = 1000000001;
	for (llint i = 0; i < n; i++) {
		llint tmp = 0;
		for (llint j = 0; j < n; j++) {
			if (max > b[i]) if (b[i] > tmp) {
				tmp = b[i];
			}
		}
		max = tmp;
		h -= tmp;
		count++;
		if (h <= 0) goto FINISH;//終わり判定
	}
	//次は斬りつける
	llint max = 0;
	for (llint i = 0; i < n; i++) {
		if (max < a[i]) max = a[i];
	}

	//一番強いのがわかったらひたすら斬る
	while (h <= 0) {
		h -= max;
		count++;
	}
FINISH:
	printf("%lld\n", count);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: redeclaration of 'llint max'
   29 |         llint max = 0;
      |               ^~~
a.cc:15:15: note: 'llint max' previously declared here
   15 |         llint max = 1000000001;
      |               ^~~
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <stdio.h>

using namespace std;
#define max(a,b) (((a)>(b)) ? (a): (b))
#define N_MAX 10000
int N;
int H;
int b[N_MAX];

int main(void){
	scanf ("%d %d\n", &N, &H)
	int a;
	int max_a=0;
	for (int i=0; i<N; i++){
		scanf ("%d %d\n", &a, &b[i])
		max_a = max(max_a, a);
	}

	int turn = 0;
	for (int i=0; i<N; i++){
		if (max_a < b[i]) {
			H -= b[i];
			turn++;
			if (H <= 0){
				cout << turn << "\n";
				return 0;
			}
		}
	}
	cout << turn + ((H - 1)/ max_a) + 1 << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:34: error: expected ';' before 'int'
   14 |         scanf ("%d %d\n", &N, &H)
      |                                  ^
      |                                  ;
   15 |         int a;
      |         ~~~                       
a.cc:18:36: error: 'a' was not declared in this scope
   18 |                 scanf ("%d %d\n", &a, &b[i])
      |                                    ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define ull unsigned long long
#define pii pair<ull ,ull >
vector < pair < ull , ull > > kat;
bool comp(pii a,pii b)
{
	if(a.first < b.first) return false;
	if(a.first > b.first) return true;
	if(a.second < b.first) return true;
	return false;
}
int main()
{
	int H,N;
	cin >> N >> H;
	for(int i = 0; i < N; ++i)
	{
		int x,y;
		cin >> x >> y;
		kat.push_back(make_pair(x,y));
	}
	sort(kat.begin(),kat.end(), comp);
	vector< ull > secondary;
	for(int i =1; i<N;++i)
	{
		if(kat[i].second > kat[0].first)
			secondary.push_back(kat[i].second);
	}
	ull cnt = 0;
	for(int i = 0; i < secondary.size();++i)
	{
		cnt++;
		if(H <= secondary[i])
		{ H=0;	break;}
		H-=secondary[i];
	}
	if(H > 0)
	{
		if(kat[0].second > kat[0].first)
		{
			if(kat[0].second >= H){
				cnt++;
			}else{
				cnt+=(H-kat[0].second + kat[0].first-1)/kat[0].first+1;
			}
		}else{
			cnt+=(H+kat[0].first-1)/kat[0].first;
		}
	}
	cout << cnt << endl;
}
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define ull unsigned long long
#define pii pair<ull ,ull >
vector < pair < ull , ull > > kat;
bool comp(pii a,pii b)
{
	if(a.first < b.first) return false;
	if(a.first > b.first) return true;
	if(a.second < b.first) return true;
	return false;
}
int main()
{
	int H,N;
	cin >> N >> H;
	for(int i = 0; i < N; ++i)
	{
		int x,y;
		cin >> x >> y;
		kat.push_back(make_pair(x,y));
	}
	sort(kat.begin(),kat.end(), comp);
	vector< ull > secondary;
	for(int i =1; i<N;++i)
	{
		if(kat[i].second > kat[0].first)
			secondary.push_back(kat[i].second);
	}
	ull cnt = 0;
	for(int i = 0; i < secondary.size();++i)
	{
		if(H <= kat[0].second)
		{
		H=0;
		cnt++;
		break;
		}
		cnt++;
		if(H <= secondary[i])
		{ H=0;	break;}
		H-=secondary[i];
	}
	if(H > 0)
	{
		if(kat[0].second > kat[0].first)
		{
			if(kat[0].second >= H){
				cnt++;
			}else{
				cnt+=(H-kat[0].second + kat[0].first-1)/kat[0].first+1;
			}
		}else{
			cnt+=(H+kat[0].first-1)/kat[0].first;
		}
	}
	cout << cnt << endl;
}


Compiler output:
a.cc:61:31: error: redefinition of 'std::vector<std::pair<long long unsigned int, long long unsigned int> > kat'
   61 | vector < pair < ull , ull > > kat;
      |                               ^~~
a.cc:7:31: note: 'std::vector<std::pair<long long unsigned int, long long unsigned int> > kat' previously declared here
    7 | vector < pair < ull , ull > > kat;
      |                               ^~~
a.cc:62:6: error: redefinition of 'bool comp(std::pair<long long unsigned int, long long unsigned int>, std::pair<long long unsigned int, long long unsigned int>)'
   62 | bool comp(pii a,pii b)
      |      ^~~~
a.cc:8:6: note: 'bool comp(std::pair<long long unsigned int, long long unsigned int>, std::pair<long long unsigned int, long long unsigned int>)' previously defined here
    8 | bool comp(pii a,pii b)
      |      ^~~~
a.cc:69:5: error: redefinition of 'int main()'
   69 | int main()
      |     ^~~~
a.cc:15:5: note: 'int main()' previously defined here
   15 | int main()
      |     ^~~~
Language: C++

typedef long long int llint;
#include <stdio.h>

int main() {
	llint n;
	llint h;
	int a[1000000000];
	int b[1000000000];
	scanf("%d %d", &n, &h);
	for (int i = 0; i < n; i++) {
		scanf("%d %d", &a[i], &b[i]);
	}
	llint count = 0;
	//まずは全部投げつけてみる
	llint max = 1000000001;
	for (llint i = 0; i < n; i++) {
		llint tmp = 0;
		for (llint j = 0; j < n; j++) {
			if (max > b[i]) if (b[i] > tmp) {
				tmp = b[i];
			}
		}
		max = tmp;
		h -= tmp;
		count++;
		if (h <= 0) goto FINISH;//終わり判定
	}
	//次は斬りつける
	llint max = 0;
	for (llint i = 0; i < n; i++) {
		if (max < a[i]) max = a[i];
	}

	//一番強いのがわかったらひたすら斬る
	while (h <= 0) {
		h -= max;
		count++;
	}
FINISH:
	printf("%d\n", count);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:15: error: redeclaration of 'llint max'
   29 |         llint max = 0;
      |               ^~~
a.cc:15:15: note: 'llint max' previously declared here
   15 |         llint max = 1000000001;
      |               ^~~
Language: C++

#include <iostream>
#include <string>
#include <cstring>
#include <stdio.h>

using namespace std;
#define max(a,b) (((a)>(b)) ? (a): (b))
#define N_MAX 10000
long int N;
long int H;
long int b[N_MAX];

int main(void){
	cin >> N;
	cin >> H;

	long int a;
	long int max_a=0;
	for (long int i=0; i<N; i++){
		scanf ("%d %d", &a, &b[i])
		max_a = max(max_a, a);
	}

	long int turn = 0;
	for (long int i=0; i<N; i++){
		if (max_a < b[i]) {
			H -= b[i];
			turn++;
			if (H <= 0){
				cout << turn << "\n";
				return 0;
			}
		}
	}
	cout << turn + ((H - 1)/ max_a) + 1 << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:43: error: expected ';' before 'max_a'
   20 |                 scanf ("%d %d", &a, &b[i])
      |                                           ^
      |                                           ;
   21 |                 max_a = max(max_a, a);
      |                 ~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int a[100011],b[100011];
int main()
{
  int n,h,ans=0,c;
  cin>>n>>h;
  for(int i=0;i<n;i++)
    cin>>a[i]>>b[i];
  sort(a,a+n);
  sort(b,b+n);
  for(int i=0;i<n;i++){
    if(b[i]>a[n-1]){
      c=i;
      break;
    }
  }
  for(int i=n-1;i>=c;i--){
    h-=b[i];
    ans++;
    if(h<=0){
      cout<<ans;
      return 0;
    }
  }
  while(h>0){
    h-=a[n-1];
    ans++;
  }
  cout<<ans;
  return 0;
}

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

#include <iostream>
using namespace std;
// bool enough(int mid, int mx_a,int*b, int n ) {
// 	while (mid > 0) {
// 		for (int i = 0; i < )
// 	}
	
// }
// int binary_search(int mx_a, int* b, int l, int r, int n) {
// 	int mid = (l+r)/2;
// 	if (l > r) 
// 		return -1;
	
// 	if (mid == l && mid == r) 
// 		return mid;
	
// 	if (enough(mid))
// 		return binary_search(mx_a, b, l, mid, n);
// 	else
// 		return binary_search(mx_a, b, mid, r, n);
// }

int main( void) {
	long long n, h; cin >> n >> h;
	long long a[n], b[n];
	for (int i = 0; i < n; i++) 
		cin >> a[i] >> b[i];

	int s = sizeof(b)/sizeof(b[0]);
    sort(b, b+s);
	//find max a
	long long mx_a = -1;
	for (int i = 0; i < n; i++) 
		if (mx_a < a[i])
			mx_a = a[i];
	long long c = 0;
	for (int i = n-1; i>=0; i--) {
		if (h > 0 && b[i] > mx_a) {
			h -= b[i];
			c++;
		}
		else 
			break;
		
	}
	if (h > 0) {
		c += h/mx_a;
		h -= h*(h/mx_a);
		if (h > 0) {
			c++;
		}
	}
	cout << c << endl;

	// int r = h / mx_a + 1;
	// int l = 0;
	// int result = binary_search(mx_a,b,l,r, n);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   30 |     sort(b, b+s);
      |     ^~~~
      |     short
Language: C++

#include <iostream>
#include <string>
#include <cstring>

using namespace std;

#define N_MAX 10000
int N;
int H;
unsigned int a[N_MAX];
unsigned int b[N_MAX]
bool table[Y_MAX/1000+10];

int main(void){

	cin >> N;
	cin >> H;

	for (int i=0; i<N; i++){
		cin >> a[i];
		cin >> b[i];
	}
	int max_a=0;
	for (int i=0; i<N; i++){
		max_a = max(max_a, a[i]);
	}

	int turn = 0;
	for (int i=0; i<N; i++){
		if (max_a < b[i]) {
			H -= b[i];
			turn++;
			if (H <= 0){
				cout << turn << "\n";
				return 0;
			}
		}
	}
	cout << turn + ((H - 1)/ max_a) + 1 << "\n";
	return 0;
}

Compiler output:
a.cc:12:1: error: expected initializer before 'bool'
   12 | bool table[Y_MAX/1000+10];
      | ^~~~
a.cc: In function 'int main()':
a.cc:21:24: error: 'b' was not declared in this scope
   21 |                 cin >> b[i];
      |                        ^
a.cc:25:28: error: no matching function for call to 'max(int&, unsigned int&)'
   25 |                 max_a = max(max_a, a[i]);
      |                         ~~~^~~~~~~~~~~~~
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:25:28: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'unsigned int')
   25 |                 max_a = max(max_a, a[i]);
      |                         ~~~^~~~~~~~~~~~~
/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
a.cc:30:29: error: 'b' was not declared in this scope
   30 |                 if (max_a < b[i]) {
      |                             ^
Language: C++

#include <iostream>
using namespace std;
// bool enough(int mid, int mx_a,int*b, int n ) {
// 	while (mid > 0) {
// 		for (int i = 0; i < )
// 	}
	
// }
// int binary_search(int mx_a, int* b, int l, int r, int n) {
// 	int mid = (l+r)/2;
// 	if (l > r) 
// 		return -1;
	
// 	if (mid == l && mid == r) 
// 		return mid;
	
// 	if (enough(mid))
// 		return binary_search(mx_a, b, l, mid, n);
// 	else
// 		return binary_search(mx_a, b, mid, r, n);
// }

int main( void) {
	int n, h; cin >> n >> h;
	int a[n], b[n];
	for (int i = 0; i < n; i++) 
		cin >> a[i] >> b[i];

	int s = sizeof(b)/sizeof(b[0]);
    sort(b, b+s);
	//find max a
	int mx_a = -1;
	for (int i = 0; i < n; i++) 
		if (mx_a < a[i])
			mx_a = a[i];
	int c = 0;
	for (int i = n-1; i>0; i--) {
		if (b[i] > mx_a) {
			h -= b[i];
			c++;
		}
		else {
			break;
		}
	}
	if (h > 0) {
		c += h/mx_a;
		h -= h*(h/mx_a);
		if (h > 0) {
			c++;
		}
	}
	cout << c << endl;

	// int r = h / mx_a + 1;
	// int l = 0;
	// int result = binary_search(mx_a,b,l,r, n);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   30 |     sort(b, b+s);
      |     ^~~~
      |     short
Language: C++

#include <bits/stdc++.h>
#define LL long long
#define Accel ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define Re(a,b) memset(a,b,sizeof a)
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define ALL(X) (X).begin(), (X).end()
#define FOR(I, A, B) for (int I = (A); I <= (B); I++)
#define REP(I, N) for (int I = 0; I < (N); I++)
#define MID ((l+r)>>1)
#define lc (rt<<1)
#define rc (rt<<1|1)
#define ls lc,l,MID
#define rs rc,MID+1,r
#define st 1,1,n
#define PII pair<int,int>
#define PLL pair<LL,LL>
using namespace std;
//LL pw(LL a, LL b,LL M) { return b ? b & 1 ? a*pw(a, b - 1,M) % M : pw(a*a%M, b>>1,M) : 1; }
//void add(int x){while(x<N)BIT[x]++,x+=x&-x;}
//int sum(int x){return x?BIT[x]+sum(x-(x&-x)):0;}
const int N=1e5+1;
const LL M=1e18;
int main(){Accel
	LL n,h,s=0,md=0,x,y;
	cin>>n>>h;
	priority_queue<LL>q;
	REP(i,n){
		cin>>x>>y;	
		q.push(y);
		md=max(md,x);
	}
	LL t=0,x=0;
	while(t<h&&q.size())
		t+=q.top(),x++,q.pop();
	while(h>0&&h>t)h-=md,s++;
	if(h>0&&h<=t)s+=x;
	cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:16: error: redeclaration of 'long long int x'
   35 |         LL t=0,x=0;
      |                ^
a.cc:27:25: note: 'long long int x' previously declared here
   27 |         LL n,h,s=0,md=0,x,y;
      |                         ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>  

using namespace std;

vector <long long> v;

int main()
{
	int n;
	long long h;
	cin >> n >> h;
	long long max = 0;
	for (int i = 0; i < n; ++i)
	{
		long long a, b;
		cin >> a >> b;
		if (a > max)
			max = a;
		v.push_back(b);
	}
	sort(v.begin(), v.end());
	long long count = 0;
	int i = n - 1;
	while (i >= 0 && v[i] > max && h > 0)
	{
		h -= v[i];
		i--;
		count++;
	}
	if (h > 0)
		count += ceil(h*1.0 / max);
	cout << count;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:26: error: 'ceil' was not declared in this scope
   33 |                 count += ceil(h*1.0 / max);
      |                          ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>

#include <cmath>
#include <cstdlib>
#include <climits>

#include "show_vector.hh"
//#include <stdio.h>
//#include <stdlib.h>


using namespace std;

#define debug false

int main(int argc, char *argv[]){

  int N, H;
  cin >> N >> H;
  vector<pair<int, int>> ab(N);
  int a_max = INT_MIN, b_min = INT_MAX;
  int x, y;
  for(int i = 0; i < N; i++){
    cin >> ab[i].first >> ab[i].second;
    if(ab[i].first > a_max) a_max = ab[i].first;
    if(ab[i].second > b_min) b_min = ab[i].second;
  }

  int n = 0;
  for(int i = N-1; 0 <= i; i--){
    if(ab[i].second <= a_max){
      ab.erase(ab.begin()+i);
      n++;
    }
  }

  N -= n;
  int a[N] = {}, b[N] = {};
  for(int i = 0; i < N; i++){
    a[i] = ab[i].first;
    b[i] = ab[i].second;
  }
  sort(a, a+N);
  sort(b, b+N);
  int count = 0;
  int damage = 0;
  int tmp;
  for(int i = 0; i < N; i++){
    damage += b[N-1-i];
    count++;

    if(H <= damage){
      //printf("throw only\n");
      goto END;
    }
  }
  //printf("damage : %d\n", damage);
  //printf("count  : %d\n", count);

  /*
  // H > damage
  while(H > damage){
    damage += a_max;
    count++;
  }
  */

  tmp = (H-damage) / a_max;
  if((H-damage) % a_max != 0) tmp++;
  count += tmp;

  END:
    cout << count << endl;


  return 0;
}


Compiler output:
a.cc:10:10: fatal error: show_vector.hh: No such file or directory
   10 | #include "show_vector.hh"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#define Max(a,b) (a>b?a:b)
#define Min(a,b) (a<b?a:b)
#define ll long long
inline int read(){
	int f=1,x=0;char c=getchar();
	while(c<'0'||c>'9'){
		if(c=='-')
			f=-1;
		c=getchar();
	}
	while(c<='9'&&c>='0'){
		x=x*10+c-'0';
		c=getchar();
	}
	return x*f;
}

inline void file(){
	freopen("1.in","r",stdin);
	freopen("1.out","w",stdout);
}

using namespace std;
const ll maxn=1e6+10;
ll a[maxn],b[maxn];

int main(){
	ll k,n,h;
	scanf("%lld%lld",&n,&h);
	for(register ll i=1;i<=n;++i){
		scanf("%lld",&a[i]);
		scanf("%lld",&b[i]);
	}
	sort(b+1,b+n+1);
	sort(a+1,a+n+1);
	for(register ll i=1;i<=n;++i)
		b[i]=max(b[i],a[n]);
	ll ovo=0;
	for(register ll i=n;i>=1;--i){
		ovo+=b[i];
		if(ovo>=h)
			printf("%lld",n-i+1);
	}
	if(ovo<h){
		h-=ovo;


Compiler output:
a.cc: In function 'int main()':
a.cc:31:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   31 |         for(register ll i=1;i<=n;++i){
      |                         ^
a.cc:37:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   37 |         for(register ll i=1;i<=n;++i)
      |                         ^
a.cc:40:25: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   40 |         for(register ll i=n;i>=1;--i){
      |                         ^
a.cc:46:24: error: expected '}' at end of input
   46 |                 h-=ovo;
      |                        ^
a.cc:45:18: note: to match this '{'
   45 |         if(ovo<h){
      |                  ^
a.cc:46:24: error: expected '}' at end of input
   46 |                 h-=ovo;
      |                        ^
a.cc:28:11: note: to match this '{'
   28 | int main(){
      |           ^
Language: C++

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

long long Y[100005];
long long a, h;

long long getCount(long long sm)
{
    return max(0LL, ceil((0LL + h - sm) / (double)a));
}

int main()
{
    int n;
    long long x;
    long long bsum = 0, ans;
    cin>>n>>h;
    for(int i = 0; i < n; i++)
    {
        scanf("%lld %lld", &x , &Y[i]);
        a = max(a, x);
    }
    sort(Y, Y + n);
    bsum = 0;
    ans = getCount(bsum);
    for(int i = n - 1; i >= 0; i--)
    {
        bsum += Y[i];
        ans = min(ans, getCount(bsum) + (n - i));
    }
    cout<<ans;
    return 0;
}


Compiler output:
a.cc: In function 'long long int getCount(long long int)':
a.cc:9:15: error: no matching function for call to 'max(long long int, double)'
    9 |     return max(0LL, ceil((0LL + h - sm) / (double)a));
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:9:15: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'double')
    9 |     return max(0LL, ceil((0LL + h - sm) / (double)a));
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/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:9:15: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
    9 |     return max(0LL, ceil((0LL + h - sm) / (double)a));
      |            ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
#define max(a,b) a>b?a:b
inline void read(int &x)
{
    x=0;int f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
}
ll ans;
int n,m,y[100005],mx;
int main()
{
    read(n);read(m);
    for(int i=1;i<=n;i++){int x;read(x);mx=max(mx,x);read(y[i]);}
    sort(y+1,y+n+1);
    int i=n;
    for(;i;i--){if(y[i]<=mx) break;m-=y[i];if(m<0){cout<<n-i+1<<"\n";return 0;}}
    ans=n-i+(m-1)/mx+1;
    cout<<ans<<"\n";
}

Compiler output:
a.cc:12:1: error: 'll' does not name a type
   12 | ll ans;
      | ^~
a.cc: In function 'int main()':
a.cc:21:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |     ans=n-i+(m-1)/mx+1;
      |     ^~~
      |     abs
Language: C++

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

int n,h,s,ans,ans2;
pair<int,int> arr[100005],arr2[100005];

int main() {
  scanf("%d%d",&n,&h);
  for(int i=0;i<n;i++){
    int a,b;
    scanf("%d%d",&a,&b);
    arr[i]=make_pair(a,b);
    arr2[i]=make_pair(b,a);
  }
  sort(arr2,arr2+n);
  reverse(arr2,arr2+n);
  long long cur=0;
  for(int i=0;i<n;i++){
    if(cur>=h){
      ans=i+1;
      break;
    }
    cur+=arr2[i].first;
  }
  sort(arr,arr+n);
  reverse(arr,arr+n);
  cur = 0;
  for(int i=1;i<n;i++) if(arr[i].second>arr[0].first){ cur+=arr[i].second;ans2++;}
  cur+=arr[0].second;
  ans2++;
  //printf("%d",cur);
  ans2+=(h-cur+arr[0].first-1)/arr[0].first;
  printf("%d",min(ans,ans2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:28: error: expected ')' before ';' token
   33 |   printf("%d",min(ans,ans2);
      |         ~                  ^
      |                            )
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int input;
  
  cin >> input;
  
  count << 24 + (24 - input) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<<'
   10 |   count << 24 + (24 - input) << endl;
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  // ここにプログラムを追記
  int input;
  
  cin >> input;
  
  count >> 24 + (24 - input) >> endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator>>'
   10 |   count >> 24 + (24 - input) >> endl;
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

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

int main() {
  int M;
    cin >> M
   cout << 24-M+24 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'cout'
    6 |     cin >> M
      |             ^
      |             ;
    7 |    cout << 24-M+24 << endl;
      |    ~~~~
Language: C++


#include <iostream>
#include <C:/inetpub/VS2019/APP/bits/stdc++.h>

using namespace std;

int main()
{
	int m;
	cin >> m; //入力された時間の情報を取得
	int max = 24; //次の日の日付

	int ans; //次の年までの時間

	ans = max - m + 24;

}

Compiler output:
a.cc:3:10: fatal error: C:/inetpub/VS2019/APP/bits/stdc++.h: No such file or directory
    3 | #include <C:/inetpub/VS2019/APP/bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int M;
  cin >> M;
  cout << 48 - M +  << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected primary-expression before '<<' token
    7 |   cout << 48 - M +  << endl;
      |                     ^~
Language: C++

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

int main() {
  int M;
  cin >> M;
  cout << 48 - M << endl
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: expected ';' before '}' token
    7 |   cout << 48 - M << endl
      |                         ^
      |                         ;
    8 | }
      | ~
Language: C++

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

int main() {
  
  int M
    
    cin >> M
    
    cout << 24 - M + 24 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'cin'
    8 |     cin >> M
      |     ^~~
Language: C++

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

 int main() {
   int n;
   cin >> n;
   
   cout << 48-n << endl;
 }

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:4: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |    cin >> n;
      |    ^~~
      |    std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:4: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |    cout << 48-n << endl;
      |    ^~~~
      |    std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |    cout << 48-n << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

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

int main() {
    int m;
    cin >> m;
    cout << 48-m;    
}

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 <bits/stdc++.h>
using namespace std;
 
int main() {
  cin>>M;
  
  cout<< 48-M <<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'M' was not declared in this scope
    5 |   cin>>M;
      |        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int M;
  cin>>M
  
  cout<< 48-M <<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'cout'
    6 |   cin>>M
      |         ^
      |         ;
    7 | 
    8 |   cout<< 48-M <<endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin>>M
  
  cout<< 48-M <<endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'M' was not declared in this scope
    5 |   cin>>M
      |        ^
Language: C++

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

int main() {
  int a;
 int y
  
  cin >> a;
 
  y = 24 - a;
  cout << y << end1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected initializer before 'cin'
    8 |   cin >> a;
      |   ^~~
a.cc:10:3: error: 'y' was not declared in this scope
   10 |   y = 24 - a;
      |   ^
a.cc:11:16: error: 'end1' was not declared in this scope
   11 |   cout << y << end1;
      |                ^~~~
Language: C++

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

int main() {
  int a;
 
  
  cin >> a;
 
  y = 24 - a;
  cout << y << end1;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'y' was not declared in this scope
   10 |   y = 24 - a;
      |   ^
a.cc:11:16: error: 'end1' was not declared in this scope
   11 |   cout << y << end1;
      |                ^~~~
Language: C++

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

int main {
  int m, x;
  
  cin >> m >> endl;
  x = (24 - m) + 24;
  
  cout << x << endl;
  
}
 







Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main {
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int m, x;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:10: note: to match this '{'
    4 | int main {
      |          ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin >> m >> endl;
      |   ^~~
a.cc:8:3: error: 'x' does not name a type
    8 |   x = (24 - m) + 24;
      |   ^
a.cc:10:3: error: 'cout' does not name a type
   10 |   cout << x << endl;
      |   ^~~~
a.cc:12:1: error: expected declaration before '}' token
   12 | }
      | ^
Language: C++

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

int main(){
  int M;
  cin >> M;
  cout << 48-M
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before '}' token
    7 |   cout << 48-M
      |               ^
      |               ;
    8 | }
      | ~
Language: C++

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

int main () {
  int M;
  cin >> M;
  
  cout << 48 - M << endl;
}


Compiler output:
a.cc:2:20: error: expected ';' before ',' token
    2 | using namespace std,
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ',' token
a.cc:4:1: error: expected unqualified-id before 'int'
    4 | int main () {
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespase std,

int main () {
  int M;
  cin >> M;
  
  cout << 48 - M << endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std,
      |       ^~~~~~~~~
Language: C++

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

int main(){
  int a=0;
  cin >> a;
  cout << (24-a)+24 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: expected '}' at end of input
    7 |   cout << (24-a)+24 << endl;
      |                             ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {
  
  cin >> int M;
  
  cout << 48 - M << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   cin >> int M;
      |          ^~~
a.cc:8:16: error: 'M' was not declared in this scope
    8 |   cout << 48 - M << endl;
      |                ^
Language: C++

#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#define PI 3.14159265359
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pai;
typedef pair<ll, ll> pal;
const int MOD = 1e9+7;
const ll LLINF = 1e18;


int main(){
	int n;
	cout << 48-m << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: 'm' was not declared in this scope
   24 |         cout << 48-m << endl;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int M;
  cin >> M;
  cout << 24 - M + 24
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: expected ';' before '}' token
    7 |   cout << 24 - M + 24
      |                      ^
      |                      ;
    8 | }
      | ~
Language: C++

int main(){
    int a;
    cin >> a;
    cout << 24-a+24 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a;
      |     ^~~
a.cc:4:5: error: 'cout' was not declared in this scope
    4 |     cout << 24-a+24 << endl;
      |     ^~~~
a.cc:4:24: error: 'endl' was not declared in this scope
    4 |     cout << 24-a+24 << endl;
      |                        ^~~~
Language: C++

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

int main() {
	int M;
	cin >> M >>endl;
    cout << 48-M <<endl;
}

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

#include <cstdio>
int M;
int x;
int main(){
x = 24 + 24 - M;
scanf("%d", &M);
printf("%d\n", x);
}

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

#include <cstdio >
int M;
int x;
int main(){
x = 24 + 24 - M;
scanf("%d", &M);
printf("%d\n", x);
}

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

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

int main() {
  int M;
  cin >> M;
  cout << (24-M);

Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected '}' at end of input
    7 |   cout << (24-M);
      |                  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int M;
  int x;
  cin >> M;
  x = 48 - M
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected ';' before 'cout'
    8 |   x = 48 - M
      |             ^
      |             ;
    9 |   cout << x << endl;
      |   ~~~~
Language: C++

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

int main() {
  cin >> M;
  x = 48 - M
  cout << x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'M' was not declared in this scope
    5 |   cin >> M;
      |          ^
a.cc:6:3: error: 'x' was not declared in this scope
    6 |   x = 48 - M
      |   ^
Language: C++

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

int main() {
  cin >> M;
  cout << (24 - M) + 24 << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: 'M' was not declared in this scope
    5 |   cin >> M;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int M;
  cin >> M;
  ans = 48-M;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    6 |   ans = 48-M;
      |   ^~~
      |   abs