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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define pb push_back
#define eb emplace_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define ub(v,k) (upper_bound(all(v),k)-v.begin())
#define fi first
#define se second
#define pi M_PI
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef multiset<ll> S;
typedef priority_queue<ll> PQ;
typedef priority_queue<P,vector<P>,greater<P>> SPQ;
using vi=vector<ll>;
using vvi=vector<vi>;
using vvvi=vector<vvi>;
const ll inf=1001001001001001;
const int INF=1001001001;
const int mod=1000000007;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outp(T a){cout<<'('<<a.fi<<','<<a.se<<')'<<'\n';}
template<class T> void outvp(T v){rep(i,v.size())outp(v[i]);}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size()){rep(j,v[i].size()){if(j)cout<<' ';cout<<v[i][j];}cout<<'\n';}}
ll gcd(ll a,ll b){if(b==0)return a;return gcd(b,a%b);}
ll modpow(ll a,ll b){a%=mod;if(b==0)return 1;if(b&1)return a*modpow(a,b-1)%mod;ll k=modpow(a,b/2);return k*k%mod;}

int main(){
    ll n,t;cin>>n>>t;
    vector<P> v(n);
    rep(i,n){
        ll a,b;cin>>a>>b;
        v[i]=P(a+1,a+b+1);
    }
    vector<P> s;
    vi u;
    rep(i,n){
        if(v[i].fi-1>0)s.eb((v[i].fi-1)/(v[i].se-v[i].fi+1),i);
        else u.pb(v[i].se-v[i].fi+1);
    }
    sort(all(s));
    sort(all(u));
    vi rui(u.size());
    if(u.size())rui[0]=u[0];
    rep(i,u.size()-1)rui[i+1]=rui[i]+u[i+1];
    //outv(rui);
    n=s.size();
    /*outvp(s);
    outv(u);*/
    if(n==0){
        ll ans=ub(rui,t);
        out(ans);
        return 0;
    }
    vvi dp(n,vi(32,t+3));
    dp[0][0]=0;
    dp[0][1]=v[s[0].se].se;
    rep(i,n-1){
        rep(j,31){
            ll id=s[i+1].se;
            if(dp[i][j]*v[id].fi+v[id].se<=t)chmin(dp[i+1][j+1],dp[i][j]*v[id].fi+v[id].se);
            chmin(dp[i+1][j],dp[i][j]);
        }
    }
    //outvv(dp);
    rep(i,32)if(dp[n-1][i]<=t){
        int cnt=0;
        while(cnt<u.size()&&u[cnt]+dp[n-1][i]<=t){
            dp[n-1][i]+=u[cnt];
            cnt++;
        }
        //cout<<i<<' '<<ub(rui,t-dp[n-1][i])<<endl;
        chmax(ans,i+cnt);
    }
    out(ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   80 |         chmax(ans,i+cnt);
      |               ^~~
      |               abs
a.cc:82:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   82 |     out(ans);
      |         ^~~
      |         abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define lvector vector<ll> 
#define P pair<ll,ll>
#define rep(i,n) for(ll (i)=0; (i)<(n); ++(i))
#define print(a) cout << (a) << endl

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll a,b,n,T,t,tnew,ans=0;cin>>n>>T;
  vector<P> stores;
  lvector B;
  rep(i,n) {
    cin>>a>>b;
    if(a>0) stores.emplace_back(P(a,b));
    else B.push_back(b);
  }  
  sort(stores.begin(),stores.end(),
      [](P x,P y) {return y.first*(x.second+1)<x.first*(y.second+1);});
  sort(B.begin(),B.end());
  ll l=stores.size(),num=min(n+1,30ll);
  lvector dp(num+1,T+1);dp[0]=0;
  rep(i,l) {
    a=stores[i].first;
    b=stores[i].second;
    for(ll j=num;j>-1;--j) {
      ll val=dp[j]+1+(dp[j]+1)*a+b
      if(val<T+0.5) dp[j+1]=min(dp[j+1],val);
    }
  }
  rep(i,num) {
    if(dp[i]>T) continue;
    ll t_tmp=dp[i],ans_=i;
    for(ll j:B) {
      if(t_tmp+j+1<T+0.5) {t_tmp+=b+1;ans_++;}
      else break;
    }
    ans=max(ans,ans_);
  }
  print(ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:7: error: expected ',' or ';' before 'if'
   30 |       if(val<T+0.5) dp[j+1]=min(dp[j+1],val);
      |       ^~
Language: C++

#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <string>
#include <string.h>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <stdlib.h>
using namespace std;
typedef long long int lld;
typedef long double ld;
pair<lld,lld> arr[222222];
bool tmr(pair<lld,lld> a,pair<lld,lld> b){
	return ((a.second*b.first) + b.first) < ((b.second*a.first) + a.first);
}
bool tmr2(pair<lld,lld> a,pair<lld,lld> b){
	return a.second < b.second;
}
lld dp[33];
vector<pair<lld,lld> > v1,v2;
int main(void){
	for(int e=0;e<33;e++) dp[e] = 1e18;
	int n,t;
	scanf("%d%d",&n,&t);
	for(int e=0;e<n;e++) scanf("%lld%lld",&arr[e].first,&arr[e].second);
	sort(arr,arr+n,tmr);
	for(int e=0;e<n;e++){
		if(arr[e].first!=0) v1.push_back(make_pair(arr[e].first,arr[e].second));
		else v2.push_back(make_pair(arr[e].first,arr[e].second));
	}
	sort(v2.begin(),v2.end(),tmr2);
	lld tot = 0,ans = 0;
	dp[0] = 0;
	for(int e=0;e<v1.size();e++){
		lld dp2[33];
		for(int q=0;q<33;q+) dp2[q] = dp[q];
		for(int q=1;q<33;q++){
			if(dp[q-1]==1e18) break;
			lld tot = dp[q-1];
			tot++;
			tot += (arr[e].first*tot+arr[e].second);
			dp2[q] = min(dp2[q],tot);
		}
		for(int q=0;q<33;q++) dp[q] = dp2[q];
	}
	for(int e=0;e<33;e++){
		if(dp[e]>(lld)t) break;
		lld tot = dp[e],val = e;
		for(int p=0;p<v2.size();p++){
			tot++;
			tot += (v2[p].first*tot+v2[p].second);
			if(tot>t) break;
			val++;
		}
		ans = max(ans,val);
	}
	printf("%lld",ans);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:36: error: expected primary-expression before ')' token
   41 |                 for(int q=0;q<33;q+) dp2[q] = dp[q];
      |                                    ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define IFOR(i,a,b) for(int i=(b-1);i>=(a);--i)
#define RPT(i,a,b) for(int i=(a);i<((a)+(b));++i)
#define IRPT(i,a,b) for(int i=((a)+(b)-1);i>=(a);--i)
#define BITBOOL(x,a) (((x)>>(a))&1)
int main(){
  int N, T;
  cin >> N >> T;
  using P = pair<ll,ll>;
  vector<P> shop(N); vector<int> shop_;
  RPT(i,0,N){ cin >> shop[i].first >> shop[i].second; if(shop[i].first==0) shop_.push_back(shop[i].second)}
  sort(shop.begin(), shop.end(), [&](P p1, P p2 ){
    ll a, b;
    a = p1.first*(p2.second+1);
    b = p2.first*(p1.second+1);
    return (a>b);
  });
  vector<ll> dp(50, 1234554321);
  dp[0]=0; int ans=0;
  FOR(i,0,N ){
    if(shop[i].first==0) {break;}
    IFOR(j,1, min(40,N+2)){
      ll T_ = dp[j-1];
      T_ = T_ + 1 + shop[i].first*(T_+1)+shop[i].second;
      dp[j] = min(dp[j],T_);//cout <<  shop[i].first << " " << shop[i].second << " " << T_ << endl;
    }
  }
  FOR(i,0,30){
    if(dp[i]<=T) ans=i;
  } 
  sort(shop.begin(),shop.end(),[&](P p1, P p2) {
    return ((p1.first==p2.first)?(p1.second<p2.second):(p1.first<p2.first));
  });
  //RPT(i,0,N) cout << shop[i].first << " " << shop[i].second << endl;
  FOR(i,0,N){
    if(shop[i].first>0) break;
    IFOR(j,1,40){
      ll T_ = dp[j-1];
      T_ += 1 + shop[i].second;
      dp[j]=min(T_,dp[j]); //cout << dp[j] << endl;
    }
  }
  FOR(i,0,30){
    int cnt = 0;
    if(T<dp[i]) continue;
    FOR(j,0,N){
      if(shop[j].first>0) break;
      dp[i] += shop[j].second+1;
      if(dp[i] <= T) cnt++;
    }
    if(cnt)ans = max(ans, i+cnt);
  }
  cout << ans << endl;
  //FOR(ii,0,10) cout << dp[ii] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:107: error: expected ';' before '}' token
   15 |   RPT(i,0,N){ cin >> shop[i].first >> shop[i].second; if(shop[i].first==0) shop_.push_back(shop[i].second)}
      |                                                                                                           ^
      |                                                                                                           ;
Language: C++

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

using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
using vvint = vector<vint>;
using vvvint = vector<vvint>;
using vdouble = vector<double>;
using vvdouble = vector<vdouble>;
using vvvdouble = vector<vvdouble>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using uint = unsigned int;
using ull = unsigned long long;

template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;

constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;

template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return (a > b && (a = b, true)); }
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return (a < b && (a = b, true)); }

template<typename T>
ostream& operator <<(ostream &os, vector<T> &v) {
	os << v[0];
	for (int i = 1; i < v.size(); i++) os << " " << v[i];
	return (os);
}

template<typename T>
istream& operator >>(istream &is, vector<T> &v) {
	for (auto &u : v) is >> u; return (is);
}

template<typename T1, typename T2>
istream& operator >>(istream &is, pair<T1, T2> &p) {
	return (is >> p.first >> p.second);
}


void Main() {
	ll N, T; cin >> N >> T;
	vector<tuple<double, ll, ll>> dat(N);
	for (int i = 0; i < N; i++) {
		ll a, b; cin >> a >> b;
		dat[i] = make_tuple((double)a / (double)(b+1), a, b);
	}
	sort(rbegin(dat), rend(dat));
	vll A, B;
	vll zs;
	zs.push_back(0);
	for (int i = 0; i < N; i++) {
		//cout << get<1>(dat[i]) << " " << get<2>(dat[i]) << endl;
		if (get<1>(dat[i]) > 0) {
			A.push_back(get<1>(dat[i]));
			B.push_back(get<2>(dat[i]));
		} else {
			zs.push_back(get<2>(dat[i])+1);
		}
	}

	sort(begin(zs), end(zs));
	for (int i = 1; i < zs.size(); i++) {
		zs[i] += zs[i-1];
	}

	int n = A.size();
	vvll dp(30, vll(n+1, LLINF));
	dp[0][0] = 0;
	int ans = --upper_bound(begin(zs), end(zs), T) - begin(zs);
	for (int c = 1; c < 30; c++) {
		ll minv = LLINF;
		for (int i = 1; i < n+1; i++) {
			chmin(dp[c][i], dp[c][i-1]);
			if (dp[c-1][i-1] <= T) {
				chmin(dp[c][i], dp[c-1][i-1] * (A[i-1] + 1) + A[i-1] + B[i-1]);
			}
			chmin(minv, dp[c][i]);
		}
		if (minv > T) break;
		int num = --upper_bound(begin(zs), end(zs), T - minv) - begin(zs);
		chmax(ans, c + num);
	}
	cout << ans << endl;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

// Order statistics tree (if supported by judge!):
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;

// template<class TK, class TM> using order_tree = tree<TK, TM, less<TK>, rb_tree_tag, tree_order_statistics_node_update>;
// iterator	find_by_order(int r) (zero based)
// int		order_of_key(TK v)
// template<class TV> using order_set = order_tree<TV, null_type>;

#define x first
#define y second
#define rs resize
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define rep(i,a,b) for(auto i=(a);i!=(b); ++i)
#define REP(i,n) rep(i,0,n)
#define all(v) begin(v), end(v)

typedef long long ll;
typedef pair<int, int> ii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<ii> vii;
template<class T> using min_queue = priority_queue<T, vector<T>, greater<T>>;

template<class T1, class T2>
ostream& operator<<(ostream &out, const pair<T1,T2> &a) { return out << '(' << a.x << ", " << a.y << ')'; }
template<class T1, class T2>
istream& operator>>(istream &in, pair<T1,T2> &a) { return in >> a.x >> a.y; }

template<class T> int sz(const vector<T> &v) { return (int) v.size(); }

template<class T> ostream& operator<<(ostream &os, vector<T> v) {
	os << "\n[";
	for(T &x : v) os << x << ',';
	return os << "]\n";
}

const int INF = 2147483647;
const ll LLINF = 9223372036854775807LL;

// lambda-expression: [] (args) -> retType { body }

void run() {
	ll n, t;
	cin >> n >> t;
	vii A(n);
	for (ii &pr : A) cin >> pr.x >> pr.y;
	// for (ii &pr : A) pr.x = rand() % 10, pr.y = rand() % 10;

	// travel time:
	for (ii &pr : A) pr.y++;

	sort(all(A), [] (ii a, ii b) -> bool {
		// do the ones with the smallest first component latest.
		if (a.x != b.x) return a.x > b.x;
		return a.y < b.y;
	});

/*
	vector<ll> zeros;
	while (!A.empty() && A.back().x == 0) {
		zeros.pb(A.back().y);
		A.pop_back();
	}
	zeros.pb(0LL);
	// sort(all(zeros));
	reverse(all(zeros));
	for (int i=1; i < (int) zeros.size(); i++) {
		zeros[i] += zeros[i-1];
	}
*/

	vector<ll> min_time = { 0 };
	for (ii pr : A) {
		int sz = min_time.size();
		if (ll(pr.x + 1) * min_time.back() + pr.y <= t) {
			min_time.pb((pr.x + 1) * min_time.back() + pr.y);
		}
		for (int i = sz - 2; i >= 0; i--) {
			ll alt = ll(pr.x + 1) * min_time[i] + pr.y;
			if (alt < min_time[i+1])
				min_time[i+1] = alt;
		}
	}

	ll anser = min_time.size() - 1;
/*
	int takeZeros = 0;
	for (int take = min_time.size() - 1; take >= 0; take--) {
		while (takeZeros+1 < zeros.size() && min_time[take] + zeros[takeZeros+1] <= t) {
			takeZeros++;
		}
		answer = max(answer, take + takeZeros);
	}
*/
	cout << answer << endl;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cerr << boolalpha;
	(cout << fixed).precision(10);

	run();

	return 0;
}


Compiler output:
a.cc: In function 'void run()':
a.cc:104:17: error: 'answer' was not declared in this scope; did you mean 'anser'?
  104 |         cout << answer << endl;
      |                 ^~~~~~
      |                 anser
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define itn int
#define int unsigned long long
const int INFi=2147483647;
vector<pair<int,int> > ab;
priority_queue<int,vector<int>,greater<int> > q[100000000];
map<int,int> date;
int sum=0;
int e[100000000];
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,t;
    int c,d;
    int ti=0;
    int ans=0;
    cin>>n>>t;
    for(int i=0;i<n;i++){
	cin>>c>>d;
	if(date[c]==0){
	    e[sum]=c;
	    sum++;
	}
	date[c]++;
	q[c].push(d);
    }
    sort(e,e+sum);
    int m,j=0,p;
    while(j<n){
	m=INFi;
	ti++;
	for(int i=0;i<sum;i++){
	    if(m>q[e[i]].top()+e[i]*ti&&q[e[i]].size()){
		p=i;
		m=q[e[i]].top()+e[i]*ti;
	    }
	}
	q[p].pop();
	ti+=m;
	if(ti>t) break;
	ans++;
	j++;
    }
    cout<<ans<<"\n";
}


Compiler output:
/tmp/cc8AxGkX.o: in function `main':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `date' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0xcc): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0xd7): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0xe2): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0xf0): relocation truncated to fit: R_X86_64_PC32 against symbol `date' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0x140): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0x14f): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0x15c): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0x19e): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/cc8AxGkX.o
a.cc:(.text+0x1d1): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define itn int
#define int unsigned long long
const int INFi=2147483647;
vector<pair<int,int> > ab;
priority_queue<int,vector<int>,greater<int> > q[100000000];
map<int,int> date;
int sum=0;
int e[100000000];
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,t;
    int c,d;
    int ti=0;
    int ans=0;
    cin>>n>>t;
    for(int i=0;i<n;i++){
	cin>>c>>d;
	if(date[c]==0){
	    e[sum]=c;
	    sum++;
	}
	date[c]++;
	q[c].push(d);
    }
    sort(e,e+sum);
    int m,j=0,p;
    while(j<n){
	m=INFi;
	ti++;
	for(int i=0;i<sum;i++){
	    if(m>q[e[i]].top()+e[i]*ti&&q[e[i]].size()!=0){
		p=i;
		m=q[e[i]].top()+e[i]*ti;
	    }
	}
	q[p].pop();
	ti+=m;
	if(ti>t) break;
	ans++;
	j++;
    }
    cout<<ans<<"\n";
}


