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

def p(boundary):
    step=[0]*(boundary+1)
    step[0]=0
    step[1]=1
    step[2]=2
    for i in range(2,boundary-1):
        step[i+1]=step[i]+step[i-1]
    d=step[boundary]
    return d


N,M = (int(i) for i in input().split())
a = [int(input()) for i in range(M)] 
b=[]
for i in range(0,M-2):
    b.append(a[i+1]-a[i]-2)
b.append(N-a[M-1]-1)
ans=p(a[0]-1)
for i in range(M):
    c=b[i]
    ans=p(c)*ans
print(ans)

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def p(boundary):
      | ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const long long mod=1e9+7;
typedef long long ll;
ll min(ll a,ll b){
  if(a>b){
    return b;
    }
      else{
        return a;
      }
  }
int main(){ 
  int N,M;
cin>>N>>M;
  
  vector<bool>a(N+1,true);//ハズレの階段を記録
  
  for(int i=0;i<M;i++){
    int x;
    cin>>x;
    a[x]=false;
  }

  vector<long long int>dp(N+1);//階ごとにパターン数を記録
 dp[0]=1;
  
  for(int now=0;now<N;++now){//nextにはnext-1とnext-2からくるパターンがあるそれをたす
    for(int next=now+1;next<=min(N,now+2);++next){//nowはnext-1とnext-2
      if(a[next]){
dp[next]+=dp[now]
        dp[next]%=mod;//それぞれに%=が使える
      }
    }
  }
  //DPはその階にくるパターンがN回あり、それぞれパターンに到達するパターンを全てたす
cout<<dp[N]<<endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:18: error: expected ';' before 'dp'
   31 | dp[next]+=dp[now]
      |                  ^
      |                  ;
   32 |         dp[next]%=mod;//それぞれに%=が使える
      |         ~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  int n,m;
  vector<int> broken(m+1);
  rep(i,m){
  int a;
  cin>>a;
    broken[a]=1;
  }
  vector<int>dp(n+2);
  for(int i= n-1;i>=0;i--){
    if(broken[i]){
      dp[i]=0;
      continue;
    }
    dp[i]=(d[i+2]+dp[i+1])%1000000007;
  }
  cout<<dp[0]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:12: error: 'd' was not declared in this scope
   27 |     dp[i]=(d[i+2]+dp[i+1])%1000000007;
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

int main(){
  int n,m;
  vector<int> broken(m+1);
  rep(i,m){
  int a;
  cin>>a;
    broken[a]=1;
  }
  vector<int>dp(n+2);
  for(int n-1;i>=0;i--){
    if(broken[i]){
      dp[i]=0;
      continue;
    }
    dp[i]=(d[i+2]+dp[i+1])%1000000007;
  }
  cout<<dp[0]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: expected ';' before '-' token
   22 |   for(int n-1;i>=0;i--){
      |            ^
      |            ;
a.cc:22:15: error: 'i' was not declared in this scope
   22 |   for(int n-1;i>=0;i--){
      |               ^
a.cc:22:19: error: expected ')' before ';' token
   22 |   for(int n-1;i>=0;i--){
      |      ~            ^
      |                   )
a.cc:22:20: error: 'i' was not declared in this scope
   22 |   for(int n-1;i>=0;i--){
      |                    ^
Language: C++

#include <bits/stdc++.h> 
using namespace std;
const int mod = 1000000007;

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

vector<int> oks(n+1,true);
for(int i=0; i<m; i++){
    int a; cin >> a;
    oks[a] = false;
}

vector<long long int> dp(N+1);
dp[0]=1;
for(int now=0; now<n; now++){
    for(int next=now+1; next<=min(n.now+2); next++){
        if(oks[next]){
            dp[next] += dp[now];
            dp[next] %= mod;
        }
    }
}

cout << dp[n] << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: 'N' was not declared in this scope
   15 | vector<long long int> dp(N+1);
      |                          ^
a.cc:18:37: error: request for member 'now' in 'n', which is of non-class type 'int'
   18 |     for(int next=now+1; next<=min(n.now+2); next++){
      |                                     ^~~
Language: C++

#include <bits/stdc++.h> 
using namespace std;
typedef long long ll;
const int mod = 1000000007;

long fib(int a){
    ll ans = 1;
    if(a==0 || a==1) return ans;
    else return fib(a-1)+fib(a-2);
}

int main(){
int n,m; int i=0; long ans=1; int tem=0;
cin >> n >> m;
vector<int> a(m);
while(i<m){
    cin >> a[i++];
}

for(int p=0; p<m; p++){
    if(tem==a[p]){
        ans=0;
        break;
    }
    ans *= fib(a[p]-tem-1);
    ans %= mod;
    tem=a[p]+1;
}

  ans *= fib(n-tem);
  ans %= mod;
 printf("%lld\n", ans.x);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:23: error: request for member 'x' in 'ans', which is of non-class type 'long int'
   32 |  printf("%lld\n", ans.x);
      |                       ^
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX((X), (Y)) ( ((X) > (Y))? (X) : (Y))
#define MIN((X), (Y)) (((X) < (Y))? (X) : (Y))
//　min
int main(void){
  int n, m;
  int a[100000];
  int MOD = 1000000007;
  int sum = 0;
  
  scanf("%d%d", &n, &m);

  for(int i = 1; i <= m; i++){
    scanf("%d", &a[i]);
    if(a[i] == a[i-1]){
      printf("0\n");
      return 0; 
    }
  }

//  int cntm = 0;
//  a[0] = 0;
//  a[1] = 1;
  for(int i = 2; i <= n; i++){
    if(a[m] == i){ 
   //   a[i] = a[i-1] +
      sum = sum + 1;
    }else{
      sum = sum + 2;
    }    

    if(sum > MOD){
      sum -= MOD;
     }
  }
  
  printf("%d\n", sum);

  return 0;
}


Compiler output:
main.c:5:13: error: expected parameter name, found "("
    5 | #define MAX((X), (Y)) ( ((X) > (Y))? (X) : (Y))
      |             ^
main.c:6:13: error: expected parameter name, found "("
    6 | #define MIN((X), (Y)) (((X) < (Y))? (X) : (Y))
      |             ^
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX((X), (Y)) ( ((X) > (Y))? (X) : (Y))
#define MIN((X), (Y)) (((X) < (Y))? (X) : (Y))
//　min
int main(void){
  int n, m;
  int a[100000];
  int MOD = 1000000007;
  int sum = 0
  
  scanf("%d%d", &n, &m);

  for(int i = 1; i <= m; i++){
    scanf("%d", &a[i])
    if(a[i] == a[i-1]){
      printf("0\n");
      return 0; 
    }
  }

//  int cntm = 0;
//  a[0] = 0;
//  a[1] = 1;
  for(int i = 2; i <= n; i++){
    if(a[m] == i){ 
   //   a[i] = a[i-1] +
      sum = sum + 1;
    }else{
      sum = sum + 2;
    }    

    if(sum > MOD){
      sum -= MOD;
     }
  }
  
  printf("%d\n", sum);

  return 0;
}


Compiler output:
main.c:5:13: error: expected parameter name, found "("
    5 | #define MAX((X), (Y)) ( ((X) > (Y))? (X) : (Y))
      |             ^
main.c:6:13: error: expected parameter name, found "("
    6 | #define MIN((X), (Y)) (((X) < (Y))? (X) : (Y))
      |             ^
main.c: In function 'main':
main.c:14:3: error: expected ',' or ';' before 'scanf'
   14 |   scanf("%d%d", &n, &m);
      |   ^~~~~
main.c:17:23: error: expected ';' before 'if'
   17 |     scanf("%d", &a[i])
      |                       ^
      |                       ;
   18 |     if(a[i] == a[i-1]){
      |     ~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(ll i=0;i<(ll) n;i++)
#define mod 1e9+7
ll dp[100000]; 

int main(){
  ll n,m,k,tmp=-1,ans=1;
  cin>>n>>m;
  vector<ll> a(n);
  rep(i,n){
    cin>>m;
    a[m-1]=1;
  }
  
  
  dp[0]=1;
  dp[1]=2;
  
  rep(i,n-2){
    dp[i+2]=(a[i+1]==0?dp[i+1]:(ll)0)+(a[i]==0?dp[i]:(ll)0);
    dp[i+2]%=mod;
  }
  
  cout<<dp[n-1]<<endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:12: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
   23 |     dp[i+2]%=mod;
      |            ^
a.cc:23:12: note:   in evaluation of 'operator%=(ll {aka long long int}, double)'
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX((X), (Y)) ( ((X) > (Y))? (X) : (Y))
#define MIN((X), (Y)) (((X) < (Y))? (X) : (Y))
//　min
int main(void){
  int n, m;
  int a[100000];
  int MOD = 1000000007;
  int sum = 0
  
  scanf("%d%d", &n, &m);

  for(int i = 1; i <= m; i++){
    scanf("%d", &a[i])
    if(a[i] == a[i-1]){
      printf("0\n");
      return 0; 
    }
  }

  int cntm = 1;
  a[0] = 0;
  a[1] = 1;
  for(int i = 2; i <= n; i++){
    if(a[m] == i){ 
      sum = 
    }else{

    }    


  }
  
  printf("%d\n", sum % MOD);

  return 0;
}


Compiler output:
main.c:5:13: error: expected parameter name, found "("
    5 | #define MAX((X), (Y)) ( ((X) > (Y))? (X) : (Y))
      |             ^
main.c:6:13: error: expected parameter name, found "("
    6 | #define MIN((X), (Y)) (((X) < (Y))? (X) : (Y))
      |             ^
main.c: In function 'main':
main.c:14:3: error: expected ',' or ';' before 'scanf'
   14 |   scanf("%d%d", &n, &m);
      |   ^~~~~
main.c:17:23: error: expected ';' before 'if'
   17 |     scanf("%d", &a[i])
      |                       ^
      |                       ;
   18 |     if(a[i] == a[i-1]){
      |     ~~                 
main.c:30:5: error: expected expression before '}' token
   30 |     }else{
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long int mod = 10e9 + 7;

int main(){
	long long int N, M;
	cin >> N >> M;
	vector<long long int> dp(N + 1, 0);
	vector<bool> pos(N + 1, true);
	for(int i = 0; i < M; i++){
		long long int n;
		cin >> n;
		pos[n] = false;
	}
	
	dp[0] = 1;
	if(pos[1]) dp[1] = 1;
	
	for(int i = 2; i <= N; i++){
		if(pos[i]){
			dp[i] = dp[i - 1] + dp[i - 2];
			dp[i] %= mod;
		}
	}
	
	long long int ans = dp[N]
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: expected ',' or ';' before 'cout'
   27 |         cout << ans << endl;
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = 10e9 + 7;

int main(){
	long long N, M;
	cin >> N >> M;
	vector<long long> dp(N + 1, 0);
	vector<bool> pos(N + 1, true);
	for(int i = 0; i < M; i++){
		long long n;
		cin >> n;
		pos[n] = false;
	}
	
	dp[0] = 1;
	if(pos[1]) dp[1] = 1;
	
	for(int i = 2; i <= N; i++){
		if(pos[i]){
			dp[i] = dp[i - 1] + dp[i - 2];
			dp[i] %= mod;
		}
	}
	
	int ans = dp[N]
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: expected ',' or ';' before 'cout'
   27 |         cout << ans << endl;
      |         ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = 10e9 + 7;

int main(){
	long long N, M;
	cin >> N >> M;
	vector<long long> dp(N + 1);
	vector<bool> pos(N + 1, true);
	for(int i = 0; i < M; i++){
		long long n;
		cin >> n;
		pos[n] = false;
	}
	
	dp[0] = 1;
	if(pos[1]){
		dp[1] = 1;
	} else {
		dp[1] = 0;
	
	for(int i = 2; i <= N; i++){
		if(pos[i]){
			dp[i] = dp[i - 1] + dp[i - 2];
			dp[i] %= mod;
		} else {
			dp[i] = 0;
		}
	}
	
	cout << dp[N] << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
const long long mod = 10e9 + 7;

int main(){
	long long N, M;
	cin >> N >> M;
	vector<long long> dp(N + 1);
	vector<bool> pos(N + 1, true);
	for(int i = 0; i < M; i++){
		long long n;
		cin >> n;
		pos[n] = false;
	}
	
	dp[0] = 1;
	if(pos[1]){
		dp[1] = 1;
	} else {
		dp[1] = 0;
	
	for(int i = 2; i <= N; i++){
		if(pos[i]){
			dp[i] = dp[i - 1] + dp[i - 2];
			dp[i] %= mod;
		} else {
			dp[i] = 0;
		}
	}
	
	cout << dp[N] << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:32:18: error: expected '}' at end of input
   32 |         return 0;
      |                  ^
a.cc:19:16: note: to match this '{'
   19 |         } else {
      |                ^
a.cc:32:18: error: expected '}' at end of input
   32 |         return 0;
      |                  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const long long mod = 10e9 + 7;

int main(){
	long long N, M;
	cin >> N >> M;
	vector<long long> dp(N + 1);
	vector<bool> pos(N + 1, true);
	for(int i = 0; i < M; i++){
		long long n;
		cin >> n;
		pos[n] = false;
	}
	
	dp[0] = 1;
	if(pos[1]){
		dp[1] = 1;
	} else {
		dp[1] = 0;
	
	for(int i = 2; i <= N; i++){
		if(pos[i]){
			dp[i] = dp[i - 1] + dp[i - 2];
			dp[i] %= mod;
		} else {
			dp[i] = 0;
		}
	}
	
	cout << dp[N] << endl;
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
const long long mod = 10e9 + 7;

int main(){
	int N, M;
	cin >> N >> M;
	vector<long long> dp(N + 1, 0);
	vector<bool> pos(N + 1, true);
	for(int i = 0; i < M; i++){
		int n;
		cin >> n;
		pos[n] = false;
	}
	
	dp[0]++;
	if(pos[1]) dp[1]++;
		
	for(int i = 2; i <= N; i++){
		if(pos[i]){
			dp[i] += (dp[i - 1] + dp[i - 2]);
			dp[i] %= mod;
		}
	}
	
	cout << dp[N] << endl;
}

/*i-1段目とi-2段目の移動方法の和がi段目の移動方法
dp[i] = dp[i - 1] + dp[i - 2]
pos[i]で壊れているかどうかを判定
pos[i] = false の場合、i段目の移動方法は0であることと同値なので考えない

Compiler output:
a.cc:29:1: error: unterminated comment
   29 | /*i-1段目とi-2段目の移動方法の和がi段目の移動方法
      | ^
Language: C

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define MAX(X, Y) ((X > Y)? X : Y)
#define MIN(X, Y) ((X < Y)? X : Y)
//　min
int main(void){
  int n, m;
  int a[100000];
  int MOD = 1000000007;
  int sum = 0
  
  scanf("%d%d", &n, &m);

  for(int i = 1; i <= m; i++){
    scanf("%d", &a[i])
  }

  
  
  printf("%d\n", sum % MOD);

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:3: error: expected ',' or ';' before 'scanf'
   14 |   scanf("%d%d", &n, &m);
      |   ^~~~~
main.c:17:23: error: expected ';' before '}' token
   17 |     scanf("%d", &a[i])
      |                       ^
      |                       ;
   18 |   }
      |   ~
Language: Java

import java.util.*;

public class Main{
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int n=sc.nextInt();

      int flag = 1;

      int[] a = new int[n];

      for(int i=0;i<n;i++){
        a[i]=sc.nextInt()-1;
      }

      //////////ERROR//////////////////////
      for(int i=0;i<m-1;i++){
        if(a[i+1]==a[i]+1){
          flag = 0;
          break;
        }
      }
      ////////////////////////////////////

      int[] way = new int[n];
      way[0] = 1;
      way[1] = 2;
      int ccnt = 0;
      //////////broken record///////////////
      for(int i=1;i<n;i++){
        for(int j=ccnt;j<m;j++){
          if(i==a[j]){
            way[i] = -1;
            ccnt++;
            break;
          }
        }
      }
      /////////////////////////////////////


      for(int i=2;i<n;i++){
        if(way[i]!=-1){
          way[i] = way[i-1] + way[i-2];
        }
        else{
          way[i] = 0;
        }
      }

      int ans = way[n-1] % 1000000007;

      if(flag==0){
        System.out.println("0");
      }
      else{
        System.out.println(ans);
      }

    }
}


Compiler output:
Main.java:18: error: cannot find symbol
      for(int i=0;i<m-1;i++){
                    ^
  symbol:   variable m
  location: class Main
Main.java:32: error: cannot find symbol
        for(int j=ccnt;j<m;j++){
                         ^
  symbol:   variable m
  location: class Main
2 errors
Language: C++

#include <vector>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(int i=0;i<n;i++)
#define REPS(i,n,s) for(int i=s;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()

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

  int n,m;
  cin >> n >> m;

  vector<int> oks(n+1, true);
  REP(i, m) {
    int a;
    cin >> a;
    oks[a] = false;
  }

  vector<long long int> dp(n+1);
  dp[0] = 1;
  REP(now, N) {
    for(int next = now+1;next<=min(N, now+2); ++next) {
      if(oks[next]) {
        dp[next] += dp[now];
        dp[next] %= 1e9+7;
      }
    }
  }

  cout << dp[n] << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:12: error: 'N' was not declared in this scope
   35 |   REP(now, N) {
      |            ^
a.cc:14:32: note: in definition of macro 'REP'
   14 | #define REP(i,n) for(int i=0;i<n;i++)
      |                                ^
a.cc:39:18: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and 'double' to binary 'operator%'
   39 |         dp[next] %= 1e9+7;
a.cc:39:18: note:   in evaluation of 'operator%=(__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int}, double)'
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
  int N,M;
  cin >> N >> M;
  const = 1000000007;
  vector<int> p(N+2);
  vector<int> broken(M+1);
  
  for(int i=0;i<M;i++){
    int a;
    cin >> a;
    broken[a] = 1;
  }
  
  for(int i=N-1;i>=0;i--){
    if(broken[i] == 1){
      p[i] = 0;
      continue;
    }
    p[i] = (p[i+1]+p[i+2])%const;
  }
  
  cout << p[0] << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: expected unqualified-id before '=' token
    8 |   const = 1000000007;
      |         ^
a.cc:23:28: error: expected primary-expression before 'const'
   23 |     p[i] = (p[i+1]+p[i+2])%const;
      |                            ^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
  int N,M;
  cin >> N >> M;
  
  vector<int> p(N+2);
  vector<int> borken(M+1);
  
  for(int i=0;i<M;i++){
    int a;
    cin >> a;
    broken[a] = 1;
  }
  
  for(int i=N-1;i>=0;i--){
    if(broken[i] == 1){
      p[i] = 0;
      continue;
    }
    p[i] = p[i+1]+p[i+2];
  }
  
  cout << p[0] << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'broken' was not declared in this scope; did you mean 'borken'?
   15 |     broken[a] = 1;
      |     ^~~~~~
      |     borken
a.cc:19:8: error: 'broken' was not declared in this scope; did you mean 'borken'?
   19 |     if(broken[i] == 1){
      |        ^~~~~~
      |        borken
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
  int N,M;
  cin >> N >> M;
  
  vector<int> p(N+2);
  vector<bool> borken(M+1);
  
  for(int i=0;i<M;i++){
    int a;
    cin >> a;
    broken[a] = True;
  }
  
  for(int i=N-1;i>=0;i--){
    if(broken[i] == True){
      p[i] = 0;
      continue;
    }
    p[i] = p[i+1]+p[i+2];
  }
  
  cout << p[0] << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'broken' was not declared in this scope; did you mean 'borken'?
   15 |     broken[a] = True;
      |     ^~~~~~
      |     borken
a.cc:15:17: error: 'True' was not declared in this scope
   15 |     broken[a] = True;
      |                 ^~~~
a.cc:19:8: error: 'broken' was not declared in this scope; did you mean 'borken'?
   19 |     if(broken[i] == True){
      |        ^~~~~~
      |        borken
a.cc:19:21: error: 'True' was not declared in this scope
   19 |     if(broken[i] == True){
      |                     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main(){
  int N,M;
  cin >> N >> M;
  
  vector<int> p(N+2);
  vecotr<bool> borken(M+1);
  
  for(int i=0;i<M;i++){
    int a;
    cin >> a;
    broken[a] = True;
  }
  
  for(int i=N-1;i>=0;i--){
    if(broken[i] == True){
      p[i] = 0;
      continue;
    }
    p[i] = p[i+1]+p[i+2];
  }
  
  cout << p[0] << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'vecotr' was not declared in this scope
   10 |   vecotr<bool> borken(M+1);
      |   ^~~~~~
a.cc:10:10: error: expected primary-expression before 'bool'
   10 |   vecotr<bool> borken(M+1);
      |          ^~~~
a.cc:15:5: error: 'broken' was not declared in this scope
   15 |     broken[a] = True;
      |     ^~~~~~
a.cc:15:17: error: 'True' was not declared in this scope
   15 |     broken[a] = True;
      |                 ^~~~
a.cc:19:8: error: 'broken' was not declared in this scope
   19 |     if(broken[i] == True){
      |        ^~~~~~
a.cc:19:21: error: 'True' was not declared in this scope
   19 |     if(broken[i] == True){
      |                     ^~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
typedef long long ll;

int main() {
  int n,m;
  cin >> n >> m;
  
  vector<int> broken(n);
  rep(i,n){
    int a;
    cin >> a;
    broken[a] = 1;
  }
  
  vector<int> dp(n+2);
  const int mod = 1000000007;
  dp[i] = 1;
  for (int i=n-1; i>=0; i--){
    if (broken[i]){
      dp[i] = 0;
      continue;
    }
    dp[i] = (dp[i+1]+dp[i+2])%mod;
  }
  
  cout << dp[0] << endl;
  return 0;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:6: error: 'i' was not declared in this scope
   19 |   dp[i] = 1;
      |      ^
Language: Java

import java.util.Scanner;

public class ABC129C {
	static long[][] cmb;
	final static int LIMIT_OF_ARRAY = 10000;
	static boolean isHuge = false;
	
	public static void main(String[] args) {
		long mod = 1_000_000_007L;
		
		Scanner in = new Scanner(System.in);
		int num = in.nextInt();
		int bstepNum = in.nextInt();
		if (LIMIT_OF_ARRAY <= num) {
			cmb = new long[LIMIT_OF_ARRAY][LIMIT_OF_ARRAY/2 + 1];
		} else {
			cmb = new long[num + 1][(num + 1)/2 + 1];
		}
		int[] brokenStep = new int[bstepNum];
		long ans = 0;
		for (int i = 0; i < bstepNum; i++) {
			brokenStep[i] = Integer.parseInt(in.next());
			if (i != 0 && brokenStep[i-1] + 1 == brokenStep[i]) {
				System.out.println(ans);
				in.close();
				return;
			}
		}
		in.close();
		int diffmax = 0;
		for (int i = 1; i < bstepNum; i++) {
			if (brokenStep[i] - brokenStep[i - 1] > 0) {
				diffmax = brokenStep[i] - brokenStep[i - 1];
			}
		}
		if (diffmax > 7500) {
			for (int j = 0; j < 2500; j++) {
				for (int k = 0; k < j; k++) {
					combination(j, k, mod);
				}
			}
			if (diffmax >= LIMIT_OF_ARRAY) {
				isHuge = true;
			}
		}
		ans = 1;
		int pos = 0;
		for (int i = 0; i < bstepNum; i++) {
			int step = brokenStep[i] - pos - 1;
			long tmp = 0;
			for (int j = step, skip = 0; j >= 0; j -= 2, skip++) {
				tmp += combination(j + skip, skip, mod);
			}
			ans *= tmp;
			if (ans > mod) {
				ans %= mod;
			}
			pos = brokenStep[i] + 1;
		}
		long lt = 0;
		for (int i = num - pos, skip = 0; i >= 0; i -= 2, skip++) {
			lt += combination(i + skip, skip, mod);
		}
		ans *= lt;
		ans %= mod;
		System.out.println(ans);
	}
	
	public static long combination(int a, int b, long mod) {
		if (a >= cmb.length || b >= cmb[a].length) {
			return combination(a-1, b-1, mod) + combination(a-1, b, mod);
		} else {
			if (cmb[a][b] != 0) return cmb[a][b];
			if (a == b) {
				return cmb[a][b] = 1L;
			} else if (b == 0) {
				return cmb[a][b] = 1L;
			} else if (b == 1) {
				return cmb[a][b] = a;
			} else {
				long tmp = combination(a-1, b-1, mod) + combination(a-1, b, mod);
				if (mod < tmp) {
					tmp %= mod;
				}
				return cmb[a][b] = tmp;
			}
		}
	}
}

Compiler output:
Main.java:3: error: class ABC129C is public, should be declared in a file named ABC129C.java
public class ABC129C {
       ^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int main()
{
  ll N,M,i,j,A;cin>>N>>M;ll answer[N];bool condition[N];memset(condition,True,N);
  for(i=0;i<M;i++){cin>>A;answer[A]=0;condition[A]=False;}
  answer[0]=0;
  if(condition[1]){answer[1]=1;}else{answer[1]=0;}
  for(i=2;i<M;i++){if(!condition[i]){continue;}else{answer[i]=answer[i-1]+answer[i-2];}}
  cout<<answer[M-1]%1000000007<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:74: error: 'True' was not declared in this scope
    6 |   ll N,M,i,j,A;cin>>N>>M;ll answer[N];bool condition[N];memset(condition,True,N);
      |                                                                          ^~~~
a.cc:7:52: error: 'False' was not declared in this scope
    7 |   for(i=0;i<M;i++){cin>>A;answer[A]=0;condition[A]=False;}
      |                                                    ^~~~~
Language: C++

#include<iostream>
#include<cmath>
#include<numeric>
#include<functional>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<n;i++)
#define ll long long
#define modbig (10*10*10*10*10*10*10*10*10+7)
using namespace std;

int main(){
  ll a[100005];
  a[0]=0; a[1]=1;
  rep(i,100002){
    a[i+2]=(a[i+1]+a[i])%modbig;
  }
  ll n,m;
  cin>>n>>m;
  ll cant[m];
  rep(i,m){
    cin>>cant[i];
  }
  ll ans=((n-cant[m-1])*cant[0])%modbig;
  for(int i=0;i<m-1;i++){
    ans=(ans*a[cant[i+1]-cant[i]-1])%modbig
  }
  cout<<ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:3: error: expected ';' before '}' token
   30 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	int a,b;
	cin>>a>>b;
	vector<int> c(b);
	for(int i=0;i<b;i++)
		cin>>c.at(i);
	bool d[100010];
	for(int i=0;i<100010;i++)
		d[i]=true;
	for(int i = 0;i < b;i++) {
		d.at(c.at(i)) = false;
	}
	int dp[100020];
	dp[0]=1;
	if(d.at(1)==true){
		dp[1]==1;
	}
	else
		dp[1]==0;
for (int i = 2; i < a; ++i)
{
	if (d[i]==false)
	{
		dp[i] = 0;
	}
	else{
		dp[i]=dp[i-2]+dp[i-1];
	}
	cout<<dp[a]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: request for member 'at' in 'd', which is of non-class type 'bool [100010]'
   14 |                 d.at(c.at(i)) = false;
      |                   ^~
a.cc:18:14: error: request for member 'at' in 'd', which is of non-class type 'bool [100010]'
   18 |         if(d.at(1)==true){
      |              ^~
a.cc:33:2: error: expected '}' at end of input
   33 | }
      |  ^
a.cc:4:14: note: to match this '{'
    4 | signed main(){
      |              ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

typedef long long ll;

const int maxn = 5e8;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;

int read()
{
	int x;
	scanf("%d", &x);
	return x;
}

int n, m, a[maxn], dp[maxn];
bool b[maxn];

bool cmp(int x, int y)
{
	return x > y;
}

int main()
{
	n = read(), m = read();
	for(int i = 1; i <= m; i ++)
	{
		a[i] = read();
	}
	dp[1] = 1, dp[2] = 2;
	for(int i = 1; i <= m; i ++)
	{
		b[a[i]] = true;
	} 
	if(b[1] == true)
	{
		dp[1] = 0;
		dp[2] = 1;
	}
	if(b[2] == true)
	{
		dp[2] = 0;
	}
	for(int i = 3; i <= n; i ++)
	{
		if(b[i])
		{
			dp[i] = 0;
		}
		else
		{
			dp[i] = dp[i - 1] + dp[i - 2];
			dp[i] %= mod;
		}
	}
	cout << (dp[n] + mod) % mod;
	return 0;
}

Compiler output:
/tmp/ccmRt5pH.o: in function `main':
a.cc:(.text+0xc9): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccmRt5pH.o
a.cc:(.text+0xe3): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccmRt5pH.o
a.cc:(.text+0x106): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccmRt5pH.o
a.cc:(.text+0x130): relocation truncated to fit: R_X86_64_PC32 against symbol `b' defined in .bss section in /tmp/ccmRt5pH.o
collect2: error: ld returned 1 exit status
Language: Java

import java.util.Scanner;
public class problema5 {
	public static boolean Esta(int k, int[]A) {
		for(int i=0;i<A.length;i++) {
			if (A[i]==k){
				return true;
			}
		}
		return false;
	}
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		String[] linea = s.nextLine().split(" ");
		int N=Integer.parseInt(linea[0]);
		int M=Integer.parseInt(linea[1]);
		int [] A= new int[(int)(M+1)];
		for(int i=1; i<=M;i++) {
			String[] linea2 = s.nextLine().split(" ");
			A[i]=Integer.parseInt(linea2[0]);
			
		}
		s.close();
		int []DP= new int[N+1];
		DP[1]=1;
		DP[2]=2;
		boolean a=true;
		for(int j=1;j<M;j++) {
			DP[A[j]]=0;
			if(A[j+1]-A[j]==1 && j!=1) {
				System.out.print(0);
				a=false;
				break;
			}
			}
		for(int k=3;k<=N;k++) {
			if(Esta(k,A)) {
				DP[k]=0;
			}
			else {
				DP[k]=DP[k-1]+DP[k-2];
			}
		}
		if(a) {
			System.out.print(DP[N]%1000000007);
		}
		}}

Compiler output:
Main.java:2: error: class problema5 is public, should be declared in a file named problema5.java
public class problema5 {
       ^
1 error
Language: C++

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

using namespace std;

int main() {
    int N, M;
	cin >> N >> M;
	vector <int> A(M);
	vector <long long int> B(N + 1, 0);
	for (int i = 0; i < M; i++) {
		cin >> A[i];
	}

	int j = 0; 
	for (int i = 0; i <= N; i++) {
		if (i == 0) {
			B[i] = 1;
		}
		else if (i == 1) {
			if (A[j] == i) {
				B[i] = 0;
				j++;
			}
			else {
				B[i] = 1;
			}
		}
		else {
			if (A[j] == i) {
				B[i] = 0;
				j++;
			}
			else {
				B[i] += B[i - 1];
				B[i] %= 1000000007;
			    B[i] += B[i - 2];
				B[i] %= 1000000007;
			}
			
		}
	}
	cout << B[N] << endl;
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:45:18: error: expected '}' at end of input
   45 |         return 0;
      |                  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

import java.io.PrintWriter
import java.util.*

val pw = PrintWriter(System.out)
val DIVIDER: Long = (1e+9 + 7).toLong()
fun main(args: Array<String>) {
    val (n, m) = readListOfInt()
    val floors: MutableList<Long> = MutableList<Long>(n + 1, {0L})
    for(i in 0 until m) {
        val a = readInt() 
        floors[a] = -1L
    }

    floors[1] = if(floors[1] == -1L) 0 else 1

    if(n > 1) {
        floors[2] = if(floors[2] == -1L) 0 else floors[1] + 1L
        for(i in 3 .. n) {
            if(floors[i] == -1L) {
                floors[i] = 0L
                continue
            } 
            val one_step = floors[i-1]
            val two_step = floors[i-2]
            floors[i] = (one_step + two_step) % DIVIDER
        }
    }
    println(floors[n] % DIVIDER)

    pw.flush()
}

fun inputList() = 
    readLine()!!.split(" ").map(String::toInt)

fun sum_digits(num_: Long): Long {
    var num = num_
    var rtn: Long = 0
    while(num != 0.toLong()) {
        val tmp = num % 10
        rtn += tmp
        num /= 10
    }
    return rtn
}

/****** Decrared Functions ******/

// IO
fun read() = readLine()!!
fun readInt() = read().toInt()
fun readLong() = read().toLong()
fun readDouble() = read().toDouble()
fun readListOfString() = read().split(" ")
fun readListOfInt() = readListOfString().map { it.toInt() }
fun readListOfLong() = readListOfString().map { it.toLong() }
fun readListOfDouble() = readListOfString().map { it.toDouble() }


fun println(value : Any) {
    pw.println(value)
}

fun gcd(a: Long, b: Long): Long = 
    if(b != 0L) a else gcd(b, a % b)

fun lcm(a: Long, b: Long) = 
    if(b==0L) a else gcd(b, a % b)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.PrintWriter
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:33:1: error: 'fun' does not name a type
   33 | fun inputList() =
      | ^~~
a.cc:50:1: error: 'fun' does not name a type
   50 | fun read() = readLine()!!
      | ^~~
a.cc:56:1: error: 'fun' does not name a type
   56 | fun readListOfLong() = readListOfString().map { it.toLong() }
      | ^~~
a.cc:57:1: error: 'fun' does not name a type
   57 | fun readListOfDouble() = readListOfString().map { it.toDouble() }
      | ^~~
a.cc:60:1: error: 'fun' does not name a type
   60 | fun println(value : Any) {
      | ^~~
a.cc:64:1: error: 'fun' does not name a type
   64 | fun gcd(a: Long, b: Long): Long =
      | ^~~
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class TypicalStairs {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		//　総段数と穴あき段数の入力
		int N = sc.nextInt();
		int M = sc.nextInt();
		
		//　穴あきの段、総和計算用の配列を用意
		Integer a[] = new Integer[M];
		int sum[] = new int[N+1];
		
		//　壊れている段目の情報を格納
		for(int i=0;i<M;i++) {
			a[i] = sc.nextInt();
		}
		
		for(int i=0;i<=N;i++) {
			if(i == 0) {
				//0段目の処理
				sum[i] = 1;
			}
			else if(i == 1) {
				//1段目の処理
				if(Arrays.asList(a).contains(i)) {
					sum[i] = 0;
				}else {
					sum[i] = 1;
				}
			}else {
				//2段目からの処理
				if(Arrays.asList(a).contains(i)) {
					sum[i] = 0;
				}else {
					sum[i] = sum[i-2] + sum[i-1];
				}
			}
		}
		System.out.println(sum[N]%1000000007);
	}
	
}


Compiler output:
Main.java:4: error: class TypicalStairs is public, should be declared in a file named TypicalStairs.java
public class TypicalStairs {
       ^
1 error
Language: C++

#include<iostream>	//魔法の言葉（笑）
#include<fstream>
#include<iomanip>
#include<string>
#include<queue>
#include<vector>
#include<algorithm>
#include<tuple>
#include<numeric>
#include<map>
#include<cmath>
#define ll long long	//強いやつ
using namespace std;	//魔法の言葉（笑） mark Ⅱ
const ll mod=1000000007;

int main(){
int n,m;cin>>n>>m;
vector<int>safe(n+1,true);
for(int i=0;i<m;i++){
int a;cin>>a;
safe[a]=false;
}

vector<ll>dp(n+1);
dp[0]=1;
for(int now=0;now<n;now++){
	for(int next=now+1;next<=min(N,now+2);next++){
		if(safe[next]){
			dp[next]+=dp[now];
			dp[next]%=mod;
		}
	}
}

cout<<dp[n];
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:27:38: error: 'N' was not declared in this scope
   27 |         for(int next=now+1;next<=min(N,now+2);next++){
      |                                      ^
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <array>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <cassert>
#include <utility>
#include <functional>

using namespace std;
using lli = long long int;

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

int abc129_c() {
    int n, m;
    cin >> n >> m;
    vector<int> broken(n+1);
    rep(i,m) {
        int a;
        cin >> a;
        broken[a] = 1;
    }
    vector<int> dp(n+2);
    const int mod = 1000000007;
    dp[n] = 1;
    for (int i = n-1; i >= 0; i--) {
        if (broken[i]) {
            dp[i] = 0;
            continue;
        }
        dp[i] = (dp[i+1] + dp[i+2]) % mod;
    }
    cout << dp[0] << endl;
    return 0;
}


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

include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, M; cin >> N >> M;
  vector<int> broken(M+2);
  broken.at(0)=0;
  broken.at(M+1)=N;
  for (int i=1;i<M+1;i++){
  	cin >> broken.at(i);
  }
  vector<int> walk(M+1);
  vector<long long> fibo(100002);
  fibo.at(0)=0;
  fibo.at(1)=1;
  fibo.at(2)=2;
  for (int i=1;i<100000;i++){
  	fibo.at(i+2)=fibo.at(i)%1000000007+fibo.at(i+1)%1000000007;
  }
  for (int i=0;i<M+1;i++){
  	walk.at(i)=broken.at(i+1)-broken.at(i)-1;
  }
  if (walk.at(0)==0) walk.at(0)=1;
  int sum=1;
  for (int i=0;i<M+1;i++){
  	sum*=fibo.at(walk.at(i));
    sum%=1000000007;
  }
  cout << sum%1000000007 << endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:13: error: 'cin' was not declared in this scope
    5 |   int N, M; cin >> N >> M;
      |             ^~~
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> broken(M+2);
      |   ^~~~~~
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> broken(M+2);
      |          ^~~
a.cc:7:3: error: 'broken' was not declared in this scope
    7 |   broken.at(0)=0;
      |   ^~~~~~
a.cc:12:10: error: expected primary-expression before 'int'
   12 |   vector<int> walk(M+1);
      |          ^~~
a.cc:13:10: error: expected primary-expression before 'long'
   13 |   vector<long long> fibo(100002);
      |          ^~~~
a.cc:14:3: error: 'fibo' was not declared in this scope
   14 |   fibo.at(0)=0;
      |   ^~~~
a.cc:21:9: error: 'walk' was not declared in this scope
   21 |         walk.at(i)=broken.at(i+1)-broken.at(i)-1;
      |         ^~~~
a.cc:23:7: error: 'walk' was not declared in this scope
   23 |   if (walk.at(0)==0) walk.at(0)=1;
      |       ^~~~
a.cc:26:22: error: 'walk' was not declared in this scope
   26 |         sum*=fibo.at(walk.at(i));
      |                      ^~~~
a.cc:29:3: error: 'cout' was not declared in this scope
   29 |   cout << sum%1000000007 << endl;
      |   ^~~~
a.cc:29:29: error: 'endl' was not declared in this scope
   29 |   cout << sum%1000000007 << endl;
      |                             ^~~~
Language: Java

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		int []a = new int [m];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	}
		
}




Compiler output:
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;
public class  {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int m = sc.nextInt();
		int []a = new int [m];
		boolean []jdg = new boolean [n+1];
		long []Dp = new long [n+1];
		int p = 1000000007;
		
		for(int i = 0; i < m ; i++) {
			a[i] = sc.nextInt();
			jdg [a[i]] = true;
		}
		Dp[0] = 1;
		
		for(int i = 1 ; i <= n; i++) {
			if(jdg[i] == false) {
			 if(i == 1)
				Dp[i] = Dp[i -1];
			 if(i >= 2) {
				 Dp[i] = (Dp[i-1])%p+(Dp[i-2])%p;
			     Dp[i] = Dp[i]%p;
			}
		}
			if(jdg[i] == true) {
				Dp[i] = 0;
			}
		
		}
		System.out.println(Dp[n]);
	}
		
}




Compiler output:
Main.java:2: error: <identifier> expected
public class  {
            ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,M;
  cin >>N>>M;
  vector<bool> bad(N+1);
  vector<int> vec(N+2);
  
  for(int i=0;i<M;i++){
    int a;cin>>a;
    bad[a]= true;
  }
  const int mod = 1000000007
  vec[N]=1;
  for(int i=N-1;i>=0;i--){
    if(bad[i]) {
      vec[i]=0;
      continue;
    }
    vec[i] = (vec [i+1]+vec[i+2])%mod;
  }
    cout << vec[0]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected ',' or ';' before 'vec'
   14 |   vec[N]=1;
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,M;
  cin >>N>>M;
  vector<bool> bad(N+1);
  vector<int> vec(N+2);
  
  for(int i=0;i<M;i++){
    int a;cin>>a;
    bad[a]= true;
  }
  vec[N]=1;
  for(int i=n-1;i>=0;i--){
    if(bad[i]) {
      vec[i]=0;
      continue;
    }
    vec[i] = vec [i+1]+vec[i+2];
  }
    cout << vec[0]%1000000007<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: 'n' was not declared in this scope
   14 |   for(int i=n-1;i>=0;i--){
      |             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,M;
  cin >>N>>M;
  vector<bool> bad(N+1);
  vector<int> vec(N+2);
  
  for(int i=0;i<M;i++){
    int a;cin>>a;
    bad[a]= true;
  }
  vec[n]=1;
  for(int i=n-1;i>=0;i--){
    if(bad[i]) {
      vec[i]=0;
      continue;
    }
    vec[i] = vec [i+1]+vec[i+2];
  }
    cout << vec[N-1]%1000000007<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'n' was not declared in this scope
   13 |   vec[n]=1;
      |       ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int N,M;
  cin >>N>>M;
  vector<bool> bad(n+1);
  vector<int> vec(N+2);
  
  for(int i=0;i<M;i++){
    int a;cin>>a;
    bad[a]= true;
  }
  vec[n]=1;
  for(int i=n-1;i>=0;i--){
    if(bad[i]) {
      vec[i]=0;
      continue;
    }
    vec[i] = vec [i+1]+vec[i+2];
  }
    cout << vec[N-1]%1000000007<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'n' was not declared in this scope
    6 |   vector<bool> bad(n+1);
      |                    ^
Language: C++

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

int main() {
  long N, M;
  cin >> N >> M;
  vector<long> steps(N + 1, -1);
  vector<int> broken(M);
  steps[0] = 1;
  for (int i = 0; i < M; i++) {
    cin >> broken[i];
  }
  for (int i : broken) {
    steps[i] = 0;
  }
  if (steps[1] != 0) {
    steps[1] = 1;
  }
  if (N > 1) {
    for (int i = 2; i < N + 1; i++) {
      if (steps[i] != 0) {
        steps[i] = (steps[i - 2] + steps[i - 1]) % 1000000007;
      }
    }
  }
  cout << steps[N] % 1000000007 << endl;
  
  return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:28:12: error: expected '}' at end of input
   28 |   return 0;
      |            ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include  <iostream>
#include  <stdio.h>
#include <algorithm>
using namespace std;
#include <vector>
#define rep(i,n) for (int i = 0; i < (n) ; i++)
typedef long long ll;
//#include <stack>
//#include <queue>

int standerd = 1000000007;
string ans_Yes = "Yes"; 
string ans_No = "No"; 
string ans_yes = "yes"; 
string ans_no = "no"; 
 
ll cnt;

ll calccnt(ll cnt){
    if(cnt==1) return 1;
    else if (cnt==0) return 1;
    else return ( calccnt(cnt-1) + calccnt(cnt-2) ) % standerd;;
}

int main(){

    int N,M;
    cin >> N;
    cin >> M;

    if(M>0){
        int a[M];
        rep(mi,M) cin >> a[mi];

    }


    ll ans = 1;

    int mi;
    mi = 0;
    cnt = 0;
    int ni=0;
    if(M==0){
        ans = ( ans * calccnt(cnt) ) % standerd;
        cout << ans << endl;
    }else{
        if(a[mi]==1){
            ni=2;
            mi++;
        }
        while(ni <= N){
            if(ni==a[mi]){
                //cout << "mi: " << mi << " cnt: " << cnt << " ans:" << ans << endl;
                ans = ( ans * calccnt(cnt-1) ) % standerd;
                mi++;
                cnt=0;
            }else{
                cnt++;
            }
            ni++;
        }
        ans = ( ans * calccnt(cnt-1) ) % standerd;
        cout << ans << endl;

    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:48:12: error: 'a' was not declared in this scope
   48 |         if(a[mi]==1){
      |            ^
a.cc:53:20: error: 'a' was not declared in this scope
   53 |             if(ni==a[mi]){
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(ll i=ll(a);i<ll(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define inf (ll)1e9
#define mod (ll)(1e9+7)
#define d(x) cerr<<#x<<"="<<x<<endl;
#define p(x) cout<<(x)<<endl
#define ps(x) cout<<(x);
#define pfix(d,x) cout << fixed << setprecision(d) << x << endl;
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define minel(v) *min_element(all(v))
#define minind(v) distance((v).begin(), min_element(all(v)))
#define maxel(v) *max_element(all(v))
#define maxind(v) distance((v).begin(), max_element(all(v)))
#define fi first
#define se second
ll a[100005],b,c,d,n,m,p,q,x,y,k,h,w,sum,mi,ma,ans,l,r,res;
string s;
typedef vector<int> VI;
typedef vector<pair<int,int> > VP;

ll dp[100005];

void solve(){
    rep(i,n+1){
        dp[i]%=mod;
        if(!a[i+1]){dp[i+1]+=dp[i];dp[i+1]%=mod;}
        if(!a[i+2]){dp[i+2]+=dp[i];dp[i+2]%=mod;}
}

int main(){
    cin>>n>>m;
    rep(i,m){cin>>b;a[b]=1;}
    dp[0]=1;
    solve();
    rep(i,n+1)d(dp[i]);
    p(dp[n]%mod);
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:36:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   36 | int main(){
      |         ^~
a.cc:36:9: note: remove parentheses to default-initialize a variable
   36 | int main(){
      |         ^~
      |         --
a.cc:36:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:36:11: error: a function-definition is not allowed here before '{' token
   36 | int main(){
      |           ^
a.cc:44:2: error: expected '}' at end of input
   44 | }
      |  ^
a.cc:29:13: note: to match this '{'
   29 | void solve(){
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  vector<pair<long long, bool>> a(N+1);
  for(int i=0;i<N+1;i++) a.at(i).second = true;
  for(int i=0;i<M;i++){
    int b;cin >>b;
    a.at(b).second = false;
  }
  a.at(0).first = 1;
  
  if(a.at(1).second == false){
    a.at(1).first = 0;
  }
  else a.at(1).first = 1;
  
  for(int i=2;i<N+1;i++){
    if(!a.at(i).second) a.at(i).first = 0;
    else a.at(i).first = a.at(i-1).first + a.at(i-2).first;
    a.at(i).first %= 1000000007
  }
  cout << a.at(N).first <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:32: error: expected ';' before '}' token
   22 |     a.at(i).first %= 1000000007
      |                                ^
      |                                ;
   23 |   }
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  vector<pair<long long, bool>> a(N+1);
  for(int i=0;i<N+1;i++) a.at(i).second = true;
  for(int i=0;i<M;i++){
    int b;cin >>b;
    a.at(b).second = false;
  }
  a.at(0).first = 1;
  
  if(a.at(1).second == false){
    a.at(1).first = 0;
  }
  else a.at(1).first = 1;
  
  for(int i=2;i<N+1;i++){
    if(!a.at(i).second) a.at(i).first = 0;
    else a.at(i).first = a.at(i-1).first + a.at(i-2).first;
    a.at(i) %= 1000000007
  }
  cout << a.at(N).first <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:13: error: no match for 'operator%=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, bool> >, std::pair<long long int, bool> >::value_type' {aka 'std::pair<long long int, bool>'} and 'int')
   22 |     a.at(i) %= 1000000007
      |     ~~~~~~~~^~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long int n,m;
  cin >> n >> m;
  vector<long long int> ans(n+1);
  vector<int> a(m);
  for (int i=0; i<m; i++){
    cin >> a[i];
  }
  int atenji=0;
  for (int i=1; i<n;i++){
    if(i=a[atenji]){
      atenji++;
      atenji = atenji > m-1 ? atenij - 1 : atenji;
      ans[i] = 0;
      continue;
    }
    else if(i=1){
      ans[i]=1;
    }
    else if(i=2){
      ans[i]=ans[i]+1;
    }
    else {
      ans[i] = ans[i-1] + ans[i-2];
    }
    ans[i] %= 1000000007;
  }
  cout << ans[n]%1000000007;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: 'atenij' was not declared in this scope; did you mean 'atenji'?
   15 |       atenji = atenji > m-1 ? atenij - 1 : atenji;
      |                               ^~~~~~
      |                               atenji
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  long long int n,m;
  cin >> n >> m;
  vector<long long int> ans(n+1);
  vector<int> a(m);
  for (int i=0; i<m; i++){
    cin >> a[i];
  }
  int atenji=0;
  for (int i=1; i<n;i++){
    if(i=a[atenji]){
      atenji++;
      ans[i] = 0;
      continue;
    }
    else if(i=1){
      ans[i]=1;
    }
    else if(i=2){
      ans[i]=ans[i]+1;
    }
    else {
      ans[i] = ans[i-1] + ans[i-2];
    }
    ans[i] %= 1000000007
  }
  cout << ans[n]%1000000007;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:25: error: expected ';' before '}' token
   27 |     ans[i] %= 1000000007
      |                         ^
      |                         ;
   28 |   }
      |   ~