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

#include<bits/stdc++.h>

using namespace std;

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

    vector<long long int> a(M);
    for(long long int i = 0; i < M; i++) cin >> a[i];
    vector<long long int> dp(N + 1,0);
    dp[0] = 1;
    long long int j = 0;
    if(a[j] == 1){ dp[1] = 0; j++; }
    else{ dp[1] = 1;}
   
   for(long long int i = 2; i <= N; i++){
       if(i == a[j]){ dp[i] = 0; j++; }
       else{ dp[i] = dp[i - 1] + dp[i - 2] 
       dp[i] %= 1000000007; } 
   }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:19:43: error: expected ';' before 'dp'
   19 |        else{ dp[i] = dp[i - 1] + dp[i - 2]
      |                                           ^
      |                                           ;
   20 |        dp[i] %= 1000000007; }
      |        ~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

    vector<long long int> a(M);
    for(int i = 0; i < M; i++) cin >> a[i];
    vector<long long int> dp(N + 1);
    dp[0] = 1;
    int j = 0;
    if(0 == a[j]){ dp[1] = 1; j++; }
   for(int i = 1; i < N; i++){
       if(i == a[j]){ d[i + 1] = d[i]; j++; }
       else{ dp[i + 1] = dp[i] + dp[i - 1]; } 
   }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: 'd' was not declared in this scope
   16 |        if(i == a[j]){ d[i + 1] = d[i]; j++; }
      |                       ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define PI 3.14159265358979

using namespace std;

int main(void){
  int n, m;
  cin >> n >> m;
  vector<ll> dp(n + 1, 0);

  int a;
  for (int i = 0; i < m; i++){
    cin >> a;
    dp[a] = -1;
  }


  dp[0] = 1;
  if (dp[1] != -1)
    dp[1] = 1;

  for (int i = 2; i <= n; i++){
    if (dp[i] == -1)
      continue;
    if (dp[i - 1] == -1 && dp[i - 2] == -1)
      dp[i] = -1;
    else if (dp[i - 1] == -1)
      dp[i] = dp[i - 2];
    else if (dp[i - 2] == -1)
      dp[i] = dp[i - 1];
    else
      dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
  }



  cout << max(0, dp[n]) << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:14: error: no matching function for call to 'max(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type&)'
   40 |   cout << max(0, dp[n]) << endl;
      |           ~~~^~~~~~~~~~
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:40:14: note:   deduced conflicting types for parameter 'const _Tp' ('int' and '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'})
   40 |   cout << max(0, dp[n]) << endl;
      |           ~~~^~~~~~~~~~
/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:40:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   40 |   cout << max(0, dp[n]) << endl;
      |           ~~~^~~~~~~~~~
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, s = 0;
  cin >> n >> m;
  vector<bool> v(n, 1);
  vector<int> a(n, 0);
  rep(i, m){
    int b;
    cin >> b;
    v[b-1] = 0;
  }
  rep(i, n){
    if(i == 0 && v[0]) a[0] = 1;
    if(i == 1 && v[1]) a[1] = 1;
    if(i > 0 && v[i-1]) a[i] += a[i-1];
    if(i > 1 && v[i-2]) a[i] += a[i-2];
    a[i] %= 1000000007
  }
  cout << a[n-1] << endl;
  return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0;i < (int)(n);i++)
#define rep2(i, s, n) for (int i = s; i < (int)(n);i++)
#define ALL(vec)  (vec).begin(),(vec).end()
#define lli long long int
#define pi 3.1415926535897932384626433832795
#define MAX_INF 9223372036854775807
#define MIN_INF 9223372036854775807+1
#define sosuu 1000000007


double fib(lli n) {
	double f = (pow((1 + sqrt(5)) / 2, n+1) - pow((1 - sqrt(5)) / 2, n+1)) / sqrt(5);
	return llround(f); // 四捨五入
}

