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

#include <iostream>
#include <vector>
using namespace std;
struct P{
    int l, r;
    P(int l, int r) : l(l), r(r){}
    bool operator<(const P &p)const{
        if(l != p.l) return l < p.l;
        return r < p.r;
    }
};

int main(void){
    int n;
    vector<P> p;
    int ans = 0;
    vector<int> v[4];
    cin >> n;
    for(int i=0;i<n;i++){
        int l, r;
        cin >> l >> r;
        p.push_back(P(l, r));
        ans = max(ans, r-l+1);
    }
    sort(p.begin(), p.end());
    for(int i=0;i<4;i++){
        v[i].assign(n, 0);
    }
    v[0][0] = p[0].l;
    v[1][0] = p[0].r;
    for(int i=1;i<n;i++){
        v[0][i] = max(v[0][i-1], p[i].l);
        v[1][i] = min(v[1][i-1], p[i].r);
    }
    v[2][n-1] = p[n-1].l;
    v[3][n-1] = p[n-1].r;
    for(int i=n-2;i>=0;i--){
        v[2][i] = max(v[2][i+1], p[i].l);
        v[3][i] = min(v[3][i+1], p[i].r);
    }
    for(int i=0;i<n-1;i++){
        int res = 0;
        if(v[0][i] <= v[1][i]) res += v[1][i] - v[0][i] + 1;
        if(v[2][i+1] <= v[3][i+1]) res += v[3][i+1] - v[2][i+1] + 1;
        ans = max(ans, res);
        //cout << i << " : " << res << endl;
        //cout << v[0][i] << " " << v[1][i] << " " << v[2][i] << " " << v[3][i] << endl;
    }
    cout << ans << endl;
}


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

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<cmath>
#include<bitset>
#include<queue>
#define ll long long
#define itn int
#define co(ans) cout<<ans<<endl;
#define COYE cout<<"YES"<<endl;
#define COYe cout<<"Yes"<<endl;
#define COye cout<<"yes"<<endl;
#define CONO cout<<"NO"<<endl;
#define CONo cout<<"No"<<endl;
#define COno cout<<"no"<<endl;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define FFOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n)  FFOR(i,1,n)
#define SORT(V) sort((V).begin(),(V).end())
#define REVERSE(V) reverse((V).begin(),(V).end())
#define INF ((1LL<<62)-(1LL<<31))
#define MOD 1000000007
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
using namespace std;


