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

#include <bits/stdc++.h>
#define deb(x)     cerr << (#x) << " : " << (x) << "\n"
#define ll long long int
#define ld long double
const ll MOD = 1e9 + 7;
const ll INF = 1e9;
using namespace std;

ll powmod(ll a, ll b, ll MOD = MOD){
	if(!a and !b)	return 1ll;
	if(!a)	return a;
	ll res = 1ll;
	b %= (MOD - 1ll), a %= MOD;
	while(b){
		if(b%2 == 1)	res = (res * a) % MOD;
		a = (a * a) % MOD;
		b /= 2;
	}
	return res;
}

ll dp[5010][5010];	

int main(){	

 
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	int n;
	cin >> n;

	pair<ll, ll> arr[n];
	for(int i = 0; i < n; i++){
		cin >> arr[i].first >> arr[i].second;
	}

	sort(arr, arr + n, [](pair<ll, ll> a, pair<ll, ll> b) -> bool {
		return (a.first + a.second) < (b.first + b.second);
	});

	for(int i = 0; i <= n; i++)	for(int j = 0; j <= n; j++)	dp[i][j] = INF;

	dp[0][1] = arr[0].second;
	dp[0][0] = 0;

	for(int i = 1; i < n; i++){
		dp[i][0] = 0;
		for(int j = 1; j <= (i + 1); j++){
			dp[i][j] = dp[i-1][j];
			if((dp[i-1][j-1]) <= arr[i].first){
				dp[i][j] = min(dp[i][j], dp[i-1][j-1] + arr[i].second);
			}
			cout << dp[i][j] << " ";
		}
		cout << 
	}

	for(int i = n; i >= 0; i--){
		if(dp[n-1][i] != INF){
			cout << i << "\n";
			return 0;
		}
	}

	cout << 0 << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:57:9: error: expected primary-expression before '}' token
   57 |         }
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector < pair < int , int >  > arr ;
bool visit [ 5001 ] ;
int main ( ){
    int n ;
    cin>>n;
    for ( int i = 0 ; i < n ; i++ ){
        int x , y ;
        cin>>x>>y;
        arr.push_back ( { x , y }  );
    }
    int resp = 0 ;
    int cont = 0 ;
    sort ( arr.begin ( ) , arr.end ( ) );
    while ( true ) {
        int cont1 = INT_MAX ;
        int pos = 0 ;
        for ( int d = 0 ; d < n ; d++ ){
            if ( arr [ d ].first < cont ) continue ;
            pair < int , int > aux  =  make_pair ( cont + arr [ d ].second , 0 ) ;
            int t = upper_bound ( arr.begin ( ) , arr.end ( ) , aux ) - arr.begin ( ) ;
            if ( cont + arr [ d ].second > arr [ d ].first ) t--;
            if ( t < cont1  ){
                cont1 = t ;
                pos = d ;
            }
        }

        if ( cont1 != INT_MAX ){
            resp++;
            cont += arr [ pos ].second ;
            arr [ pos ].first = -1 ;
            arr [ pos ].second = -1 ;
            visit [ pos ] = true ;
        }
        else break;
        sort ( arr.begin ( ) , arr.end ( ) ) ;
    }
    cout<<resp<<endl;
    return 0 ;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:13: error: reference to 'visit' is ambiguous
   35 |             visit [ pos ] = true ;
      |             ^~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:80,
                 from a.cc:1:
/usr/include/c++/14/variant:1855:5: note: candidates are: 'template<class _Visitor, class ... _Variants> constexpr std::__detail::__variant::__visit_result_t<_Visitor, _Variants ...> std::visit(_Visitor&&, _Variants&& ...)'
 1855 |     visit(_Visitor&& __visitor, _Variants&&... __variants)
      |     ^~~~~
a.cc:4:6: note:                 'bool visit [5001]'
    4 | bool visit [ 5001 ] ;
      |      ^~~~~
Language: C++

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

#define fi first
#define se second
#define FOR(a, b, c) for(int a = b; a <= c; ++a)
#define int long long

const int N = 1e5 + 10;

int n;
struct book {
    int h, p;
}t[N];

bool cmp(const book x, const book y)    {
    return (x.h + x.p) < (y.h + y.p);
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cin >> n;
    FOR(i, 1, n)    {
        cin >> t[i].h >> t[i].p;
    }
    sort(t + 1, t + n + 1, cmp);
    priority_queue<int> pq;
    int sum = 0ll;
    FOR(i, 1, n)    {
        sum += t[i].p;
        pq.push(t[i].p);
        while(!pq.empty() && sum > t[i].h) {
            sum -= pq.top();
            pq.pop();
        }
    }
    cout << pq.size();
}
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define FOR(a, b, c) for(int a = b; a <= c; ++a)
#define int long long

const int N = 1e5 + 10;

int n;
struct book {
    int h, p;
}t[N];

bool cmp(const book x, const book y)    {
    return (x.h + x.p) < (y.h + y.p);
}

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    cin >> n;
    FOR(i, 1, n)    {
        cin >> t[i].h >> t[i].p;
    }
    sort(t + 1, t + n + 1, cmp);
    priority_queue<int> pq;
    int sum = 0ll;
    FOR(i, 1, n)    {
        sum += t[i].p;
        pq.push(t[i].p);
        while(!pq.empty() && sum > t[i].h) {
            sum -= pq.top();
            pq.pop();
        }
    }
    cout << pq.size();
}


Compiler output:
a.cc:49:11: error: redefinition of 'const long long int N'
   49 | const int N = 1e5 + 10;
      |           ^
a.cc:9:11: note: 'const long long int N' previously defined here
    9 | const int N = 1e5 + 10;
      |           ^
a.cc:51:5: error: redefinition of 'long long int n'
   51 | int n;
      |     ^
a.cc:11:5: note: 'long long int n' previously declared here
   11 | int n;
      |     ^