int main()
{
	lli N, M;
	cin >> N >> M;
	vector<int> broken(M);
	rep(i, M)
		cin >> broken[i];
	lli ans = 1;
	if (M >= 2) {
		rep(i, M - 1) {
			ans *= fib(broken[0] + 1);
			if (broken[i + 1] - broken[i] == 1) {
				cout << 0 << endl;
				return 0;
			}
			else
				ans *= fib(broken[i + 1] - broken[i]-1)%sosuu;
		}
		ans *= fib(N - broken[M - 1]-1)%sosuu;
	}
	else if (M == 1) {
		ans *= fib(broken[0]-1)%sosuu;
		ans *= fib(N - broken[M - 1]-1)%sosuu;
	}
	else
		ans *= fib(N)%sosuu;
	cout << ans%sosuu << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:72: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   34 |                                 ans *= fib(broken[i + 1] - broken[i]-1)%sosuu;
      |                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
      |                                           |
      |                                           double
a.cc:36:48: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   36 |                 ans *= fib(N - broken[M - 1]-1)%sosuu;
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~^
      |                           |
      |                           double
a.cc:39:40: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   39 |                 ans *= fib(broken[0]-1)%sosuu;
      |                        ~~~~~~~~~~~~~~~~^
      |                           |
      |                           double
a.cc:40:48: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   40 |                 ans *= fib(N - broken[M - 1]-1)%sosuu;
      |                        ~~~~~~~~~~~~~~~~~~~~~~~~^
      |                           |
      |                           double
a.cc:43:30: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   43 |                 ans *= fib(N)%sosuu;
      |                        ~~~~~~^
      |                           |
      |                           double
Language: C++

#include<bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define each(it,v) for(auto it : v)
#define mod 1000000007
#define vpii vector<pair<int,int>>

using namespace std;

int n,m,cnt;

main()
{
        cin>>n>>m;
        vpii p(n+10);
        p[0].second=1;
        each(&it,p)it.first=true;

        vi v(m);
        each(&it,v)
        {
                cin>>it;
                p[it].first=false;
        }

        rep(i,n)
        {
                if(!p[i].first)continue;

                p[i+1].second=(p[i+1].second+p[i].second%mod)%mod;
                p[i+2].second=(p[i+2].second+p[i].second%mod)%mod;
        }

        //debug
        //each(it,p)printf("%d %d %d\n",cnt++,it.first,it.second);

        cout<<p[n].second<<endl;
}


Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:9: error: 'vi' was not declared in this scope
   19 |         vi v(m);
      |         ^~
a.cc:20:18: error: 'v' was not declared in this scope
   20 |         each(&it,v)
      |                  ^
a.cc:4:34: note: in definition of macro 'each'
    4 | #define each(it,v) for(auto it : v)
      |                                  ^
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> a(M + 1);
  for (int i = 0; i < M; i++) {
    cin >> a.at(i);
  }
  a.at(M) = -1;
  vector<int> S(N + 1);
  S.at(0) = 1;
  if (a.at(0) == 1) {
    S.at(1) = 0;
    int x = 1;
    for (int i = 2; i <= N; i++) {
      if (i == a.at(x)) {
        S.at(i) = 0;
        x++;
      }
      else {
        S.at(i) = (S.at(i - 1) + S.at(i - 2)) % 1000000007;
      }
    }
  }
  else {
    S.at(1) = 1;
    int y = 0;
    for (int i = 2; i <= N; i++) {
      if (i == a.at(y)) {
        S.at(i) = 0;
        x++;
      }
      else {
        S.at(i) = (S.at(i - 1) + S.at(i - 2)) % 1000000007;
      }
    }
  }
  cout << S.at(N) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:33:9: error: 'x' was not declared in this scope
   33 |         x++;
      |         ^
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> a(M + 1);
  for (int i = 0; i < M; i++) {
    cin >> a.at(i);
  }
  a.at(M) = -1
  vector<int> S(N + 1);
  S.at(0) = 1;
  if (a.at(0) == 1) {
    S.at(1) = 0;
    int x = 1;
    for (int i = 2; i <= N; i++) {
      if (i == a.at(x)) {
        S.at(i) = 0;
        x++;
      }
      else {
        S.at(i) = (S.at(i - 1) + S.at(i - 2)) % 1000000007;
      }
    }
  }
  else {
    S.at(1) = 1;
    int y = 0;
    for (int i = 2; i <= N; i++) {
      if (i == a.at(y)) {
        S.at(i) = 0;
        x++;
      }
      else {
        S.at(i) = (S.at(i - 1) + S.at(i - 2)) % 1000000007;
      }
    }
  }
  cout << S.at(N) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected ';' before 'vector'
   11 |   a.at(M) = -1
      |               ^
      |               ;
   12 |   vector<int> S(N + 1);
      |   ~~~~~~       
a.cc:13:3: error: 'S' was not declared in this scope
   13 |   S.at(0) = 1;
      |   ^
a.cc:33:9: error: 'x' was not declared in this scope
   33 |         x++;
      |         ^
Language: C++

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

int main() {
  int N, M;
  cin >> N >> M;
  vector<int> a(M + 1);
  for (int i = 0, i < M, i++) {
    cin >> a.at(i);
  }
  a.at(M) = -1
  vector<int> S(N + 1);
  S.at(0) = 1;
  if (a.at(0) == 1) {
    S.at(1) = 0;
    int x = 1;
    for (int i = 2, i <= N; i++) {
      if (i == a.at(x)) {
        S.at(i) = 0;
        x++;
      }
      else {
        S.at(i) = (S.at(i - 1) + S.at(i - 2)) % 1000000007;
      }
    }
  }
  else {
    S.at(1) = 1;
    int y = 0;
    for (int i = 2; i <= N; i++) {
      if (i == a.at(y)) {
        S.at(i) = 0;
        x++;
      }
      else {
        S.at(i) = (S.at(i - 1) + S.at(i - 2)) % 1000000007;
      }
    }
  }
  cout << S.at(N) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '<' token
    8 |   for (int i = 0, i < M, i++) {
      |                    ^~
      |                    ;
a.cc:8:21: error: expected primary-expression before '<' token
    8 |   for (int i = 0, i < M, i++) {
      |                     ^
a.cc:8:29: error: expected ';' before ')' token
    8 |   for (int i = 0, i < M, i++) {
      |                             ^
      |                             ;
a.cc:11:15: error: expected ';' before 'vector'
   11 |   a.at(M) = -1
      |               ^
      |               ;
   12 |   vector<int> S(N + 1);
      |   ~~~~~~       
a.cc:13:3: error: 'S' was not declared in this scope
   13 |   S.at(0) = 1;
      |   ^
a.cc:17:22: error: expected ';' before '<=' token
   17 |     for (int i = 2, i <= N; i++) {
      |                      ^~~
      |                      ;
a.cc:17:23: error: expected primary-expression before '<=' token
   17 |     for (int i = 2, i <= N; i++) {
      |                       ^~
a.cc:33:9: error: 'x' was not declared in this scope
   33 |         x++;
      |         ^
Language: C++

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

int main() {
    int n, m;
    cin >> n >> m;
    vector<int> broken(n+1);
    rep(i,m) {
        int a;
        cin >> a;
        broken[a] = 1;
    }
    vector<int> dp(n+2);
    const int mode = 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:23:39: error: 'mod' was not declared in this scope; did you mean 'mode'?
   23 |         dp[i] = (dp[i+1] + dp[i+2]) % mod;
      |                                       ^~~
      |                                       mode
Language: C++

#include<stdio.h>
#define ll long long
const ll mod=1e9+7;
const int N=1e5+9;
ll vis[N],a[N];
int main()
{
    int t,n,x;
    scanf("%d%d",&t,&n);
    memset(a,0,sizeof(a));
    memset(vis,0,sizeof(vis));
    for(int i=1;i<=n;i++)
    {
        scanf("%d",&x);
        vis[x]=1;
    }
    a[0]=1;
    if(!vis[1]) a[1]=1;
    for(int i=2;i<=t;i++)
    {
        if(vis[i]) continue;
        a[i]=(a[i-1]+a[i-2])%mod;
//        printf("%lld  a[i],  %d  i\n",a[i],i);
    }
    printf("%lld\n",a[t]);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'memset' was not declared in this scope
   10 |     memset(a,0,sizeof(a));
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | #define ll long long
Language: C

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
static const int MOD = 1e9 + 7;

bool pairCompare(const pair<int, int>& firstElof, const pair<int, int>& secondElof) {
    return firstElof.first > secondElof.first;
}

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

    vector<ll> a(N);
    for(int i=0;i<N;i++) {
        a.at(i) = 1;
    }
    int m;
    for(int i=0;i<M;i++) {        
        cin >> m;
        a.at(m-1) = 0;
    }

    vector<ll> S(N);
    for(int i=0;i<N;i++) {
        if(i==0) S.at(i) = a.at(0);
        else if(i==1) S.at(i) = S.at(0)+a.at(1);
        else {
            S.at(i) = (S.at(i-1)%MOD + S.at(i-2)%MOD)%MOD;
            S.at(i) *= a.at(i);
        }
    }

    cout << S.at(N-1)%MOD;

    return (0);
}


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;
#define l long long
const l e=1e9+7;
int main()
{
  int n,m,d;
  cin>>n>>m;
  int a[n+1]={0};
  for(int i=0;i<m;i++)
  {
    cin>>d;
    a[d]=1;
  }
  l dp[n+1]={0};
  dp[0]=1;
  for(int i=0;i<n;i++)
  {
    for(int j=i+1;j<=min(n,i+2);j++)
    {
      if(a[j]==0)
      {
        dp[j]+=dp[i];
        dp[j]%=e;
      }
    }
  }
  cout<<dp[n]<<endl;


Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: expected '}' at end of input
   28 |   cout<<dp[n]<<endl;
      |                     ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
typedef long long ll;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define REP(i,num,n) for(ll i=num, i##_len=(n); i<i##_len; ++i)
#define repprev(i,a,b) for(ll i=b-1;i>=a;i--)
#define reprev(i,n) repprev(i,0,n)
using namespace std;
#define sz(x) ((int)(x).size())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define MEMSET(v, h) memset((v), h, sizeof(v))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
template<class T> int former(const vector<T> &v, T x){
   return upper_bound(v.begin(),v.end(),x) - v.begin() - 1;
}
template<class T> int latter(const vector<T> &v, T x){
    return lower_bound(v.begin(),v.end(),x) - v.begin();
}
#define pb push_back
#define mp make_pair
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define BIT_FLAG_0 (1<<0) // 0000 0000 0000 0001
#define BIT_FLAG_1 (1<<1) // 0000 0000 0000 0010
#define BIT_FLAG_2 (1<<2) // 0000 0000 0000 0100
#define BIT_FLAG_3 (1<<3) // 0000 0000 0000 1000
#define BIT_FLAG_4 (1<<4) // 0000 0000 0001 0000
#define BIT_FLAG_5 (1<<5) // 0000 0000 0010 0000
#define BIT_FLAG_6 (1<<6) // 0000 0000 0100 0000
#define BIT_FLAG_7 (1<<7) // 0000 0000 1000 0000
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
const ll LLINF = 1LL<<60;
const int INF = 1<<29;

const int MAX = 510000;
const int MOD = 1000000007;



const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};


ll binary_search(){
	while(abs(ok - ng) > 1){
		ll mid = (ok + ng) / 2;
		if(solve(mid))
		{
			ok = mid;
		}else{
			ng = mid;
		}
	}
}

ll dp[100100];

int main(void) {
	ios::sync_with_stdio(false);
	cin.tie(0);
	ll n, m;
	cin >> n >> m;
	vector<ll> a(m);
	rep(i,m) {
		cin >> a[i];
		dp[a[i]] = -1;
	}
	dp[0] = 1;
	rep(i,n) {
		if(dp[i] == -1) continue;
		if(dp[i + 1] != -1) {
			dp[i + 1] = max(dp[i + 1], dp[i] + 1);
			dp[i + 1] %= MOD;
		}
		if(dp[i + 2] != -1){
		 dp[i + 2] = max(dp[i + 2], dp[i] + 1);
		 dp[i + 2] %= MOD;
		}
	}
	cout << dp[n] << endl;
	
}


Compiler output:
a.cc: In function 'll binary_search()':
a.cc:50:19: error: 'ok' was not declared in this scope
   50 |         while(abs(ok - ng) > 1){
      |                   ^~
a.cc:50:24: error: 'ng' was not declared in this scope
   50 |         while(abs(ok - ng) > 1){
      |                        ^~
a.cc:52:20: error: 'solve' was not declared in this scope
   52 |                 if(solve(mid))
      |                    ^~~~~
a.cc:59:1: warning: no return statement in function returning non-void [-Wreturn-type]
   59 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i,n) for(ll i=0;i<(n);i++)
int main(){
  ll n,m;
  cin>>n>>m;
  vector<bool> issafe(n,true);
  rep(i,m){
    ll a;cin>>a;
    issafe[a]=false;
  }
  vector<ll> dp(n+1,0);
  dp[0]=1;
  if(issafe[1]) dp[1]=1;
  for(ll 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:19:12: error: 'MOD' was not declared in this scope
   19 |     dp[i]%=MOD;
      |            ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define rep(i,(n)) for(ll i=0;i<(n);i++)
int main(){
  ll n,m;
  cin>>n>>m;
  vector<bool> issafe(n,true);
  rep(i,m){
    ll a;cin>>a;
    issafe[a]=false;
  }
  vector<ll> dp(n+1,0);
  dp[0]=1;
  if(issafe[1]) dp[1]=1;
  for(ll 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:4:15: error: expected parameter name, found "("
    4 | #define rep(i,(n)) for(ll i=0;i<(n);i++)
      |               ^
a.cc: In function 'int main()':
a.cc:9:7: error: 'i' was not declared in this scope
    9 |   rep(i,m){
      |       ^
a.cc:9:3: error: 'rep' was not declared in this scope
    9 |   rep(i,m){
      |   ^~~
a.cc:19:12: error: 'MOD' was not declared in this scope
   19 |     dp[i]%=MOD;
      |            ^~~
Language: C++

/*Function Template*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define ALL(a)  (a).begin(),(a).end()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll fac[MAX], finv[MAX], inv[MAX];


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;
}
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }

}
ll Len(ll n) {
  ll s=0;
  while(n!=0) s++, n/=10;
  return s;
}


ll Sint(ll n) {
  ll m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(ll i=s-1;i>=0;i--) m+=n/((ll)pow(10,i))-(n/((ll)pow(10,i+1)))*10;
  return m;
}


ll Svec(vector<ll> v){
  ll n=0;
  for(ll i=0;i<v.size();i++) n+=v[i];
  return n;
}


ll GCD(ll a,ll b){
  ll r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return b;
}


ll LCM(ll a,ll b){
  ll c=a,d=b,r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return c/b*d;
}


ll Factorial(ll n){
  ll m=1;
  while(n>=1) m*=n,n--;
  return m;
}

vector<pair<char,ll>> runlength(string s,vector<pair<char,ll>> p){
  ll x=1;
  if(s.size()==1){
    p.push_back(pair<char,ll>(s[0],1));
    return p;
  }
  for(ll i=0;i<s.size()-1;i++){
    if(s[i]==s[i+1]){
      x++;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[i],x));
      }
    }else{
      p.push_back(pair<char,ll>(s[i],x));
      x=1;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[s.size()-1],x));
      }
    }
  }
  return p;
}


ll COM(ll n,ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

const int MAX_N=100010;
vector<bool> sieve_of_eratosthenes(){
  vector<bool> isPrime(MAX_N+1,true);
  for(int i=2;i<=MAX_N;i++){
    if(isPrime[i]){
      for(int j=2*i;j<=MAX_N;j+=i){
        isPrime[j]=false;
      }
    }
  }
  return isPrime;
}







/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
int main() {
  IOS;
  ll n,m;
  cin>>n>>m;
  vector<ll> v(m);
  rep(i,m) cin>>v[i];
  ll dp[100010];
  rep(i,n) dp[i]=mod;
  dp[0]=1;
  dp[1]=2;
  rep(i,m){
    dp[v[i]-1]=0;
  }
  
  for(ll i=2;i<n;i++){
    chmin(dp[i],dp[i-1]+dp[i-2]);
    dp[i]%=MOD;
  }
  cout<<dp[n-1]%MOD<<endl;
  
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:154:18: error: 'mod' was not declared in this scope; did you mean 'modf'?
  154 |   rep(i,n) dp[i]=mod;
      |                  ^~~
      |                  modf
Language: C++

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

int main(){
  int n,m;
  cin >> n >> m;
  vector<int> broken(n+1);
  for(int i=0;i<N;i++) {
    int a;
    cin >> a;
    broken[a]=1;
  }
  vector<int> dp(n+2);
  dp[n]=1;
  const int mod=1000000007;
  for(int i=n-1;i>=0;i--){
    if(braken[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:8:17: error: 'N' was not declared in this scope
    8 |   for(int i=0;i<N;i++) {
      |                 ^
a.cc:17:8: error: 'braken' was not declared in this scope; did you mean 'broken'?
   17 |     if(braken[i]){
      |        ^~~~~~
      |        broken
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
using in = int64_t;
const in INF=1<<30;


int main(){
   in n,m;
    cin>>n>>m;
  vector<in> a(m);

  rep(i,m) cin>>a.at(i);
  sort(all(a));
  in dp[100010];
  //rep(i,n+1) dp[i] =INF;
  dp[1]=1;
  dp[2]=2;
  if()
  if(n==1){cout<<1;return 0;}
  if(n==2){if(m==0){cout<<2;} else cout<<1;return 0;}
  if(!a.empty())if(a[0]==1){dp[1]=0;dp[2]=1;a.erase(a.begin());}
  if(!a.empty()){if(a[0]==2){dp[2]=0;a.erase(a.begin());}}
  
  
  for(in i=3;i<=n;i++){
    if(!a.empty()){if(i==a[0]){
      dp[i]=0;
      a.erase(a.begin());
      continue;
    }}
     dp[i]=dp[i-1]+dp[i-2];
    if(dp[i]>=waru) dp[i]-=waru;
  }
  cout<<dp[n];
}


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

#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
using in = int64_t;
const in INF=1<<30;

bool chmin(in &a,in b){
  if(a>b) {a=b;return 1;}
  return 0;
}

int main(){
   in n,m;
  vector<in> a(m);
  cin>>n>>m;
  rep(i,m) cin>>a.at(i);
  sort(all(a));
  in dp[100010];
  rep(i,n+1) dp[i] =INF;
  dp[1]=1;
  dp[2]=1;
  
  for(in i=3;i<=n;i++){
    if(i==a.at(0)){
      dp[i]=0;
      a.pop();
      continue;
    }
     dp[i]=dp[i-1]+dp[i-2];
  }
  cout<<(dp[n]%waru);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:9: error: 'class std::vector<long int>' has no member named 'pop'
   29 |       a.pop();
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const double PI=3.14159265358979323846;
const int64_t waru = 1000000007;
using in = int64_t;
const in INF=1<<30;

bool chmin(in &a,in b){
  if(a>b) {a=b;return 1;}
  return 0;
}

int main(){
   in n,m;
  in a[100010];
  cin>>n>>m;
  rep(i,m) cin>>a[i];
  sort(all(a));
  in dp[100010];
  rep(i,n+1) dp[i] =INF;
  dp[1]=1;
  dp[2]=1;
  
  for(int i=3;i<=n;i++){
    if(i==a[0]){
      dp[i]=0;
      a.pop();
      continue;
    }
     dp[i]=dp[i-1]+dp[i-2];
  }
  cout<<(dp[n]%waru);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:18: error: request for member 'begin' in 'a', which is of non-class type 'in [100010]' {aka 'long int [100010]'}
    3 | #define all(v) v.begin(), v.end()
      |                  ^~~~~
a.cc:20:8: note: in expansion of macro 'all'
   20 |   sort(all(a));
      |        ^~~
a.cc:3:29: error: request for member 'end' in 'a', which is of non-class type 'in [100010]' {aka 'long int [100010]'}
    3 | #define all(v) v.begin(), v.end()
      |                             ^~~
a.cc:20:8: note: in expansion of macro 'all'
   20 |   sort(all(a));
      |        ^~~
a.cc:29:9: error: request for member 'pop' in 'a', which is of non-class type 'in [100010]' {aka 'long int [100010]'}
   29 |       a.pop();
      |         ^~~
Language: C

#coding: utf-8
import math
import heapq
import bisect
#from scipy.misc import comb

MOD = 10**9+7

N,M = map(int, input().split())
A = []
for i in range(M):
    a = int(input())
    A.append(a)    

ans = [1,1]+[0]*(N-1)
for a in A:
    ans[a]=-1

for i in range(2,N+1):
    if ans[i]!=-1:
        if ans[i-2]!=-1:
            ans[i]=(ans[i]+ans[i-2])%MOD
        if ans[i-1]!=-1:
            ans[i]=(ans[i]+ans[i-1])%MOD

print(ans[N])


Compiler output:
main.c:1:2: error: invalid preprocessing directive #coding
    1 | #coding: utf-8
      |  ^~~~~~
main.c:2:1: error: unknown type name 'import'
    2 | import math
      | ^~~~~~
main.c:3:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'import'
    3 | import heapq
      | ^~~~~~
main.c:3:1: error: unknown type name 'import'
main.c:5:2: error: invalid preprocessing directive #from
    5 | #from scipy.misc import comb
      |  ^~~~
Language: C++

# include<bits/stdc++.h>
using namespace std;
int main(){
	int n,m, temp;
  	cin >> n >> m;
  	int broken[n+1] = {0}
	for (int i =0; i < m; i++){
    	cin >> temp;
      	broken[temp] = 1;
    }
  	long int dp[n+1] = {0};
  	dp[0] = 1;
  	(broken[1]==0)? dp[1] = 1 : dp[1] = 0;
  	for (int i = 2; i < n+1; i++){
    	if(!broken[i]) dp[i] = (dp[i-1]%1000000007 + dp[i-2]%1000000007)%1000000007;
    }
  
  cout << dp[n]<<'\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected ',' or ';' before 'for'
    7 |         for (int i =0; i < m; i++){
      |         ^~~
a.cc:7:24: error: 'i' was not declared in this scope
    7 |         for (int i =0; i < m; i++){
      |                        ^
Language: C++

#include <iostream>
#include<math.h>
using namespace std;
long long long int fact(long long long int n)
{
    long long int i,k;
    if(n==0 || n==1)
        return 1;
    else
    {k=n;
        for(i=2;i<k;i++)
        {
            n=i*n;
        }
    }
    return n;
}

long long long int possibility(long long long int b,long long long int a)
{
    long long long int c=b-a;
    long long long int p,k=0,i,j,s=0;
    p=c/2;
    if(c%2!=0)
    {
        k=1;
    }
    j=p;
    for(i=k;i<=c;i=i+2)
    {
        s+=(fact(j+i))/(fact(i)*fact(j));
        j-=1;
    }
    return s;
}

int main()
{
    long long long int m,n,i,p=1;
    cin>>n>>m;
    long long long int a[m+1];
    for(i=0;i<m;i++)
    {
        cin>>a[i];
    }
    a[m]=n+1;
    i=0;
    while(i!=m)
    {
        p=p*possibility(a[i+1]-1,a[i]+1);
        i++;
    }
    p=p*possibility(a[0]-1,0);
    cout<<(p%1000000007);
    return 0;
}


Compiler output:
a.cc:4:11: error: 'long long long' is too long for GCC
    4 | long long long int fact(long long long int n)
      |           ^~~~
a.cc:4:35: error: 'long long long' is too long for GCC
    4 | long long long int fact(long long long int n)
      |                                   ^~~~
a.cc:19:11: error: 'long long long' is too long for GCC
   19 | long long long int possibility(long long long int b,long long long int a)
      |           ^~~~
a.cc:19:42: error: 'long long long' is too long for GCC
   19 | long long long int possibility(long long long int b,long long long int a)
      |                                          ^~~~
a.cc:19:63: error: 'long long long' is too long for GCC
   19 | long long long int possibility(long long long int b,long long long int a)
      |                                                               ^~~~
a.cc: In function 'long long int possibility(long long int, long long int)':
a.cc:21:15: error: 'long long long' is too long for GCC
   21 |     long long long int c=b-a;
      |               ^~~~
a.cc:22:15: error: 'long long long' is too long for GCC
   22 |     long long long int p,k=0,i,j,s=0;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:39:15: error: 'long long long' is too long for GCC
   39 |     long long long int m,n,i,p=1;
      |               ^~~~
a.cc:41:15: error: 'long long long' is too long for GCC
   41 |     long long long int a[m+1];
      |               ^~~~
Language: C++

#include <iostream>
#include<math.h>
using namespace std;
long long int fact(long long int n)
{
    long int i,k;
    else
    {k=n;
        for(i=2;i<k;i++)
        {
            n=i*n;
        }
    }
    return n;
}

long long int possibility(long long int b,long long int a)
{
    long long int c=b-a;
    if(c<=0)
    	return 1;
    long long int p,k=0,i,j,s=0;
    p=c/2;
    if(c%2!=0)
    {
        k=1;
    }
    j=p;
    for(i=k;i<=c;i=i+2)
    {
        s+=(fact(j+i))/(fact(i)*fact(j));
        j-=1;
    }
    return s;
}

int main()
{
    long long int m,n,i,p=1;
    cin>>n>>m;
    long long int a[m+1];
    for(i=0;i<m;i++)
    {
        cin>>a[i];
    }
    a[m]=n+1;
    i=0;
    while(i!=m)
    {
        p=p*possibility(a[i+1]-1,a[i]+1);
        i++;
    }
    p=p*possibility(a[0]-1,0);
    cout<<(p%1000000007);
    return 0;
}


Compiler output:
a.cc: In function 'long long int fact(long long int)':
a.cc:7:5: error: 'else' without a previous 'if'
    7 |     else
      |     ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    4 |   cin >> n >> m;
      |          ^
      |          yn
a.cc:4:15: error: 'm' was not declared in this scope; did you mean 'tm'?
    4 |   cin >> n >> m;
      |               ^
      |               tm
a.cc:6:3: error: 'a' was not declared in this scope
    6 |   a[0] = 0;
      |   ^
a.cc:13:3: error: 's' was not declared in this scope
   13 |   s[0]=0;
      |   ^
Language: C++

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



int main(){
  int n, m;
  cin >> n >> m;
  vectror<int> a(m);
  for(int i = 0; i<m;i++){
    cin >> a.at(i);
  }
  vector<long int> dp(n+1, 1000000009);
  for(int i = 0; i <m;i++){
    dp.at(m.at(i)) = 0;
  }
  for(int i = 2;i< n+1;i++){
    long int tmp = (dp.at(i-2) + dp.at(i-1)) % 1000000007;
    if(tmp < dp.at(i)) dp.at(i) = tmp;
  }
  cout << dp.at(n);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'vectror' was not declared in this scope
    9 |   vectror<int> a(m);
      |   ^~~~~~~
a.cc:9:11: error: expected primary-expression before 'int'
    9 |   vectror<int> a(m);
      |           ^~~
a.cc:11:12: error: 'a' was not declared in this scope
   11 |     cin >> a.at(i);
      |            ^
a.cc:15:13: error: request for member 'at' in 'm', which is of non-class type 'int'
   15 |     dp.at(m.at(i)) = 0;
      |             ^~
Language: C++

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

//フィボナッチ数 mod p
vector<long long> fibmemo(100000, 0);
long long fib(long long n, long long p) {
  if (n == 0) return 0;
  if (n == 1) return 1;
  if (2 <= n && n <= 99999 && fibmemo.at(n) != 0)
    return fibmemo.at(n);
  if (2 <= n && n <= 99999)
    fibmemo.at(n) = (fib(n - 1, p) + fib(n - 2, p)) % p;
  return fibmemo.at(n);
}

int main() {
  long long n, m, p = 1000000007;
  cin >> n >> m;
  vector<long long> a(m), b(1, 0);
  for (long long i = 0; i < m; i++) {
    cin >> a.at(i);
    if (i > 0 && a.at(i) = a.at(i - 1) + 1) {
      cout << 0 << endl;
      return 0;
    }
    b.push_back(a.at(i) + 1);
  }
  b.push_back(n + 2);
  long long cnt = 1;
  for (long long i = 0; i < m + 1; i++)
    cnt *= fib(b.at(i + 1) - 1 - b.at(i), p);
    cnt %= p;
  cout << cnt << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: lvalue required as left operand of assignment
   22 |     if (i > 0 && a.at(i) = a.at(i - 1) + 1) {
      |         ~~~~~~^~~~~~~~~~
Language: C++

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

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

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

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

int main() {
  int n,m;
  cin>>n>>m;
  vector<int> a(m);
  
  vector<int> dp(n+100);
  for(int i=0;i<m;i++){
    cin>>a[i];
    dp[a[i]]=-100;
  }
  dp[0]=1;
  if(a[0]==1) dp[1]=0;
  else dp[1]=1;
  for(int i=1;i<n+3;i++){
    if(dp[i+1]<0) dp[i+1]=0;
    else dp[i+1]=dp[i]+dp[i-1];
    dp[i+1]%=1000000000+7;
  }
  

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

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

using ll=long long;
using int64=int64_t;
const int inf=100000000;

int in(){
  int a;
  cin >> a;
  return a;
}//int型関数の受け取り

void forin(int* x,int y){
  for (int i=0;i<y;i++){
    cin >> x[i];
  }
}//(x,y) int型配列x[y]の受け取り

int fact(int x){
  if (x == 1) return 1;
  return x*fact(x-1);
}//(x) x!

int div1(ll x){
  return x%1000000007;
}

ll broken(int x){
    if (x==-1) return 0;
    return x;
}

main(){
    int n=in(),m=in(),st[n+1];
    queue<int> a;
    for (int i=0;i<n+1;i++) st[i]=0;
    for (int i=0;i<m;i++) st[in()]=-1;
    st[0]=1;
    if (st[1]==0) st[1]=1;
    for (int i=2;i<n;1;i++){
        if (st[i]==-1) continue;
        st[i]=div1(broken(st[i-2])+broken(st[i-1]));
    }
    cout << st[n]<< endl;
}


Compiler output:
a.cc:34:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   34 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:41:23: error: expected ')' before ';' token
   41 |     for (int i=2;i<n;1;i++){
      |         ~             ^
      |                       )
a.cc:41:24: error: 'i' was not declared in this scope
   41 |     for (int i=2;i<n;1;i++){
      |                        ^
Language: C++

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

using ll=long long;
using int64=int64_t;
const int inf=100000000;

int in(){
  int a;
  cin >> a;
  return a;
}//int型関数の受け取り

void forin(int* x,int y){
  for (int i=0;i<y;i++){
    cin >> x[i];
  }
}//(x,y) int型配列x[y]の受け取り

int fact(int x){
  if (x == 1) return 1;
  return x*fact(x-1);
}//(x) x!

int div1(ll x){
  return x%1000000007;
}

ll broken(int x){
    if (x==-1) return 0;
    return x;
}

main(){
    int n=in(),m=in(),st[n+1];
    queue<int> a;
    for (int i=0;i<n+1;i++) st[i]=0;
    for (int i=0;i<m;i++) st[in()]=-1;
    st[0]=1;
    if (st[1]==0) st[1]=1;
    for (int i=2;i<n;1;i++){
        if (st[i]==-1) continue;
        st[i]=div1(broken(st[i-2])+broken(st[i-1]))
    }
    cout << st[n]<< endl;
}


Compiler output:
a.cc:34:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   34 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:41:23: error: expected ')' before ';' token
   41 |     for (int i=2;i<n;1;i++){
      |         ~             ^
      |                       )
a.cc:41:24: error: 'i' was not declared in this scope
   41 |     for (int i=2;i<n;1;i++){
      |                        ^
Language: C++

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

int main(){
	
	long int n,m; cin >> n >> m;
	vector<int> a(m);

	int b = 1;

	for(long int i=0; i<m; i++){
		cin >> a[i];
		if(a[i]-1==a[i-1]){
			b = 0;
		}
	}

	long int ans = (b * pow(2,n-m-1))%1000000007;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:42: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   19 |         long int ans = (b * pow(2,n-m-1))%1000000007;
      |                        ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
      |                           |               |
      |                           |               int
      |                           __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
using ll = long long;
int main(){ 
    ll n,m;
    cin>>n>>m;
    vector<ll> a(m);
    rep(i,m) cin>>a[i];
    ll b[100010];
    b[0]=1;
    b[1]=1;
    for(int i=2;i<100010;i++){
        b[i]=b[i-1]+b[i-2];
    }
    rep(i,m-1){
        if(a[i+1]-a[i]==1){
            cout<<0;
            return 0;
        }
    }
    ll c=b[a[0]-1];
    c=c%1000000007;
    c=c*b[n-a[m-1]-1]
    c=c%1000000007;
    for(int i=1;i<m;i++){
       c=c*(b[a[i]-a[i-1]-2]);
       c%=1000000007;
    }
    cout<<c;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: expected ';' before 'c'
   28 |     c=c*b[n-a[m-1]-1]
      |                      ^
      |                      ;
   29 |     c=c%1000000007;
      |     ~
Language: C++

#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;

typedef long long ll;
const long long mod=1e9+7;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'cin' was not declared in this scope
   11 |         cin>>n>>m;
      |         ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<algorithm>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:32:9: error: 'cout' was not declared in this scope
   32 |         cout<<dp[n]<<endl;
      |         ^~~~
a.cc:32:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:22: error: 'endl' was not declared in this scope
   32 |         cout<<dp[n]<<endl;
      |                      ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<algorithm>
  +++ |+#include <ostream>
    4 | using namespace std;
Language: C++

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

int main()
{
    int n,m;
    cin>>n>>m;
    vector<int>broken(n+1);
    rep(i,m){
        int a;
        cin>>a;
        broken[a]=1;
    }
    vector<int> dp(n+2);
    const int mod=10000000007
    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:17:19: warning: overflow in conversion from 'long int' to 'int' changes value from '10000000007' to '1410065415' [-Woverflow]
   17 |     const int mod=10000000007
      |                   ^~~~~~~~~~~
a.cc:18:5: error: expected ',' or ';' before 'dp'
   18 |     dp[n]=1;
      |     ^~
Language: C++

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

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;
}

const long long INF = 1LL << 60;
const long long div = 1000000007;

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

    vector<int> a(M+1, -2);
    rep(i, M) cin >> a.at(i);

    vector<ll> dp(N+5, -1);
    dp.at(0) = 1;
    dp.at(1) = 1;

    ll tmp = a.at(0);
    ll cnt = 0;

    rep(i, M){
        if(a.at(i+1) == a.at(i) + 1){
            cout << 0 << endl;
            return 0;
        }
    }

    rep(i, N){
        if(i == tmp){
            ++cnt;
            tmp = a.at(cnt);
            chmax(dp.at(i+2), dp.at(i+1));
        }
        else if(i+1 == tmp){
            chmax(dp.at(i+2), dp.at(i));
        }
        else{
            chmax(dp.at(i+2), dp.at(i)%div+dp.at(i+1)%div);
        }
    }

    cout << dp.at(N)%div << endl;

}


Compiler output:
a.cc:22:17: error: 'const long long int div' redeclared as different kind of entity
   22 | const long long div = 1000000007;
      |                 ^~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:992:14: note: previous declaration 'div_t div(int, int)'
  992 | extern div_t div (int __numer, int __denom)
      |              ^~~
a.cc: In function 'int main()':
a.cc:55:39: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator%'
   55 |             chmax(dp.at(i+2), dp.at(i)%div+dp.at(i+1)%div);
      |                               ~~~~~~~~^~~~
a.cc:55:54: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator%'
   55 |             chmax(dp.at(i+2), dp.at(i)%div+dp.at(i+1)%div);
      |                                            ~~~~~~~~~~^~~~
a.cc:59:21: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} and '<unresolved overloaded function type>' to binary 'operator%'
   59 |     cout << dp.at(N)%div << endl;
      |             ~~~~~~~~^~~~
Language: C++

#include <iostream>
using namespace std;
unsigned long long fact(int n);
long comb(long n, long r);

unsigned long long fact(long n){
        long i;
        unsigned long long f;
        f = 1;
        if (n!=0){
                for (i=1; i<=n; i++){
                        f = f * (unsigned long long) i;
                }
        }
        return f;
}

long comb(long n, long r){
        unsigned long long a;
        a=1;
        if (r>n/2){
                r = n-r;
        }
        for (i=0;i<r);i++){
                a = a * (unsigned long long)(n-i)
        }
        return long(a  /  fact(r) );
}

int main(){
        long N, M, i, j;
        long b, c, d;
        cin >> N >> M;
        long a[M+2];
        
        a[0]=-1;
        if (M!=0){
                for (i=1; i<=M; i++){
                        cin >> a[i];
                }
        }
        a[M+1] = N+1;
        d = 1;
        for (i=0; i<=M; i++){
                b = a[i+1]-a[i]-2;
                c = 0;
                if (b==-1){
                        c=0;
                }else{
                        for (j=0; j<=b/2; j++){
                                c = c + comb( (b-j), j );
                        }
                }
                d = d * c;
                d = d%1000000007;
        }
        cout << d;
}


Compiler output:
a.cc: In function 'long int comb(long int, long int)':
a.cc:24:14: error: 'i' was not declared in this scope
   24 |         for (i=0;i<r);i++){
      |              ^
a.cc:24:21: error: expected ';' before ')' token
   24 |         for (i=0;i<r);i++){
      |                     ^
      |                     ;
a.cc:24:23: error: 'i' was not declared in this scope
   24 |         for (i=0;i<r);i++){
      |                       ^
Language: C++

#include <iostream>

using namespace std;

int main() {

	int n, m, l;
	bool state[100010];
	int pattern[100010];

	cin >> n >> m;

	for (int i = 0; i < n+5; i++) {
		state[i] = true;
	}

	pattern[0] = 1;

	for (int i = 1; i < n+5; i++) {
		pattern[i] = 0;
	}

	for (int i = 0; i < m; i++) {
		cin >> l;
		state[l] = false;
	}

	for (int i = 0; i < n +5; i++) {
		if (state[i + 1]) {
			pattern[i + 1] += pattern[i];
			pattern[i + 1] %= (1e9 + 7);
		}
		if (state[i + 2]) {
			pattern[i + 2] += pattern[i];
			pattern[i + 2] %= (1e9 +7);
		}
	}

	cout << pattern[n] << endl;

	return 0;
}

//1,1,2,0,2,2,4
//1,1,2,3,5,8,13,21,34,55,89
//1,0,1,1,2


Compiler output:
a.cc: In function 'int main()':
a.cc:31:40: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   31 |                         pattern[i + 1] %= (1e9 + 7);
      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~
a.cc:31:40: note:   in evaluation of 'operator%=(int, double)'
a.cc:35:40: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   35 |                         pattern[i + 2] %= (1e9 +7);
      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~
a.cc:35:40: note:   in evaluation of 'operator%=(int, double)'