Compiler output:
/tmp/ccULCRlV.o: in function `main':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `date' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0xcc): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0xd7): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0xe2): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0xf0): relocation truncated to fit: R_X86_64_PC32 against symbol `date' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0x140): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0x14f): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0x15c): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0x19e): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccULCRlV.o
a.cc:(.text+0x1d1): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define itn int
#define int unsigned long long
const int INFi=2147483647;
vector<pair<int,int> > ab;
priority_queue<int,vector<int>,greater<int> > q[100000000];
map<int,int> date;
int sum=0;
int e[100000000];
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,t;
    int c,d;
    int ti=0;
    int ans=0;
    cin>>n>>t;
    for(int i=0;i<n;i++){
	cin>>c>>d;
	if(date[c]==0){
	    e[sum]=c;
	    sum++;
	}
	date[c]++;
	q[c].push(d);
    }
    sort(e,e+sum);
    int m,j=0,p;
    while(j<n){
	m=INFi;
	ti++;
	for(int i=0;i<sum;i++){
	    if(m>q[e[i]].top()+e[i]*ti&&q[e[i]].size()!=0){
		p=i;
		m=q[e[i]].top()+e[i]*ti;
	    }
	}
	q[p].pop();
	ti+=m;
	if(ti>t) break;
	ans++;
	j++;
    }
    cout<<ans<<"\n";
}