a.cc:52:8: error: redefinition of 'struct book'
   52 | struct book {
      |        ^~~~
a.cc:12:8: note: previous definition of 'struct book'
   12 | struct book {
      |        ^~~~
a.cc:54:2: error: conflicting declaration 'int t [100010]'
   54 | }t[N];
      |  ^
a.cc:14:2: note: previous declaration as 'book t [100010]'
   14 | }t[N];
      |  ^
a.cc:56:6: error: redefinition of 'bool cmp(book, book)'
   56 | bool cmp(const book x, const book y)    {
      |      ^~~
a.cc:16:6: note: 'bool cmp(book, book)' previously defined here
   16 | bool cmp(const book x, const book y)    {
      |      ^~~
a.cc:60:8: error: redefinition of 'int main()'
   60 | signed main()
      |        ^~~~
a.cc:20:8: note: 'int main()' previously defined here
   20 | signed main()
      |        ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007; 
struct T {
	int H;
	int P;
	bool operator<(const T& right) const {
		return H + P < right.H + right.P;
	}
};
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	cin >> N;
	vector<T> t(N);
	int res = 0;
	for (int i = 0; i < N; i++) {
		cin >> t[i].H >> t[i].P;
	}
	sort(t.begin(), t.end());
	int p = 0;
	for (int i = 0; i < N; i++) {
		if (p <= H[i]) {
			res++;
			p += P[i];
		}
	}

	cout << res << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:26: error: 'H' was not declared in this scope
   34 |                 if (p <= H[i]) {
      |                          ^
a.cc:36:30: error: 'P' was not declared in this scope
   36 |                         p += P[i];
      |                              ^
Language: C++

#include <stdio.h>  
#include <algorithm>  
#include <assert.h>
#include <bitset>
#include <cmath>  
#include <complex>  
#include <deque>  
#include <functional>  
#include <iostream>  
#include <limits.h>  
#include <map>  
#include <math.h>  
#include <queue>  
#include <deque>
#include <set>  
#include <stdlib.h>  
#include <string.h>  
#include <string>  
#include <time.h>  
#include <unordered_map>  
#include <unordered_set>  
#include <vector>  
#include <chrono>
#include <random>
#include <time.h>
#include <fstream>
#define ll long long
#define rep2(i,a,b) for(ll i=a;i<=b;++i)
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep3(i,a,b) for(ll i=a;i>=b;i--)
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pq priority_queue<int>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb emplace_back
#define vec vector<int>
#define vecll vector<ll>
#define vecpii vector<pii>
#define endl "\n"
#define all(c) begin(c),end(c)
using namespace std;
int in() {int x;scanf("%d",&x);return x;}
ll lin() {ll x;scanf("%lld",&x);return x;}
void print(vec v){for(auto e:v)cout<<e<<" ";cout<<endl;}
void print(vecll v){for(auto e:v)cout<<e<<" ";cout<<endl;}
void print(map<int,int> mp){for(auto e:mp)cout<<e.first<<" "<<e.second<<endl;cout<<endl;}


const ll MOD=998244353;
const int N=510000;


main(){
    string s;cin>>s;
    int n=s.size();
    vec b;
    rep(i,n/2){
        b.pb((26+s[i]-s[n-1-i]));
        if(b.back()>=26)b.back()-=26;
    }
    vector<vec> p(n);
    int q=in();
    rep(i,q){
        int l=in(),r=in();
        if(r<=n/2){
            p[l-1].pb(r-1);
        }
        else if(l>n/2){
            p[n-r].pb(n-l);
        }
        else {
            r=n-r;
            p[r].pb(l-2);
        }
    }
    rep(i,n/2){
        if(p[i].size())
        sort(all(p[i]));
        rep(j,(int)p[i].size()-1){
            p[p[i][j]+1].pb(p[i][j+1]);
        }
    }
    vec rui(n);
    rep(i,n/2){
        // cout<<b[i]<<" "<<rui[i]<<endl;
        b[i]+=rui[i];
        b[i]%=26;
        if(b[i]){
            if(p[i].size()==0){
                cout<<"NO";return 0;
            }
            else{
                rui[i]+=26-b[i];
                rui[p[i][0]+1]-=26-b[i];
            }
        }
        rui[i+1]+=rui[i];
        if(rui[i+1]>=26)rui-=26;
    }
    cout<<"YES";return 0;
}

Compiler output:
a.cc:53:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   53 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:98:28: error: no match for 'operator-=' (operand types are 'std::vector<int>' and 'int')
   98 |         if(rui[i+1]>=26)rui-=26;
      |                         ~~~^~~~
Language: C++

#include <iostream>
using namespace std;

const int MAXN = 1e6+10;
char s[MAXN];
int a[MAXN],N,M;
struct node {
    int to,next;
}E[MAXN * 10];

int head[MAXN],sumE,sum;
bool vis[MAXN];
void add(int u,int v) {
    E[++sumE].to = v;
    E[sumE].next = head[u];
    head[u] = sumE;
}
#define read(x) scanf("%d",&x)
void Init() {
    scanf("%s",s + 1);
    N = strlen(s + 1);
    s[0] = 'a';s[N + 1] = 'a';
    for(int i = 1 ; i <= N + 1; ++i) a[i] = (s[i] - s[i - 1] + 26) % 26;
    read(M);
    int L,R;
    for(int i = 1 ; i <= M ; ++i) {
    read(L);read(R);
    add(L,R + 1);add(R + 1,L);
    }
    for(int i = 1 ; i <= N + 1 ; ++i) {
    add(i,N + 2 - i),add(N+2-i,i);
    }
}
void dfs(int u) {
    vis[u] = 1;
    sum = (sum + a[u]) % 26;
    for(int i = head[u] ; i ; i = E[i].next) {
    int v = E[i].to;
    if(!vis[v]) {
        dfs(v);
    }
    }
}
void Solve() {
    bool flag = 1;
    for(int i = 1 ; i <= N + 1 ; ++i) {
    if(!vis[i]) {
        sum = 0;
        dfs(i);
        if(sum != 0) {flag = 0;break;} 
    }
    }
    if(flag) puts("YES");
    else puts("NO");
}
int main() {
    Init();
    Solve();
    return 0;
}


Compiler output:
a.cc: In function 'void Init()':
a.cc:21:9: error: 'strlen' was not declared in this scope
   21 |     N = strlen(s + 1);
      |         ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <bits/stdc++.h>
#define L long long

using namespace std;

struct S{
	L s,e;
};

bool operator<(S a,S b){
	if(a.s!=b.s) return a.s<b.s;
	return a.e<b.e;
}

set<S>st;

char str[100010];
L b[100010];
L n,len;

L tr[400040];

void update(L now,L S,L E,L s,L e,L val){
	if(S>e||E<s) return;
	if(s<=S&&E<=e)
	{
		tr[now]+=val;
		return;
	}
	L mid=(S+E)/2;
	update(now*2,S,mid,s,e,val);
	update(now*2+1,mid+1,E,s,e,val);
}

L get(L now,L S,L E,L loc){
	if(S>loc||E<loc) return 0;
	if(S==E) return tr[now];
	L mid=(S+E)/2;
	return tr[now]+get(now*2,S,mid,loc)+get(now*2+1,mid+1,E,loc);
}

void E(L x){
	puts("NO");
	exit(0);
}

int main()
{
	scanf("%s %lld",str,&n);
	L i,j;
	for(i=0;str[i];i++);
	len=i;
	for(i=1;i<=n;i++)
	{
		L s,e;
		scanf("%lld %lld",&s,&e);
		if(s<=len/2)
		{
			if(e>len/2)
			{
				e=len-e;
				if(e<s)
				{
					s--;
					e++;
					swap(s,e);
					if(s>e) continue;
				}
			}
			if(len%2&&e==(len+1)/2) e--;
			if(s>e) continue;
		}
		else
		{
			s=len-s+1;
			e=len-e+1;
			swap(s,e);
		}
		st.insert((S){s,e});
	}
	for(i=1;i<=n;i++)
	{
		set<S>::iterator it=st.lower_bound((S){i,0});
		if(it==st.end()||->s!=i) continue;
		S range=*it;
		while(1)
		{
			set<S>::iterator it2=st.lower_bound((S){i,0});
			it2++;
			if(it2==st.end()||it2->s!=range.s) break;
			S etemp=*it2;
			st.insert((S){range.e+1,etemp.e});
			st.erase(etemp);
		}
	}
	for(i=1;i<=len;i++)
	{
		b[i]=str[i-1]-'a';
	}
	for(i=1;i<=len/2;i++)
	{
		b[i]-=b[len-i+1];
		if(b[i]<0) b[i]+=26;
	}
	len/=2;
	for(i=1;i<=len;i++)
	{
		update(1,1,len,i,i,b[i]);
	}
	for(i=1;i<=len;i++)
	{
		L temp=get(1,1,len,i)%26;
		if(temp)
		{
			while(!st.empty()&&st.begin()->s<i) st.erase(st.begin());
			if(st.empty()||st.begin()->s!=i) E(1);
			S range=*(st.begin());
			update(1,1,len,range.s,range.e,26-temp);
		}
	}
	puts("YES");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:34: error: expected primary-expression before '->' token
   84 |                 if(it==st.end()||->s!=i) continue;
      |                                  ^~
Language: C++

#include<bits/stdc++.h>

using namespace std;

int xor128(void)
{
  static int x = 123456789;
  static int y = 362436069;
  static int z = 521288629;
  static int w = 88675123;
  int t;

  t = x ^ (x << 11);
  x = y;
  y = z;
  z = w;
  return w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
}

template< typename T >
struct WeightedUnionFind
{
  int n;
  T d;
  vector< int > r, p;
  vector< T > ws;

  WeightedUnionFind() {}

  WeightedUnionFind(int sz, T d_) :
      n(sz), d(d_), r(n, 1), p(n), ws(n, d) { iota(p.begin(), p.end(), 0); }

  int find(int x)
  {
    if(x == p[x]) {
      return x;
    } else {
      int t = find(p[x]);
      (ws[x] += ws[p[x]]) %= 26;
      return p[x] = t;
    }
  }

  T weight(int x)
  {
    find(x);
    return ws[x];
  }

  bool same(int x, int y)
  {
    return find(x) == find(y);
  }

  void unite(int x, int y, T w)
  {
    w += weight(x);
    w -= weight(y);
    w += 26;
    w %= 26;
    x = find(x);
    y = find(y);
    if(x == y) return;
    if(r[x] < r[y]) swap(x, y), w = -w;
    w += 26;
    w %= 26;
    r[x] += r[y];
    p[y] = x;
    ws[y] = w;
  }

  T diff(int x, int y)
  {
    return (weight(y) - weight(x) + 26) % 26;
  }
};

template< class T >
struct BinaryIndexedTree
{
  vector< T > data;

  BinaryIndexedTree(int sz)
  {
    data.assign(++sz, 0);
  }

  T sum(int k)
  {
    T ret = 0;
    for(++k; k > 0; k -= k & -k) ret ^= data[k];
    return (ret);
  }

  void add(int k, T x)
  {
    for(++k; k < data.size(); k += k & -k) data[k] ^= x;
  }
};

int main()
{
  string S;
  cin >> S;
  int N;
  cin >> N;
  BinaryIndexedTree< int > bit(S.size() + 1);
  while(N--) {
    int x, y;
    cin >> x >> y;
    --x;
    int rd = xor128();
    bit.add(x, rd);
    bit.add(y, rd);
  }
  vector< int > vs;
  for(int i = 0; i < S.size(); i++) {
    vs.emplace_back(bit.sum(i));
  }
  sort(begin(vs), end(vs));
  vs.erase(unique(begin(vs), end(vs)), end(vs));
  vector< vector< int > > st(vs.size());
  map< int, int > ind;
  for(int i = 0; i < S.size(); i++) {
    int p = bit.sum(i);
    p = lower_bound(begin(vs), end(vs), p) - begin(vs);
    st[p].emplace_back(i);
    ind[i] = p;
  }

  WeightedUnionFind< int > uf(st.size(), 0);
  for(int i = 0; i < st.size(); i++) {

    for(auto &idx : st[i]) {
      int other = (int) S.size() - idx - 1p
      if(idx > other) continue;
      if(ind[other] == i) {
        if(S[other] != S[idx]) {
          cout << "NO" << endl;
          return (0);
        }
      } else {
        // S[other]-S[idx]=x
        if(!uf.same(i, ind[other])) {
          uf.unite(i, ind[other], (S[other] - S[idx] + 26) % 26);
        } else {
          int diff = uf.diff(i, ind[other]);
          int diff2 = (S[other] - S[idx] + 26) % 26;
          if(diff != diff2) {
            cout << "NO" << endl;
            return (0);
          }
        }
      }
    }

  }

  cout << "YES" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:135:42: error: unable to find numeric literal operator 'operator""p'
  135 |       int other = (int) S.size() - idx - 1p
      |                                          ^~
Language: C++

Perguruan Tinggi Bina Nusantara
Wahana 'tuk semaikan benih HARAPAN
MENDIDIK dan MEMBERDAYAKAN sesama
Membangun NUSA berkiprah untuk BANGSA

Berlambarkan KASIH, CITA dan KARSA
Dengan Rahmat TUHAN, berdasar PANCASILA
Menjunjung tinggi nilai KEJUJURAN
Menghidupi KEADILAN

BINUSIAN nyalakan api di dada
Rengkuh rasa hormat dan HARGAI sesama
TEKUN dan GIGIH raihlah yang terbaik
Kobarkan INOVASI di penjuru semesta

Bulatkan tekad dan niat bersama
Teguhkan langkah arungi zaman
Perguruan Tinggi Bina Nusantara
Wujudkan INDONESIA JAYA

Compiler output:
a.cc:2:8: warning: missing terminating ' character
    2 | Wahana 'tuk semaikan benih HARAPAN
      |        ^
a.cc:2:8: error: missing terminating ' character
    2 | Wahana 'tuk semaikan benih HARAPAN
      |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:1:1: error: 'Perguruan' does not name a type
    1 | Perguruan Tinggi Bina Nusantara
      | ^~~~~~~~~
Language: C++

#include"bits/stdc++.h"
using namespace std;
typedef long long LL;
const int N=1e6;
int mp[2000][50];
int main()
{
	int n=38;
	int cnt=0;
	printf("%d %d\n",n*n-n+1,n);
	mp[0][0]=++cnt;
	for(int i=0;i<n;i++)
		for(int j=1;j<n;j++){
			mp[i][j]=++cnt;
		}

	for(int i=0;i<n;i++)mp[i][0]=1;
	
	for(int j=2;j<=n;j++){
		int d=j-2;
		for(int i=1;i<n;i++){
			int y=i,x=(j-1)*(n-1)+i;
			mp[x][0]=j;
			
			for(int k=1;k<n;k++){
				int z=y%(n-1);
				if(z==0)z=n-1;
				mp[x][k]=mp[k][z];
				y+=d;
			}	
		}
	}
	
	for(int i=0;i<n*n-n+1;i++){
		for(int j=0;j<n-1;j++){
			printf("%d ",mp[i][j]);
		}
		printf("%d\n",mp[i][n-1]);
	}
		
	return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:41:17: error: expected ';' before '}' token
   41 |         return 0
      |                 ^
      |                 ;
   42 | }
      | ~
Language: C++

#include <iostream>
#include <cmath>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <cassert>
using namespace std;
int n,K,len;
vector<int>ans[2000];
bitset<2100>X[2100];
int main(){
	K=38; n=K*(K-1)+1; len=0;
	for (int i=1;i<=K;i++){
		len++;
		int l=(i-1)*(K-1)+1,r=i*(K-1);
		for (int j=l;j<=r;j++) ans[j].push_back(len);
		ans[n].push_back(len);
	}
	for (int i=1;i<=(K-1);i++)
		for (int j=1;j<=(K-1);j++){
			len++; ans[i].push_back(len);
			for (int k=2;k<=K;k++){
				int num=((k-2)*i+j-1)%(K-1)+1;
				int now=(k-1)*(K-1)+num;
				ans[now].push_back(len);
			}
		}
	printf("%d %d\n",n,K);
	for (int i=1;i<=n;i++){
		for (int j=0;j<ans[i].size();j++) cout<<ans[i][j]<<" "; cout<<endl;
	}
}

Compiler output:
a.cc:11:1: error: 'bitset' does not name a type
   11 | bitset<2100>X[2100];
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>

#define int long long
#define fr first
#define sc second
#define pb push_back

using namespace std;

const int N = 1e3 + 4;
const int inf = 1e9 + 7;
int a[2009][N];
main ()
{
    srand(time(NULL));
    int n = rand() % 1001 + 1000;
    int m = rand() % N + 1; 
    printf("%lld %lld\n", n, m);
    if( m > n )
    {
        puts("0");
        return ;
    }
    for( int j = 1; j <= m; j ++ )
    {
        int cnt = j;
        for( int i = 1; i <= n; i++ )
        {
            if( cnt > n )
                cnt = 1;
            a[i][j] = cnt;
            cnt++;
        }
    }
    for( int i = 1; i <= n; i++ )
    {
        for( int j = 1; j <= m; j++ )
            printf("%I64d ", a[i][j]);
        puts("");
    }
}



Compiler output:
a.cc:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main ()
      | ^~~~
a.cc: In function 'int main()':
a.cc:22:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   22 |         return ;
      |         ^~~~~~
Language: C++

你这是让我被封号的节奏儿童款计划任务个人ventDHJYXUVBNRNVBJFUIOGC VRHGJI0-CFHFG
 MHRETGHJDKJ B


HJW


G


N 


WRVE


JT


G

GBH





TJW


RH





MBHTR





J





H

 



T

RHJ


H


JKU
ERT

YU


HVN


G,KTRJ


LI


UHVM

 JTNR



K


NGV


 HU


TERI


BH

N 


U
ILO

B;H





RE
























































Compiler output:
a.cc:1:1: error: '\U00004f60\U00008fd9\U0000662f\U00008ba9\U00006211\U000088ab\U00005c01\U000053f7\U00007684\U00008282\U0000594f\U0000513f\U00007ae5\U00006b3e\U00008ba1\U00005212\U00004efb\U000052a1\U00004e2a\U00004ebaventDHJYXUVBNRNVBJFUIOGC' does not name a type
    1 | 你这是让我被封号的节奏儿童款计划任务个人ventDHJYXUVBNRNVBJFUIOGC VRHGJI0-CFHFG
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:104:3: error: 'H' does not name a type
  104 | B;H
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int MAXN=45;
const int INF=1e9;
 
int ice[MAXN][MAXN],dp[MAXN][MAXN][MAXN][MAXN];
int n,m,hx,hy,ans=INF;
 
inline int poi(int lx,int ly,int rx,int ry){
	if(lx>rx||ly>ry) return 0;
	return ice[rx][ry]-ice[rx][ly-1]-ice[lx-1][ry]+ice[lx-1][ly-1];
}
 
int main(){
	n=read(),m=read();
	memset(dp,0x3f,sizeof dp);
	dp[1][1][n][m]=0;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			char c=readc();
			if(c=='P') hx=i,hy=j;
			ice[i][j]=ice[i-1][j]+ice[i][j-1]-ice[i-1][j-1]+(c=='#');//正常的前缀和优化
		}
	}
	for(int i=1;i<=hx;i++)
	for(int j=1;j<=hy;j++)
	for(int k=n;k>=hx;k--)
	for(int l=m;l>=hy;l--){
		ans=min(ans,dp[i][j][k][l]+min(min(poi(i,j,hx,hy),poi(i,hy,hx,l)),min(poi(hx,j,k,hy),poi(hx,hy,k,l))));
		for(int s=i;s<=k;s++)
		for(int t=j;t<=l;t++){
			if(s>=hx&&t>=hy)
				dp[i][j][s][t]=min(dp[i][j][s][t],dp[i][j][k][l]+poi(s+1,j,k,t)+poi(i,t+1,s,l));
			if(s>=hx&&t<=hy)
				dp[i][t][s][l]=min(dp[i][t][s][l],dp[i][j][k][l]+poi(i,j,s,t-1)+poi(s+1,t,k,l));
			if(s<=hx&&t<=hy)
				dp[s][t][k][l]=min(dp[s][t][k][l],dp[i][j][k][l]+poi(s,j,k,t-1)+poi(i,t,s-1,l));
			if(s<=hx&&t>=hy)
				dp[s][j][k][t]=min(dp[s][j][k][t],dp[i][j][k][l]+poi(i,j,s-1,t)+poi(s,t+1,k,l));
		}
	}
	printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: too few arguments to function 'ssize_t read(int, void*, size_t)'
   15 |         n=read(),m=read();
      |           ~~~~^~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /usr/include/c++/14/csignal:42,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:116,
                 from a.cc:1:
/usr/include/unistd.h:371:16: note: declared here
  371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
      |                ^~~~
a.cc:15:24: error: too few arguments to function 'ssize_t read(int, void*, size_t)'
   15 |         n=read(),m=read();
      |                    ~~~~^~
/usr/include/unistd.h:371:16: note: declared here
  371 | extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur
      |                ^~~~
a.cc:20:32: error: 'readc' was not declared in this scope; did you mean 'read'?
   20 |                         char c=readc();
      |                                ^~~~~
      |                                read
Language: C++

#include <bits/stdc++.h>
#define N 300010
#define inf 1000000000000000ll
using namespace std;
typedef long long ll;
inline int read()
{
	int x=0,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();}
	return x*f;
}
struct edge
{
	int u,v,next;
	ll w;
}vs[N<<1];
int n,ee,st[N],bg[N],ed[N],las;
int V1[N],V2[N];
ll F1[N],F2[N],vl[N];
inline void addedge(int u,int v,int w)
{
	vs[++ee].v=v; 
	vs[ee].w=w; vs[ee].u=u;
	vs[ee].next=st[u];st[u]=ee;
}
inline void dfs(int rt,int pr)
{
	bg[rt]=las++;
	V1[rt]=V2[rt]=-1;
	F1[rt]=F2[rt]=inf;
	for(int i=st[rt];i;i=vs[i].next)
	{
		if(vs[i].v==pr) continue;
		dfs(vs[i].v,rt);
		int xx=V1[vs[i].v]; ll yy=F1[vs[i].v]+vs[i].w;
		if(yy>vl[vs[i].v]+vs[i].w)
			yy=vl[vs[i].v]+vs[i].w,
			xx=vs[i].v;
		if(F1[rt]>yy) swap(yy,F1[rt]),swap(xx,V1[rt]);
		if(F2[rt]>yy) swap(yy,F2[rt]),swap(xx,V2[rt]);
	}
	ed[rt]=las;
}
inline void DFS(int rt,int pr)
{
	for(int i=st[rt];i;i=vs[i].next)
	{
		if(vs[i].v==pr) continue;
		int xx=V1[rt]; ll yy=F1[rt]+vs[i].w;
		if(bg[vs[i].v]<=bg[xx]&&bg[xx]<ed[vs[i].v])
		{
			xx=V2[rt]; yy=F2[rt]+vs[i].w;
		}
		if(yy>vs[i].w+vl[rt])
			yy=vl[rt]+vs[i].w, 
			xx=rt;
		if(F1[vs[i].v]>yy) swap(yy,F1[vs[i].v]),swap(xx,V1[vs[i].v]);
		if(F2[vs[i].v]>yy) swap(yy,F2[vs[i].v]),swap(xx,V2[vs[i].v]);
		DFS(vs[i].v,rt);
	}
}
int fa[N];
inline getfa(int x)
{
	return fa[x]==x? x:fa[x]=getfa(fa[x]);
}
int main()
{
	n=read(); for(int i=1;i<=n;i++)
		vl[i]=read();
	for(int i=1;i<n;i++)
	{
		int u=read(), v=read(), w=read();
		addedge(u,v,w); addedge(v,u,w); 
	}dfs(1,0); DFS(1,0);
	for(int i=1;i<=n;i++) fa[i]=i;
	ll Ans=0;
	for(int i=1;i<=n;i++)
	{
		if(V1[V1[i]]==i&&i>V1[i]) continue;
		Ans+=F1[i]+vl[i];
		int f1=getfa(i),f2=getfa(V1[i]);
		fa[f1]=f2;
	}
	for(int i=1;i<n;i++)
	{
		if(getfa(vs[i<<1].u)==getfa(vs[i<<1].v)) continue;
		Ans+=min(vl[vs[i<<1].u],F1[vs[i<<1].u]);
		Ans+=min(vl[vs[i<<1].v],F1[vs[i<<1].v]);
		Ans+=vs[i<<1].w;
	}
	cout << Ans << endl;
	return 0 ;
}

Compiler output:
a.cc:64:8: error: ISO C++ forbids declaration of 'getfa' with no type [-fpermissive]
   64 | inline getfa(int x)
      |        ^~~~~
Language: C

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

char ss[16][99]={
"AKIHABARA",
"AKIHABAR",
"AKIHABRA",
"AKIHABR",
"AKIHBARA",
"AKIHBAR",
"AKIHBRA",
"AKIHBR",
"KIHABARA",
"KIHABAR",
"KIHABRA",
"KIHABR",
"KIHBARA",
"KIHBAR",
"KIHBRA",
"KIHBR"
}

int main(){
	char s[99];
	scanf("%s",s);
	for(int i=0;i<16;i++)if(!strcmp(s,ss[i])){
		puts("YES");
		return 0;
	}
	puts("NO");
}

Compiler output:
main.c:23:1: error: expected ',' or ';' before 'int'
   23 | int main(){
      | ^~~
Language: C

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

char ss[16][99]={
"AKIHABARA",
"AKIHABAR",
"AKIHABRA",
"AKIHABR",
"AKIHBARA",
"AKIHBAR",
"AKIHBRA",
"AKIHBR",
"KIHABARA",
"KIHABAR",
"KIHABRA",
"KIHABR",
"KIHBARA",
"KIHBAR",
"KIHBRA",
"KIHBR"
}

int main(){
	char s[99];
	scanf("%s",s);
	for(int i=0;i<16;i++)if(!strcmp(s,ss[i])){
		puts("YES");
		return 0;
	}
	puts("NO");
}\

Compiler output:
main.c:23:1: error: expected ',' or ';' before 'int'
   23 | int main(){
      | ^~~
main.c:31:2: error: stray '\' in program
   31 | }\
      |  ^
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define FI first
#define SE second
#define MP make_pair
#define PB push_back
#define SZ(x)  (int)x.size()
#define SP(x)  setprecision((int)x)


using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pii;
const int INF = 1e9;
const ll LINF = 1e18;
const double EPS = 1e-9;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;} //最大公約数
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;} //最小公倍数

//-------------------------------------------------
//コピペするとこ



//-------------------------------------------------


int main()
{
  vector<string> vec = ["AKIHABARA","AKIHABAR","AKIHABRA","AKIHBARA","KIHABARA","AKIHABR","AKIHBAR","KIHABAR","AKIHBRA","KIHABRA","KIHBARA","AKIHBR","KIHBRA","KIHBR"] ;
  string s ;
  cin >> s ;
  int n = SZ(vec) ;
  REP(i,n){
    if(vec.at(i)==s){
      cout <<"YES"<<endl ;
      return  0;
    }
  }
  
  cout <<"NO"<<endl ;

  return 0 ;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:38:25: error: expected identifier before string constant
   38 |   vector<string> vec = ["AKIHABARA","AKIHABAR","AKIHABRA","AKIHBARA","KIHABARA","AKIHABR","AKIHBAR","KIHABAR","AKIHBRA","KIHABRA","KIHBARA","AKIHBR","KIHBRA","KIHBR"] ;
      |                         ^~~~~~~~~~~
a.cc:38:36: error: expected ']' before ',' token
   38 |   vector<string> vec = ["AKIHABARA","AKIHABAR","AKIHABRA","AKIHBARA","KIHABARA","AKIHABR","AKIHBAR","KIHABAR","AKIHBRA","KIHABRA","KIHBARA","AKIHBR","KIHBRA","KIHBR"] ;
      |                                    ^
      |                                    ]
a.cc: In lambda function:
a.cc:38:36: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:38:24: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::vector<std::__cxx11::basic_string<char> >' requested
   38 |   vector<string> vec = ["AKIHABARA","AKIHABAR","AKIHABRA","AKIHBARA","KIHABARA","AKIHABR","AKIHBAR","KIHABAR","AKIHBRA","KIHABRA","KIHBARA","AKIHBR","KIHBRA","KIHBR"] ;
      |                        ^~~~~~~~~~~~
a.cc:38:37: error: expected unqualified-id before string constant
   38 |   vector<string> vec = ["AKIHABARA","AKIHABAR","AKIHABRA","AKIHBARA","KIHABARA","AKIHABR","AKIHBAR","KIHABAR","AKIHBRA","KIHABRA","KIHBARA","AKIHBR","KIHBRA","KIHBR"] ;
      |                                     ^~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep0(i,n) for(ll (i) = 0; (i) < (n); ++(i))
#define rrep0(i,n) for(ll (i) = (n) - 1; (i) >= 0; --(i))
#define rep1(i,n) for(ll (i) = 1; (i) <= (n); ++(i))
#define rrep1(i,n) for(ll (i) = (n); (i) >= 1; --(i))
#define nfor(i,a,b) for(ll (i) = (a); (i) < (b); ++(i))
#define ll long long
#define mod (1000000007)
#define YES cout << "YES" << endl;
#define Yes cout << "Yes" << endl;
#define yes cout << "yes" << endl;
#define NO cout << "NO" << endl;
#define No cout << "No" << endl;
#define no cout << "no" << endl;
#define all(x) (x).begin(),(x).end()

ll gcd(ll a,ll b){
    if(b == 0) return a;
    return gcd(b,a%b);
}

ll lcm(ll a,ll b){
    ll g = gcd(a,b);
    return a / g * b;
}

ll fac(ll n){
    ll t = 1;
    rep1(i, n + 1)t *= i;
    return t;
}

int main()
{
    string s,t = "AKIHABARA";
    cin >> s;
    rep0(i, 9){
        if (s[i] != t[i] && t[i] == 'A') {
            if (i == 8) {
                s += 'A'
            }else{
                s = s.substr(0,i) + 'A' + s.substr(i);
            }
        }
    }
    if (s == t) {
        YES;
    }else{
        NO;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:25: error: expected ';' before '}' token
   41 |                 s += 'A'
      |                         ^
      |                         ;
   42 |             }else{
      |             ~
Language: Java

public class Main {
	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = "";
		try {
			s = br.readLine().trim();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		if(9 < s.length()) {
			System.out.println("NO");
			return;
		}
		
		final char[] WORD = {'A', 'K', 'I', 'H', 'A', 'B', 'A', 'R', 'A'};
		char[] str = s.toCharArray();
		char[] r = new char[WORD.length];
		
		for (int i = 0, j = 0; i < WORD.length; i++) {
			if (j == str.length) r[i] = 'A';
			else if (WORD[i] == str[j]) r[i] = str[j];
			else {
				r[i] = 'A';
				if (i < WORD.length - 1)r[++i] = str[j];
			}
			j++;
		}
		System.out.println((Arrays.equals(r, WORD)) ? "YES":"NO");		
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:3: error: cannot find symbol
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		                                           ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:7: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Main
Main.java:29: error: cannot find symbol
		System.out.println((Arrays.equals(r, WORD)) ? "YES":"NO");		
		                    ^
  symbol:   variable Arrays
  location: class Main
5 errors
Language: C++

#include "bits/stdc++.h"

using namespace std;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    string s;
    cin >> s;
    if ((int) s.length() < 5) {
        cout << "NO" << "\n";
        return 0;
    }
    bool ok = (s.substr(0, 3) == "KIH" ? true : false);
    int start = (s.substr(0, 3) == "KIH" ? 3 : 0);
    for (int i = start; i < s.length(); ++i) {
        if (ok) {
            if (s[i] == 'K') {
                if ((i && s[i - 1] != 'A') && s[i + 1] != 'I' && s[i + 2] != 'H') ok = false;
            } else if (s[i] == 'B') {
                if (s[i - 1] != 'A' && s[i - 1] != 'H') ok = false;
            } else if (s[i] == 'R') {
                if (s[i - 1] != 'A' && s[i - 1] != 'B') ok = false;
                else {
                    cout << "YES" << "\n";
                    return 0;
                }
            } else if (s[i] == 'A') {
                if (s[i + 1] != 'K' && s[i + 1] != 'B' && s[i + 1] != 'R') ok = false;
            } else {
                ok = false;
            }
        } else {
            if (s.substr(i, 4) == "AKIH" || s.substr(i, 3) == "KIH") {
                ok = true;
            }
        }
        dump(ok);
    }
    cout << "NO" << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'dump' was not declared in this scope; did you mean 'dup'?
   38 |         dump(ok);
      |         ^~~~
      |         dup
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define REP(i,n) for(int i=(0);i<(n);i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;
 
template<class T> inline void read(T &x){
	int f=0;x=0;char ch=getchar();
	for(;!isdigit(ch);ch=getchar())f|=(ch=='-');
	for(;isdigit(ch);ch=getchar())x=x*10+ch-'0';
	if(f)x=-x;
}
 
int main(){
	string s; cin>>s; s=s+"#";
	string tg="AKIHABARA#";
	for(int i=0;i<s.size()&&i<tg.size()&&s.size()<tg.size();++i){
		if(s[i]!=tg[i]){
			s.insert(s.begin()+i,'A');
			--i;
			continue;
		}
	if(s==tg) puts("YES");
	else puts("NO");
	return 0;
}

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

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,a,b) for(int i=(a);i>=(b);i--)
#define REP(i,n) for(int i=(0);i<(n);i++)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

template<class T> inline void read(T &x){
	int f=0;x=0;char ch=getchar();
	for(;!isdigit(ch);ch=getchar())f|=(ch=='-');
	for(;isdigit(ch);ch=getchar())x=x*10+ch-'0';
	if(f)x=-x;
}

int main(){
	cin>>s; s=s+"#";
	string tg="AKIHABARA#";
	for(int i=0;i<s.size()&&i<tg.size()&&s.size()<tg.size();++i){
		if(s[i]!=tg[i]){
			s.insert(s.begin()+i,'A');
			--i;
			continue;
		}
	if(s==tg) puts("YES");
	else puts("NO");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: 's' was not declared in this scope; did you mean 'se'?
   22 |         cin>>s; s=s+"#";
      |              ^
      |              se
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:21:11: note: to match this '{'
   21 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <string>
#include <iomanip>
#include <ios>
using namespace std;
int main(void){
  string s;
  cin >> s;
  
  int n = s.length();
  int check_k = 0;
  int check_i = 0;
  int check_h = 0;
  int check_b = 0;
  int check_r = 0;
  bool can = true;
  
  for(int i=0;i<n;i++){
    if(s[i] == "K"){
      if(check_k == 0){
        check_k = i;
      }
      else
        can = false;
    }
    if(s[i] == "I"){
      if(check_i == 0){
        check_i = i;
      }
      else
        can = false;
    }
    if(s[i] == "H"){
      if(check_h == 0){
        check_h = i;
      }
      else
        can = false;
    }
    if(s[i] == "B"){
      if(check_b == 0){
        check_b = i;
      }
      else
        can = false;
    }
    if(s[i] == "R"){
      if(check_r == 0){
        check_r = i;
      }
      else
        can = false;
    }
  }
  
  if(can && check_k + 1 == check_i && check_i + 1 == check_h && check_b < check_r){
    cout << "YES" << endl;
  }
  else
    cout << "NO" << endl;
  
  return 0;
}

    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |     if(s[i] == "K"){
a.cc:26:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |     if(s[i] == "I"){
a.cc:33:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   33 |     if(s[i] == "H"){
a.cc:40:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   40 |     if(s[i] == "B"){
a.cc:47:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   47 |     if(s[i] == "R"){
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<tuple>
#include<iomanip>
#include<map>
#define int long long
using namespace std;

signed main() {
	string S;
	cin >> S;
	if(S == "KIHBR" || S == "AKIHBR" || S == "KIHABR" || S == "KIHBAR" || S == "KIHBRA" || S == "AKIHABR" || S == "AKIHBAR" || S == "AKIHBRA" || S == "KIHABAR" || S == "KIHABRA" || S == "KIHBARA" || S == "AKIHABAR" || S == "AKIHABRA" || S = "AKIHBARA" || S == "KIHABARA" || S == "AKIHABARA") {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:239: error: no match for 'operator||' (operand types are 'bool' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   16 |         if(S == "KIHBR" || S == "AKIHBR" || S == "KIHABR" || S == "KIHBAR" || S == "KIHBRA" || S == "AKIHABR" || S == "AKIHBAR" || S == "AKIHBRA" || S == "KIHABAR" || S == "KIHABRA" || S == "KIHBARA" || S == "AKIHABAR" || S == "AKIHABRA" || S = "AKIHBARA" || S == "KIHABARA" || S == "AKIHABARA") {
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~ ~
      |                                                                                                                                                                                                                            |                     |
      |                                                                                                                                                                                                                            bool                  std::string {aka std::__cxx11::basic_string<char>}
a.cc:16:239: note: candidate: 'operator||(bool, bool)' (built-in)
   16 |         if(S == "KIHBR" || S == "AKIHBR" || S == "KIHABR" || S == "KIHBAR" || S == "KIHBRA" || S == "AKIHABR" || S == "AKIHBAR" || S == "AKIHBRA" || S == "KIHABAR" || S == "KIHABRA" || S == "KIHBARA" || S == "AKIHABAR" || S == "AKIHABRA" || S = "AKIHBARA" || S == "KIHABARA" || S == "AKIHABARA") {
      |            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
a.cc:16:239: note:   no known conversion for argument 2 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'bool'
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
signed main(){
  int b=0,c=0,e=0,f=0;
  string a,d;
  cin>>a;
  d=a;
  fo(i,a.size()){
    if(a[i]=='A')
       a.erase(a.begin()+i);
  }
  if(a!="KIHBR")
    cout<<"NO"<<endl;
  else{
    a=d;
  for(int i=0,i<6;i=i){
    if(i==5&&i+b<a.size()){
      f++;
      b++;
      if(f>1)
        break;
      if(i+b==a.size()){
        e=1;
        break;
      }
    }
    else{
    if(a[i+b]=='A'){
      b++;
      c++;
      if(i==1||i==2)
        break;
      if(c==2)
      break;
    }
    else{
      i++;
      c=0;
    }
    }
  }
    if(e)
      cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:70:16: error: expected ';' before '<' token
   70 |   for(int i=0,i<6;i=i){
      |                ^
      |                ;
a.cc:70:16: error: expected primary-expression before '<' token
Language: C++

// #include <bits/stdc++.h>
#include<climits>
#include<cmath>
#include<cstdio>
#include<deque>
#include<map>
#include<set>
#include<vector>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<numeric>
#include<string>
#include<tuple>
using namespace std;
// #include <boost/multiprecision/cpp_int.hpp>
// using namespace boost::multiprecision;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define pt pop_front
#define pk pop_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;}
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}

inline void solve(void){
  string s;
  cin>>s;
  cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<endl;
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:51:24: error: 'regex' was not declared in this scope
   51 |   cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<endl;
      |                        ^~~~~
a.cc:51:10: error: 'regex_match' was not declared in this scope
   51 |   cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<endl;
      |          ^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
main(){string s;std::cin>>s;std::cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<'\n';}

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){string s;std::cin>>s;std::cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<'\n';}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:8: error: 'string' was not declared in this scope
    2 | main(){string s;std::cin>>s;std::cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<'\n';}
      |        ^~~~~~
a.cc:2:8: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:2:27: error: 's' was not declared in this scope
    2 | main(){string s;std::cin>>s;std::cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<'\n';}
      |                           ^
a.cc:2:55: error: 'regex' was not declared in this scope; did you mean 'std::__cxx11::regex'?
    2 | main(){string s;std::cin>>s;std::cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<'\n';}
      |                                                       ^~~~~
      |                                                       std::__cxx11::regex
In file included from /usr/include/c++/14/regex:68,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:181:
/usr/include/c++/14/bits/regex.h:879:32: note: 'std::__cxx11::regex' declared here
  879 |   typedef basic_regex<char>    regex;
      |                                ^~~~~
a.cc:2:41: error: 'regex_match' was not declared in this scope; did you mean 'std::regex_match'?
    2 | main(){string s;std::cin>>s;std::cout<<(regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO")<<'\n';}
      |                                         ^~~~~~~~~~~
      |                                         std::regex_match
/usr/include/c++/14/bits/regex.h:2395:5: note: 'std::regex_match' declared here
 2395 |     regex_match(const basic_string<_Ch_type, _Ch_traits, _Str_allocator>& __s,
      |     ^~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;main(){string s;cin>>s;
  cout<<regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO"<<endl;
}


Compiler output:
a.cc:2:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | using namespace std;main(){string s;cin>>s;
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:3:57: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
    3 |   cout<<regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO"<<endl;
      |                                                     ~~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;main(){string s;cin>>s;
  cout<<regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO;
}


Compiler output:
a.cc:3:53: warning: missing terminating " character
    3 |   cout<<regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO;
      |                                                     ^
a.cc:3:53: error: missing terminating " character
    3 |   cout<<regex_match(s,regex("A?KIHA?BA?RA?"))?"YES":"NO;
      |                                                     ^~~~
a.cc:2:21: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | using namespace std;main(){string s;cin>>s;
      |                     ^~~~
a.cc: In function 'int main()':
a.cc:4:1: error: expected primary-expression before '}' token
    4 | }
      | ^