int main(){
  ll N,ans=0;
  cin>>N;
  
  vector<pair<ll,ll>> L;
  L.puah_back(make_pair(0,0));
  
  REP(i,N){
    ll a,b;
    cin>>a>>b;
    L.push_back(make_pair(a,b));
  }
  
  SORT(L);
  
  ll A[N+1],B[N+1],C[N+1],D[N+1];
  REP(i,N+2){
    A[i]=0;
    B[i]=0;
    C[i]=0;
    D[i]=0;
  }
  A[0]=0,B[0]=INF,C[N]=0,D[N]=INF;
  
  for(int i=1; i<N; ++i){
    A[i]=max(A[i-1],L[i].first);
    B[i]=min(B[i-1],L[i].second);
  }
  
  for(int i=N-1; i>1; --i){
    C[i]=max(C[i+1],L[i+1].first);
    D[i]=min(D[i+1],L[i+1].second);
  }
  
  
  
  for(int i=1; i<N; ++i){
    ans=max(ans,(B[i]-A[i])+(D[i]-C[i]));
  }
  
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:5: error: 'class std::vector<std::pair<long long int, long long int> >' has no member named 'puah_back'; did you mean 'push_back'?
   36 |   L.puah_back(make_pair(0,0));
      |     ^~~~~~~~~
      |     push_back
Language: C++

#include<bits/stdc++.h>
using namespace std ;
#define rep(i,s,t)
#define re register
#define int long long
int gi(){
	for(register int i=s;i<=t;++i )
    char cc=getchar();
	int cn=0,flus=1 ;
    while(cc<'0'||cc>'9' ){ 
	if( cc == '-' ) 
	flus=-flus; 
	cc=getchar(); 
}
    while(cc>='0'&&cc<='9') 
	cn=cn*10+cc-'0',cc=getchar() ;
    return cn*flus;
}
const int P=998244353; 
const int N=1e7+5;
int n,inv[N],fac[N],fp[N],Ans;
int fpow(int x,int k){
    int ans=1,base=x;
    while(k) {
        if(k&1) 
		ans=ans*base%P; 
        base=base*base%P,k>>=1;
    } 
	return ans; 
}
void inc(int&x,int y ){
    ((x+=y)>=P)&&(x-=P);
}
int C(int x,int y){
    if(y>x) 
	return 0 ;
    return fac[x]*inv[y]%P*inv[x-y]%P;
}
signed main()
{
    n=gi(),fp[0]=inv[0]=fac[0]=1;
    rep(i,1,n)fac[i]=fac[i-1]*i%P,fp[i]=fp[i-1]*2%P; 
    inv[n]=fpow(fac[n],P-2);
    for(re int i=n;i>=1;--i) 
	inv[i-1]=inv[i]*i%P;
    int m=(n/2)+1,num=0 ;
    Ans=fpow(3,n) ;
    for(re int i=m;i<=n;++i) {
        int dec=C(n,i) ;
        dec=dec*fp[n-i]%P;
        inc(num,dec);
    }
    Ans=(Ans-num*2ll%P+P)%P;
    printf("%lld\n",Ans);
    return 0 ;
}

Compiler output:
a.cc: In function 'long long int gi()':
a.cc:7:28: error: 's' was not declared in this scope
    7 |         for(register int i=s;i<=t;++i )
      |                            ^
a.cc:7:26: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
    7 |         for(register int i=s;i<=t;++i )
      |                          ^
a.cc:7:33: error: 't' was not declared in this scope
    7 |         for(register int i=s;i<=t;++i )
      |                                 ^
a.cc:10:11: error: 'cc' was not declared in this scope; did you mean 'cn'?
   10 |     while(cc<'0'||cc>'9' ){
      |           ^~
      |           cn
a.cc:15:11: error: 'cc' was not declared in this scope; did you mean 'cn'?
   15 |     while(cc>='0'&&cc<='9')
      |           ^~
      |           cn
a.cc: In function 'int main()':
a.cc:42:19: error: 'i' was not declared in this scope
   42 |     rep(i,1,n)fac[i]=fac[i-1]*i%P,fp[i]=fp[i-1]*2%P;
      |                   ^
a.cc:44:16: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   44 |     for(re int i=n;i>=1;--i)
      |                ^
a.cc:48:16: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   48 |     for(re int i=m;i<=n;++i) {
      |                ^
Language: C++

// https://atcoder.jp/contests/agc040/submissions/10482076
#include "bits/stdc++.h"
using namespace std;

constexpr long long MOD = 998244353;
vector<long long> F, RF, R;

long long Comb(long long A, long long B) {
	return (F[A] * ((RF[A - B] * RF[B]) % MOD)) % MOD;
}

long long Calc(long long A, long long B) {
	if (B == 0) return 1;
	if (B % 2 == 0) {
		long long C = Calc(A, B / 2);
		return (C * C) % MOD;
	}
	return (A * Calc(A, B - 1)) % MOD;
}

int main() {
	long long N, NG = 0;
	cin >> N;
    if(N == 2) return;
	F.resize(N + 1), RF.resize(N + 1), R.resize(N + 1);
	F[0] = F[1] = RF[0] = RF[1] = R[0] = R[1] = 1;
	for (int i = 2; i <= N; i++) {
		F[i] = (F[i - 1] * i) % MOD;
		R[i] = MOD - (R[MOD % i] * (MOD / i)) % MOD;
		RF[i] = (RF[i - 1] * R[i]) % MOD;
	}
	for (int X = N / 2 + 1; X <= N; X++) {
		int Y = N - X;
		long long COUNT = Comb(N, X);
		COUNT *= Calc(2, Y);
		COUNT %= MOD;
		NG = (NG + COUNT) % MOD;
	}
	cout << (Calc(3, N) - NG * 2 + MOD * 2) % MOD << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: return-statement with no value, in function returning 'int' [-fpermissive]
   24 |     if(N == 2) return;
      |                ^~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
using namespace std;
typedef long long int ll;

ll mod=998244353;

//繰り返し二乗法
ll mod_pow(ll x, ll n) {
	ll ret = 1;
	while (n > 0) {
		if (n % 2)ret = ret * x%mod;
		x = x * x%mod; n >>= 1;
	}
	return ret;
}

struct perm{
private:
	int sz;
	vector<ll> p,invp;
public:
	perm(int n){
		sz=n+1;
		p.resize(sz),invp.resize(sz);
		p[0]=1;
		for(int i=1;i<=sz-1;i++){
			p[i]=p[i-1]*i%mod;
		}
		invp[sz-1]=power(p[sz-1],mod-2);
		for(int i=sz-2;i>=0;i--){
			invp[i]=invp[i+1]*(i+1)%mod;
		}
	}
	ll comb(ll x,ll y){
		if(x<y||y<0)return 0;
		return (p[x]*invp[x-y]%mod)*invp[y]%mod;
	}
};
perm p(5000010*2);

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	ll n; cin >> n;
	ll ans=mod_pow(3,n);
	ll res=0;
	for(int i=0;i<n/2;i++){
		ll k=p.comb(n,i);
		(k*=mod_pow(2,i))%=mod;
		(res+=k)%=mod;
	}
	cout << (ans-2*res+mod)%mod << endl;
}


Compiler output:
a.cc: In constructor 'perm::perm(int)':
a.cc:34:28: error: 'power' was not declared in this scope
   34 |                 invp[sz-1]=power(p[sz-1],mod-2);
      |                            ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = a; i < b; ++i)
#define rrep(i,a,b) for(int i = (b); i --> (a);)
#define trav(x, v) for(auto &x : v)
#define all(v) v.begin(),v.end()
#define sz(v) int(v.size())
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;

const ll mod = 998244353;

ll modpow(ll a, ll e){
	ll res = 1;
	do {	rep(i,0,n) fs[i+1] = fs[i] * (i+1) % md;
	rep(i,0,n) fs[i+1] = fs[i] * modpow(i+1, mod) % md;

		if(e % 2) res = res * a % mod;
		a = a * a % mod;
	} while(e >>= 1);
	return res;
}

int main(){
	cin.tie(0);
	cin.sync_with_stdio(0);
	cin.exceptions(cin.failbit);

	int n;
	cin >> n;

	vector<ll> fs(n+1,1);
	rep(i,0,n) fs[i+1] = fs[i] * (i+1) % mod;

	auto bin = [&](int n, int k){
		return fs[n] * modpow(fs[k] * fs[n-k] % mod, mod-2) % mod;
	};

	ll sub = 0;

	rep(i,n/2+1,n+1) sub += bin(n, i) * modpow(2, n-i) % mod;

	ll ans = modpow(3, n) - 2*sub;
	ans %= mod;

	if(ans < 0) ans += mod;

	cout << ans << endl;
}


Compiler output:
a.cc: In function 'll modpow(ll, ll)':
a.cc:16:25: error: 'n' was not declared in this scope
   16 |         do {    rep(i,0,n) fs[i+1] = fs[i] * (i+1) % md;
      |                         ^
a.cc:3:39: note: in definition of macro 'rep'
    3 | #define rep(i,a,b) for(int i = a; i < b; ++i)
      |                                       ^
a.cc:16:28: error: 'fs' was not declared in this scope; did you mean 'ffs'?
   16 |         do {    rep(i,0,n) fs[i+1] = fs[i] * (i+1) % md;
      |                            ^~
      |                            ffs
a.cc:16:54: error: 'md' was not declared in this scope; did you mean 'mod'?
   16 |         do {    rep(i,0,n) fs[i+1] = fs[i] * (i+1) % md;
      |                                                      ^~
      |                                                      mod
a.cc:17:17: error: 'n' was not declared in this scope
   17 |         rep(i,0,n) fs[i+1] = fs[i] * modpow(i+1, mod) % md;
      |                 ^
a.cc:3:39: note: in definition of macro 'rep'
    3 | #define rep(i,a,b) for(int i = a; i < b; ++i)
      |                                       ^
a.cc:17:20: error: 'fs' was not declared in this scope; did you mean 'ffs'?
   17 |         rep(i,0,n) fs[i+1] = fs[i] * modpow(i+1, mod) % md;
      |                    ^~
      |                    ffs
a.cc:17:57: error: 'md' was not declared in this scope; did you mean 'mod'?
   17 |         rep(i,0,n) fs[i+1] = fs[i] * modpow(i+1, mod) % md;
      |                                                         ^~
      |                                                         mod
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = a; i < b; ++i)
#define rrep(i,a,b) for(int i = (b); i --> (a);)
#define trav(x, v) for(auto &x : v)
#define all(v) v.begin(),v.end()
#define sz(v) int(v.size())
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;

const ll mod = 998244353;

ll modpow(ll a, ll e){
	ll res = 1;
	do {
		if(e % 2) res = res * a % mod;
		a = a * a % mod;
	} while(e >>= 1);
	return res;
}

int main(){
	cin.tie(0);
	cin.sync_with_stdio(0);
	cin.exceptions(cin.failbit);

	int n;
	cin >> n;	rep(i,0,n) fs[i+1] = fs[i] * (i+1) % md;
	rep(i,0,n) fs[i+1] = fs[i] * modpow(i+1, mod) % md;


	vector<ll> fs(n+1,1);
	rep(i,0,n) fs[i+1] = fs[i] * (i+1) % mod;

	auto bin = [&](int n, int k){
		return fs[n] * modpow(fs[k] * fs[n-k] % mod, mod-2) % mod;
	};

	ll sub = 0;

	rep(i,n/2+1,n+1) sub += bin(n, i) * modpow(2, n-i) % mod;

	ll ans = modpow(3, n) - 2*sub;
	ans %= mod;

	if(ans < 0) ans += mod;

	cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:36: error: 'fs' was not declared in this scope; did you mean 'ffs'?
   29 |         cin >> n;       rep(i,0,n) fs[i+1] = fs[i] * (i+1) % md;
      |                                    ^~
      |                                    ffs
a.cc:29:62: error: 'md' was not declared in this scope; did you mean 'mod'?
   29 |         cin >> n;       rep(i,0,n) fs[i+1] = fs[i] * (i+1) % md;
      |                                                              ^~
      |                                                              mod
a.cc:30:20: error: 'fs' was not declared in this scope; did you mean 'ffs'?
   30 |         rep(i,0,n) fs[i+1] = fs[i] * modpow(i+1, mod) % md;
      |                    ^~
      |                    ffs
a.cc:30:57: error: 'md' was not declared in this scope; did you mean 'mod'?
   30 |         rep(i,0,n) fs[i+1] = fs[i] * modpow(i+1, mod) % md;
      |                                                         ^~
      |                                                         mod
Language: C++

//#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#include<bits/extc++.h>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using vi = vector<ll>;
using vvi = vector<vector<ll>>;
const ll mod = 998244353;
using oset = tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
ll fact[10001001], inv[10001001], p3[10001001];
ll bp(ll a, ll p) {
	ll res = 1;
	while(p) {
		if(p&1) res = (res*a)%mod;
		a=(a*a)%mod;
		p>>=1;
	}
	return res;
}
ll nck(ll n, ll k) {
	ll res = (fact[n]*inv[k])%mod;
	return (res*inv[n-k])%mod;
}
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll n;
	cin >> n;
	fact[0]= p3[0] = 1;
	for(int i = 1; i <= 10000000; i++)
		fact[i] = (fact[i-1]*i)%mod;
	inv[10000000]=bp(fact[10000000], mod-2);
	for(int i = 10000000; i--;)
		inv[i] = (inv[i+1]*(i+1))%mod;
	for(int i = 1; i <= 10000000; i++)
		p3[i] = (p3[i-1]*2)%mod;
	ll ans = bp(3, n);
	for(ll x = (n/2)+1; x <= n; x++) {
		ans = (mod+ans - (2ll*p3[n-x]*nck(n, x))%mod)%mod;
	}
	cout << ans;
}
\

Compiler output:
a.cc:51:1: error: stray '\' in program
   51 | \
      | ^
Language: C++

#pragma GCC optimize("O3", "unroll-loops");

#include <bits/stdc++.h>

using namespace std;

#define ll long long

const ll mod = 998244353LL;

// aのb乗を求める.
ll modpow(ll a, ll b) {
	if (a > mod) a %= mod;
	if (b == 0LL) return 1LL;
	ll tmp = modpow(a, b / 2);
	if (b & 1LL)
		return tmp * tmp % mod * a % mod;
	return tmp * tmp % mod;
}

// aの逆元を求める.
ll inverse(ll a) {
	return modpow(a, mod - 2);
}

// kの階乗を計算する.(sgnを0以外に設定すると逆元を返す)
ll fact(ll k, int sgn = 0) {
	static vector<ll> fac(1, 1LL); // fac[i] := i!
	static vector<ll> inv(1, 1LL); // inv[i] := i!の逆元
	static ll nx = 1LL;
	while (nx <= k) {
		fac.push_back(fac[nx - 1] * nx % mod);
		inv.push_back(inv[nx - 1] * inverse(nx) % mod);
		++nx;
	}
	if (sgn == 0)
		return fac[k];
	return inv[k];
}

// aCbを計算する.
ll comb(ll a, ll b) {
	if (b < 0 || b > a) return 0;
	return fact(a) * fact(b, 1) % mod * fact(a - b, 1) % mod;
}

signed main() {
	ll n; cin >> n;
	ll ans = modpow(3, n);
	for (ll i = (n / 2) + 1; i <= n; ++i) {
		ans -= modpow(2, n - i) * comb(n, i) % mod * 2 % mod;
		ans += mod;
		ans %= mod;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:1:43: error: '#pragma GCC optimize' string is badly formed
    1 | #pragma GCC optimize("O3", "unroll-loops");
      |                                           ^
Language: C++

//さすが解説は天才的ですねー
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
//#include<bits/stdc++.h>
#include<cstdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const ll mod = 998244353;
ll modpow(ll A, ll B) {
	ll kotae = 1;
	while (B > 0) {
		if (B & 1) kotae = kotae * A % mod;
		A = A * A % mod;
		B >>= 1;
	}
	return kotae;
}

const int IMAX = 10000001;
ll fac[IMAX + 1], ifac[IMAX + 1];
inline ll comb(int A, int B) {
	return fac[A] * ifac[B] % mod * ifac[A - B] % mod;
}

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


	int N;
	scanf_s("%d", &N);

	fac[0] = 1;
	rep1(i, IMAX) fac[i] = fac[i - 1] * i % mod;
	ifac[IMAX] = modpow(fac[IMAX], mod - 2);
	for (int i = IMAX; i > 0; i--) ifac[i - 1] = ifac[i] * i % mod;

	ll kotae = 1;
	rep(i, N) {
		kotae *= 3;
		if (!(i & 15)) kotae %= mod;
	}
	kotae %= mod;

	ll k = 1;
	rep(i, N / 2) {
		kotae -= 2 * fac[N] * ifac[i] % mod * ifac[N - i] % mod * k % mod;
		k = k * 2 % mod;
	}
	printf("%lld", (kotae % mod + mod) % mod);

	Would you please return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   45 |         scanf_s("%d", &N);
      |         ^~~~~~~
      |         scanf
Language: C++

//              +-- -- --++-- +-In the name of ALLAH-+ --++-- -- --+              \\

#include <bits/stdc++.h>

#define F first
#define S second
#define _sz(x) (int)x.size()
#define pb push_back

#define error(x) cout << #x << " = " << x << endl

using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;

const int N = 1e7 + 20, mod = 998244353;
int n, fac[N], inv[N];

inline int pw (int a, int b)
{
	int res = 1;
	while (b)
	{
		if (b & 1) res = 1ll * res * a % mod;
		a = 1ll * a * a % mod;
		b >>= 1;
	}

	return res;
}

inline int C (int n, int k)
{
	return 1ll * fac[n] * inv[k] % mod * inv[n - k] %mod;
}

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

	fac[0] = inv[0] = 1;
	for (int i = 1; i < N; i++)
	{
		fac[i] = 1ll * fac[i - 1] * i % mod;
		inv[i] = pw(fac[i], mod - 2);
	}

	cin >> n;

	ans = pw(3, 2 * n);

	for (int i = n; i <= 2 * n; i++)
	{
		int res = C(2 * n, i);
		res = 2 * res % mod;

		res = 1ll * res * pw(2, 2 * n - i) % mod;

		ans = (ans + mod - res) % mod;

	}
	
	cout << ans << '\n';
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   51 |         ans = pw(3, 2 * n);
      |         ^~~
      |         abs
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for ((i)=1;(i)<=(n);(i)++)
using namespace std;
long long n,m,i,j;
struct p{
	long long a,b;
}a[100005];
int main(){
	cin>>n;
	rep(i,n){
		cin>>a[i].a>>a[i].b;
	}
	sort(
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: expected primary-expression before 'return'
   14 |         return 0;
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h> 

using namespace std;


typedef pair<int, int> pii;

#define REP(i,n) for(int(i)=0;(i)<(int)(n);(i)++)

using namespace std;

int n;
typedef __int128_t ll;

struct bar {
	int diff;
	int s, r;
};

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

bar bars[110000];
vector<bar> negs;
vector<bar> pos;

struct frac {
	ll a, b;
	frac(ll _a, ll _b) {
		a = _a; b = _b;
		simplify();
	}

	void simplify() {
		ll g = gcd(a,b);
		a /= g; b /= g;
	}

	frac operator+(frac ot) {
		frac ret(1,1);
		ret.b = b/gcd(b,ot.b) * ot.b;
		ret.a = a*(ret.b/b) + ot.a*(ret.b/ot.b);
		ret.simplify();
		return ret;
	}

	bool operator<(frac ot) {
		return a*ot.b < b*ot.a;
	}
};

int main() {
	scanf("%d", &n);

	REP(i,n) {
		int a,b;
		scanf("%d %d", &a, &b);
		bars[i].diff = a-b;
		bars[i].s = a;
		bars[i].r = b;
	
		if (bars[i].s < bars[i].r) {
			negs.push_back(bars[i]);
		}
		else {
			pos.push_back(bars[i]);
		}
	}

	sort(negs.begin(), negs.end(), [](bar a, bar b) {return a.r > b.r;});
	sort(pos.begin(), pos.end(), [](bar a, bar b){return a.s < b.s;});

	multiset<int> rs;

	ll cur = 0;
	for (int i = 0; i < negs.size(); i++) {
		cur += negs[i].s;
	}

	int atneg = 0;
	while (cur > 0 && atneg < negs.size()) {
		cur -= negs[atneg++].r;
	}

	frac ans(0,1);
	for (int atp = 0; atp <= pos.size(); atp++) {
		if (cur > 0) break;

		int has = (int)negs.size() - atneg;
		has += atp;

		frac r(has, 1);
		//printf("has = %d cur = %lld\n", has, cur);
		if (atneg != 0) {
			frac r1 = r + frac(-cur,negs[atneg-1].r);
			frac r2(0,1);
			if (atp != 0) r2 = r + frac(-(cur - pos[atp-1].s + negs[atneg-1].r), pos[atp-1].s); 
		}
		if (ans < r1) ans = r1;
		if (ans < r2) ans = r2;
		//printf("%lld %lld", ans.a, ans.b);

		if (atp != pos.size()) {
			cur += pos[atp].s;
			while (cur > 0 && atneg < negs.size()) {
				cur -= negs[atneg++].r;
			}
		}
	}

	long long num = ans.a;
	long long den = ans.b;
	ll g = gcd(num, n);
	num /= g; n /= g;
	den *= n;

	printf("%lld %lld\n", num, den);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:101:27: error: 'r1' was not declared in this scope; did you mean 'r'?
  101 |                 if (ans < r1) ans = r1;
      |                           ^~
      |                           r
a.cc:102:27: error: 'r2' was not declared in this scope; did you mean 'r'?
  102 |                 if (ans < r2) ans = r2;
      |                           ^~
      |                           r
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> 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;
}

const int N=200005;
ll a[N],c[N],n,sum,owo;
multiset<ll> s;

const ll M=2005;
ll f[M][M];

int main(){
	read(n);
	rep(i,1,n){
		read(a[i]);
		c[i]=a[i]-a[i-1];
	}
	c[n+1]=-a[n];
	n+=1;

	assesrt(n<=2001);
	memset(f,0xc0,sizeof f);
	f[0][0]=0;
	rep(i,1,n){
		if(c[i]>0){
			rep(j,0,i){
				f[i][j]=f[i-1][j];
				if(j){
					f[i][j]=max(f[i][j],f[i-1][j-1]+c[i]);
				}
			}
		}
		else if(c[i]<0){
			rep(j,0,i){
				if(f[i-1][j]>=-c[i]){
					f[i][j]=f[i-1][j]+c[i];
				}
				if(j){
					f[i][j]=max(f[i][j],min(f[i-1][j-1],a[i]));
				}
			}
		}
	}
	ll cur=0;
	while(f[n][cur]<0) cur++;
	cout<<cur<<endl;

	return 0;

/*
8
8 4 6 2 8 1 5 2 
*/

	s.insert(0);
	rep(i,1,n){
		if(c[i]>0){
			s.insert(c[i]);
			sum+=c[i];
		}
		else if(c[i]<0){
			s.insert(-c[i]);
			ll ex=-c[i],zero=0;
			while(ex){
				auto it=s.lower_bound(1);
				if(ex>=*it){
					ex-=*it;
					s.erase(it);
					zero++;
				}
				else{
					ll nw=*it-ex;
					s.erase(it);
					s.insert(nw);
					ex=0;
				}
			}
			for(;zero;zero--){
				s.insert(zero);
			}
		}
		else owo++;
		while(sum>a[i]){
			sum-=*(--s.end());
			s.erase(--s.end());
		}
	}
	cout<<n-owo-(ll)s.size()+1<<endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:9: error: 'assesrt' was not declared in this scope; did you mean 'assert'?
   37 |         assesrt(n<=2001);
      |         ^~~~~~~
      |         assert
Language: C++

15
541962451 761940280 182215520 378290929 211514670 802103642 28942109 641621418 380343684 526398645 81993818 14709769 139483158 444795625 40343083

Compiler output:
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 15
      | ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int N,a[200005];
int main(){
	scanf("%d",&N);
	for (int i=1;i<=N;i++)
		scanf("%d",&a[i]);
	int ans=0,now=0,v[2]{};
	for (int i=1;i<=N;i++){
		int p[2]{0,a[i]-now};
		if (p[0]<p[1]) swap(p[0],p[1]);
		int nex[3]{1e9,1e9,0};
		for (int j=0;j<2;j++)
			for (int k=0;k<2;k++)
				nex[j+k]=min(max(0,v[j]+p[k]),nex[j+k]);
		int d=nex[0]>a[i];
		for (int j=0;j<2;j++)
			v[j]=nex[j+d];
		ans+=d;
		now=a[i];
	}
	cout<<ans+1;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:28: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
   12 |                 int nex[3]{1e9,1e9,0};
      |                            ^~~
a.cc:12:32: error: narrowing conversion of '1.0e+9' from 'double' to 'int' [-Wnarrowing]
   12 |                 int nex[3]{1e9,1e9,0};
      |                                ^~~
Language: C++

　う　し　た　ぷ　に　き　あ　王　国　笑　民　が　ん　ば　っ　て

Compiler output:
a.cc:1:1: error: extended character 　 is not valid in an identifier
    1 | 　う　し　た　ぷ　に　き　あ　王　国　笑　民　が　ん　ば　っ　て
      | ^
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: extended character 　 is not valid in an identifier
a.cc:1:1: error: '\U00003000\U00003046\U00003000\U00003057\U00003000\U0000305f\U00003000\U00003077\U00003000\U0000306b\U00003000\U0000304d\U00003000\U00003042\U00003000\U0000738b\U00003000\U000056fd\U00003000\U00007b11\U00003000\U00006c11\U00003000\U0000304c\U00003000\U00003093\U00003000\U00003070\U00003000\U00003063\U00003000\U00003066' does not name a type
    1 | 　う　し　た　ぷ　に　き　あ　王　国　笑　民　が　ん　ば　っ　て
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#pragma GCC optimize("O3")

#define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <string_view>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
using namespace std;

/*----------macros----------*/

//output================
#define endl '\n'
#define fcout(a) cout << fixed << setprecision((int)(a))

//typedef===============
typedef long long       ll;
typedef long double     ld;
typedef pair<int, int>  Pii;
typedef pair<ll, ll>    Pll;

//const number==========
constexpr ll INF9   = (ll)1e9 + 1;
constexpr ll INF18  = (ll)1e18 + 1;
constexpr ll MOD    = 1000000007;
constexpr ll MOD2   = 998244353;
constexpr ld PI     = 3.141592653589793L;

//member================
#define pb push_back
#define eb emplace_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second

//others================
#define all(x)          (x).begin(), (x).end()
#define rall(x)         (x).rbegin(), (x).rend()
#define rep(i, n)       for(int i = 0; (i) < (n); ++(i))
#define reps(i, n)      for(int i = 1; (i) <= (n); ++(i))
#define rrep(i, n)      for(int i = n - 1; (i) >= 0 ; --(i))
#define repbit(bit, n)  for(int bit = 0; (bit) < (1 << (n)); ++(bit))
#define ifbit(bit, i)   if((bit) & (1 << (i)))
#define CtoI(c)         int((c)) - int('0')
#define ItoC(c)         char((c) + '0')

//functions=============
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

//vector<int> dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
//vector<int> dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };

/*--------additional--------*/



/*----------main------------*/

int main() {
/*----------fastio----------*/
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
/*----------solve-----------*/

    int a, b; cin >> a >> b;
    if(a <= 9 && b <= 9){
        cout << a * b << endl;
        return 0;
    }
    else cout << -1 << endl;.

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:86:29: error: expected primary-expression before '.' token
   86 |     else cout << -1 << endl;.
      |                             ^
a.cc:88:1: error: expected unqualified-id before 'return'
   88 | return 0;
      | ^~~~~~
Language: C

include<stdio.h>

int main()
{
    int a,b;

    scanf("%d%d",&a,&b);
    if( a>9 || b>9 || a<0 ||b<0)
        printf("-1\n");
        else
            printf("%d\n",a*b);

    return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <iostream>

int main() {
  int a, b; std::cin >> a >> b;
  if (1 <= a && a <= 9 && 1 <= b && b <= 9) std::cout << ans << std::endl;
  else std::cout << -1 << std::endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:58: error: 'ans' was not declared in this scope; did you mean 'abs'?
    5 |   if (1 <= a && a <= 9 && 1 <= b && b <= 9) std::cout << ans << std::endl;
      |                                                          ^~~
      |                                                          abs
Language: C++

#include <bits/stdc++.h>

int main(){
	int a,b;cin>>a>>b;
  	if(a>=1&&a<=9&&b>=1&&b<=9){
          	cout<<(a*b)<<endl;

    }else{
            cout<<-1<<endl;

    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |         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:6:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |                 cout<<(a*b)<<endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |                 cout<<(a*b)<<endl;
      |                              ^~~~
      |                              std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |             cout<<-1<<endl;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |             cout<<-1<<endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<stdio.h>
int main(){
  int A,B;
  scanf{"%d %d",&A,&B};
  if(A>9||B>9){
    printf("-1");
  }
  else{
    printf("%d",A*B);
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: expected ';' before '{' token
    4 |   scanf{"%d %d",&A,&B};
      |        ^
      |        ;
Language: C++

#include <bits/stdc++.h>

using namespace std;
#define endl "\n"

const int MOD = 1000000007;



int main()
{
	ios::sync_with_stdio(0);cin.tie(0);
    int a, b
    cin >> a >> b;
    if(a > 9 || b > 9)cout << "-1" << endl;
    else cout << a*b << endl;
    
    
    
    
    
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: expected initializer before 'cin'
   14 |     cin >> a >> b;
      |     ^~~
a.cc:15:17: error: 'b' was not declared in this scope
   15 |     if(a > 9 || b > 9)cout << "-1" << endl;
      |                 ^
Language: C++

a,b = map(int ,input().split(' '))
n = a*b
aa = str(a)
aa += str(b)
f= True
for ch in aa:
    if ch == '0':
        print(-1)
        f = False
        break
if f:
    print(n)


Compiler output:
a.cc:1:1: error: 'a' does not name a type
    1 | a,b = map(int ,input().split(' '))
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int a, b; cin >> a >> b;
  if(0 < a and a < 10 and 0 < b and < b < 10)
    cout << a * b << endl;
  else cout << -1 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: expected primary-expression before '<' token
    8 |   if(0 < a and a < 10 and 0 < b and < b < 10)
      |                                     ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main()
{
  int a, b; cin >> a >> b;
  if(0 < a and a < 10 and 0 < b and < b < 10)
    cout << a * b << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:37: error: expected primary-expression before '<' token
    8 |   if(0 < a and a < 10 and 0 < b and < b < 10)
      |                                     ^
Language: C

#include <stdio.h>
 
int main()
{
  int a, b;
  
  scanf("%d %d",&a,&b);
  
  if(a>9 || b>9)
    a=-1;
  else
    a*=b;
  
  printf("%d\n",a);
  

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected declaration or statement at end of input
   14 |   printf("%d\n",a);
      |   ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b;
  cin>>a>>b;
  if(a>=1&&a<=9&&b>=!&&b<=9){
    cout<<a*b<<endl;}
  else{cout<<"-1"<<endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:24: error: label 'b' used but not defined
    6 |   if(a>=1&&a<=9&&b>=!&&b<=9){
      |                        ^
Language: C++

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

int main() {
  int a, b, out=0;
  cin >> a >> b;
  if(1<=a<=9 && 1<=b<=9) {}cout << a*b << endl;
  else cout <<"-1" << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'else' without a previous 'if'
    8 |   else cout <<"-1" << endl;
      |   ^~~~
Language: C++

#include<iotream>
using namespace std;
int main()
{
  int a,b;
  cin>>a>>b;
  if(a<=9&&b<=9) cout<<a*b;
  else cout<<"-1";
}

Compiler output:
a.cc:1:9: fatal error: iotream: No such file or directory
    1 | #include<iotream>
      |         ^~~~~~~~~
compilation terminated.
Language: C++

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

int main() {
  cin >> a >> b;
  if (a <= 9 && b <= 9) {
    cout << a * b << '\n';
  }
  else {
    cout << -1 << '\n';
  }
  
  return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

#define int long long
#define forr(i,n) for(int i = 0;i < (int)n; i++)
#define forn(i,n) for(int i = (int)(n-1); ~i ;i--)
#define deb(x) cout<<#x<<" " <<x<<"\n";
#define all(x) x.begin(), x.end()
#define eb emplace_back
#define pb push_back
#define mpa make_pair
#define endl "\n"
#define ar array


const int mxN;

void solve(){
	int a, b;
	cin >> a >> b;
	if(a >=1 && a<=9 && b>=1 && b<=9){
		cout << a*b << "\n";
	}else{
		cout << -1 << "\n";
	}
}

int32_t main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int t = 1;
	//cin>>t;
	while(t--){
		solve();		
	}
	return 0;
}


Compiler output:
a.cc:17:11: error: uninitialized 'const mxN' [-fpermissive]
   17 | const int mxN;
      |           ^~~
Language: C

#include <stdio.h>

main() {
	int n, j; scanf("%d", &n);
	for(int i=1; i<=9; ++i) {
      for(j=1; j<=9 && i*j!=n; ++j);
      if(i*j==n) printf("YES"); break;
    }
  	if(i==10) printf("NO");
    
}


Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main() {
      | ^~~~
main.c: In function 'main':
main.c:9:12: error: 'i' undeclared (first use in this function)
    9 |         if(i==10) printf("NO");
      |            ^
main.c:9:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

main() {
	int a, b; scanf("%d%d", &a, &b);
  	if(9-a>=0 && 9-b>=0 && a>=1 && b>=1) printf("%d", a*b);
  	else printf("-1");

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main() {
      | ^~~~
main.c: In function 'main':
main.c:6:9: error: expected declaration or statement at end of input
    6 |         else printf("-1");
      |         ^~~~
Language: C++

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

bool ch(int a)
{
  if(a>0&&a<10)
    return true;
  return false;
}

int main()
{
  int a,b;
  cin>>a>>b;
  if(ch(a)&&ch(b))
    cout<<a*b;
  else
    cout"-1";
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:9: error: expected ';' before string constant
   21 |     cout"-1";
      |         ^~~~
      |         ;
Language: C

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

bool ch(int a)
{
  if(a>0&&a<10)
    return true;
  return false;
}

int main()
{
  int a,b;
  cin>>a>>b;
  if(ch(a)&&ch(b))
    cout<<a*b;
  else
    cout"-1";
  
  return 0;
}


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

#undef _GLIBCXX_DEBUG

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

bool ch(int a)
{
  if(a>0&&a<10)
    return true;
  return false;
}

int main()
{
  int a,b;
  cin>>a>>b;
  if(ch(a)&&ch(b))
    cout<<a*b;
  else
    cout"-1";
}


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

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


bool ch(int a)
{
  if(a>0&&a<10)
    return true;
  return false;
}
 
int main()
{
  int a,b;
  cin>>a>>b;
  if(ch(a)&&ch(b))
    cout<<a*b;
  else
    cout"-1";
}
#include<bits/stdc++.h>
using namespaces std;

bool ch(int a)
{
  if(a>0&&a<10)
    return true;
  return false;
}

int main()
{
  int a,b;
  cin>>a>>b;
  if(ch(a)&&ch(b))
    cout<<a*b;
  else
    cout"-1";
}

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

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

bool ch(int a)
{
  if(a>0&&a<10)
    return true;
  return false;
}

int main()
{
  int a,b;
  cin>>a>>b;
  if(ch(a)&&ch(b))
    cout<<a*b;
  else
    cout"-1";
}


Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   14 |   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:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout<<a*b;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |     cout"-1";
      |     ^~~~
      |     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>
using namespaces std;

bool ch(int a)
{
  if(a>0&&a<10)
    return true;
  return false;
}

int main()
{
  int a,b;
  cin>>a>>b;
  if(ch(a)&&ch(b))
    cout<<a*b;
  else
    cout"-1";
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespaces'
    2 | using namespaces std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:14:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   14 |   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:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout<<a*b;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   18 |     cout"-1";
      |     ^~~~
      |     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>
using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  if(a < 10 && b < 10) cout << a * b << endl;
  else cout << '-1' << endl;
  return 0
}

Compiler output:
a.cc:8:16: warning: multi-character character constant [-Wmultichar]
    8 |   else cout << '-1' << endl;
      |                ^~~~
a.cc: In function 'int main()':
a.cc:9:11: error: expected ';' before '}' token
    9 |   return 0
      |           ^
      |           ;
   10 | }
      | ~
Language: C++

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

int main() {
  int a = 0; b = 0;
  cin >> a >> b;
  if(a > 9 || b > 9) {
    cout << '-1' << endl;
  }
  else {
    cout << a * b << endl;
  }
  return 0;
}


Compiler output:
a.cc:8:13: warning: multi-character character constant [-Wmultichar]
    8 |     cout << '-1' << endl;
      |             ^~~~
a.cc: In function 'int main()':
a.cc:5:14: error: 'b' was not declared in this scope
    5 |   int a = 0; b = 0;
      |              ^
Language: C++

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

int main() {
  int a = 0; b = 0;
  cin >> a >> b;
  if(a < 10) {
    if(b < 10) {
      cout << a * b << endl;
    }
    cout << '-1' << endl;
  }
  return 0;
}

Compiler output:
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
   11 |     cout << '-1' << endl;
      |             ^~~~
a.cc: In function 'int main()':
a.cc:5:14: error: 'b' was not declared in this scope
    5 |   int a = 0; b = 0;
      |              ^
Language: C++

#include<bits/stdc++.h>
#include<math.h>
const double PI = acos(-1);
using namespace std;
int main()
{
  long int n,a;
  cin>>n>>a;
  int flag=0;
  if((n>=1 && n<=9) && (a>=1 && a<=9))
  cout<<a*b;
  else
  cout<<"-1";

    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:11: error: 'b' was not declared in this scope
   11 |   cout<<a*b;
      |           ^
Language: C++

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

int a, b, hasil;

int main () {
cin >> a >> b;
if ((0<a)&&(0<b)&&(10>a)&&(10>b)) {
     hasil=a*b;
     cout << hasil << endl;
} else {
     hasil=-1
     cout << hasil << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before 'cout'
   12 |      hasil=-1
      |              ^
      |              ;
   13 |      cout << hasil << endl;
      |      ~~~~
Language: C++

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

int a, b, hasil;

int main () {
cin >> a >> b;
if ((0<a<10)&&(0<b<10)) {
     hasil=a*b;
     cout << hasil << endl;
} else {
     hasil=-1
     cout << hasil << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected ';' before 'cout'
   12 |      hasil=-1
      |              ^
      |              ;
   13 |      cout << hasil << endl;
      |      ~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int A,B,WA;

int main() {
    cin>>A>>B;
    WA=-1
    {if ((A<10) && (B<10) && (A>0) && (B>0))
    cout<<A*B<<endl;
    else
    cout<<WA<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected ';' before '{' token
    9 |     WA=-1
      |          ^
      |          ;
   10 |     {if ((A<10) && (B<10) && (A>0) && (B>0))
      |     ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int A,B,-1;

int main() {
    cin>>A>>B;
    {if ((A<10) && (B<10) && (A>0) && (B>0))
    cout<<A*B<<endl;
    else
    cout<<-1<<endl;
    }
}

Compiler output:
a.cc:5:9: error: expected unqualified-id before '-' token
    5 | int A,B,-1;
      |         ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int A,B;

int main() {
    cin>>A>>B;
    if {((A<10) && (B<10) &&(A>0) &&(B>0))
    cout<<A*B<<endl;
    else{
    cout<<-1<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected '(' before '{' token
    9 |     if {((A<10) && (B<10) &&(A>0) &&(B>0))
      |        ^
      |        (
a.cc:14:2: error: expected '}' at end of input
   14 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int A,B;

int main() {
    cin>>A>>B;
    if {((A<10) && (B<10) &&(A>0) &&(B>0))
    cout<<A*B<<endl;
    }else{
    cout<<-1<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: expected '(' before '{' token
    9 |     if {((A<10) && (B<10) &&(A>0) &&(B>0))
      |        ^
      |        (
a.cc:11:6: error: 'else' without a previous 'if'
   11 |     }else{
      |      ^~~~
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
#include <functional>
#include <string>
#include <cmath>  //sqrt 
#include <iomanip> //setprecision
using namespace std;

int main(){
    int a,b; cin >> a >> b;
    int out =-1;
    if(0<a && a<10 0<b && b<10 ){
        out = a*b;
    }
    cout << out << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:19: error: expected ')' before numeric constant
   13 |     if(0<a && a<10 0<b && b<10 ){
      |       ~           ^~
      |                   )
Language: C++

#include <iostream>
using namespace std;

int main{
  int a, b;
  cin >> a >> b;
  if(a >= 10 || b >= 10){
    cout << 0 << endl;
  }else{
    cout << a*b << endl;
  }
  return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:3: error: expected primary-expression before 'int'
    5 |   int a, b;
      |   ^~~
a.cc:5:3: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:6:3: error: 'cin' does not name a type
    6 |   cin >> a >> b;
      |   ^~~
a.cc:7:3: error: expected unqualified-id before 'if'
    7 |   if(a >= 10 || b >= 10){
      |   ^~
a.cc:9:4: error: expected unqualified-id before 'else'
    9 |   }else{
      |    ^~~~
a.cc:12:3: error: expected unqualified-id before 'return'
   12 |   return 0;
      |   ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main() {
  int A, B;
  cin >> A >> B;
  if (A =< 9 and B =< 9) {
    cout << A * B;
  }
  else {
    cout << -1;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before '<' token
    7 |   if (A =< 9 and B =< 9) {
      |          ^
a.cc:7:21: error: expected primary-expression before '<' token
    7 |   if (A =< 9 and B =< 9) {
      |                     ^