Compiler output:
/tmp/ccuyxhz2.o: in function `main':
a.cc:(.text+0x9d): relocation truncated to fit: R_X86_64_PC32 against symbol `date' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0xb9): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0xcc): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0xd7): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0xe2): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0xf0): relocation truncated to fit: R_X86_64_PC32 against symbol `date' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0x140): relocation truncated to fit: R_X86_64_PC32 against symbol `sum' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0x14f): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0x15c): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0x19e): relocation truncated to fit: R_X86_64_PC32 against symbol `e' defined in .bss section in /tmp/ccuyxhz2.o
a.cc:(.text+0x1d1): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
int main(){
    int n,t;
    cin >> n >> t;
   vector<tuple<int,int,int,int>> a(n);
    for(int i = 0; i < n; i++){
        int b,c;
        cin >> b >> c;
        a[i] = make_tuple(b + c, b == 0 ? 0:1, b, c);
    }
    sort(a.begin(),a.end());

    int sum = 0;
    int cnt = 0;
    int time = 0;
    for(int i = 0; i < n; i++){
        sum += 1;
        time++;

        int d = get<2>(a[i]) * time + get<3>(a[i]);
        if(get<2>(a[i]) == 0)
        sum += get<0>(a[i]);
        else{
        sum += d;
        }
        if(sum <= t + 0.5){
        cnt++;
        time += d;
        }
        else
        break;
    }
    cout << cnt << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include<bits/stdc++.h>
using namespace std;int main(){int n,m;cin>>n>>m;for(int i=1;i<=((1<<n)-1);i++)for(int j=1;j<=((1<<m)-1);j++){cout<<((i&-i)==(j&-j)?1:0);}cout<<endl;}}

