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

#include <bits10_1.h/stdc++.h>
using namespace std;
int main()
{
    int N, M;
    cin >> N;
    cin >> M;
    int a[M];
    int ai[N];
    for(int i = 0; i < N; ++i){
        ai[i] = 1;
    }
    for(int i = 0; i < M; ++i){
        cin >> a[i];
        ai[a[i]] = 0;
    }

    int dp[N];
    dp[0] = 1;
    if(ai[1] == 0) dp[1] = 0;
    else dp[1] = 1;

    for(int i = 2; i < N; ++i){
        dp[i] = (dp[i-1]*ai[i-1] + dp[i-2]*ai[i-1])%1000000007;
    }

    cout << dp[N-1];
}

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

#include <stdio.h>
int main(void) {
    int N, M;
    if(scanf("%d%d",&N,&M)<2){exit(1);}
		short f[N+1];
		unsigned long long int fibo[N+1];
		for(int i=0;i<N+1;i++)f[i]=1;
		for(int i=0;i<M;i++){
			int num;
			if(scanf("%d",&num)<1){exit();}
			f[num]=0;
		}
		fibo[0]=fibo[1]=1;
		fibo[0]*=f[0],fibo[1]*=f[1];
		for(int i=2;i<N+1;i++){
			fibo[i]=(fibo[i-1]+fibo[i-2])*f[i];
		}
		printf("%llu\n",fibo[N]);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:31: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    4 |     if(scanf("%d%d",&N,&M)<2){exit(1);}
      |                               ^~~~
main.c:2:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
    1 | #include <stdio.h>
  +++ |+#include <stdlib.h>
    2 | int main(void) {
main.c:4:31: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    4 |     if(scanf("%d%d",&N,&M)<2){exit(1);}
      |                               ^~~~
main.c:4:31: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:10:48: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
   10 |                         if(scanf("%d",&num)<1){exit();}
      |                                                ^~~~
main.c:10:48: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:10:48: error: too few arguments to function 'exit'
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  bool b[n+1];
  for(int i=0;i<a;i++){
    int a;
    cin >> a;
    b[a] = true;
  }
  int dp[n+2];
  const int mod = 1000000007;
  dp[n] = 1;
  for (int i = n-1; i >= 0; i--) {
    if (b[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:8:17: error: 'a' was not declared in this scope
    8 |   for(int i=0;i<a;i++){
      |                 ^
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  bool b[n+1];
  for(int i=0;i<a;i++){
    int a;
    cin >> a;
    b[a] = true;
  }
  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:
a.cc: In function 'int main()':
a.cc:8:17: error: 'a' was not declared in this scope
    8 |   for(int i=0;i<a;i++){
      |                 ^
a.cc:17:9: error: 'broken' was not declared in this scope
   17 |     if (broken[i]) {
      |         ^~~~~~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  bool b[n+1];
  for(int i=0;i<a;i++){
    int a;
    cin >> a;
    b[a] = true;
  }
  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:
a.cc: In function 'int main()':
a.cc:9:17: error: 'a' was not declared in this scope
    9 |   for(int i=0;i<a;i++){
      |                 ^
a.cc:18:9: error: 'broken' was not declared in this scope
   18 |     if (broken[i]) {
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main(){
    long long int N,M,x,bk=0;
    cin >> N >> M;
    vector<int> a(M),sum(N+1);
    sum[0] = 1;
    sum[1] = 1;
    for(int i=0;i<M;i++){
        cin >> x;
        a[i] = x;
    }

    if(a[0]==1){
        sum[1] = 0;
        bk++;
    }

    if(N==1){
        if(M==0){
            cout << "1" << endl;
        }else{
            cout << "0" << endl;
        }
    }else{
        for(int i=2;i<N+1;i++){
        if(i == a[bk]){
            sum[i] = 0;
            bk++;
        }else{
            sum[i] = sum[i-2]+sum[i-1];
            sum[i] %= 1000000007;
        }

        cout << sum[N] << endl;
    }
}

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

#include <bits/stdc++.h>

using namespace std;
using ll =long long;
using db = double;

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

#define che(a,string) cout<<"//"<<string <<"=="<<(a)<<"//" <<endl;
#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define leftunique(v) SORT(v);(v).erase(unique((v).begin(),(v).end()),(v).end())
//leftuniqueは配列から同じ要素のものを取り除く 例 4 6 2 1 3 4 1 2 なら 1 2 3 4 6 になる
bool IsInt(double a){int b = a/1;if(a==b){return true;}else {return false;}}
bool coY() {cout <<"Yes"<<endl;}
bool coN(){cout <<"No"<<endl;}
const ll mod = 1e9 + 7;
const ll INF = 1LL << 60;


//ここから書き始める
int main()
{
	ll n;
	ll m;
	vector<ll> dp(100100,-1);

	//dpの初期化
	rep(i,100100){
		dp[i] = 0;
	}
	cin >> n >>m;
	rep(i,m){
		ll broken_stair;
		cin >> broken_stair;
		dp[broken_stair] = -1;
	}
	for(int i = 2 ; i < n + 1 ; i++){
		ll a = dp[i-1];
		if(a<0) a = 0;
		ll b = dp[i-2];
		if(b<0) b =0 ;
		if(dp[i]!=0){
			dp[i] = a + b;
		}
	}
	if(dp[i]<0) cout << 0 << endl;
	else{
	cout <<dp[n]%mod <<endl;
	}
}


Compiler output:
a.cc: In function 'bool coY()':
a.cc:18:32: warning: no return statement in function returning non-void [-Wreturn-type]
   18 | bool coY() {cout <<"Yes"<<endl;}
      |                                ^
a.cc: In function 'bool coN()':
a.cc:19:30: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | bool coN(){cout <<"No"<<endl;}
      |                              ^
a.cc: In function 'int main()':
a.cc:50:15: error: 'i' was not declared in this scope
   50 |         if(dp[i]<0) cout << 0 << endl;
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
#define M 1000000007
#define all(a) (a).begin(),(a).end()
#define rep(i,n) reps(i,0,n)
#define reps(i,m,n) for(int i=(m);i<(n);i++)
int main(){
  ll n,m;cin>>n>>m;
  vector<bool> b(n+1,false);
  vector<ll> a(n+1,0);
  a[0]=1;
  rep(i,m+1){
    int c;cin>>c;
    b[c]=true;
  }
  rep(i,1,n+1){
    if(i==1)a[1]=1;
    else a[i]=(a[i-1]+a[i-2])%M;
    if(b[i])a[i]=0;
  }
  cout<<a[n];
}

Compiler output:
a.cc:18:14: error: macro "rep" passed 3 arguments, but takes just 2
   18 |   rep(i,1,n+1){
      |              ^
a.cc:7:9: note: macro "rep" defined here
    7 | #define rep(i,n) reps(i,0,n)
      |         ^~~
a.cc: In function 'int main()':
a.cc:18:3: error: 'rep' was not declared in this scope
   18 |   rep(i,1,n+1){
      |   ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {

  uint64_t v = 1000000007;
  
  int N, M;
  cin >> N >> M;
  
  if ( N == 1 ) {
    else cout << 1 << endl;
    return 0;
  }
  
  vector<uint64_t> dp(100007, 1);
  
  for (int i=0; i<M; i++) {
    int n; cin >> n;
    dp.at(n-1) = 0;
  }
  
  int p = 0;
  while ( p < N ) {
    p++;
    if( dp.at(p-1) && dp.at(p) ) {
      dp.at(p) = 2;
      break;
    } 
  }
  for (int i=0; i<N-1; i++) {
    if( !dp.at(i) ) {
      if( !dp.at(i+1) ) {
        cout << 0 << endl;
        return 0;
      }
      else if ( dp.at(i+2) ) {
        dp.at(i+2) = dp.at(i+1);
      }
    }
    else if ( dp.at(i+2) ) {
      if ( !dp.at(i+1) )  dp.at(i+2) = dp.at(i);
      else dp.at(i+2) = (dp.at(i) + dp.at(i+1)) % v;
    }
  }
  
  cout << dp.at(N-1) << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected '}' before 'else'
   12 |     else cout << 1 << endl;
      |     ^~~~
a.cc:11:17: note: to match this '{'
   11 |   if ( N == 1 ) {
      |                 ^
a.cc: At global scope:
a.cc:18:3: error: expected unqualified-id before 'for'
   18 |   for (int i=0; i<M; i++) {
      |   ^~~
a.cc:18:17: error: 'i' does not name a type
   18 |   for (int i=0; i<M; i++) {
      |                 ^
a.cc:18:22: error: 'i' does not name a type
   18 |   for (int i=0; i<M; i++) {
      |                      ^
a.cc:24:3: error: expected unqualified-id before 'while'
   24 |   while ( p < N ) {
      |   ^~~~~
a.cc:31:3: error: expected unqualified-id before 'for'
   31 |   for (int i=0; i<N-1; i++) {
      |   ^~~
a.cc:31:17: error: 'i' does not name a type
   31 |   for (int i=0; i<N-1; i++) {
      |                 ^
a.cc:31:24: error: 'i' does not name a type
   31 |   for (int i=0; i<N-1; i++) {
      |                        ^
a.cc:47:3: error: 'cout' does not name a type
   47 |   cout << dp.at(N-1) << endl;
      |   ^~~~
a.cc:49:3: error: expected unqualified-id before 'return'
   49 |   return 0;
      |   ^~~~~~
a.cc:50:1: error: expected declaration before '}' token
   50 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {

  uint64_t v = 1000000007;
  
  int N, M;
  cin >> N >> M;
  
  if ( N == 1 ) {
    else cout << 1 << endl;
    return 0
  }
  
  vector<uint64_t> dp(100007, 1);
  
  for (int i=0; i<M; i++) {
    int n; cin >> n;
    dp.at(n-1) = 0;
  }
  
  int p = 0;
  while ( p < N ) {
    p++;
    if( dp.at(p-1) && dp.at(p) ) {
      dp.at(p) = 2;
      break;
    } 
  }
  for (int i=0; i<N-1; i++) {
    if( !dp.at(i) ) {
      if( !dp.at(i+1) ) {
        cout << 0 << endl;
        return 0;
      }
      else if ( dp.at(i+2) ) {
        dp.at(i+2) = dp.at(i+1);
      }
    }
    else if ( dp.at(i+2) ) {
      if ( !dp.at(i+1) )  dp.at(i+2) = dp.at(i);
      else dp.at(i+2) = (dp.at(i) + dp.at(i+1)) % v;
    }
  }
  
  cout << dp.at(N-1) << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected '}' before 'else'
   12 |     else cout << 1 << endl;
      |     ^~~~
a.cc:11:17: note: to match this '{'
   11 |   if ( N == 1 ) {
      |                 ^
a.cc:13:13: error: expected ';' before '}' token
   13 |     return 0
      |             ^
      |             ;
   14 |   }
      |   ~          
a.cc: At global scope:
a.cc:18:3: error: expected unqualified-id before 'for'
   18 |   for (int i=0; i<M; i++) {
      |   ^~~
a.cc:18:17: error: 'i' does not name a type
   18 |   for (int i=0; i<M; i++) {
      |                 ^
a.cc:18:22: error: 'i' does not name a type
   18 |   for (int i=0; i<M; i++) {
      |                      ^
a.cc:24:3: error: expected unqualified-id before 'while'
   24 |   while ( p < N ) {
      |   ^~~~~
a.cc:31:3: error: expected unqualified-id before 'for'
   31 |   for (int i=0; i<N-1; i++) {
      |   ^~~
a.cc:31:17: error: 'i' does not name a type
   31 |   for (int i=0; i<N-1; i++) {
      |                 ^
a.cc:31:24: error: 'i' does not name a type
   31 |   for (int i=0; i<N-1; i++) {
      |                        ^
a.cc:47:3: error: 'cout' does not name a type
   47 |   cout << dp.at(N-1) << endl;
      |   ^~~~
a.cc:49:3: error: expected unqualified-id before 'return'
   49 |   return 0;
      |   ^~~~~~
a.cc:50:1: error: expected declaration before '}' token
   50 | }
      | ^
Language: C++

#include <iostream>
#include <unordered_set>
#include <algorithm>
using namespace std;

int main()
{
    int N, M;
    cin >> N >> M;
    unordered_set<int> A;
    for (int i = 0; i < M; ++i) {
        int a;
        cin >> a;
        A.insert(a);
    }

    vector<int> dp(N + 1, 0);
    dp[0] = 1;
    for (int i = 1; i <= N; ++i) {
        if (find(A.begin(), A.end(), i) != A.end()) {
            continue;
        }
        if (find(A.begin(), A.end(), i - 1) == A.end()) {
            dp[i] = dp[i - 1];
        }
        if (find(A.begin(), A.end(), i - 2) == A.end()) {
            if (i - 2 >= 0)
            dp[i] = (dp[i] + dp[i - 2]) % 1000000007;
        }
    }
    cout << dp[N] << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:5: error: 'vector' was not declared in this scope
   17 |     vector<int> dp(N + 1, 0);
      |     ^~~~~~
a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    3 | #include <algorithm>
  +++ |+#include <vector>
    4 | using namespace std;
a.cc:17:12: error: expected primary-expression before 'int'
   17 |     vector<int> dp(N + 1, 0);
      |            ^~~
a.cc:18:5: error: 'dp' was not declared in this scope
   18 |     dp[0] = 1;
      |     ^~
Language: C++

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

int main() {
  int n, m;
  cin >> n >> m;
  int a[];
  for(int i = 0; i < m; i++){
    int t;
    cin >> t;
    a.push(t);
  }
  lomg int dp[100010];
  for(int i = 0; i < 100010; i++){
    dp[i] = -1;
  }
  dp[0] = 1;
  dp[1] = 1;
  for(int i = 2; i < n; i++){
    if(dp[i] = -1){
      dp[i] = dp[i-1] + dp[i-2];
    }
  }
  cout << dp[n-1] % 1000000007;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: storage size of 'a' isn't known
    7 |   int a[];
      |       ^
a.cc:13:3: error: 'lomg' was not declared in this scope; did you mean 'long'?
   13 |   lomg int dp[100010];
      |   ^~~~
      |   long
a.cc:15:5: error: 'dp' was not declared in this scope; did you mean 'dup'?
   15 |     dp[i] = -1;
      |     ^~
      |     dup
a.cc:17:3: error: 'dp' was not declared in this scope; did you mean 'dup'?
   17 |   dp[0] = 1;
      |   ^~
      |   dup
Language: C++

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

ll fivo(int n){
    if(n==1 || n==2) return 1;
    else return fivo(n-1)+fivo(n-2);
}

int main(){
   int n,m;
   cin >> n >> m;
   if(m!=0){
       vector<int> a(m),sa(m+1);
       rep(i,m) cin >> a[i];
   }
   ll ans=1;
   bool flag=true;
   if(m!=0){
       rep(i,m-1){
       if(a[i+1]-a[i]==1){
           flag=false;
           break;
       }
   }
   if(!flag) cout << 0;
   else{
       sa[0]=a[0];
       sa[m]=n-a[m-1];
       rep1(i,1,m) sa[i]=a[i]-a[i-1]-1;
       rep(i,m+1){
           ans*=fivo(sa[i]);
       }
       cout << ans%d;
   }
   }else{
       cout << fivo(n+1)%d;
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:11: error: 'a' was not declared in this scope
   25 |        if(a[i+1]-a[i]==1){
      |           ^
a.cc:32:8: error: 'sa' was not declared in this scope
   32 |        sa[0]=a[0];
      |        ^~
a.cc:32:14: error: 'a' was not declared in this scope
   32 |        sa[0]=a[0];
      |              ^
Language: C++

#include <bits/stdc++.h>
    using namespace std;
     
     
    typedef long long ll;
     
    int main(){
        ll N,M;
        cin>>N>>M;
        
        vector<ll> a(M);
        for(ll i=0;i<M;i++){
            cin>>a.at(i);
        }
        
        map<ll,ll> mp2;
        for(ll i=1;i<=N;i++){
            mp2[i]=0;
            //壊れていたら1をかえす
        }
        for(ll i=0;i<M;i++){
            mp2[a.at(i)]=1;
        }
     
        map<ll,ll> mp;
        for(ll i=1;i<=N;i++){
            mp[i]=0;
        }
        if(N==1){
            cout<<1<<endl;
        }
        if(N==2){
            if(M==1){
                cout<<1<<endl;
            }
            else{
                cout<<2<<endl;
            }
        }
        if(N>2){
            if(M==0){
                mp[1]=1;
                mp[2]=2;
            }
            if(M==1){
                if(a.at(0)==1){
                    mp[1]=0;
                    mp[2]=1;
                }
                else if(a.at(0)==2){
                    mp[1]=1;
                    mp[2]=0;
                }
                else{
                    mp[1]=1;
                    mp[2]=2;
                }
            }
            if(M>1){
                if(a.at(0)==1 && a.at(1)==2){
                    mp[1]=0;
                    mp[2]=0;
                }
                else if(a.at(0)==1){
                    mp[1]=0;
                    mp[2]=1;
                }
                else if(a.at(0)==2){
                    mp[1]=1;
                    mp[2]=0;
                }
                else{
                    mp[1]=1;
                    mp[2]=2;
                }
            }
            for(ll i=3;i<=N;i++){
                if(mp2[i]==0 && mp2[i-1]==0 && mp2[i-2]==0){
                    mp[i]=mp[i-1]+mp[i-2];
                }
                else if(mp2[i]==1){
                    mp[i]=0;
                }
                else if(mp2[i-1]==1 && mp2[i-2]==1){
                    mp[i]=0;
                    break;
                }
                else if(mp2[i-1]==1){
                    mp[i]=mp[i-2];
                }
                else if(mp2[i-2]==1){
                    mp[i]=mp[i-1];
                }
                mp[i]%=1000000007
            }
            cout<<mp[N]%1000000007<<endl;
        }
    }
    /*
    メモ書き
    mp[i]=mp[i-1]+mp[i-2](条件によって片方消えたりなんたり)に落とし込みたい
    初期値を与える必要
    条件を処理する必要
    M=0をいかに処理するか
    そもそもM=0のときvector a(M)ってどうなる？
    mp2[]を作って壊れた階段をキーに壊れた階段には特定の値を入れることで階段数から壊れているかの処理できそう
    */

Compiler output:
a.cc: In function 'int main()':
a.cc:94:34: error: expected ';' before '}' token
   94 |                 mp[i]%=1000000007
      |                                  ^
      |                                  ;
   95 |             }
      |             ~
Language: C

#include<stdio.h>

int main(void){
    int n, m;
    scanf("%d %d",&n ,&m);
    long long int a[m], b[n];
    int i, j;
    int flag;
    long long int ans;
    for(i=0;i<m;i++){
        scanf("%ld",&a[i]);
    }

    // shokichi
    if(a[0] == 1 && a[1] == 2){
        printf("0");
        return 0;
    }
    if(a[0] == 2){
        b[0] = 1;
        b[1] = 0;
    }
    else if(a[0] == 1 && a[1] != 2){
        b[0] = 0;
        b[1] = 1;
    }
    else{
        b[0] = 1;
        b[1] = 2;
    }

    //keisan
    for(i=0;i<n-2;i++){
        b[i+2] = b[i+1] + b[i];
        for(j=0;j<m;j++){
            if(a[j] == i+3){
                flag++;
                break;
            }
        }
        if(flag == 1){
            b[i+2] = 0;
            frag--;
        }
    }
    ans = b[n-1]%1000000007;
    printf("%ld\n",ans);
    return 0;
    
}


Compiler output:
main.c: In function 'main':
main.c:43:13: error: 'frag' undeclared (first use in this function); did you mean 'flag'?
   43 |             frag--;
      |             ^~~~
      |             flag
main.c:43:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(void){
    int n, m;
    scanf("%d %d",&n ,&m);
    long long int a[m], b[n];
    int i, j;
    int flag
    long long int ans;
    for(i=0;i<m;i++){
        scanf("%ld",&a[i]);
    }

    // shokichi
    if(a[0] == 1 && a[1] == 2){
        printf("0");
        return 0;
    }
    if(a[0] == 2){
        b[0] = 1;
        b[1] = 0;
    }
    else if(a[0] == 1 && a[1] != 2){
        b[0] = 0;
        b[1] = 1;
    }
    else{
        b[0] = 1;
        b[1] = 2;
    }

    //keisan
    for(i=0;i<n-2;i++){
        b[i+2] = b[i+1] + b[i];
        for(j=0;j<m;j++){
            if(a[j] == i+3){
                flag++;
                break;
            }
        }
        if(flag == 1){
            b[i+2] = 0;
            frag--;
        }
    }
    ans = b[n-1]%1000000007;
    printf("%ld\n",ans);
    return 0;
    
}


Compiler output:
main.c: In function 'main':
main.c:8:13: error: expected ';' before 'long'
    8 |     int flag
      |             ^
      |             ;
    9 |     long long int ans;
      |     ~~~~     
main.c:37:17: error: 'flag' undeclared (first use in this function)
   37 |                 flag++;
      |                 ^~~~
main.c:37:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:43:13: error: 'frag' undeclared (first use in this function)
   43 |             frag--;
      |             ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: expected ';' before '<=' token
   12 |   for(int i=2, i<=n; i++){
      |                 ^~
      |                 ;
a.cc:12:17: error: expected primary-expression before '<=' token
   12 |   for(int i=2, i<=n; i++){
      |                 ^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected ',' or ';' before 'int'
    5 |   int n,m;
      |   ^~~
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |   cin >> n >> m;
      |          ^
      |          yn
a.cc:6:15: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |   cin >> n >> m;
      |               ^
      |               tm
a.cc:12:17: error: expected ';' before '<=' token
   12 |   for(int i=2, i<=n; i++){
      |                 ^~
      |                 ;
a.cc:12:17: error: expected primary-expression before '<=' token
   12 |   for(int i=2, i<=n; i++){
      |                 ^~
Language: C++

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

int main(){
  long long int i,n,m,fib[100001];
  fib[0]=0;
  fib[1]=1;
  for(i=2;i<100001;i++){
    fib[i]=fib[i-1]+fib[i-2];
  }
  cin>>n>>m;
  int a[m+1];
  a[0]=-1;
  for(i=1;i<m+1;i++){
    cin>>a[i];
    kotae*=fib[a[i]-a[i-1]-1]
  }
  kotae*=fib[n-a[m]];
  cout<<kotae%1000000007;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'kotae' was not declared in this scope
   16 |     kotae*=fib[a[i]-a[i-1]-1]
      |     ^~~~~
a.cc:18:3: error: 'kotae' was not declared in this scope
   18 |   kotae*=fib[n-a[m]];
      |   ^~~~~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#define mod = 1000000007
using namespace std;

int main() {
  int n,m;
  cin >> n >> m;
  vector<int> h(m);
  vector<bool> v(n,true);
  for(int i=0;i<m;i++){
    cin >> h.at(i);
    v.at(h.at(i)) = false;
  }
  int stop = 0;
  for(int i=0;i<m-1;i++){
    if(h.at(i+1)-h.at(i) == 1){
      stop = -1;
      break;
    }
  }
  
  if(stop == -1){
    cout << 0 << endl;
  }
  else {
    vector<long long> dp(n+1);
    dp[0]=1;
    for(int i=0;i<n;i++){
      for(int j=i+1;j<=min(n,i+2);j++){
        if(v.at(i)){
          dp[j] += dp[i];
          dp[j] %= mod;
        }
      }
    }
    
    cout << dp[n] << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:13: error: expected primary-expression before '=' token
    4 | #define mod = 1000000007
      |             ^
a.cc:34:20: note: in expansion of macro 'mod'
   34 |           dp[j] %= mod;
      |                    ^~~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
define mod = 1000000007
  
int main() {
  int n,m;
  cin >> n >> m;
  vector<int> h(m);
  vector<bool> v(n,true);
  for(int i=0;i<m;i++){
    cin >> h.at(i);
    v.at(h.at(i)) = false;
  }
  int stop = 0;
  for(int i=0;i<m-1;i++){
    if(h.at(i+1)-h.at(i) == 1){
      stop = -1;
      break;
    }
  }
  
  if(stop == -1){
    cout << 0 << endl;
  }
  else {
    vector<long long> dp(n+1);
    dp[0]=1;
    for(int i=0;i<n;i++){
      for(int j=i+1;j<=min(n,i+2);j++){
        if(v.at(i)){
          dp[j] += dp[i];
          dp[j] %= mod;
        }
      }
    }
    
    cout << dp[n] << endl;
  }
  return 0;
}


Compiler output:
a.cc:5:1: error: 'define' does not name a type
    5 | define mod = 1000000007
      | ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <vector>
using namespace std;
define mod = 1000000007
  
int main() {
  int n,m;
  cin >> n >> m;
  vector<int> h(m);
  vector<bool> v(n,true);
  for(int i=0;i<m;i++){
    cin >> h.at(i);
    v.at(h.at(i)) = false;
  }
  int stop = 0;
  for(int i=0;i<m-1;i++){
    if(h.at(i+1)-h.at(i) == 1){
      stop = -1;
      break;
    }
  }
  
  if(stop == -1){
    cout << 0 << endl;
  }
  else {
    vector<long long> dp(n);
    dp[0]=1;
    for(int i=0;i<n;i++){
      for(int j=i+1;j<=min(n,i+2);j++){
        if(v.at(i)){
          dp[j] += dp[i];
          dp[j] %= mod;
        }
      }
    }
    
    cout << dp[n] << endl;
  }
  return 0;
}


Compiler output:
a.cc:5:1: error: 'define' does not name a type
    5 | define mod = 1000000007
      | ^~~~~~
Language: C++

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

int func(int i,int j){
  vector<int> dp(j-i+1);
  dp[0] = 0;
  dp[1] = 1;
  for(int k=1;k<j-i+1;k++){
    dp[i] = dp[i-1]+dp[i-2];
  }
  return dp[j-i];
}

int main() {
  int n,m;
  cin >> n >> m;
  vector<int> h(m);
  for(int i=0;i<m;i++){
    cin >> h.at(i);
  }
  int stop = 0;
  for(int i=0;i<m-1;i++){
    if(h.at(i+1)-h.at(i) == 1){
      stop = -1;
      break;
    }
  }
  
  if(stop == -1){
    cout << 0 << endl;
  }
  else {
    long long ans=0; 
    for(int k=0;k<m-1;k++){
      ans += func(h.at(k)+1,h.at(k+1)-1);
    }
    ans += func(0,h.at(0)-1);
    ans += fun(h.at(m-1)+1,n);
    ans %= 1000000007;
    
    cout <<  << endl;
  }
  return 0;
}

  


Compiler output:
a.cc: In function 'int main()':
a.cc:40:12: error: 'fun' was not declared in this scope; did you mean 'func'?
   40 |     ans += fun(h.at(m-1)+1,n);
      |            ^~~
      |            func
a.cc:43:14: error: expected primary-expression before '<<' token
   43 |     cout <<  << endl;
      |              ^~
Language: C++

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

using namespace std;

bool compare(int i,int j)
{
    return i>j;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int N, M;
    cin>>N>>M;
    ll arr[N];
    for (int i=0;i<M;i++)
    {
        int num;
        cin>>num;
        arr[num-1] = -1;
    }
    arr[N-1]=1;
    arr[N-2]=arr[N-2]!=-1;
    {
        if (arr[i]!=-1)
            arr[i] = arr[i+1]+arr[i+2];
        else
            arr[i] = 0;
    }
    cout<<(arr[0]+arr[1])%1000000007;



    return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:17: error: 'i' was not declared in this scope
   28 |         if (arr[i]!=-1)
      |                 ^
Language: C++

//#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<string>
#include<numeric>
#include<vector>
#include<set>
#include<map>
using namespace std;

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

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: 'd' was not declared in this scope
   23 |   for(int i=0;i<m;i++) d[a[i]] = -1;
      |                        ^
Language: C

#include <stdio.h>
#include <math.h>
int aller(int st,int goal);
 int main(void){
     long ans=1;
    int n, m,i;
 
    long now=0;//to (n)
    scanf("%d %d",&n,&m);
    int data[m];//no enter
    for(i=0;i<m;i++){
        scanf("%d",&data[i]);
        
       
        
        ans=ans*aller(now,data[i]-1);
    
        ans=ans%1000000007;
        
        now=data[i]+1;
    }
    
    ans=ans*all(now,n);

    printf("%ld\n",ans%1000000007);
  
   
    return 0;
}
int aller(int st,int goal){
int na=goal-st+1;
 int ans,i, sut[na];
    if(na==2){
        return 1;
        
    }else if(na<=1){return 0;}
    else{sut[0]=1;
    sut[1]=1;
        
    }
  for (i=2;i<na;i++){
      sut[i]=sut[i-1]+sut[i-2] ;
  }
  return sut[na-1];
}


Compiler output:
main.c: In function 'main':
main.c:23:13: error: implicit declaration of function 'all'; did you mean 'aller'? [-Wimplicit-function-declaration]
   23 |     ans=ans*all(now,n);
      |             ^~~
      |             aller
Language: C++

include <bits/stdc++.h>
#define ll long long 
using namespace std;
int main()
{
  int n,m; cin >> n >> m; vector<ll> A(n+1,0); int a;
  for (int i=0;i<m;i++)
  {  cin >> a;
  	A[a]=-1;
  }
  vector<ll> dp(n+1,0);
  dp[0]=1; dp[1]=(A[1]==0);
  for (int i=2;i<=n;i++)
  {
    if (A[i]==-1) dp[i]=0;
    else 
    {
      dp[i]=dp[i-1]+dp[i-2];
    }
  }
  cout << dp[n];
  return 0;
}

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:6:12: error: 'cin' was not declared in this scope
    6 |   int n,m; cin >> n >> m; vector<ll> A(n+1,0); int a;
      |            ^~~
a.cc:6:27: error: 'vector' was not declared in this scope
    6 |   int n,m; cin >> n >> m; vector<ll> A(n+1,0); int a;
      |                           ^~~~~~
a.cc:2:12: error: expected primary-expression before 'long'
    2 | #define ll long long
      |            ^~~~
a.cc:6:34: note: in expansion of macro 'll'
    6 |   int n,m; cin >> n >> m; vector<ll> A(n+1,0); int a;
      |                                  ^~
a.cc:9:9: error: 'A' was not declared in this scope
    9 |         A[a]=-1;
      |         ^
a.cc:2:12: error: expected primary-expression before 'long'
    2 | #define ll long long
      |            ^~~~
a.cc:11:10: note: in expansion of macro 'll'
   11 |   vector<ll> dp(n+1,0);
      |          ^~
a.cc:12:3: error: 'dp' was not declared in this scope
   12 |   dp[0]=1; dp[1]=(A[1]==0);
      |   ^~
a.cc:12:19: error: 'A' was not declared in this scope
   12 |   dp[0]=1; dp[1]=(A[1]==0);
      |                   ^
a.cc:21:3: error: 'cout' was not declared in this scope
   21 |   cout << dp[n];
      |   ^~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;
const int MOD =1000000007;
int main(){
  int N,M;cin>>N>>M;
  vector<bool>issafe;
  issafe.assin(N+1,true);
  for (int i=0;i<M;++i){
    int a;cin>>a;
    issafe[a]=false;
  }
  vector<int>dp(N+1,0);
  dp[0] = 1;
  if (issafe[1]) dp[1] = 1;
  for (int i = 2; i <= N; ++i) {
    if (issafe[i-1])dp[i]+=dp[i-1];
    if (issafe[i-2])dp[i]+=dp[i-2];
    dp[i]%=MOD;
  }
  cout<<dp[N]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'class std::vector<bool>' has no member named 'assin'; did you mean 'assign'?
    8 |   issafe.assin(N+1,true);
      |          ^~~~~
      |          assign
Language: C++

#include <iostream>
#include <vector>
using namespace std;
const int MOD =1000000007;
int main(){
  int N,M;cin>>N>>M;
  vector<bool>issafe;
  issafe.assing(N+1,true);
  for (int i=0;i<M;++i){
    int a;cin>>a;
    issafe[a]=false;
  }
  vecto<int>dp(N+1,0);
  dp[0] = 1;
  if (issafe[1]) dp[1] = 1;
  for (int i = 2; i <= N; ++i) {
    if (issafe[i-1])dp[i]+=dp[i-1];
    if (issafe[i-2])dp[i]+=dp[i-2];
    dp[i]%=MOD;
  }
  cout<<dp[N]<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'class std::vector<bool>' has no member named 'assing'; did you mean 'assign'?
    8 |   issafe.assing(N+1,true);
      |          ^~~~~~
      |          assign
a.cc:13:3: error: 'vecto' was not declared in this scope
   13 |   vecto<int>dp(N+1,0);
      |   ^~~~~
a.cc:13:9: error: expected primary-expression before 'int'
   13 |   vecto<int>dp(N+1,0);
      |         ^~~
a.cc:14:3: error: 'dp' was not declared in this scope
   14 |   dp[0] = 1;
      |   ^~
Language: C

#include<algorithm>
#include<iostream>
#include<vector>
using namespace std;
typedef long long ll;
const long long MOD = 1000000007;
int main(){
	ll n,m;
	cin >> n >> m;
	
	vector<ll> a(m);
	vector<ll> s(m+1);
	vector<ll> e(m+1);
    vector<ll> A(n+1);
	s[0] = 0;
	e[m] = n;
	ll sum = 1;
	A[0] = 0;
	A[1] = 1;
	for (int i = 2; i <= n; i++){
		A[i] = A[i - 1] + A[i - 2];
	}
	
	for (ll i = 0; i < m; i++){
		cin >> a[i];
		s[i + 1] = a[i] + 1;
		e[i] = a[i] - 1;
	}
  
	for (ll i = 0; i <= m; i++){
		sum *= A[e[i] - s[i] + 1];
        sum=sum%MOD;
	}
	cout << sum << endl;
	return 0;
}

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

#include <bits/stdc++.h>

using namespace std;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(WW,n)cerr << v[WW] << ' ';cerr << endl << endl;}
#define SHOW2d(v,WW,HH) {REP(W_,WW){REP(H_,HH)cerr << v[W_][H_] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 1e9+7

typedef long long ll;
typedef pair<ll,ll> P;

ll dp[111111];
bool ng[111111];

void modAdd(ll &a, ll b){
	a += b;
	a %= MOD;
}

int main(){
	cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
	ll n, m;cin >> n >> m;
	REP(i, m){
		ll a;cin >> a;ng[a] = true;
	}
	dp[0] = 1;
	REP(i, n){
		if(!ng[i+1])modAdd(dp[i+1], dp[i]);
		if(!ng[i+2])modAdd(dp[i+2], dp[i]);
	}
	cout << dp[n] << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void modAdd(ll&, ll)':
a.cc:28:11: error: invalid operands of types 'll' {aka 'long long int'} and 'double' to binary 'operator%'
   28 |         a %= MOD;
      |           ^
a.cc:28:11: note:   in evaluation of 'operator%=(ll {aka long long int}, double)'
Language: C++

#include <bits/stdc++.h>
#include <algorithm>
using namespace std;
#define LEN 1000000007

int main(){
    long N, M;
    cin >> N >> M;

    vector<long> flag(N+1, 0);
    long a = 0;
    for(long i = 0; i < M; i++){
        cin >> a;
        flag[a]++;
    }

    vector<long long> dp(N+1, 0);
    dp[1] = 1;
    dp[2] = 2;
    if(flag[1]){
        dp[1]--;
        dp[2]--;
    }
    if(flag[2]){
        f[2] = 0;
    }
    for(long j = 3; j <= N; j++){
        if(flag[j]){
            continue;
        }else{
            dp[j] = dp[j-1] + dp[j-2]; 
        }
    }

    cout << dp[N] % LEN << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:9: error: 'f' was not declared in this scope
   25 |         f[2] = 0;
      |         ^
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<cmath>
#define mod 998244853 
using namespace std;
int main()
{
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int n, m, x;
    cin >> n >> m;
    long long int a[n+1];
    for(int i = 0; i <= n; i++)
        a[i]=0;
    for(int i = 0; i < m; i++)
    {
        cin >> x;
        a[x]=-1;
    }
        a[n]=1;
        if(a[n-1]!=-1)
        {
            if()
            a[n-1]=1;
        }
    for(int i = n-2; i >= 0; i--)
    {
        if(a[i]!=-1)
        {
            if(a[i+1]!=-1)
            {
                a[i]+=a[i+1];
            }
            if(a[i+2]!=-1)
            {
                a[i]+=a[i+2];
            }
            a[i]%=1000000007;
        }
    }
    cout << a[0]%1000000007 << '\n';
}

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

#include <iostream>
#include <vector>
 
using namespace std;
 
int main(){
  int N,M;
  cin >> N >> M;
  vector<int> a;
  a.push_back(-1);
  int b;
  cin >> b;
  a.push_back(b);
  int  beforeEmpty=b;
  for(int i=1;i<M;i++){
    int s;
    cin >> s;
    if(beforeEmpty+1==s){
      cout << 0;
      return 0;
    }
	a.push_back(s);
    beforeEmpty=s;
  }
  a.push_back(N+1);
	vector<int> buf;
	buf.push_back(1);
	buf.push_back(1);
  for(int i=2;i<N;i++){
  	int push=buf[i-1]+buf[i-2];
    for(int j=0;j<a.size();j++){
      if(i==a[j]){
        push=0;
        break;
      }
    }
    buf.push_back(push);
  }
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:39:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   39 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

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

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<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(oks[next]){
        dp[next]+=dp[now];
        dp[next]%=10000000007;
      }
    }
  }
  cout << dp[n] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'N' was not declared in this scope
   12 |   vector<int> oks(N+1, true);
      |                   ^
Language: C++

#include<iostream>
#include <vector>
#include<algorithm>
using namespace std;
using vi = vector<int>;
using vii = vector<vi>;
using pii = pair<int, int>;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define vsort(v) sort(v.begin(),v,end())
#define ll long long
const ll MOD = 1e9 + 7;

int main() {
	int n, m;
	cin >> n >> m;
	vector<bool> b(n + 1);
	rep(i, m) {
		int a;
		cin >> a;
		b[a] = 1;
	}

	vector<ll> dp(n + 1);
	dp[0] = 1;
	if (b[1]) dp[1] = 0;
	else dp[1] = 1;

	for (int i = 2; i <= n; i++) {
		if (!b[i]) dp[i] = dp[i - 1] + dp[i - 2];
		else dp[i] = 0;
		dp[i] %= mod;
	}
	cout << dp[n] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:26: error: 'mod' was not declared in this scope
   31 |                 dp[i] %= mod;
      |                          ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  
  int n,m;
  cin >> n >> m;
  int mod = 1000000007;
  vector<int> cont(N , 1);
  
  vector<int> dp(N+2);
  dp.at(N) = 1;
  dp.at(N+1) = 0;
  
  for(int i = 0 ; i < N ; i++){
    int a;
    cin >> a;
    cont.at(a) = 0;
  }
  
  for(int i = N - 1 ; i >= 0 ; i--){
    
    if(cont.at(i)){
      continue;
    }
      dp.at(i) = ( dp.at(i+1) + dp.at(i+2) ) % mod;
  }
  
  cout << dp.at(0) << endl;
}
    
    
    
    
  
  
    
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'N' was not declared in this scope
    8 |   vector<int> cont(N , 1);
      |                    ^
Language: Java

import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int m=sc.nextInt();
		boolean[] a=new boolean[n+1];
		for(int i=1;i<=n;i++){
			i=sc.nextInt();
			a[i]=false;
		}
 
		int r=1_000_000_007;
		long[] d=new long[n+1];
		d[0]=1;
		for(int i=1;i<n+1;i++){
          	int p;
			if(a[i]!=false){
				if(i=1)
					p=i-1;
				else
					p=i-2;
				for(int j=p;j<i;j++)
				d[i]+=d[j];
				d[i]%=r;
			}else if(a[i]==false){
				d[i]=0;
			}
		}
		System.out.println(d[n]%r);
		
	}
}

Compiler output:
Main.java:19: error: incompatible types: int cannot be converted to boolean
				if(i=1)
				    ^
1 error
Language: Java

import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int m=sc.nextInt();
		boolean[] a=new boolean[n+1];
		for(int i=1;i<=n;i++){
			i=sc.nextInt();
			a[i]=false;
		}
 
		int r=1_000_000_007;
		long[] d=new long[n+1];
		d[0]=1;
		for(int i=1;i<n+1;i++){
			if(a[i]!=false){
				if(i=1)
					int p=i-1;
				else
					int p=i-2;
				for(int j=p;j<i;j++)
				d[i]+=d[j];
				d[i]%=r;
			}else if(a[i]==false){
				d[i]=0;
			}
		}
		System.out.println(d[n]%r);
		
	}
}

Compiler output:
Main.java:19: error: variable declaration not allowed here
					int p=i-1;
					    ^
Main.java:21: error: variable declaration not allowed here
					int p=i-2;
					    ^
2 errors
Language: Java

import java.util.*;
class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		int m=sc.nextInt();
		boolean[] a=new boolean[n+1];
		for(int i=1;i<=n;i++){
			i=sc.nextInt();
			a[i]=false;
		}
 
		int r=1_000_000_007;
		long[] d=new long[n+1];
		d[0]=1;
		for(int i=1;i<n+1;i++){
			if(a[i]!=false){
				if(i=1)
					int p=i-1;
				else
					int p=i-2;
				for(int j=p;j<i;i++)
				d[i]+=d[j];
				d[i]%=r;
			}else if(a[i]==false){
				d[i]=0;
			}
		}
		System.out.println(d[n]%r);
		
	}
}

Compiler output:
Main.java:19: error: variable declaration not allowed here
					int p=i-1;
					    ^
Main.java:21: error: variable declaration not allowed here
					int p=i-2;
					    ^
2 errors
Language: C++

/*
      Chase
       Your
      Legend

    英雄志逐传奇
*/

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#include <stdio.h>

#define rep(i, n) for(int i = 0; i < (n); i++)
typedef long long ll;
using namespace std;


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

    vector<int>vec(M);
    rep(i, M) {
        cin >> vec[i];
    }

    //二段連続で壊れてるか判定する
    bool flag = true;
    rep(i, M - 1) {
        if (vec[i] == vec[i + 1] - 1) {
            flag = false;
        }
    }

    //Fibonacci sequence
    vector<ll>fib(N);
    fib[0] = 0;
    fib[1] = 1;
    for (int i = 2; i < N; i++) {
        fib[i] = fib[i - 2] + fib[i - 1];
        fib[i] = fib[i] % 1000000007;
    }

    ll sum = 1;

    //一番下の段から壊れてる段のなかで最下段のものまで登る方法の回数を計算
    if (M > 0){
        sum = sum * fib[vec[0]];
        sum = sum % 1000000007;
    }

    for (int i = 0; i < M - 1; i++) {
        sum = sum * fib[vec[i + 1] - vec[i] - 1];
        sum = sum % 1000000007;
    }

    //壊れてる段のなかで最上段のものから一番上の段まで登る方法の回数を計算
    if (M > 0) {
        sum = sum * fib[N - vec[M - 1]];
        sum = sum % 1000000007;
    }
  
    //1箇所も壊れていない場合
    if (M == 0){
        sum = sum * fib[N - 1];
        sum = sum % 1000000007;
    }
  
    if (flag == true) {
        cout << sum << endl;
   
    else {
        cout << '0' << endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:80:5: error: expected '}' before 'else'
   80 |     else {
      |     ^~~~
a.cc:77:23: note: to match this '{'
   77 |     if (flag == true) {
      |                       ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <cmath>
typedef long long ll;
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: warning: ignoring return value of 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = int; _Alloc = std::allocator<int>; reference = int&; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   17 |     a[i];
      |        ^
In file included from /usr/include/c++/14/vector:66,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:30:14: error: 'i' was not declared in this scope
   30 |   cout << dp[i] << endl;
      |              ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include <bitset>
using namespace std;
#define INF 110000000000
#define MAX 100000
typedef long long ll;
typedef pair<ll,int> P;

int check[110000];
ll dp[110000];

int main(){
  int N,M,temp;
  cin>>N>>M;
  for(int i=0;i<M;i++){
    cin>>temp;
    check[temp]++;
  }
  dp[0]=1;
  for(int i=0;i<N;i++){
    for(int j=1;j!=3;j++){
      if(check[i+j]==0) dp[i+j]+=dp[i];
    }
    dp[i]%=1000000007
  }
  cout<<dp[N]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:22: error: expected ';' before '}' token
   29 |     dp[i]%=1000000007
      |                      ^
      |                      ;
   30 |   }
      |   ~
Language: C++

#include<iostream>
using namespace std;
const ll mo=1e9+7;
ll a[100005], re[100005];

int main(){
 ll i,j,k,n,m,t;
  cin>>n>>m;
  ll f=0,pre=-1;
  for(i=0;i<m;i++){
    cin>>k;
    if(k-pre==1){
     f=1; 
    }
    pre=k;
    a[k]=1;
  }
  if(f) cout<<"0\n";
  else {
    re[0]=1;
    if(!a[1]) re[1]=1;
    if(!a[2]) re[2]=2;
    for(i=3;i<=n;i++){
      if(a[i]) continue;
      a[i]=0;
      if(!a[i-1]) a[i]+=a[i-1], a[i]%=mo;
      if(!a[i-2]) a[i]+=a[i-2],a[i]%=mo;
    }
    cout<<a[n]<<"\n";
  }
}

Compiler output:
a.cc:3:7: error: 'll' does not name a type
    3 | const ll mo=1e9+7;
      |       ^~
a.cc:4:1: error: 'll' does not name a type
    4 | ll a[100005], re[100005];
      | ^~
a.cc: In function 'int main()':
a.cc:7:2: error: 'll' was not declared in this scope
    7 |  ll i,j,k,n,m,t;
      |  ^~
a.cc:8:8: error: 'n' was not declared in this scope
    8 |   cin>>n>>m;
      |        ^
a.cc:8:11: error: 'm' was not declared in this scope; did you mean 'tm'?
    8 |   cin>>n>>m;
      |           ^
      |           tm
a.cc:9:5: error: expected ';' before 'f'
    9 |   ll f=0,pre=-1;
      |     ^~
      |     ;
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<m;i++){
      |       ^
a.cc:11:10: error: 'k' was not declared in this scope
   11 |     cin>>k;
      |          ^
a.cc:12:10: error: 'pre' was not declared in this scope
   12 |     if(k-pre==1){
      |          ^~~
a.cc:13:6: error: 'f' was not declared in this scope
   13 |      f=1;
      |      ^
a.cc:15:5: error: 'pre' was not declared in this scope
   15 |     pre=k;
      |     ^~~
a.cc:16:5: error: 'a' was not declared in this scope
   16 |     a[k]=1;
      |     ^
a.cc:18:6: error: 'f' was not declared in this scope
   18 |   if(f) cout<<"0\n";
      |      ^
a.cc:20:5: error: 're' was not declared in this scope
   20 |     re[0]=1;
      |     ^~
a.cc:21:9: error: 'a' was not declared in this scope
   21 |     if(!a[1]) re[1]=1;
      |         ^
a.cc:22:9: error: 'a' was not declared in this scope
   22 |     if(!a[2]) re[2]=2;
      |         ^
a.cc:23:9: error: 'i' was not declared in this scope
   23 |     for(i=3;i<=n;i++){
      |         ^
a.cc:24:10: error: 'a' was not declared in this scope
   24 |       if(a[i]) continue;
      |          ^
a.cc:25:7: error: 'a' was not declared in this scope
   25 |       a[i]=0;
      |       ^
a.cc:26:39: error: 'mo' was not declared in this scope
   26 |       if(!a[i-1]) a[i]+=a[i-1], a[i]%=mo;
      |                                       ^~
a.cc:27:38: error: 'mo' was not declared in this scope
   27 |       if(!a[i-2]) a[i]+=a[i-2],a[i]%=mo;
      |                                      ^~
a.cc:29:11: error: 'a' was not declared in this scope
   29 |     cout<<a[n]<<"\n";
      |           ^