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

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

ll mod=1000000007;

ll f(ll x,vector<ll>&dp){
  if(x==1){
    dp.at(x)=1;
    return dp.at(x);
  }
  else if(x==2){
    dp.at(x)=2;
    return dp.at(x);
  }
  if(dp.at(x)!=0){
    return dp.at(x);
  }
  else{
    dp.at(x)=(f(x-2,dp)%mod+f(x-1,dp)%mod)%mod;
    return dp.at(x);
  }
}

int main(){
  ll n,m;cin>>n>>m;
  vector<ll>dp(n+1,0);
  if(m==0){
    cout <<f(n)<<endl;
    return 0;
  }
  vector<ll>a(m);
  cin>>a.at(0);
  for(ll i=1;i<m;i++){
    cin>>a.at(i);
    if(a.at(i)-a.at(i-1)==1){
      cout <<0<<endl;
      return 0;
    }
  }
  vector<ll>s(m+1,0);
  if(m==1){
    s.at(0)=a.at(0)-1;
    s.at(1)=n-a.at(0)-1;
  }
  else{
    for(ll i=0;i<m;i++){
      if(i==0){
        s.at(i)=a.at(i)-1;
      }
      else {
        s.at(i)=a.at(i)-a.at(i-1)-2;
      }
    }
    s.at(m)=n-a.at(m-1)-1;
  }
  ll ans=1;
  for(ll i=0;i<m+1;i++){
    if(s.at(i)==0)continue;
    ans*=f(s.at(i),dp);
    ans%=mod;
  }
  cout <<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:13: error: too few arguments to function 'll f(ll, std::vector<long int>&)'
   29 |     cout <<f(n)<<endl;
      |            ~^~~
a.cc:7:4: note: declared here
    7 | ll f(ll x,vector<ll>&dp){
      |    ^
Language: Java


public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);
		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int M = sc.nextInt();
		int[] n = new int[N+1];

		for (int i = 1; i <= M; i++) {
			int x = sc.nextInt();
			n[x] = 1;
		}
		int cnt = 1;
		long ans = 1;
		for (int i=1;i<=N;i++) {
			if(n[i]!=1) {
				cnt++;
			} else {
				ans = mod(ans * mod(solve(cnt)));
				cnt =0;
			}
		}
		ans = mod(ans * mod(solve(cnt)));
		System.out.println(ans);
	}

	public static long solve(int N) {
		if (N==0) return 0;
		if (N==1||N==2)	return 1;
		long num1 = 1;
		long num2 = 1;
		long tmp = 1;
		for (int i = 1; i < N-1; i++) {
			tmp = mod(num1 + num2);
			num1 = mod(num2);
			num2 = mod(tmp);
		}
		return tmp;

	}

	public static long mod(long N) {

		return (long) N % 1000000007;

	}

}