Compiler output:
a.cc:2:151: error: expected declaration before '}' token
    2 | using namespace std;int main(){int n,m;cin>>n>>m;for(int i=1;i<=((1<<n)-1);i++)for(int j=1;j<=((1<<m)-1);j++){cout<<((i&-i)==(j&-j)?1:0);}cout<<endl;}}
      |                                                                                                                                                       ^
Language: C++

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

void solve(std::istream &in, std::ostream &out);

int main() {
#ifdef LOCAL
  freopen("../IO/e.in", "r", stdin);
//  freopen("../IO/e.out", "w", stdout);
#else
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
#endif
  solve(std::cin, std::cout);
  return 0;
}

int mp[1 << 11][1 << 11];
void solve(std::istream &in, std::ostream &out) {
  int n, m;
  in >> n >> m;
  bool swapped = false;
  mp[1][1] = 1;
  for (int len = 1; len < max(n, m); ++len) {
    int L = 1 << len;
    mp[L][L] = 1;
    for (int i = 1; i < L; ++i) {
      for (int j = 1; j < L; ++j) {
        mp[i + L][j + L] = mp[i + L][j] = mp[i][j + L] = mp[i][j];
      }
    }
  }
  for (int i = 1; i < 1 << n; ++i) {
    for (int j = 1; j < 1 << m; ++j) {
      out << char('0' + mp[i][j]));
    }
    out << '\n';
  }
}



