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

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

using namespace std;
#define mod 1000000007;

int calc(long long  p,int q){
	long long ans =1;
	for(int i=0;i<q;i++){
		ans = ans * p %mod;
	}
	return ans;
}

int main(){
	long long  ruijo[401][401]={};
	for(int t=0;t<401;t++){
		ruijo[0][t]=t;
	}
	for(int k=1;k<401;k++){
		for(int l=1;l<401;l++){
			ruijo[k][l] = (ruijo[k][l-1] + calc(l,k))%mod;
		}
	}
	long long  n,c,tmp;
	long long dp[401][401]={};
	dp[0][0]=1;
	vector <long long> a,b;
	cin >> n >>c;
	for(int i=0;i<n;i++){
		cin >> tmp;
		a.push_back(tmp);
	}
	for(int j=0;j<n;j++){
		cin >> tmp;
		b.push_back(tmp);
	}
	for(int x=1;x<=n;x++){
		for(int y=0;y<=c;y++){
			for(int z=0;z<=y;z++){
				dp[x][y]=(dp[x][y]+(dp[x-1][y-z]*(ruijo[z][b[x-1]]-ruijo[z][a[x-1]-1]))%mod)%mod;
			}
		}
	}
	cout << dp[n][c] <<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:23: error: expected ')' before ';' token
    8 | #define mod 1000000007;
      |                       ^
a.cc:44:105: note: in expansion of macro 'mod'
   44 |                                 dp[x][y]=(dp[x][y]+(dp[x-1][y-z]*(ruijo[z][b[x-1]]-ruijo[z][a[x-1]-1]))%mod)%mod;
      |                                                                                                         ^~~
a.cc:44:42: note: to match this '('
   44 |                                 dp[x][y]=(dp[x][y]+(dp[x-1][y-z]*(ruijo[z][b[x-1]]-ruijo[z][a[x-1]-1]))%mod)%mod;
      |                                          ^
a.cc:44:108: error: expected primary-expression before ')' token
   44 |                                 dp[x][y]=(dp[x][y]+(dp[x-1][y-z]*(ruijo[z][b[x-1]]-ruijo[z][a[x-1]-1]))%mod)%mod;
      |                                                                                                            ^
Language: C

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1e9+7;
ll add(ll a,ll b){
  return (a+b)%mod;
  
}
ll mul(ll a,ll b){
  return (a*b)%mod;
}
#define MAX 405
int n,c;
int X[MAX],Y[MAX];
ll dp[2][MAX];
ll cost[2][MAX];

int main(){
  cin>>n>>c;
  for(int i=1;i<=n;i++)cin>>X[i];
  for(int i=1;i<=n;i++)cin>>Y[i];

  dp[0][0]=1;
  for(int i=1;i<=n;i++){
    int ai=i%2;
    int bi=1-ai;
    
    for(int j=0;j<MAX;j++)dp[ai][j]=0;
    
    for(int p=X[i];p<=Y[i];p++){

      for(int j=0;j<=c;j++){

        cost[ai][j]=0;
        if(j==0){
          cost[ai][j]= dp[bi][j];
          dp[ai][j]=add(dp[ai][j], dp[bi][j] );
        }else{
          cost[ai][j]=add(cost[ai][j], mul(cost[ai][j-1],p) );
          cost[ai][j]=add(cost[ai][j], dp[bi][j]);
          dp[ai][j]=add(dp[ai][j], cost[ai][j]);
        }
      }
    }
  }
  cout<<dp[n%2][c]<<endl;
  return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1e9+7;
ll add(ll a,ll b){
  return (a+b+mod+mod)%mod;
}
ll mul(ll a,ll b){
  return (a*b)%mod;
}
ll mpow(ll a,ll b){
  if(b==0)return 1;
  ll res=mpow( mul(a,a) , b/2);
  if(b%2==1)res=mul(res,a);
  return res;
}

int n,c;
int X[500],Y[500];
ll dp[2][405];
ll cost[2][405];

int main(){
  cin>>n>>c;
  for(int i=1;i<=n;i++)cin>>X[i];
  for(int i=1;i<=n;i++)cin>>Y[i];

  dp[0][0]=1;
  for(int i=1;i<=n;i++){
    int ai=i%2;
    int bi=1-ai;
    for(int j=0;j<405;j++)
      dp[ai][j]=0;
    
    for(int p=X[i];p<=Y[i];p++){

      for(int j=0;j<=c;j++){
        cost[ai][j]=0;
        
        if(j==0){
          ll z=1;
          for(int k=0;k<=j;k++){
            cost[ai][j]=add(cost[ai][j],mul(dp[bi][j-k],z) );
            dp[ai][j]=add(dp[ai][j], mul(dp[bi][j-k],z) );
            z=mul(z,p);
          }
          continue;
        }

        cost[ai][j]=add(cost[ai][j], mul(cost[ai][j-1],p) );
        cost[ai][j]=add(cost[ai][j], dp[bi][j]);
        
        dp[ai][j]=add(dp[ai][j], cost[ai][j]);
                     
      }
    }
  }
  cout<<dp[n%2][c]<<endl;
  return 0;
}


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

#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long int;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;

//struct edge {int from, to, cost;};

constexpr double EPS = 1e-10;
constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;

template<class T> inline T sqr(T x) {return x*x;}

long ret = 0, mod = 1000000000+7;

int power(long x, long n, long mod) {
	if (n == 0) return 1;
	if (n % 2 == 0) return power(x * x % mod, n/2, mod);
	else return x * power(x, n-1, mod) % mod;
}

void calc(const VI &a, long i, long ans, long num) {
	if (i == a.size() - 1) {
		//cout << i << " " << ans << " " << num << endl;
		ret = (ans * power(a[i],num,mod) + ret) % mod;
	} else {
		REP(j,0,num+1) calc(a, i+1, (ans*power(a[i],j,mod))%mod, num - j);
	}
}


int main() {
	int n,c;
	cin >> n >> c;
	VI a(n),b(n);
	REP(i,0,n) cin >> a[i];
	REP(i,0,n) cin >> b[i];
	// a == b
	shuffle(all(a));
	calc(a, 0, 1, c);
	cout << ret << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:81:16: error: no matching function for call to 'shuffle(std::vector<int>::iterator, std::vector<int>::iterator)'
   81 |         shuffle(all(a));
      |         ~~~~~~~^~~~~~~~
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h:3697:5: note: candidate: 'template<class _RAIter, class _UGenerator> void std::shuffle(_RAIter, _RAIter, _UGenerator&&)'
 3697 |     shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
      |     ^~~~~~~
/usr/include/c++/14/bits/stl_algo.h:3697:5: note:   candidate expects 3 arguments, 2 provided
Language: C++

#include <iostream>
using namespace std;

typedef long long ll;

const ll MOD = 1000 * 1000 * 1000 + 7;
const int MAX_N = 410;
const int MAX_C = 410;

int a[MAX_N], b[MAX_N], n, c;

ll memo[MAX_N][MAX_C];

ll pow_mod(ll a, ll n, ll mod) {
    if (n == 0) return 1;
    if (n % 2 == 0) {
        ll temp = pow_mod(a, n / 2, mod);
        return (temp * temp) % mod;
    } else {
        return (a * pow_mod(a, n - 1, mod)) % mod;
    }
}

// index個数まで見ていて使えるキャンディーの個数がcandys
ll rec(int index, int candys) {
    if (memo[index][candys] >= 0) {
        return memo[index][candys];
    }
    if (index == n) {
        if (candys == 0) return memo[index][candys] = 1;
        else return memo[index][candys] = 0;
    }
    ll res = 0;
    for (int candy_num = 0; candy_num <= candys; candy_num++) {
        res += pow_mod(a[index], candy_num, MOD) * rec(index + 1, candys - candy_num);
        res %= MOD;
    }
    return memo[index][candys] = res;
}

int main() {
    cin >> n >> c;

    memset(memo, -1, sizeof(memo));
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
        cin >> b[i];
    }

    cout << rec(0, c) << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:44:5: error: 'memset' was not declared in this scope
   44 |     memset(memo, -1, sizeof(memo));
      |     ^~~~~~
a.cc:2:1: note: 'memset' 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 <iostream>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <cmath>
#include <algorithm>
  
#define INF 2000000010
#define mod7 1000000007
#define YJ 1145141919
#define INF_INT_MAX 2147483647
#define INF_LL_MAX 9223372036854775807
#define INF_LL 9223372036854775
#define EPS 1e-10
#define Pi acos(-1)
#define LL long long
#define ULL unsigned long long
#define LD long double 
 
using namespace std;

#define MAX_N 405
#define MAX_C 405

LL N, C;
LL A[MAX_N], B[MAX_N];

void input(){

  cin >> N >> C;
  for(int i = 0; i < N; i++){
    cin >> A[i];
  }
  for(int i = 0; i < N; i++){
    cin >> B[i];
  }

}

LL dp[MAX_N][MAX_C];

LL mPow(LL n, LL m){
  LL ret = 1;
  while(m){
    if(m & 1){
      ret *= n;
      ret %= mod7;
    }
    n *= n;
    n %= mod7;
    m >>= 1;
  }
  return ret;
}

int main(){

  input();

  memset(dp, 0, sizeof(dp));
  
  for(int i = 0; i < N; i++){
    if(i == 0){
      for(int j = 0; j <= C; j++){
	if(j == 0){
	  dp[i+1][j] = 1;
	}
	else{
	  dp[i+1][j] = (dp[i+1][j-1] * A[i]) % mod7;
	}
      }
    }
    for(int j = 0; j <= C; j++){
      for(int k = 0; k <= j; k++){
	int c = j-k;
	dp[i+1][j] += (dp[i][c] * mPow(A[i], k));
	dp[i+1][j] %= mod7;
      }
    }
  }

  cout << dp[N][C] << endl;

  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:61:3: error: 'memset' was not declared in this scope
   61 |   memset(dp, 0, sizeof(dp));
      |   ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <algorithm>
  +++ |+#include <cstring>
    8 |
Language: C++

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

const int MODULO = (int) 1e9 + 7;
const int N = 405;
int a[N], b[N], power[N], sum[N];
int f[N][N];
int psum[N][N];

int F(int n, int c) {
    if (n == 0) return c == 0 ? 1 : 0;
    int &res = f[n][c];
    if (res != -1) return res;
    res = 0;
    for (int x = 0; x <= c; ++x)
        res = (res + 1LL * psum[n - 1][x] * F(n - 1, c - x)) % MODULO;
    return res;
}

int main() {
    ios::sync_with_stdio(false);
    int n; cin >> n;
    int c; cin >> c;
    for (int i = 0; i < n; ++i) cin >> a[i];
    for (int i = 0; i < n; ++i) cin >> b[i];
    for (int i = 0; i < N; ++i) power[i] = 1;
    for (int pwr = 0; pwr <= c; ++pwr) {
        for (int i = 1; i < N; ++i)
            sum[i] = (sum[i - 1] + power[i]) % MODULO;
        for (int i ne0; i < n; ++i)
            psum[i][pwr] = sum[b[i]] - sum[a[i] - 1];
        for (int i = 0; i < N; ++i)
            power[i] = 1LL * power[i] * i % MODULO;
    }
    memset(f, -1, sizeof f);
    cout << F(n, c) << '\n';
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:19: error: expected ';' before 'ne0'
   30 |         for (int i ne0; i < n; ++i)
      |                   ^~~~
      |                   ;
a.cc:30:20: error: 'ne0' was not declared in this scope
   30 |         for (int i ne0; i < n; ++i)
      |                    ^~~
a.cc:30:30: error: expected ')' before ';' token
   30 |         for (int i ne0; i < n; ++i)
      |             ~                ^
      |                              )
a.cc:30:34: error: 'i' was not declared in this scope
   30 |         for (int i ne0; i < n; ++i)
      |                                  ^
Language: C++

#include <bits/stdc++.h>
#include "../lib/math/modpow.hpp"

using namespace std;

#define SZ(x) (int)(x.size())
#define REP(i, n) for(int i=0;i<(n);++i)
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define RREP(i, n) for(int i=(int)(n);i>=0;--i)
#define RFOR(i, a, b) for(int i=(int)(a);i>=(int)(b);--i)
#define ALL(a) (a).begin(),(a).end()
#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;

const double eps = 1e-8;
const ll MOD = 1000000007;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;

template <typename T1, typename T2>
bool chmax(T1 &a, const T2 &b) {
  if(a < b) {a = b; return true;}
  return false;
}

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

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  REP(i, SZ(v)) {
    if(i) os << " ";
    os << v[i];
  }
  return os;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  int n; cin >> n;
  string s; cin >> s;
  int sz = SZ(s);

  vvll dp(n+1, vll(n+1));
  dp[0][0] = 1;
  REP(i, n) {
    REP(j, n) {
      if(j != 0) {
        dp[i+1][j-1] += dp[i][j];
        dp[i+1][j-1] %= MOD;
      } else {
        dp[i+1][j] += dp[i][j];
        dp[i+1][j] %= MOD;
      }
      dp[i+1][j+1] += 2 * dp[i][j];
      dp[i+1][j+1] %= MOD;
    }
  }

  //REP(i, n+1) cout << dp[i] << endl;

  ll inv2 = mod_pow<ll>(2, MOD-2, MOD);
  ll now = 1;
  REP(i, sz) now *= inv2, now %= MOD;

  cout << dp[n][sz] * now % MOD << endl;



}
























Compiler output:
a.cc:2:10: fatal error: ../lib/math/modpow.hpp: No such file or directory
    2 | #include "../lib/math/modpow.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<iostream>
using  namespace  std;
const  int N = 5005, mod = 1e9 + 7;
int n, f[N][N], m; char s[N];
int  main() {
	scanf("%d%s", &n, s + 1); m = strlen(s + 1);
	f[0][0] = 1;
	for (int i = 0; i < n; i++)
		for (int j = 0; j <= i; j++) {
			if (j) f[i + 1][j - 1] = (f[i + 1][j - 1] + f[i][j]) % mod;
			else f[i + 1][j] = (f[i + 1][j] + f[i][j]) % mod;
			f[i + 1][j + 1] = (f[i + 1][j + 1] + 1ll * f[i][j] * 2) % mod;
		}
	for (int i = 1; i <= m; i++) f[n][m] = 1ll * f[n][m] * 500000004 % mod;
	printf("%d \n", f[n][m]);
	return  0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:39: error: 'strlen' was not declared in this scope
    6 |         scanf("%d%s", &n, s + 1); m = 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> 
using  namespace  std ;
 const  int N = 5005 , mod = 1e9 + 7 ;
 int n, f [N] [N], m; char s [N];
 int  main () {
  freopen ( "pp.in" , "r" , stdin);
  freopen ( "pp.out" , "w" , stdout);
   scanf ( "% d% s" , & n, s + 1 ); m = strlen (s + 1 );
  f [ 0 ] [ 0 ] = 1 ;
   for ( int i = 0 ; i <n; i ++)
       for ( int j = 0 ; j <= i; j ++) {
           if (j) f [i + 1 ] [j- 1 ] = (f [i + 1 ] [j- 1 ] + f [i] [j])% mod;
           else f [i + 1 ] [j] = (f [i + 1 ] [j] + f [i] [j])% mod;
          f [i + 1 ] [j + 1 ] = (f [i + 1 ] [j + 1 ] + 1l l * f [i] [j] * 2 )% mod;
      }
  for ( int i = 1 ; i <= m; i ++) f [n] [m] = 1l l * f [n] [m] * 500000004 % mod;
   printf ( "% d \ n" , f [n] [m]);
   return  0 ;
}

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

#include <bits/stdc++.h>
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

using long long = LL;
using namespace std;
LL p = 1000000007ll;
LL n,m;

map<LL,map<LL,map<LL,LL>>> memo;

LL solve(LL i,LL co,LL er)
{
  if(i==n) {
    if(co == m && er == 0) return 1;
    else return 0;
  }
  if(memo[i][co].count(er)) return memo[i][co][er];
  LL answer = 0;
  answer += solve(i+1, co, max(er-1, 0ll));
  if(co<m) answer += solve(i+1, co+1, er);
  else answer += solve(i+1, co, er+1);
  answer += solve(i+1, co, er+1);
  return memo[i][co][er] = answer%p;
}
int main(void)
{
  string s;
  cin >> n >> s;
  m=s.size();
  cout << solve(0,0,0) <<endl;
}


Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'long'
    5 | using long long = LL;
      |       ^~~~
a.cc:7:1: error: 'LL' does not name a type
    7 | LL p = 1000000007ll;
      | ^~
a.cc:8:1: error: 'LL' does not name a type
    8 | LL n,m;
      | ^~
a.cc:10:5: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |     ^~
a.cc:10:12: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |            ^~
a.cc:10:19: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                   ^~
a.cc:10:22: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                      ^~
a.cc:10:22: error: template argument 1 is invalid
a.cc:10:22: error: template argument 2 is invalid
a.cc:10:22: error: template argument 3 is invalid
a.cc:10:22: error: template argument 4 is invalid
a.cc:10:24: error: template argument 1 is invalid
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                        ^~
a.cc:10:24: error: template argument 2 is invalid
a.cc:10:24: error: template argument 3 is invalid
a.cc:10:24: error: template argument 4 is invalid
a.cc:10:26: error: template argument 1 is invalid
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                          ^
a.cc:10:26: error: template argument 2 is invalid
a.cc:10:26: error: template argument 3 is invalid
a.cc:10:26: error: template argument 4 is invalid
a.cc:12:1: error: 'LL' does not name a type
   12 | LL solve(LL i,LL co,LL er)
      | ^~
a.cc: In function 'int main()':
a.cc:29:10: error: 'n' was not declared in this scope
   29 |   cin >> n >> s;
      |          ^
a.cc:30:3: error: 'm' was not declared in this scope
   30 |   m=s.size();
      |   ^
a.cc:31:11: error: 'solve' was not declared in this scope
   31 |   cout << solve(0,0,0) <<endl;
      |           ^~~~~
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

using LL = long long;
using namespace std;
LL p = 1000000007ll;
LL n,m;

map<LL,map<LL,map<LL,LL>>> memo;

LL solve(LL i,LL co,LL er)
{
  if(i==n) {
    if(co == m && er == 0) return 1;
    else return 0;
  }
  if(memo[i][co].count(er)) return memo[i][co][er];
  LL answer = 0;
  answer += solve(i+1, co, max(er-1, 0));
  if(co<m) answer += solve(i+1, co+1, er);
  else answer += solve(i+1, co, er+1);
  answer += solve(i+1, co, er+1);
  return memo[i][co][er] = answer%p;
}
int main(void)
{
  string s;
  cin >> n >> s;
  m=s.size();
  cout << solve(0,0,0) <<endl;
}


Compiler output:
a.cc: In function 'LL solve(LL, LL, LL)':
a.cc:20:31: error: no matching function for call to 'max(LL, int)'
   20 |   answer += solve(i+1, co, max(er-1, 0));
      |                            ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:20:31: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   20 |   answer += solve(i+1, co, max(er-1, 0));
      |                            ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:20:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   20 |   answer += solve(i+1, co, max(er-1, 0));
      |                            ~~~^~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

using long long = LL;
using namespace std;
LL p = 1000000007ll;
LL n,m;

map<LL,map<LL,map<LL,LL>>> memo;

LL solve(LL i,LL co,LL er)
{
  if(i==n) {
    if(co == m && er == 0) return 1;
    else return 0;
  }
  if(memo[i][co].count(er)) return memo[i][co][er];
  LL answer = 0;
  answer += solve(i+1, co, max(er-1, 0));
  if(co<m) answer += solve(i+1, co+1, er);
  else answer += solve(i+1, co, er+1);
  answer += solve(i+1, co, er+1);
  return memo[i][co][er] = answer%p;
}
int main(void)
{
  string s;
  cin >> n >> s;
  m=s.size();
  cout << solve(0,0,0) <<endl;
}


Compiler output:
a.cc:5:7: error: expected nested-name-specifier before 'long'
    5 | using long long = LL;
      |       ^~~~
a.cc:7:1: error: 'LL' does not name a type
    7 | LL p = 1000000007ll;
      | ^~
a.cc:8:1: error: 'LL' does not name a type
    8 | LL n,m;
      | ^~
a.cc:10:5: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |     ^~
a.cc:10:12: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |            ^~
a.cc:10:19: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                   ^~
a.cc:10:22: error: 'LL' was not declared in this scope
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                      ^~
a.cc:10:22: error: template argument 1 is invalid
a.cc:10:22: error: template argument 2 is invalid
a.cc:10:22: error: template argument 3 is invalid
a.cc:10:22: error: template argument 4 is invalid
a.cc:10:24: error: template argument 1 is invalid
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                        ^~
a.cc:10:24: error: template argument 2 is invalid
a.cc:10:24: error: template argument 3 is invalid
a.cc:10:24: error: template argument 4 is invalid
a.cc:10:26: error: template argument 1 is invalid
   10 | map<LL,map<LL,map<LL,LL>>> memo;
      |                          ^
a.cc:10:26: error: template argument 2 is invalid
a.cc:10:26: error: template argument 3 is invalid
a.cc:10:26: error: template argument 4 is invalid
a.cc:12:1: error: 'LL' does not name a type
   12 | LL solve(LL i,LL co,LL er)
      | ^~
a.cc: In function 'int main()':
a.cc:29:10: error: 'n' was not declared in this scope
   29 |   cin >> n >> s;
      |          ^
a.cc:30:3: error: 'm' was not declared in this scope
   30 |   m=s.size();
      |   ^
a.cc:31:11: error: 'solve' was not declared in this scope
   31 |   cout << solve(0,0,0) <<endl;
      |           ^~~~~
Language: C++

#include <bits/stdc++.h>
typedef long long LL;
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

using namespace std;
LL p = 1000000007ll;
LL n,m;

map<LL,map<LL,map<LL,LL>>> memo;

LL solve(LL i,LL co,LL er)
{
  if(i==n) {
    if(co == m && er == 0) return 1;
    else return 0;
  }
  if(memo[i][co].count(er)) return memo[i][co][er];
  LL answer = 0;
  answer += solve(i+1, co, max(er-1, 0));
  if(co<m) answer += solve(i+1, co+1, er);
  else answer += solve(i+1, co, er+1);
  answer += solve(i+1, co, er+1);
  return memo[i][co][er] = answer%p;
}
int main(void)
{
  string s;
  cin >> n >> s;
  m=s.size();
  cout << solve(0,0,0) <<endl;
}


Compiler output:
a.cc: In function 'LL solve(LL, LL, LL)':
a.cc:20:31: error: no matching function for call to 'max(LL, int)'
   20 |   answer += solve(i+1, co, max(er-1, 0));
      |                            ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:20:31: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   20 |   answer += solve(i+1, co, max(er-1, 0));
      |                            ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:20:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   20 |   answer += solve(i+1, co, max(er-1, 0));
      |                            ~~~^~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long DP[5001][5001];
long long pow[5001];
int mod=1e9+7;
int main(){
  int N;
  string S;
  cin>>N>>S;
  int now=1;
  for(int i=0;i<N+1;i++){
    DP[0][i]=0;
    pow[i]=now;
    (now*=2)%=mod;
  }
  for(int i=1;i<N+1;i++){
    (DP[i][0]=DP[i-1][1]+DP[i-1][0]);
    for(int j=1;j<N+1;j++){
      (DP[i][j]=DP[i-1][j-1]+DP[i-1][j+1])%=pow[j];
    }
  }
  cout<<DP[N][S.size()]<<endl;
  return 0;
}
  

Compiler output:
a.cc:4:19: error: 'long long int pow [5001]' redeclared as different kind of entity
    4 | long long pow[5001];
      |                   ^
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/c++config.h:683,
                 from /usr/include/c++/14/cassert:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:33,
                 from a.cc:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: previous declaration 'double pow(double, double)'
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:13:8: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   13 |     pow[i]=now;
      |        ^
a.cc:19:48: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
   19 |       (DP[i][j]=DP[i-1][j-1]+DP[i-1][j+1])%=pow[j];
      |                                                ^
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
	scanf("%d",&m);
	scanf("%s",s);
	n=strlen(s);
	for(int j=1;j<=m;j++)
		for(int i=0;i<=m;i++)
		{
			if(i!=m)
				f[i][j]+=2ll*f[i+1][j-1];
			if(i==0)
				f[i][j]+=f[i][j-1];
			else
				f[i][j]+=f[i-1][j-1];
			f[i][j]%=mod;
		}
	printf("%lld",f[n][m]);
}

Compiler output:
/tmp/ccbcq1MI.s: Assembler messages:
/tmp/ccbcq1MI.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccvMrLkS.o: 'No space left on device'
Language: C++

#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
	scanf("%d",&m);
	scanf("%s",s);
	n=strlen(s);
	for(int j=1;j<=m;j++)
		for(int i=0;i<=m;i++)
		{
			if(i!=m)
				f[i][j]+=2ll*f[i+1][j-1];
			if(i==0)
				f[i][j]+=f[i][j-1];
			else
				f[i][j]+=f[i-1][j-1];
			f[i][j]%=mod;
		}
	printf("%lld",f[n][m]%mod);
}

Compiler output:
/tmp/cc8LAHZ2.s: Assembler messages:
/tmp/cc8LAHZ2.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccNMwuYU.o: 'No space left on device'
Language: C++

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
	scanf("%d",&m);
	scanf("%s",s);
	n=strlen(s);
	for(int j=1;j<=m;j++)
		for(int i=0;i<=m;i++)
		{
			if(i!=m)
				f[i][j]+=2ll*f[i+1][j-1];
			if(i==0)
				f[i][j]+=f[i][j-1];
			else
				f[i][j]+=f[i-1][j-1];
			f[i][j]%=mod;
		}
	printf("%lld",f[n][m]%mod);
}

Compiler output:
/tmp/ccP4mus5.s: Assembler messages:
/tmp/ccP4mus5.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccTVS4rt.o: 'No space left on device'
Language: C++

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define mod 1000000007
typedef long long LL;
int n,m;
LL f[5005][5005]={1};
char s[5005];
int main()
{
	scanf("%d%s",&m,s);
	n=strlen(s);
	for(int j=1;j<=m;j++)
		for(int i=0;i<=m;i++)
		{
			if(i!=m)
				f[i][j]+=2ll*f[i+1][j-1];
			if(i==0)
				f[i][j]+=f[i][j-1];
			else
				f[i][j]+=f[i-1][j-1];
			f[i][j]%=mod;
		}
	printf("%lld",f[n][m]%mod);
}

Compiler output:
/tmp/ccvJZm1E.s: Assembler messages:
/tmp/ccvJZm1E.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccZmG3Vy.o: 'No space left on device'
Language: C++

#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
#define Max(_A,_B) (_A>_B?_A:_B)

int n,f[5005][5005],len;
int clz=1E9+7;
char ch[5005];
long long pw(long long a,int b){
    long long nw=1;
    while(b){
        if(b&1){
            nw=nw*a%clz;
        }
        a=a*a%clz;
        b>>=1;
    }
    return nw;
}
void init(){
//    freopen("keyboard.in","r",stdin);
//    freopen("keyboard.out","w",stdout);
    scanf("%d",&n);
    scanf("%s",ch);
    len=int(strlen(ch));
    f[0][0]=1;
    for(int i=0;i<=n;++i){
        for(int j=0;j<=i;++j){
            f[i+1][j+1]=int(1LL*f[i][j]*2%clz+f[i+1][j+1]%clz)%clz;
            f[i+1][Max(j-1,0)]=int(1LL*(f[i][j]+f[i+1][Max(j-1,0)])%clz);
        }
    }
    int anss=(int(pw(pw(2,len),clz-2)*f[n][len]%clz));
    printf("%d",ans);
}
//int(pw(pw(2,len),clz-2))*
int main(){
    init();
    return 0;
}

Compiler output:
a.cc: In function 'void init()':
a.cc:35:17: error: 'ans' was not declared in this scope; did you mean 'anss'?
   35 |     printf("%d",ans);
      |                 ^~~
      |                 anss
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
const long long mod=1e9+7;
ll pow(ll a, ll b, ll MOD)
{
 ll x=1,y=a; 
 while(b > 0)
 	{
 		if(b%2 == 1)
 	{
 		x=(x*y);
 		if(x>MOD) x%=MOD;
 	}
 	y = (y*y);
 	if(y>MOD) y%=MOD; 
 	b /= 2;
 	}
 return x;
}
 
long long dp[5001][5001],n,l;
int main(){
	cin>>n;
	string s;
	cin>>s;	l=s.size();
	dp[0][0]=1;
	for(int i=0;i<n;i++){
		for(int j=0;j<=n;j++){
			if(dp[i][j]){
				dp[i+1][j+1]+=2*dp[i][j];
				dp[i+1][j+1]%=mod;
				if(j==0){
					dp[i+1][0]+=dp[i][0];
					dp[i+1][0]%=mod;
				}
				else{
					dp[i+1][j-1]+=dp[i][j];
					dp[i+1][j-1]%=mod;
				}
			}
		}
	}
	cout<<dp[n][l]*Pow(2,mod-2)%mod;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:44:24: error: 'Pow' was not declared in this scope; did you mean 'pow'?
   44 |         cout<<dp[n][l]*Pow(2,mod-2)%mod;
      |                        ^~~
      |                        pow
Language: C++

#include "bits/stdc++.h"
#define ll long long
#define rep2(i,a,b) for(int i=(a);i<=(b);++i)
#define rep(i,n) for(int i=0;i<n;i++)
#define pii pair<int,int>
#define ti3 tuple<int,int,int>
ll int MOD=1e9+7;
#define N 6000
 
using namespace std;
string alphabet("abcdefghijklmnopqrstuvwxyz");

ll int poww(ll int a,ll int b){
    ll int ans=1,temp=a;
    while(b){
        
        if(b%2) ans=(temp*ans)%MOD;
        b>>=1;
      temp=(temp*temp)%MOD;

    }
    return ans;
}
ll int n;

ll int dp[N][N]={};
ll int calc(ll int a,ll int b){
    if(a<b) return 0;
    if(dp[a][b]) return dp[a][b];
    visited[a][b]=1;
    if(a==0){
        if(b==0) return 1;
        else return 0;
    }
    if(b==0){
        return dp[a][b]=(calc(a-1,1)+calc(a-1,0))%MOD;
    }
    return dp[a][b]=(calc(a-1,b+1)+calc(a-1,b-1)*2)%MOD;
}
main(){
    string s;
    cin>>n>>s;
    ll int t=s.size();
    ll int inv=poww(poww(2,t),MOD-2);
    cout<<calc(n,t)*inv%MOD;

    
    

    return 0;
}

Compiler output:
a.cc: In function 'long long int calc(long long int, long long int)':
a.cc:30:5: error: 'visited' was not declared in this scope
   30 |     visited[a][b]=1;
      |     ^~~~~~~
a.cc: At global scope:
a.cc:40:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   40 | main(){
      | ^~~~
Language: C++

#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
long long a[5002][5002]={{1}},b[2][5002],i,j,m,n,z=1e9+7;char c[5001];
int main()
{
	scanf("%lld%s",&n,c),m=strlen(c);
	for(i=0;i<=n;i++)
	for(j=0;j<=m;j++)
	{
		b[i&1][j]=(b[i&1][j]<<1)%z;
		a[i][j]=(a[i][j]+b[i&1][j])%z;
		if(!j)a[i+1][j]=(a[i+1][j]+a[i][j])%z;
		b[i&1][j]=(a[i][j]+b[i&1][j])%z;
		a[i+1][j+1]=(a[i+1][j+1]+a[i][j])%z;
	}
	printf("%lld",a[n][m]);
	return 0;
}


Compiler output:
/tmp/cco3sW3H.s: Assembler messages:
/tmp/cco3sW3H.s: Fatal error: can't fill 256 bytes in section .data of /tmp/cccVeC2R.o: 'No space left on device'
/tmp/cco3sW3H.s: Fatal error: /tmp/cccVeC2R.o: No such file or directory
Language: C++

#pragma region include
#include <iostream>
#include <iomanip>
#include <stdio.h>

#include <sstream>
#include <algorithm>
#include <iterator>
#include <cmath>
#include <complex>

#include <string>
#include <cstring>
#include <vector>
#include <tuple>
#include <bitset>

#include <queue>
#include <complex>
#include <set>
#include <map>
#include <stack>
#include <list>

#include <fstream>
#include <random>
//#include <time.h>
#include <ctime>
#pragma endregion //#include
/////////
#define REP(i, x, n) for(int i = x; i < n; ++i)
#define rep(i,n) REP(i,0,n)
#define ALL(X) X.begin(), X.end()
/////////
#pragma region typedef
typedef long long LL;
typedef long double LD;
typedef unsigned long long ULL;
typedef std::pair<LL,LL> PLL;//
typedef std::pair<int,int> PII;//
#pragma endregion //typedef
////定数
const int INF = (int)1e9;
const LL MOD = (LL)1e9+7;
const LL LINF = (LL)1e18+20;
const double PI = acos(-1.0);
const double EPS = 1e-9;
/////////
using namespace::std;

void solve(){
	int N;
	string str;
	cin >> N >> str;
	int size = str.size();

	//何らかのi文字を作る通り数。
	vector< LL > dp(N+1,0);
	vector< LL > next(N+1,0);
	vector< LL > zero(N+1,0);
	
	dp[0] = 1;
	for(int Len=1;Len<=N;++Len){
		for(int i=0;i<=Len;++i){
			if( dp[i] == 0 ) continue;
			next[i+1] += dp[i]*2;
			next[i+1] %= MOD;
			if( i > 0){
				next[i-1] += dp[i];
				next[i-1] %= MOD;
			}else{//i==0
				next[0] += dp[i];
				next[0] %= MOD;
			}
		}
		dp = next;
		next = zero;
	}
	//modの中で2^sizeで割る
	LL MOD_2_size = powMod(powMod(2,MOD-2),size);
	LL ans = (dp[size] * MOD_2_size) % MOD;
	cout << ans << endl;
}

#pragma region main
signed main(void){
	std::cin.tie(0);
	std::ios::sync_with_stdio(false);
	std::cout << std::fixed;//小数を10進数表示
	cout << setprecision(16);//小数点以下の桁数を指定//coutとcerrで別	

	solve();
}
#pragma endregion //main()

Compiler output:
a.cc: In function 'void solve()':
a.cc:80:32: error: 'powMod' was not declared in this scope
   80 |         LL MOD_2_size = powMod(powMod(2,MOD-2),size);
      |                                ^~~~~~
a.cc:80:25: error: 'powMod' was not declared in this scope
   80 |         LL MOD_2_size = powMod(powMod(2,MOD-2),size);
      |                         ^~~~~~
Language: C++


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

int n;
int memo[5001][10001];
bool tag[5001][10001];
const int mod = 1000000007;
const int invtwo = 500000004;
int dp(int i, int j)//i=押したキー回数　j=現在のカーソル位置
{
	if (i < j)return 0;
	if (i == 0)
	{
		if (j == 0)return 1;
		return 0;
	}
	if (tag[i][j])return memo[i][j];
	int ret = 0;
	if (j == 0)
	{
		ret += dp(i - 1, j);
		ret += dp(i - 1, j + 1);
	}
	else
	{
		ret += dp(i - 1, j + 1);
		ret += dp(i - 1, j - 1) * 2;
	}
	ret %= mod;
	tag[i][j] = true;
	return memo[i][j] = ret;
}

int main(void)
{
	cin >> n;
	string s;
	cin >> s;
	memset(tag, false, sizeof(tag));
	int ans = dp((int)n, s.size());
	for (int i = 0; i < s.size(); ++i)
	{
		ans *= invtwo;
		ans %= mod;
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:9: error: 'memset' was not declared in this scope
   41 |         memset(tag, false, sizeof(tag));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 | #include <string>
Language: C++

#include <iostream>
#include <string>
using namespace std;
const int MOD = 1000000007;
const int MAX_N = 5000;
long long dp[MAX_N+1][MAX_N+1]={1};
int main() {
	int N;
	string s;
	cin >> N >> s;
	for(int i=0;i<N;i++) {
		dp[i+1][0] = dp[i][0];
		dp[i+1][1] = dp[i][0];
		for(int j=1;j<=i;j++) {
			dp[i+1][j+1] = dp[i][j];
			dp[i+1][j-1] += dp[i][j] * 2;
			dp[i+1][j-1] %= MOD;
		}
	}
	cout << dp[N][s.length()] << endl;
	return 0;
}


Compiler output:
/tmp/ccaJ8oF6.s: Assembler messages:
/tmp/ccaJ8oF6.s: Fatal error: can't fill 256 bytes in section .data of /tmp/ccTAtWFU.o: 'No space left on device'
/tmp/ccaJ8oF6.s: Fatal error: /tmp/ccTAtWFU.o: No such file or directory
Language: C++

#include <string>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
const int mod = 1e9+7;
int add(int a, int b) { return (a+b)%mod; }
int sub(int a, int b) { return (a-b+mod)%mod; }
int mult(int a, int b) { return (long long) a*b%mod; }
int n;
string s;
int dp[5005][5005];
int main() {
cin >> n >> s;
dp[0][s.length()] = 1;
for (int i=0;i<n;i++) {
for (int j=0;j<5004;j++) {
if (j==0) {
dp[i+1][0] = add(dp[i+1][0],dp[i][j]);
} else {
dp[i+1][j-1] = add(dp[i+1][j-1],dp[i][j]);
}
dp[i+1][j+1] = add(dp[i+1][j+1],mult(dp[i][j],2));
}
cout << dp[n][0];
}

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

#include <string>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
const int mod = 1e9+7;
int add(int a, int b) { return (a+b)%mod; }
int sub(int a, int b) { return (a-b+mod)%mod; }
int mult(int a, int b) { return (long long) a*b%mod; }
int n;
string s;
int dp[5005][5005];
int main() {
cin >> n >> s;
dp[0][s.length()] = 1;
for (int i=0;i<n;i++) {
for (int j=0;j<5004;j++) {
if (j==0) {
dp[i+1][0] = add(dp[i+1][0],dp[i][j]);
} else {
dp[i+1][j-1] = add(dp[i+1][j-1],dp[i][j]);
}
dp[i+1][1] = add(dp[i+1][1],mult(dp[i][j],2));
}
cout << dp[n][0];
}

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

#include<stdio.h>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<cmath>
#include<bitset>
 
#define Vsort(a) sort(a.begin(), a.end())
#define Vreverse(a) reverse(a.begin(), a.end())
#define Srep(n) for(int i = 0; i < (n); i++)
#define Lrep(i,a,n) for(int i = (a); i < (n); i++)
#define Brep(n) for(int bit = 0; bit < (1<<n); bit++)
#define rep2nd(n,m) Srep(n) Lrep(j,0,m)
#define vi vector<int>
#define vi64 vector<int64_t>
#define vvi vector<vector<int>>
#define vvi64 vector<vector<int64_t>>
#define P pair<int,int>
#define F first
#define S second

using namespace std;

int main(){
  int n;
  cin >> n;
  vi dp(n);
  dp[0] = 1;
  Lrep(i,1,100) dp[i] = dp[i-1] + i + 1;
  cout << dp[n-1] << endl;
}
p

Compiler output:
a.cc:34:1: error: 'p' does not name a type
   34 | p
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
cin>>n;
int s=0;
for(int i=1;i<=n; i++) {
s+=i;}
cout<<s;
return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:6: error: 'n' was not declared in this scope; did you mean 'yn'?
    4 | cin>>n;
      |      ^
      |      yn
Language: C++

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

int main() {
  int N;
 cin >> N;
int souwa = N*(N+1)/2;
cout >> int souwa >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before 'int'
    8 | cout >> int souwa >> endl;
      |         ^~~
Language: C++

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

int main() {
  int N;
 cin >> N;
int souwa = N*(N+1)/2
cout >> souwa >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected ',' or ';' before 'cout'
    8 | cout >> souwa >> endl;
      | ^~~~
Language: C++

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

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

cout >> int N*(N+1)/2; >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected primary-expression before 'int'
    8 | cout >> int N*(N+1)/2; >> endl;
      |         ^~~
a.cc:8:24: error: expected primary-expression before '>>' token
    8 | cout >> int N*(N+1)/2; >> endl;
      |                        ^~
Language: C++

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

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

cout >> N(N+1)/2 >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'N' cannot be used as a function
    8 | cout >> N(N+1)/2 >> endl;
      |         ~^~~~~
Language: C++

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

int main() {
  int N;
 cin >> N;
 int k=N(N+1)/2

cout >> k >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'N' cannot be used as a function
    7 |  int k=N(N+1)/2
      |        ~^~~~~
Language: C++

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

int main() {
  int n;  
  cin >> n;
  int s = 0;
  for(int i=1; i<=n; i++){
  s += i}
}
cout << s << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: expected ';' before '}' token
    9 |   s += i}
      |         ^
      |         ;
a.cc: At global scope:
a.cc:11:1: error: 'cout' does not name a type
   11 | cout << s << endl;
      | ^~~~
Language: C++

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

int main() {
  int N;
 cin >> N;
number==N*(N+1)/2;
cout >> number >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'number' was not declared in this scope
    7 | number==N*(N+1)/2;
      | ^~~~~~
Language: C++

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

int main() {
  int N;
 cin >> N;
number==1/2*N*(N+1);
cout >> number >> endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'number' was not declared in this scope
    7 | number==1/2*N*(N+1);
      | ^~~~~~
Language: C++

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

int main() {
  int N;
 cin >> N;
number==1/2*N*(N+1)
cout >> number >> endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'number' was not declared in this scope
    7 | number==1/2*N*(N+1)
      | ^~~~~~
a.cc:8:24: error: expected '}' at end of input
    8 | cout >> number >> endl;
      |                        ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  scn(n);
  
  cout<<(n*(n-1))/2<<endl;
}

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

#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  cout << n(n+1)/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'n' cannot be used as a function
    7 |   cout << n(n+1)/2 << endl;
      |           ~^~~~~
Language: Java

    import java.util.*;
    import java.io.*;
     
     
    public class Main{
     
         public static void main(String `[]args){
            Scanner scanner = new Scanner(System.in);
           int n = scanner.nextInt();
           int [] arr = new int[n];
           
         
           
           for(int i=0;i<n;i++)
           arr[i] = scanner.nextInt();
          
          
          int d =0;
            if((arr[0]+arr[n-1])%2==0)
             d =(((arr[0]+arr[n-1])/2));
              else
                d =(((arr[0]+arr[n-1])/2))+1;
            
            int sum=0;
            for(int i=0;i<n;i++)
             sum = sum+(int) Math.pow((arr[i]-d),2);
        
            System.out.println(sum);
            
            
            //System.out.println()
            //for(int i=0;i<n;i++)
         }
    }

Compiler output:
Main.java:7: error: illegal character: '`'
         public static void main(String `[]args){
                                        ^
1 error
Language: C++

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

int main() {
  int n,c=0;
  cin >> n;
  for(i = 1; i <= n ; i++) c += i ;
  cout << c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i = 1; i <= n ; i++) c += i ;
      |       ^
Language: C++

#include<bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, a, b) for (int i =a; i < b; i++)
#define all(a) a.begin(), a.end()
#define PI 3.14159265359
static const int INF = 1e9+7;
typedef long long ll;
using namespace std;
int main()
{

    string s;
    cin>>s;
    string st;
    int n=s.length();
    rep(i,n)
    {
        if(s[i]=='1'){
            st=st+s[i];
        }
        if(s[i]=='0')
        {
            st=st+s[i];
        }
        if(s[i]=='B'&&s!="")
        {
            st.pop_back(s[i]);
        }
    }
    cout<<st;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:24: error: no matching function for call to 'std::__cxx11::basic_string<char>::pop_back(__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   27 |             st.pop_back(s[i]);
      |             ~~~~~~~~~~~^~~~~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:2174:7: note: candidate: 'void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::pop_back() [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
 2174 |       pop_back() noexcept
      |       ^~~~~~~~
/usr/include/c++/14/bits/basic_string.h:2174:7: note:   candidate expects 0 arguments, 1 provided
Language: C++

#include<bits/stdc++>h>
using namespace std;
int main(){
int n;
  cin>>n;
  int x=0;
  for(int i=1;i<=n;i++){
    x+=i;
  }
  cout<<x<<endl;
}


Compiler output:
a.cc:1:23: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++>h>
      |                       ^
a.cc:1:9: fatal error: bits/stdc++>: No such file or directory
    1 | #include<bits/stdc++>h>
      |         ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;

int main() {
  int n;
  cin >> n;
  cout << (n(n+1))/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'n' cannot be used as a function
    7 |   cout << (n(n+1))/2 << endl;
      |            ~^~~~~