Compiler output:
Main.java:3: error: cannot find symbol
	public static void main(String[] args) throws FileNotFoundException {
	                                              ^
  symbol:   class FileNotFoundException
  location: class Main
Main.java:7: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

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

void fnInput(int& rnStair, vector<int>& rvnBroken)
{
  int nBrokenSiz;
  cin >> rnStair >> nBrokenSiz;
  rvnBroken.resize(nBrokenSiz);

  for (int& rnBroken : rvnBroken)
    cin >> rnBroken;
}

void fnDPWaySet(int nStair, vector<llong>& rvnDPWays)
{
  rvnDPWays.resize(nStair + 1);
  rvnDPWays[0] = 1;

  for (int i = 1; i < rvnDPWays.size(); i++)
  {
    rvnDPWays[i] += rvnDPWays[i - 1];
    if (i > 1)
      rvnDPWays[i] += rvnDPWays[i - 2];

    rvnDPWays[i] %= 1000000007;
  }
}

bool fnUseFulStairSet(int nStair, vector<int>& rvnUseful, const vector<int>& cnrvnBroken)
{
  for (int i = 0; i < cnrvnBroken.size(); i++)
    if (i == 0)
      if (cnrvnBroken[i] == 1);
      else
        rvnUseful.push_back( cnrvnBroken[i] - 1 );
    else
      if (cnrvnBroken[i] - cnrvnBroken[i - 1] == 1)
        return false;
      else
        rvnUseful.push_back( (cnrvnBroken[i] - 1) - (cnrvnBroken[i - 1] + 1) );

  if (cnrvnBroken.size())
    rvnUseful.push_back( nStair - (cnrvnBroken[cnrvnBroken.size() - 1] + 1) );
  else
    rvnUseful.push_back( nStair );
  return true;
}

ullong fnNumOfWays(int nStair, const vector<int>& cnrvnBroken)
{
  vector<llong> vnDPWays;
  fnDPWaySet(nStair, vnDPWays);

  vector<int> vnUseful;
  if (!fnUseFulStairSet(nStair, vnUseful, cnrvnBroken))
    return 0;

  llong nNumOfWays = 1;

  for (int nUseful : vnUseful)
  {
    nNumOfWays *= vnDPWays[ nUseful ];
    nNumOfWays %= 1000000007;
  }
  
  return nNumOfWays;
}
  
int main()
{
  int nStair;
  vector<int> vnBroken;

  fnInput(nStair, vnBroken);
  cout << fnNumOfWays(nStair, vnBroken) << endl;

  return 0;
}

Compiler output:
a.cc:50:1: error: 'ullong' does not name a type; did you mean 'ulong'?
   50 | ullong fnNumOfWays(int nStair, const vector<int>& cnrvnBroken)
      | ^~~~~~
      | ulong
a.cc: In function 'int main()':
a.cc:76:11: error: 'fnNumOfWays' was not declared in this scope
   76 |   cout << fnNumOfWays(nStair, vnBroken) << endl;
      |           ^~~~~~~~~~~
Language: C

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

int N=0, M=0;
// 割る数の定義
long long MOD = pow(10, 9)+7;

int main(){
  cin >> N >> M;
  // 階段が壊れているかどうかのflag
  vector<bool> flag(N+1, true);
  // DPテーブル。漸化式の計算結果を保存しておく用
  vector<long long> DP(N+1, 0);
  rep(i, M){
    int a = 0;
    cin >> a;
    flag[a] = false;
  }
  // 今いる場所は1通りと考えることで辻褄が合う
  DP[0] = 1;
  // 1段目が壊れていれば0のまま，壊れていなければ1で初期化する
  if (flag[1]==true) DP[1]=1;
  // MODで割ったあまりを格納していけば良い
  rep(i, N-1){
    if (flag[i+2]==true) DP[i+2] = (DP[i+1]+DP[i]) % MOD;
  }
    // DPテーブルは0段目が0インデックスなのでN段目はNインデックス
    cout << DP[N] << endl;
}

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: 'a' was not declared in this scope
    7 |   for(int i=0;i<m;i++) cin>>a[i];
      |                             ^
a.cc:13:8: error: 'a' was not declared in this scope
   13 |     if(a[j]==i){
      |        ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:29: error: 'a' was not declared in this scope
    7 |   for(int i=0;i<m;i++) cin>>a[i];
      |                             ^
a.cc:13:8: error: 'a' was not declared in this scope
   13 |     if(a[j]==i){
      |        ^
a.cc:21:12: error: 'i' was not declared in this scope
   21 |   cout<<dp[i]<<endl;
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define MOD 1000000007
using Graph = vector<vector<int>>;
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;
// 任意長整数型
using Bint = mp::cpp_int;
// 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする)
using Real = mp::number<mp::cpp_dec_float<1024>>;
int dp[100010];
int main (){
  int N,M;
  cin>>N>>M;
  rep(i,M){
    int x;
    cin>>x;
    dp[x]=-1;
  }
  if(dp[1]==0) dp[1]=1;
  if(dp[2]==0) dp[2]=2;
  for(int i=3;i<=N;i++){
    if(dp[i]==-1){
      dp[i]==0;
    }
    else{
      dp[i]=dp[i-1]+dp[i-2];
      if(dp[i]!=0)
      dp[i]=((dp[i]-1)/MOD)+1
    }
  }
  cout<<dp[N];
}


Compiler output:
a.cc:6:10: fatal error: boost/multiprecision/cpp_dec_float.hpp: No such file or directory
    6 | #include <boost/multiprecision/cpp_dec_float.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define be(v) v.begin(), v.end()
#define ll long long
ll INF = 1e9;
ll mod = 1e9+7;

ll dp[10001];
ll a[10001];
int main() {
  int n,m; cin >> n >> m;
  vector<bool> aa(n,false);
  rep(i,m) {
  	cin >> a[i];
  	aa[i]=true;
  }
  rep(i,n) dp[i] = 0;
  dp[0]=1;
  rep(i,n) {
  	for(int j=i+1;j<=min(n,i+2);j++) {
  	if(aa[i]==false) {
  		dp[j] += dp[i];
  		dp[i] %= mod;
  	}
  }
  cout << dp[n] << endl;
}


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

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define be(v) v.begin(), v.end()
#define ll long long
ll INF = 1e9;
ll mod = 1e9+7;

ll dp[10001];
ll a[10001];
int main() {
  int n,m; cin >> n >> m;
  vector<bool> aa(n,false);
  rep(i,m) {
  	cin >> a[i];
  	aa[i]=true;
  }
  rep(i,n) dp[i] = 0;
  dp[0]=1;
  rep(i,n) {
  	for(int j=i+1;j<=min(n,i+2);j++){}
  	if(aa[i]==false) {
  		dp[j] += dp[i];
  		dp[i] %= mod;
  	}
  }
  cout << dp[n] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:20: error: 'j' was not declared in this scope
   24 |                 dp[j] += dp[i];
      |                    ^
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#include<algorithm>//next_permutation
#define rep(i,n) for (int i = 0;i < (n);i++)
#define all(v) v.begin(),v.end()
#define dec(n) cout << fixed << setprecision(n);
#define large "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define small "abcdefghijklmnopqrstuvwxyz"
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;

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

ll mod(ll a){
  return (a % 1000000007);
}

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



int main(){
  ll n,m; cin >> n >> m;
  vector<ll> dp(n+1); vector<bool> isbreak(n+1);
  
  rep(i,m){
    ll x; cin >> x;
    isbreak[x] = true;
  }
  
 
    
  if(isbreak[1] && isbreak[2]){
    cout << 0 << endl;
    return 0;
  }
  else if(isbreak[1] && !isbreak[2]){
    dp[1] = 0; dp[2] = 1;
  }
  else if(!isbreak[1] && isbreak[2]){
    dp[1] = 1; dp[2] = 0;
  }
    else{
      dp[1] = 1; dp[2] = 2;
    }
    
    
    for(ll i=3; i <= n; i++){
      if(isbreak[i]){
        continue;
      }
      else{
        dp[i] = dp[i-1] + dp[i-2];
        dp[i] = mod(dp[i]);
      }
    }
    
    cout << dp[n] << endl;
  }
  
}
  


Compiler output:
a.cc:69:1: error: expected declaration before '}' token
   69 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define ll long long
#define be(v) v.begin(), v.end()
#define dcout cout << fixed << setprecision(20) 
ll INF = 1000100100010;
ll mod = 1e9 + 7;

template<class T> inline void chmin(T& a,T b) {   //DP(小)
    if(a>b) a = b; 
} 
template<class T> inline void chmax(T& a,T b) {   //DP(大)
    if(a<b) a = b; 
} 
int main() {
	int n,m; cin >> n >> m;
	vector<bool> oks(n+1,true);
	vector<ll> dp(n+1,1);
	rep(i,m) {
		int a;
		cin >> a;
		oks[a] = false;
	}
	for(int now = 0;now<m;now++) for(int next = now + 1; next<=min(now+2,n) ) {
			if(oks[next]) {
				dp[next] += dp[now];
				dp[next] %= mod;
			}
		}
	cout << dp[n] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:80: error: expected ';' before ')' token
   26 |         for(int now = 0;now<m;now++) for(int next = now + 1; next<=min(now+2,n) ) {
      |                                                                                ^~
      |                                                                                ;
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define ll long long
#define be(v) v.begin(), v.end()
#define dcout cout << fixed << setprecision(20) 
ll INF = 1000100100010;
ll mod = 1e9 + 7;

template<class T> inline void chmin(T& a,T b) {   //DP(小)
    if(a>b) a = b; 
} 
template<class T> inline void chmax(T& a,T b) {   //DP(大)
    if(a<b) a = b; 
} 
int main() {
	int n,m; cin >> n >> m;
	vector<bool> oks(n+1,true);
	vector<ll> dp(n+1,1);
	rep(i,m) {
		int a;
		cin >> a;
		oks[a] = false;
	}
	for(int now = 0;now<m;now++) {
		for(int next = now + 1; next<=min(now+2,n)) {
			if(oks[next]) {
				dp[next] += dp[now];
				dp[next] %= mod;
			}
		}
	}
	cout << dp[n] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:59: error: expected ';' before ')' token
   27 |                 for(int next = now + 1; next<=min(now+2,n)) {
      |                                                           ^
      |                                                           ;
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define ll long long
#define be(v) v.begin(), v.end()
#define dcout cout << fixed << setprecision(20) 
ll INF = 1000100100010;
ll mod = 1e9 + 7;

template<class T> inline void chmin(T& a,T b) {   //DP(小)
    if(a>b) a = b; 
} 
template<class T> inline void chmax(T& a,T b) {   //DP(大)
    if(a<b) a = b; 
} 
int main() {
	int n,m; cin >> n >> m;
	vector<bool> oks(n+1,true);
	vecotr<ll> dp(n+1,1);
	rep(i,m) {
		int a;
		cin >> a;
		oks[a] = false;
	}
	for(int now = 0;now<m;now++) {
		for(int next = now + 1; next<=min(now+2,n)) {
			if(oks[next]) {
				dp[next] += dp[now];
				dp[next] %= mod;
			}
		}
	}
	cout << dp[n] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: 'vecotr' was not declared in this scope
   20 |         vecotr<ll> dp(n+1,1);
      |         ^~~~~~
a.cc:5:12: error: expected primary-expression before 'long'
    5 | #define ll long long
      |            ^~~~
a.cc:20:16: note: in expansion of macro 'll'
   20 |         vecotr<ll> dp(n+1,1);
      |                ^~
a.cc:27:59: error: expected ';' before ')' token
   27 |                 for(int next = now + 1; next<=min(now+2,n)) {
      |                                                           ^
      |                                                           ;
a.cc:29:33: error: 'dp' was not declared in this scope; did you mean 'dup'?
   29 |                                 dp[next] += dp[now];
      |                                 ^~
      |                                 dup
a.cc:34:17: error: 'dp' was not declared in this scope; did you mean 'dup'?
   34 |         cout << dp[n] << endl;
      |                 ^~
      |                 dup
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define ll long long
#define be(v) v.begin(), v.end()
#define dcout cout << fixed << setprecision(20) 
ll INF = 1000100100010;
ll mod = 1e9 + 7;

template<class T> inline void chmin(T& a,T b) {   //DP(小)
    if(a>b) a = b; 
} 
template<class T> inline void chmax(T& a,T b) {   //DP(大)
    if(a<b) a = b; 
} 
int main() {
	int n,m; cin >> n >> m;
	vector<bool> oks(n+1,true);
	ll dp(n+1){};
	rep(i,m) {
		int a;
		cin >> a;
		oks[a] = false;
	}
	rep(i,n+1) dp[i] = 1;
	for(int now = 0;now<m;now++) {
		for(int next = now + 1; next<=min(now+2,n)) {
			if(oks[next]) {
				dp[next] += dp[now];
				dp[next] %= mod;
			}
		}
	}
	cout << dp[n] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: expected ',' or ';' before '{' token
   20 |         ll dp(n+1){};
      |                   ^
a.cc:26:22: error: invalid types 'long long int[int]' for array subscript
   26 |         rep(i,n+1) dp[i] = 1;
      |                      ^
a.cc:28:59: error: expected ';' before ')' token
   28 |                 for(int next = now + 1; next<=min(now+2,n)) {
      |                                                           ^
      |                                                           ;
a.cc:30:35: error: invalid types 'long long int[int]' for array subscript
   30 |                                 dp[next] += dp[now];
      |                                   ^
a.cc:30:47: error: invalid types 'long long int[int]' for array subscript
   30 |                                 dp[next] += dp[now];
      |                                               ^
a.cc:31:35: error: invalid types 'long long int[int]' for array subscript
   31 |                                 dp[next] %= mod;
      |                                   ^
a.cc:35:19: error: invalid types 'long long int[int]' for array subscript
   35 |         cout << dp[n] << endl;
      |                   ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define ll long long
#define be(v) v.begin(), v.end()
#define dcout cout << fixed << setprecision(20) 
ll INF = 1000100100010;
ll mod = 1e9 + 7;

template<class T> inline void chmin(T& a,T b) {   //DP(小)
    if(a>b) a = b; 
} 
template<class T> inline void chmax(T& a,T b) {   //DP(大)
    if(a<b) a = b; 
} 
int main() {
	int n,m; cin >> n >> m;
	vector<int> oks(n+1,true);
	ll dp(n+1){};
	rep(i,m) {
		int a;
		cin >> a;
		oks[a] = false;
	}
	rep(i,n+1) dp[i] = 1;
	for(int now = 0;now<m;now++) {
		for(int next = now + 1; next<=min(now+2,n)) {
			if(oks[next]) {
				dp[next] += dp[now];
				dp[next] %= mod;
			}
		}
	}
	cout << dp[n] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:19: error: expected ',' or ';' before '{' token
   20 |         ll dp(n+1){};
      |                   ^
a.cc:26:22: error: invalid types 'long long int[int]' for array subscript
   26 |         rep(i,n+1) dp[i] = 1;
      |                      ^
a.cc:28:59: error: expected ';' before ')' token
   28 |                 for(int next = now + 1; next<=min(now+2,n)) {
      |                                                           ^
      |                                                           ;
a.cc:30:35: error: invalid types 'long long int[int]' for array subscript
   30 |                                 dp[next] += dp[now];
      |                                   ^
a.cc:30:47: error: invalid types 'long long int[int]' for array subscript
   30 |                                 dp[next] += dp[now];
      |                                               ^
a.cc:31:35: error: invalid types 'long long int[int]' for array subscript
   31 |                                 dp[next] %= mod;
      |                                   ^
a.cc:35:19: error: invalid types 'long long int[int]' for array subscript
   35 |         cout << dp[n] << endl;
      |                   ^
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define ll long long
#define be(v) v.begin(), v.end()
#define dcout cout << fixed << setprecision(20) 
ll INF = 1000100100010;
ll mod = 1e9 + 7;

template<class T> inline void chmin(T& a,T b) {   //DP(小)
    if(a>b) a = b; 
} 
template<class T> inline void chmax(T& a,T b) {   //DP(大)
    if(a<b) a = b; 
} 
int main() {
	int n,m; cin >> n >> m;
	vector<int> oks(n+1,true);
	ll dp(n+1);
	rep(i,m) {
		int a;
		cin >> a;
		oks[a] = false;
	}
	rep(i,n+1) dp[i] = 1;
	for(int now = 0;now<m;now++) {
		for(int next = now + 1; next<=min(now+2,n)) {
			if(oks[next]) {
				dp[next] += dp[now];
				dp[next] %= mod;
			}
		}
	}
	cout << dp[n] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:22: error: invalid types 'long long int[int]' for array subscript
   26 |         rep(i,n+1) dp[i] = 1;
      |                      ^
a.cc:28:59: error: expected ';' before ')' token
   28 |                 for(int next = now + 1; next<=min(now+2,n)) {
      |                                                           ^
      |                                                           ;
a.cc:30:35: error: invalid types 'long long int[int]' for array subscript
   30 |                                 dp[next] += dp[now];
      |                                   ^
a.cc:30:47: error: invalid types 'long long int[int]' for array subscript
   30 |                                 dp[next] += dp[now];
      |                                               ^
a.cc:31:35: error: invalid types 'long long int[int]' for array subscript
   31 |                                 dp[next] %= mod;
      |                                   ^
a.cc:35:19: error: invalid types 'long long int[int]' for array subscript
   35 |         cout << dp[n] << endl;
      |                   ^
Language: C++

#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
#include <algorithm>
using namespace std;
using ll = long long;
using P = pair<int,int>;
using Graph= vector<vector<int>>; 
#define rep(i,n) for (ll i=0; i < (n); ++i)
#define rep2(i,n,m) for(ll i=n;i<=m;i++)
#define rep3(i,n,m) for(ll i=n;i>=m;i--)
#define pb push_back
#define eb emplace_back
#define ppb pop_back
#define mpa make_pair
const ll INF=1e18 ;
inline void chmax(ll& a,ll b){a=max(a,b);}
inline void chmin(ll& a,ll b){a=min(a,b);}
 ll dp[n+1] 
int main(){
 int n,m;cin>>n>>m ;
 vector<int> A(m) ;rep(i,m) cin>>A[i] ;
 
 dp[0]=1 ;
 rep(i,m){
   dp[A[i]]=-1 ;
 }
 if(A[0]==1) dp[1]=0 ;
 else dp[1]=1;
 rep2(i,2,n){
  if(dp[i]==-1) dp[i]=0 ;
  else{
    dp[i]=dp[i-1]+dp[i-2] ;
  }
   
 }
  cout<<dp[n] <<endl;
  return 0;
  }

Compiler output:
a.cc:19:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   19 |  ll dp[n+1]
      |        ^
      |        yn
a.cc:20:1: error: expected initializer before 'int'
   20 | int main(){
      | ^~~
Language: C++

#include<iostream>
using namespace std;

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

int main()
{
	int N;
	cin >> N;
	int M;
	cin >> M;
	int a [M];
	for (int i=0;i<M;++i)cin>>a[i];

	long long dp [100100];
	for (int i=0;i<100100;++i)dp[i]=-1;

	dp[0]=1;
	dp[1]=1;
	long long tmp=0;
	for (int i=0;i<M;++i)dp[a[i]]=0;
	for (int i=0;i<100000;++i){
		tmp=dp[i+1]+dp[i];
		if(tmp>1000000007)tmp-=1000000007;
		chmax(dp[i+2],tmp);};
	cout<dp[N]<<endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
   26 |         cout<dp[N]<<endl;
      |              ~~~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;

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

int main()
{
	int N;
	cin >> N;
	int M;
	cin >> M;
	int a [M];
	for (int i=0;i<M;++i)cin>>a[i];

	long long dp [100100];
	for (int i=0;i<100100;++i)dp[i]=-1;

	dp[0]=1;
	dp[1]=1;
	for (int i=0;i<M;++i)dp[a[i]]=0;
	for (int i=0;i<100000;++i){
		long long tmp=dp[i+1]+dp[i];
		if(temp>1000000007)temp-=1000000007;
		chmax(dp[i+2],temp);};
	cout<dp[N]<<endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:20: error: 'temp' was not declared in this scope; did you mean 'tmp'?
   23 |                 if(temp>1000000007)temp-=1000000007;
      |                    ^~~~
      |                    tmp
a.cc:24:31: error: 'temp' was not declared in this scope; did you mean 'tmp'?
   24 |                 chmax(dp[i+2],temp);};
      |                               ^~~~
      |                               tmp
a.cc:25:19: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
   25 |         cout<dp[N]<<endl;
      |              ~~~~~^~~~~~
Language: C++

#include<iostream>
using namespace std;

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

int main()
{
	int N;
	cin >> N;
	int M;
	cin >> M;
	int a [M];
	for (int i=0;i<M;++i)cin>>a[i];

	long long dp [100100];
	for (int i=0;i<100100;++i)dp[i]=-1;

	dp[0]=1;
	dp[1]=1;
	for (int i=0;i<M;++i)dp[a[i]]=0;
	for (int i=0;i<100000;++i)
		tmp=dp[i+1]+dp[i];
		if(temp>1000000007)temp-=1000000007;
		chmax(dp[i+2],temp);
	cout<dp[N]<<endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   22 |                 tmp=dp[i+1]+dp[i];
      |                 ^~~
      |                 tm
a.cc:23:20: error: 'temp' was not declared in this scope; did you mean 'tm'?
   23 |                 if(temp>1000000007)temp-=1000000007;
      |                    ^~~~
      |                    tm
a.cc:24:26: error: 'i' was not declared in this scope
   24 |                 chmax(dp[i+2],temp);
      |                          ^
a.cc:24:31: error: 'temp' was not declared in this scope; did you mean 'tm'?
   24 |                 chmax(dp[i+2],temp);
      |                               ^~~~
      |                               tm
a.cc:25:19: error: invalid operands of types 'long long int' and '<unresolved overloaded function type>' to binary 'operator<<'
   25 |         cout<dp[N]<<endl;
      |              ~~~~~^~~~~~
Language: C++

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

int main(){
  int N,M;  cin >> N >> M;
  vector<int>A(M);
  for(int i=0;i<M;i++){
    cin >> A.at(i);
  }
  sort(A.begin(),A.end());
  vector<long long>dp(N+1);
  dp.at(0) = 1;
  int temp = 0;
  for(int i=1;i<=N;i++){
    if(i == A.at(temp)){
      if(temp != M-1) temp++;
      else  temp = 0;
      continue;
    }
    dp.at(i) += dp.at(i-1)%1000000007;
    if(i>1)  dp.at(i) += dp.at(i-2)%1000000007;
  }
  cout << dp.at(N)%1000000007 << endl;
}


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

int main(){
  int n,m,a;
  std::cin>>n>>m;
  std::vector<bool> brake(n,0);
  std::vector<int> t(n,0);
  for(int i=0;i<m;i++){
    std::cin>>a;
    brake[a-1]=1;
  }
  t[0]=1;
  if(brake[1]==1)t[1]=0;
  else t[1]=1;
  for(int i=2;i<n;i++){
    if(brake[i]==0)t[i]=(t[i-1]+t[i-2])%1000000007;
  }
  std::cout<<brake[n-1]<<std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:8: error: 'cin' is not a member of 'std'
    3 |   std::cin>>n>>m;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:4:8: error: 'vector' is not a member of 'std'
    4 |   std::vector<bool> brake(n,0);
      |        ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | int main(){
a.cc:4:15: error: expected primary-expression before 'bool'
    4 |   std::vector<bool> brake(n,0);
      |               ^~~~
a.cc:5:8: error: 'vector' is not a member of 'std'
    5 |   std::vector<int> t(n,0);
      |        ^~~~~~
a.cc:5:8: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
a.cc:5:15: error: expected primary-expression before 'int'
    5 |   std::vector<int> t(n,0);
      |               ^~~
a.cc:7:10: error: 'cin' is not a member of 'std'
    7 |     std::cin>>a;
      |          ^~~
a.cc:7:10: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:5: error: 'brake' was not declared in this scope
    8 |     brake[a-1]=1;
      |     ^~~~~
a.cc:10:3: error: 't' was not declared in this scope
   10 |   t[0]=1;
      |   ^
a.cc:11:6: error: 'brake' was not declared in this scope
   11 |   if(brake[1]==1)t[1]=0;
      |      ^~~~~
a.cc:14:8: error: 'brake' was not declared in this scope
   14 |     if(brake[i]==0)t[i]=(t[i-1]+t[i-2])%1000000007;
      |        ^~~~~
a.cc:16:8: error: 'cout' is not a member of 'std'
   16 |   std::cout<<brake[n-1]<<std::endl;
      |        ^~~~
a.cc:16:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:14: error: 'brake' was not declared in this scope
   16 |   std::cout<<brake[n-1]<<std::endl;
      |              ^~~~~
a.cc:16:31: error: 'endl' is not a member of 'std'
   16 |   std::cout<<brake[n-1]<<std::endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
Language: C++

#include<iostream>
#include<vector>

int main(){
  int n,m,a;
  std::cin>>n>>m;
  std::vector<bool> brake(n,0);
  std::vector<int> t(n,0);
  for(int i=0;iNm;i++){
    std::cin>>a;
    brake[a-1]=1;
  }
  t[0]=1;
  if(brake[1]==1)t[1]=0;
  else t[1]=1;
  for(int i=2;i<n;i++){
    if(brake[i]==0)t[i]=(t[i-1]+t[i-2])%1000000007;
  }
  std::cout<<brake[n-1]<<std::endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'iNm' was not declared in this scope
    9 |   for(int i=0;iNm;i++){
      |               ^~~
Language: C++

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

int main(){
    int n, m, k;
    cin >> n >> m;
    set<int> drop;
    rep(i, m){ cin >> k; drop.insert(k);}
    vector<int> dp(n+2);
    dp[n] = 1;
    for (int i = n-1; i >= 0; i--){
        if (drop.count(i) == 1) dp[i] == 0;
        else dp[i] = (dp[i+1] + dp[i+2]) % 1000000007;
    }
    cout << d[0] << endl;
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: 'd' was not declared in this scope; did you mean 'dp'?
   17 |     cout << d[0] << endl;
      |             ^
      |             dp
Language: C++

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

int main() {
    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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:35: error: expected ')' before ';' token
   24 |         dp[i] = (dp[i+1] + dp[i+2];) % mod
      |                 ~                 ^
      |                                   )
a.cc:24:36: error: expected primary-expression before ')' token
   24 |         dp[i] = (dp[i+1] + dp[i+2];) % mod
      |                                    ^
Language: C++

//Jai Bhole Ki
#include <bits/stdc++.h>
using namespace std;
#define fast static int fastline = []() { std::ios::sync_with_stdio(false); cin.tie(NULL); return 0; }();
#define ll long long
#define LL unsigned ll
#define pb push_back
#define pi pair<ll,ll>
#define debug(x) cout<<x<<"\n";
#define debug cout<<"debugged\n";
#define minval -2e9
#define maxval 2e9
long double PI =3.14159265358979323846;
 
const ll M=1e9+7;
const ll inf=1e18;
const ll ms=2e5+5;
fast;
ll ans;
void solve()
{
    ll n,m;cin>>n>>m;vector<ll>dp(n+2,0);vector<bool>ar(n+2,0);
    for(ll i=0;i<m;i++)
    {
        ll a;cin>>a;ar[a]=1;
        if(ar[a-1]||ar[a+1])
        {cout<<0;return;}
    }
    dp[0]=1;dp[1]=1;
    for(ll i=2;i<=n;i++)
    {
        if(!ar[i-1])
            dp[i]+=dp[i-1];
        if(!ar[i-2])
            dp[i]+=dp[i-2];

Compiler output:
a.cc:10:9: warning: "debug" redefined
   10 | #define debug cout<<"debugged\n";
      |         ^~~~~
a.cc:9:9: note: this is the location of the previous definition
    9 | #define debug(x) cout<<x<<"\n";
      |         ^~~~~
a.cc: In function 'void solve()':
a.cc:35:28: error: expected '}' at end of input
   35 |             dp[i]+=dp[i-2];
      |                            ^
a.cc:31:5: note: to match this '{'
   31 |     {
      |     ^
a.cc:35:28: error: expected '}' at end of input
   35 |             dp[i]+=dp[i-2];
      |                            ^
a.cc:21:1: note: to match this '{'
   21 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll N,M;
  cin >> N >> M;
  ll a[M + 2] = {0};
  ll Mod = 1000000007;
  for (int i = 0; i < M; i++) {
    cin >> a[i + 1];
  }
  a[0] = -1;
  a[M+1] = N+1;
  ll f[120000] = {0};
  f[0] = 0;
  f[1] = 1;
  f[2] = 2;
  for (int i = 3; i < 114514; i++) {
    f[i] = (f[i - 1] + f[i - 2]) % Mod;
  }
  ll ans = 1;
  for (int i = 1; i < M+2; i++) {
    ans *= f[max(0,a[i] - a[i - 1] - 2)];
    ans %= Mod;
  }
  cout << ans << endl;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ll N,M;
  cin >> N >> M;
  ll a[M + 2] = {0};
  ll Mod = 1000000007;
  for (int i = 0; i <M; i++) {
    cin >> a[i + 1];
  }
  a[0] = -1;
  a[N+1] = N+1;
  ll f[120000] = {0};
  f[0] = 0;
  f[1] = 1:
  f[2] = 3;
  for (int i = 3; i < 120000; i++) {
    f[i] = (f[i - 1] + f[i - 2]) % Mod;
  }
  ll ans = 1;
  for (int i = 1; i < N+2; i++) {
    ans *= f[a[i] - a[i - 1] - 2];
    ans %= Mod;
  }
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: expected ';' before ':' token
   16 |   f[1] = 1:
      |           ^
      |           ;
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
        long [] ans = new long [a+1];
        if(b>0){int [] in = new int [b];
        for(int i=0;i<b;i++){
                             in[i] = sc.nextInt();
                            }
               }
		int c = 0;
        long mod = 1000000007;
        ans [0] = 1;
        if(b>0 && in[c]==1){c++;}
        else{ans[1]=1;}
        for(int i=2;i<=a;i++){if(b>0 && in[c]==i){c++;}
                              else{ans[i]=(ans[i-1]+ans[i-2])%mod;}
                             }       
		System.out.println(ans[a]);
	}
}

Compiler output:
Main.java:16: error: cannot find symbol
        if(b>0 && in[c]==1){c++;}
                  ^
  symbol:   variable in
  location: class Main
Main.java:18: error: cannot find symbol
        for(int i=2;i<=a;i++){if(b>0 && in[c]==i){c++;}
                                        ^
  symbol:   variable in
  location: class Main
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
const long long mod=1e9+7;
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=nou+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:7:23: error: expected ')' before ';' token
    7 |     vector<int>oks(n+1;true);
      |                   ~   ^
      |                       )
a.cc:7:28: error: expected ';' before ')' token
    7 |     vector<int>oks(n+1;true);
      |                            ^
      |                            ;
a.cc:16:22: error: 'nou' was not declared in this scope; did you mean 'now'?
   16 |         for(int next=nou+1;next<=min(n,now+2);next++){
      |                      ^~~
      |                      now
Language: C++

#include <bits/stdc++.h>//復習必須
#include<iostream>
#include<vector>
#include <cmath>
#include <map>
#include <algorithm>
#include <string>
#define rep(i, n) for (int i = 0; i < n; ++i)
using ll = long long;
using namespace std;
#define P pair<int, int>
#define MOD = 1000000007
int main () {
    ll N , M ;
    cin >> N >> M ;
    
    vector<bool>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]%=MOD;
   }
   }
   }
  
   cout<<dp[N]<<endl;

    
    


   
    return 0 ;
}

 


Compiler output:
a.cc: In function 'int main()':
a.cc:26:32: error: no matching function for call to 'min(ll&, int)'
   26 |    for(int next=now+1;next<=min(N,now+2);++next){
      |                             ~~~^~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:26:32: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   26 |    for(int next=now+1;next<=min(N,now+2);++next){
      |                             ~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:26:32: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   26 |    for(int next=now+1;next<=min(N,now+2);++next){
      |                             ~~~^~~~~~~~~
a.cc:12:13: error: expected primary-expression before '=' token
   12 | #define MOD = 1000000007
      |             ^
a.cc:29:14: note: in expansion of macro 'MOD'
   29 |    dp[next]%=MOD;
      |              ^~~
Language: C++

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

typedef long long ll;

int main ()
{
	int n, m;
  	cin >> n >> m;
  	ll dp[100010];
  	vector<ll> broken(100010,true);
  	for(int i = 0; i < m; i++)
    {
    	int a;
      	cin >> a;
      	broken[a] = false;
    }
  	dp[0] = 1;
  	for(int i = 0; i < n; i++)
    {
    	for(int j = i + 1; j <=min(n, i+2); j++)
        {
        	if(broken[j])
            {
            	dp[j] += dp[i];
              	dp[j] %= 1e7;
            }
        } 
    }
  	cout << dp[n] << endl;
  	return 0;
}


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

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

template <class T> inline bool chmax(T& a, T b)
{
	if (a < b)
    {
    	a = b;
      	return true;
    }
  	return false;
}
typedef long long ll;
const ll minimum = -10000000000;

int main ()
{
	int n, m;
  	cin >> n >> m;
  	ll dp[100010];
  	ll broken[100010];
  	for(int i = 0; i < m; i++)
    {
    	int a;
      	cin >> a;
      	broken[a] = false;
    }
  	dp[0] = 1;
  	for(int i = 0; i < n; i++)
    {
    	for(int j = i + 1; j <=min(n, i+2); j++)
        {
        	if(broken[j])
            {
            	dp[j] += dp[i;]
            }
        } 
    }
  	cout << dp[n] << endl;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:30: error: expected ']' before ';' token
   35 |                 dp[j] += dp[i;]
      |                              ^
      |                              ]
a.cc:35:31: error: expected primary-expression before ']' token
   35 |                 dp[j] += dp[i;]
      |                               ^
Language: C++

#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <tuple>
#include <map>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repd(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++)
#define repdm(i, a, b) for (ll i = (ll)(a); i > (ll)(b); i--)

int main()
{
  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 + 1);
  const int mode = 1000000007;
  dp[n] = 1;
  for (int i = n - 1; i >= 0; i--)
  {
    if (broken[i])
    {
      // 壊れている段はルートに入らないので0でcontinue
      dp[i] = 0;
      continue;
    }
    if (i == n - 1)
      continue;
    dp[i] = (dp[i + 1] + dp[i + 2]) % mod;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:39: error: 'mod' was not declared in this scope; did you mean 'mode'?
   40 |     dp[i] = (dp[i + 1] + dp[i + 2]) % mod;
      |                                       ^~~
      |                                       mode
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <climits>

using namespace std;


int main() {
  int N, M;
  cin >> N >> M;
  long mod =  1e9+7;

  int a[M+1];
  for (int i = 0; i < M; i++) {
    cin >> a[i];
  }
  a[M] = N+1;
  
  //階段チェック
  for (int i = 1; i < M; i++) {
    if ( a[i]-a[i-1] == 1 ) {
      cout << 0 << endl;
      return 0;
    }
  }

  //事前計算
  long long cases[N+1];
  cases[0] = 1;
  cases[1] = 1;
  cases[2] = 2;
  for (int i = 3; i < N+1; i++) {
    cases[i] = cases[i-1] + cases[i-2];

  }
  
  //集計
  long long ans = 1;
  int startPoint = 0;
  for (int i = 0; i < M+1; i++) {
    int breakPoint = a[i] ;
    ans *= cases[breakPoint - startPoint -1];
    ans %= mod
    startPoint = breakPoint + 1;
  }
  
  cout << ans % mod << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:15: error: expected ';' before 'startPoint'
   45 |     ans %= mod
      |               ^
      |               ;
   46 |     startPoint = breakPoint + 1;
      |     ~~~~~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#define P 1000000007
int n, m, i, a[100010];

int min(int a, int b){ return a<b?a:b; }

int main(void)
{
	
	scanf("%d %d", &n, &m);
	for(i=0; i<m; i++){
		int f;
		scanf("%d", &f);
		a[f]=1;
	}
	
	dp[0]=1;
	dp[1]=(a[1]==0?1:0);
	for(i=2; i<n; i++){
		if(a[i]==0){
			dp[i]=(dp[i-2]+dp[i-1])%P;
		}
		else dp[i]=0;
	}
	printf("%d", dp[n-1]);
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:18:9: error: 'dp' undeclared (first use in this function)
   18 |         dp[0]=1;
      |         ^~
main.c:18:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
  int n,m;
  long long ans=1;
  cin>>n>>m;
  int b[m];
  rep(i,m){
    cin>>b[i];
    if(i>0&&b[i]==b[i-1]+1)
      ans=0;
  }
  if(ans==0)
    cout<<ans<<endl;
  
  
  else{
    long long a[n];

    a[0]=1;a[1]=1;
    rep(i,n-1){
      a[i+2]=a[i]+a[i+1];
      a[i+2]%=1000000007;
    }
  
    rep(i,m+1){
      if(i==0){
        if(m==0)
          ans*=a[n];
        else
          ans*=a[b[0]-1];
      }else if(i==m){
        ans*=a[n-1-b[m-1]];
      }else {
        ans*=a[b[i]-b[i-1]-2];
      }
      ans%=1000000007
      
    }
    cout<<ans%1000000007<<endl;
    
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:22: error: expected ';' before '}' token
   39 |       ans%=1000000007
      |                      ^
      |                      ;
   40 | 
   41 |     }
      |     ~
Language: C++

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

int main() {
  int n,m;
  long long ans=1;
  cin>>n>>m;
  int b[m];
  rep(i,m){
    cin>>b[i];
    if(i>0&&b[i]==b[i-1]+1)
      ans=0;
  }
  if(ans==0)
    cout<<ans<<endl;
  
  
  else{
    long long a[n];

    a[0]=1;a[1]=1;
    rep(i,n-1){
      a[i+2]=a[i]+a[i+1];
      a[i+2]=%=1000000007;
    }
  
    rep(i,m+1){
      if(i==0){
        if(m==0)
          ans*=a[n];
        else
          ans*=a[b[0]-1];
      }else if(i==m){
        ans*=a[n-1-b[m-1]];
      }else {
        ans*=a[b[i]-b[i-1]-2];
      }
      
    }
    cout<<ans%1000000007<<endl;
    
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: expected primary-expression before '%=' token
   25 |       a[i+2]=%=1000000007;
      |              ^~
Language: C++

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

int main() {
  int n,m;
  long long ans=1;
  cin>>n>>m;
  int b[m];
  rep(i,m){
    cin>>b[i];
    if(i>0&&b[i]==b[i-1]+1)
      ans=0;
  }
  if(ans==0)
    cout<<ans<<endl;
  
  
  else{
    long long a[n];

    a[0]=1;a[1]=1;
    rep(i,n-1){
      a[i+2]=a[i]+a[i+1];
    }
  
    rep(i,m+1){
      if(i==0){
        if(m==0)
          ans*=a[n];
        else
          ans*=a[b[0]-1];
      }else if(i==m){
        ans*=a[n-1-b[m-1]];
      }else {
        ans*=a[b[i]-b[i-1]-2];
      }
      ans%=1000000007
   
    }
    cout<<ans<<endl;
    
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:22: error: expected ';' before '}' token
   38 |       ans%=1000000007
      |                      ^
      |                      ;
   39 | 
   40 |     }
      |     ~