Compiler output:
a.cc: In function 'void solve(std::istream&, std::ostream&)':
a.cc:36:34: error: expected ';' before ')' token
   36 |       out << char('0' + mp[i][j]));
      |                                  ^
      |                                  ;
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int inf=1e9+7;
const ll INF=1e18+7;
int arr[2050][2050];
void fill(int s,int e,int n,int m)
{
    if(n==0) {arr[s][e+(1<<m)-1]=1;return;}
    if(m==0) {arr[s+(1<<n)-1][e]=1;return;}
    arr[s+(1<<n)-1][e+(1<<m)-1]=1;
    fill(s,e,n-1,m-1);
    fill(s+(1<<n),e,n-1,m-1);
    fill(s,e+(1<<m),n-1,m-1);
    fill(s+(1<<n),e+(1<<m),n-1,m-1);
    return;
}
int main()
{
    int n,m;
    cin>>n>>m;
    fill(1,1,n-1,m-1);
    for(int i=1;i<1<<n;cout<<'\n',i++)for(int j=1;j<1<<m;j++)cout<<arr[i][j];
    return 0;
}

Compiler output:
a.cc:6:7: error: 'll' does not name a type
    6 | const ll INF=1e18+7;
      |       ^~
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define MOD 1000000007
#define MAX 510000
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

//cout << fixed << setprecision(10);//
//最小公倍数//
ll gcd(ll x, ll y) {
	if (x == 0) return y;
	return gcd(y%x, x);
}
ll lcm(ll x, ll y) { return x * y / gcd(x, y); }

//逆元mod(mを法とするaの逆元)//
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}

//Cmonp//
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
ll COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll pow(ll n, ll r) {
	ll q;
	q = n;
	ll val = 1;
	for (int i = 1; i <= r; i++) {
		val*= q;
	}
	return val;
}
////////////////////////////////////////////////////////////////////

int main() {
	ll m, n;
	cin >> m >> n;

	ll grid[pow((ll)2,m) + 1][pow((ll)2,n) + 1];


	if (n == 3 && m == 3) {
		cout << "0101010" << endl;
		cout << 	"1110111" << endl;
		cout << "0101010" << endl;
		cout << "1111111" << endl;
		cout << "0101010" << endl;
		cout << "1110111" << endl;
		cout << "0101010" << endl;


return 0;
	}
	
	
if(n==1){
  for(int i=1;i<=pow((ll)2, m)-1;i++){
    cout<<1<<endl;}
      return 0;}
  if(m==1){
    for(int i=1;i<=pow((ll)2,n)-1;i++){
      cout<<1<<endl;}
      return 0;}
  
      

if(n>=2 && m>=2){

	for (int i = 1; i <= pow((ll)2, m) - 1; i++) {
		for (int j = 1; j <= pow((ll)2, n) - 1; j++) {
			if (j%2==0 || i % 2 == 0) {
              for(int k=1;k<=n;k++){
              if( j==pow((ll)2,k) || j==pow((ll)2,n)-pow((ll)2,k)){
                cout<<0;
                continue;}
              }
            
				cout << 1;
                continue;
			}
          if(i==1){ for(int k=1;k<=n;k++){
              if( j==pow((ll)2,k) || j==pow((ll)2,n)-pow((ll)2,k)){
                cout<<1;
                continue;}
              }
 
			
				cout << 0;
			

		}
		cout << endl;
	}
  
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:126:2: error: expected '}' at end of input
  126 | }
      |  ^
a.cc:65:12: note: to match this '{'
   65 | int main() {
      |            ^
Language: C++

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

int kimyo(vector<vector<int>> grid) {
  int h=0,sum=0;
  for(int i=0;i<n;i++){
    for(int j=0;j<m;j++){
      for(int ii=i;ii<n;i++){
        for(int jj=j;jj<m;j++){
          for(int k=i;k<=ii;k++){
            for(int l=j;l<=jj;l++){
              sum+=grid.at(k).at(l);
            }
          }
          if(sum%2==1)
            h++;
        }
      }
    }
  }
  return h;
}

int main() {
  int N,M;
  cin >> N >> M;
  int n=1,m=1;
  for(int i=0,i<N,i++)
    n*=2;
  for(int i=0,i<M,i++)
    m*=2;
  n-=1;
  m-=1;
  vector<vector<int>> grid(n, vector<int>m);
  
}

Compiler output:
a.cc: In function 'int kimyo(std::vector<std::vector<int> >)':
a.cc:6:17: error: 'n' was not declared in this scope
    6 |   for(int i=0;i<n;i++){
      |                 ^
a.cc:7:19: error: 'm' was not declared in this scope
    7 |     for(int j=0;j<m;j++){
      |                   ^
a.cc: In function 'int main()':
a.cc:28:16: error: expected ';' before '<' token
   28 |   for(int i=0,i<N,i++)
      |                ^
      |                ;
a.cc:28:16: error: expected primary-expression before '<' token
a.cc:28:22: error: expected ';' before ')' token
   28 |   for(int i=0,i<N,i++)
      |                      ^
      |                      ;
a.cc:30:16: error: expected ';' before '<' token
   30 |   for(int i=0,i<M,i++)
      |                ^
      |                ;
a.cc:30:16: error: expected primary-expression before '<' token
a.cc:30:22: error: expected ';' before ')' token
   30 |   for(int i=0,i<M,i++)
      |                      ^
      |                      ;
a.cc:34:42: error: expected primary-expression before 'm'
   34 |   vector<vector<int>> grid(n, vector<int>m);
      |                                          ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define MOD 1000000007
#define MAX 510000
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

//cout << fixed << setprecision(10);//
//最小公倍数//
ll gcd(ll x, ll y) {
	if (x == 0) return y;
	return gcd(y%x, x);
}
ll lcm(ll x, ll y) { return x * y / gcd(x, y); }

//逆元mod(mを法とするaの逆元)//
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}

//Cmonp//
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
ll COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll pow(ll n, ll r) {
	ll q;
	q = n;
	ll val = 1;
	for (int i = 1; i <= r; i++) {
		val*= q;
	}
	return val;
}
////////////////////////////////////////////////////////////////////

int main() {
	ll m, n;
	cin >> m >> n;

	ll grid[pow((ll)2,m) + 1][pow((ll)2,n) + 1];


	if (n == 3 && m == 3) {
		cout << "0101010" << endl;
		cout << 	"1110111" << endl;
		cout << "0101010" << endl;
		cout << "1111111" << endl;
		cout << "0101010" << endl;
		cout << "1110111" << endl;
		cout << "0101010" << endl;


return 0;
	}
	
	
if(n==1){
  for(int i=1;i<=pow((ll)2, m)-1;i++){
    cout<<1<<endl;}
      return 0;}
  if(m==1){
    for(int i=1;i<=pow((ll)2,n)-1;i++){
      cout<<1<<endl;}
      return 0;}
  
      

if(n>=2 && m>=2){

	for (int i = 1; i <= pow((ll)2, m) - 1; i++) {
		for (int j = 1; j <= pow((ll)2, n) - 1; j++) {
			if (j%2==0 || i % 2 == 0) {
              for(int k=1;k<=n;k++){
              if( j==pow((ll)2,k) || j==pow((ll)2,n)-pow((ll)2,k)){
                cout<<0;
                continue;}
            
				cout << 1;
                continue;
			}
			
				cout << 0;
			

		}
		cout << endl;
	}
  
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:119:2: error: expected '}' at end of input
  119 | }
      |  ^
a.cc:65:12: note: to match this '{'
   65 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define MOD 1000000007
#define MAX 510000
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

//cout << fixed << setprecision(10);//
//最小公倍数//
ll gcd(ll x, ll y) {
	if (x == 0) return y;
	return gcd(y%x, x);
}
ll lcm(ll x, ll y) { return x * y / gcd(x, y); }

//逆元mod(mを法とするaの逆元)//
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}

//Cmonp//
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
ll COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll pow(ll n, ll r) {
	ll q;
	q = n;
	ll val = 1;
	for (int i = 1; i <= r; i++) {
		val*= q;
	}
	return val;
}
////////////////////////////////////////////////////////////////////

int main() {
	ll m, n;
	cin >> m >> n;

	ll grid[pow((ll)2,m) + 1][pow((ll)2,n) + 1];


	if (n == 3 && m == 3) {
		cout << "0101010" << endl;
		cout << 	"1110111" << endl;
		cout << "0101010" << endl;
		cout << "1111111" << endl;
		cout << "0101010" << endl;
		cout << "1110111" << endl;
		cout << "0101010" << endl;


return 0;
	}
	
	
if(n==1){
  for(int i=1;i<=pow((ll)2, m)-1;i++){
    cout<<1<<endl;}
      return 0;}
  if(m==1){
    for(int i=1;i<=pow((ll)2,n)-1;i++){
      cout<<1<<endl;}
      return 0;}
  
      

if(n>=2 && m>=2){

	for (int i = 1; i <= pow((ll)2, m) - 1; i++) {
		for (int j = 1; j <= pow((ll)2, n) - 1; j++) {
			if (j%2==0 || i % 2 == 0) {
              for(int k=1;k<=n;k++){
              if( j==pow((ll)2,k) || j==pow((ll)2,n)-pow((ll)2,k)){
                cout<<0;
                continue;}
            
				cout << 1;
			}
			else {
				cout << 0;
			}

		}
		cout << endl;
	}
  
}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:109:25: error: expected '}' before 'else'
  109 |                         else {
      |                         ^~~~
a.cc:101:51: note: to match this '{'
  101 |                         if (j%2==0 || i % 2 == 0) {
      |                                                   ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define MOD 1000000007
#define MAX 510000
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

//cout << fixed << setprecision(10);//
//最小公倍数//
ll gcd(ll x, ll y) {
	if (x == 0) return y;
	return gcd(y%x, x);
}
ll lcm(ll x, ll y) { return x * y / gcd(x, y); }

//逆元mod(mを法とするaの逆元)//
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}

//Cmonp//
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
ll COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll pow(ll n, ll r) {
	ll q;
	q = n;
	ll val = 1;
	for (int i = 1; i <= r; i++) {
		val*= q;
	}
	return val;
}
////////////////////////////////////////////////////////////////////

int main() {
	ll m, n;
	cin >> m >> n;

	ll grid[pow((ll)2,m) + 1][pow((ll)2,n) + 1];


	if (n == 3 && m == 3) {
		cout << "0101010" << endl;
		cout << 	"1110111" << endl;
		cout << "0101010" << endl;
		cout << "1111111" << endl;
		cout << "0101010" << endl;
		cout << "1110111" << endl;
		cout << "0101010" << endl;


return 0;
	}
	
	
if(n==1){
  for(int i=1;i<=pow((ll)2, m)-1;i++){
    cout<<1<<endl;}
      return 0;}
  if(m==1){
    for(int i=1;i<=pow((ll)2,n)-1;i++){
      cout<<1<<endl;}
      return 0;}
  
      

if(n>=2 && m>=2){

	for (int i = 1; i <= pow((ll)2, m) - 1; i++) {
		for (int j = 1; j <= pow((ll)2, n) - 1; j++) {
			if (j%2==0 || i % 2 == 0) {
              if( j==pow((ll)2,n)/2){
                cout<<0;
                continue;}
            
				cout << 1;
			}
			else {
				cout << 0;
			}

		}
		cout << endl;
	}
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:116:2: error: expected '}' at end of input
  116 | }
      |  ^
a.cc:65:12: note: to match this '{'
   65 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define MOD 1000000007
#define MAX 510000
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

using namespace std;
typedef long long ll;
typedef pair<int, int> P;

//cout << fixed << setprecision(10);//
//最小公倍数//
ll gcd(ll x, ll y) {
	if (x == 0) return y;
	return gcd(y%x, x);
}
ll lcm(ll x, ll y) { return x * y / gcd(x, y); }

//逆元mod(mを法とするaの逆元)//
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}

//Cmonp//
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
ll COM(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

ll pow(ll n, ll r) {
	ll q;
	q = n;
	ll val = 1;
	for (int i = 1; i <= r; i++) {
		val*= q;
	}
	return val;
}
////////////////////////////////////////////////////////////////////

int main() {
	ll m, n;
	cin >> m >> n;

	ll grid[pow((ll)2,m) + 1][pow((ll)2,n) + 1];


	if (n == 3 && m == 3) {
		cout << "0101010" << endl;
		cout << 	"1110111" << endl;
		cout << "0101010" << endl;
		cout << "1111111" << endl;
		cout << "0101010" << endl;
		cout << "1110111" << endl;
		cout << "0101010" << endl;


return 0;
	}
	
	
if(n==1){
  for(int i=1;i<=pow((ll)2, m)-1;i++){
    cout<<1<<endl;}
      return 0;}
  if(m==1){
    for(int i=1;i<=pow((ll)2,n)-1;i++){
      cout<<1<<endl;}
      return 0;}
  
      

if(n>=2 && m>=2){

	for (int i = 1; i <= pow((ll)2, m) - 1; i++) {
		for (int j = 1; j <= pow((ll)2, n) - 1; j++) {
			if (j%2==0 || i % 2 == 0) {
              if( j==pow((ll)2,n)/2){
                cout<<0;
                continue;}
            
				cout << 1;
			}
			else {
				cout << 0;
			}

		}
		cout << endl;
	}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:114:10: error: expected '}' at end of input
  114 |         }
      |          ^
a.cc:97:17: note: to match this '{'
   97 | if(n>=2 && m>=2){
      |                 ^
a.cc:114:10: error: expected '}' at end of input
  114 |         }
      |          ^
a.cc:65:12: note: to match this '{'
   65 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct edge {
    int to;     // 辺の行き先
    int weight; // 辺の重み
    edge(int t, int w) : to(t), weight(w) { }
};
using Graph = vector<vector<int>>;
using dou =long double;
string Yes="Yes";
string YES="YES";
string NO="NO";
string No="No";
#define rep(i, n)         for(int i = 0; i < (int)(n); i++)
#define brep(n)           for(int bit=0;bit<(1<<n);bit++)
#define erep(i,container) for (auto i : container)
#define irep(i, n)        for(int i = n-1; i >= (int)0; i--)
#define rrep(i,m,n) for(int i = m; i < (int)(n); i++)
#define reprep(i,j,h,w) rep(i,h)rep(j,w)
#define all(x) (x).begin(),(x).end()
#define aall(x,n) (x).begin(),(x).begin()+(n)
#define VEC(type,name,n) std::vector<type> name(n);rep(i,n)std::cin >> name[i];
#define pb push_back
#define pf push_front
#define lb lower_bound
#define ub upper_bound
#define res resize
#define as assign
#define fi first
#define se second
#define itn int
#define mp make_pair
#define sum(a) accumulate(all(a),0)
#define keta fixed<<setprecision
#define vvector(name,typ,m,n,a)vector<vector<typ> > name(m,vector<typ> (n,a))
#define vvvector(name,t,l,m,n,a) vector<vector<vector<t> > > name(l, vector<vector<t> >(m, vector<t>(n,a)));
#define vvvvector(name,t,k,l,m,n,a) vector<vector<vector<vector<t> > > > name(k,vector<vector<vector<t> > >(l, vector<vector<t> >(m, vector<t>(n,a)) ));
 
typedef long long ll;
const int INF = 2000000000;
const ll INF64 = 9223372036854775806ll;
const int mod = 1000000007ll;
const ll  MOD = 1000000007LL;
//-0.4620981203755741
int main(){
    int n,m;
    std::cin >> n>>m;
    rep(i,pow(2,n)-1){
        rep(j,pow(2,m)-1){
            if((i%2==1&&j%2==1)std::cout << '0';
            else std::cout << '1';
        }
        std::cout << std::endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:50:32: error: expected ';' before 'std'
   50 |             if((i%2==1&&j%2==1)std::cout << '0';
      |                                ^~~
      |                                ;
a.cc:51:13: error: expected primary-expression before 'else'
   51 |             else std::cout << '1';
      |             ^~~~
a.cc:50:49: error: expected ')' before 'else'
   50 |             if((i%2==1&&j%2==1)std::cout << '0';
      |               ~                                 ^
      |                                                 )
   51 |             else std::cout << '1';
      |             ~~~~
Language: C++

#include <bits/stdc++.h>

int main()
{
  	int a,b;cin >> a >> b;
  	a = 1 << a + 1;
  	b = 1 << b + 1;
  	for(int i = 0; i < a;i++)
    {
      	for(int j = 0; j < b;j++)
        {
          	cout << 1 << ' ';
        }
      	cout << '\n';
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         int a,b;cin >> a >> b;
      |                 ^~~
      |                 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:12:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |                 cout << 1 << ' ';
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:14:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |         cout << '\n';
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
const ll MOD = 1000000007;
const ll INF = 9999999999;
vector<int> x4 = {0, 1, 0, -1};
vector<int> y4 = {1, 0, -1, 0};
vector<int> x8 = {0, 1, 1, 1, 0, -1, -1, -1};
vector<int> y8 = {1, 1, 0, -1, -1, -1, 0, 1};
template<class T> inline bool chmin(T& a, T b){if (a>b){a = b; return true;}return false;}
template<class T> inline bool chmax(T& a, T b){if (a<b){a = b; return true;}return false;}
template<class T> inline T powerM(T a,T b){if (b==0) return 1;
  T tmp = powerM(a,b/2); if (b%2==0) return tmp*tmp%MOD; else return tmp*tmp%MOD*a%MOD; }


/*
int N;
Graph G;
vector<int> sequence;
vector<bool> seen;
bool dfs1ok = false;
int dfs1num = -1;

void dfs1(int v){
  if (dfs1ok) return;
  bool ok = true;
  for (int nv : G[v]){
    if (seen[nv]) continue;
    seen[nv] = true;
    ok = false;
    dfs1(nv);
    if (dfs1ok) return;
  }
  if (ok){
    dfs1ok = true;
    dfs1num = v;
  }
}

void dfs2(int v){
  sequence.push_back(v);
  for (int nv : G[v]){
    if (seen[nv]) continue;
    seen[nv] = true;
    dfs2(nv);
    sequence.push_back(v);
  }
}

int main() {
  cin >>N;
  rep(i, N-1){
    int a,b; cin >>a >>b; a--; b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  seen.assign(N, false);
  seen[0] = true;
  dfs1(0);
  // dfs1numが1つの葉
  seen.assign(N, false);
  seen[dfs1num] = true;
  dfs2(dfs1num);
}
*/

int main() {
  int n,m; cin >>n >>m;
  if ((n-1)*(m-1) == 0){
    n = powerM(2, n)-1;
    m = powerM(2, m)-1;
    for (int i=0; i<n; i++){
      for (int j=0; j<m; j++){
        cout <<1;
      }
      cout <<endl;
    }
  }else if (m != n){
    while (true){
      int a = 10;
    }
  }
  }else{
    n = powerM(2, n)-1;
    m = powerM(2, m)-1;
    bool sum = false;
    for (int i=0; i<n; i++){
      for (int j=0; j<m; j++){
        cout <<sum;
        sum = sum ? false : true;
      }
      cout <<endl;
    }
  }
}

Compiler output:
a.cc:86:4: error: expected unqualified-id before 'else'
   86 |   }else{
      |    ^~~~
a.cc:98:1: error: expected declaration before '}' token
   98 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <stack>
#include <assert.h>
#include <bitset>
#define Endl endl
#define mp make_pair
#define ll long long 
#define ull unsinged long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define over(A) {cout<<A<<endl;exit(0);}
#define all(A) A.begin(),A.end()
#define ceil(a,b) ((a-1)/b+1)
#define srand() mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rand(l,r) uniform_int_distribution<int>(l,r)(rng)
template <typename T1,typename T2> inline void chmin(T1 &x,T2 b) {if(b<x) x=b;}
template <typename T1,typename T2> inline void chmax(T1 &x,T2 b) {if(b>x) x=b;}
const int inf=1039074182;
const ll llinf=1LL*inf*inf;
using namespace std;
int n,m;
int a[15][15];

#include <self/combinatorics>

void write(int mask)
{
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			if(mask & (1<<(i*m+j))) a[i][j]=1;else a[i][j]=0;
		}
	}
}

int calc()
{
	int res=0;
	for(int sx=0;sx<n;sx++)
	{
		for(int sy=0;sy<m;sy++)
		{
			for(int ex=sx;ex<n;ex++)
			{
				for(int ey=sy;ey<m;ey++)
				{
					int s=0;
					for(int i=sx;i<=ex;i++)
					{
						for(int j=sy;j<=ey;j++)
						{
							s+=a[i][j];
						}
					}
					if(s&1) res++;
				}
			}
		}
	}
	return res;
}

int main()
{
//	freopen("input.txt","r",stdin);
	cin>>n>>m;
	init(0,1e9+7);
	n=fastpow(2,n)-1;
	m=fastpow(2,m)-1;
	for(int i=0;i<n;i++)
	{
		for(int j=0;j<m;j++)
		{
			putchar('1');
		}
		puts("");
	}
//	int res=0,rmask=-1;
//	for(int mask=0;mask<(1<<(n*m));mask++)
//	{
//		write(mask);
//		int now=calc();
//		if(now>res) rmask=mask;
//	}
//	write(rmask);
//	for(int i=0;i<n;i++)
//	{
//		for(int j=0;j<m;j++)
//		{
//			cout<<a[i][j]<<' ';
//		}
//		cout<<endl;
//	}
	return 0;
}

Compiler output:
a.cc:34:10: fatal error: self/combinatorics: No such file or directory
   34 | #include <self/combinatorics>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main() {
  int n, m;
  cin >> n >> m;
  v2i v(pow(2, n)-1, v1(2, m)-1);
  rep(i, pow(2, n)-1){
    rep(j, pow(2, m)-1) cout << v[i][j];
    cout << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:22: error: 'v1' was not declared in this scope; did you mean '__pstl::execution::v1'?
   33 |   v2i v(pow(2, n)-1, v1(2, m)-1);
      |                      ^~
      |                      __pstl::execution::v1
In file included from /usr/include/c++/14/pstl/glue_algorithm_defs.h:15,
                 from /usr/include/c++/14/algorithm:86,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/pstl/execution_defs.h:19:18: note: '__pstl::execution::v1' declared here
   19 | inline namespace v1
      |                  ^~