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

#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
using namespace std;
#define rep(i,x) for(int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
const ll MOD = 1e9+7;
const int n_max = 1e5+10;

int main(){
    ll h,w; cin >> h >> w;
    ll k; cin >> k;
    vector<vector<ll>> dp(h+3,vector<ll>(w+3,0));
    ll fib[10];
    fib[0] = 1;fib[1] = 2;
    for(int i = 2;i < 10;i++)fib[i] = fib[i-1] + fib[i-2];

    auto count = [&](int x){
        if(x < 0)return fib[0];
        else return fib[x];
    }
    dp[1][1] = 1;
    rep(i,h+1){
        if(i <= 1)continue;
        rep(j,w+1){
            if(j == 0)continue;
            // if(i == 1)
            dp[i][j] += (dp[i-1][j-1] * count(j-3) * count(w-j-1))%MOD;
            dp[i][j] += (dp[i-1][j] * count(j-2) * count(w-j-1))%MOD;
            dp[i][j] += (dp[i-1][j+1] * count(j-2) * count(w-j-2)) % MOD;
            dp[i][j] %= MOD;
        }
    }

    cout << dp[h][k] << endl;
    return 0;
}

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

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



int fibary[10];
int dp[110][10];
int mod=1e9+7;

int fib(int a){
	if(a<=0)return 1;
	if (fibary[a]>0)return fibary[a];
	else return fibary[a]=fib(a-1)+fib(a-2);
}

signed main(){
	int w,h,k;cin>>w>>h>>k;	
	fill(fibary,fibary+10,-1);
	fibary[1]=fibary[2]=1;
	
	fill(dp[0],dp[110],0);
	dp[0][0]=1
		
	rep(i,w)rep(j,h+1){
	(dp[i][j+1]+=dp[i][j]*fib(w-i-1)*fib(i-1))%=mod;
	if(i>0)(dp[i][j+1]+=dp[i-1][j]*fib(w-i)*fib(i-2))%=mod;
	if(i<w-1)(dp[i][j+1]+=dp[i+1][j]*fib(w-i-2)*fib(i))%=mod;
	}

	cout<<dp[k-1][h]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: expected ';' before 'for'
   26 |         dp[0][0]=1
      |                   ^
      |                   ;
a.cc:28:13: error: 'i' was not declared in this scope
   28 |         rep(i,w)rep(j,h+1){
      |             ^
a.cc:4:30: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                              ^
a.cc:28:21: error: 'j' was not declared in this scope
   28 |         rep(i,w)rep(j,h+1){
      |                     ^
a.cc:4:30: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                              ^
Language: C++

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



int fibary[10];
int dp[110][10];
int mod=1e9+7;

int fib(int a){
	if(a<=0)return 1;
	if (fibary[a]>0)return fibary[a];
	else return fibary[a]=fib(a-1)+fib(a-2);
}

signed main(){
	int w,h,k;cin>>w>>h>>k;	
	fill(fibary,fibary+10,-1);
	fibary[1]=fibary[2]=1;
	
	fill(dp[0],dp[110],0);
	dp[0][0]=1
		
	rep(i,w)rep(j,h+1){
	(dp[i][j+1]+=dp[i][j]*fib(w-i-1)*fib(i-1))%=mod;
	if(i>0)(dp[i][j+1]+=dp[i-1][j]*fib(w-i)*fib(i-2))%=mod;
	if(i<w-1)(dp[i][j+1]+=dp[i+1][j]*fib(w-i-2)*fib(i))%=mod;
	}

	cout<<dp[k-1][h]<<endl;
}


Compiler output:
a.cc:5:15: error: expected ',' or ')', found "."
    5 | #define repf(i.j,n) for(int i=(j);i<(n);i++)
      |               ^
a.cc:6:15: error: expected ',' or ')', found "."
    6 | #define repe(i.j,n) for(int i=(j);i<=(n);i++)
      |               ^
a.cc: In function 'int main()':
a.cc:26:19: error: expected ';' before 'for'
   26 |         dp[0][0]=1
      |                   ^
      |                   ;
a.cc:28:13: error: 'i' was not declared in this scope
   28 |         rep(i,w)rep(j,h+1){
      |             ^
a.cc:4:30: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                              ^
a.cc:28:21: error: 'j' was not declared in this scope
   28 |         rep(i,w)rep(j,h+1){
      |                     ^
a.cc:4:30: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                              ^
Language: C++

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#include "prettyprint.hpp"

long mod = 1000000007;

int amida[9];
int getAmida(int i) {
  if (i < 0) return 1;
  return amida[i];
}

int main() {
  amida[0] = 1;
  amida[1] = 2;
  for (int i = 2; i <= 8; i++) {
    amida[i] = amida[i - 2] + amida[i - 1];
  }

  int H, W, K;
  cin >> H >> W >> K;

  long dp[H + 1][W];
  for (int i = 0; i < H + 1; i++) {
    for (int j = 0; j < W; j++) {
      dp[i][j] = 0;
    }
  }
  dp[0][0] = 1;

  for (int i = 1; i < H + 1; i++) {
    for (int j = 0; j < W; j++) {
      dp[i][j] += dp[i - 1][j] * getAmida(j - 1) * getAmida(W - j - 2);
      // cout << "i j " << i << " " << j << endl;
      // cout << "dp[i - 1][j] " << dp[i - 1][j] << endl;
      // cout << "getAmida(j - 1) " << getAmida(j - 1) << endl;
      // cout << "getAmida(W - j - 2) " << getAmida(W - j - 2) << endl;
      // cout << "1 " << dp[i][j] << endl;

      if (j - 1 >= 0)
        dp[i][j] += dp[i - 1][j - 1] * getAmida(j - 2) * getAmida(W - j - 2);
      // cout << "dp[i - 1][j-1] " << dp[i - 1][j - 1] << endl;
      // cout << "getAmida(j - 2) " << getAmida(j - 2) << endl;
      // cout << "getAmida(W - j - 1) " << getAmida(W - j - 1) << endl;
      // cout << "2 " << dp[i][j] << endl;

      if (j + 1 < W)
        dp[i][j] += dp[i - 1][j + 1] * getAmida(j - 1) * getAmida(W - j - 3);
      // cout << "3 " << dp[i][j] << endl;

      dp[i][j] = dp[i][j] % mod;
      // cout << "mod " << dp[i][j] << endl;
    }
  }

  cout << (dp[H][K - 1] % mod) << endl;

  return 0;
}

Compiler output:
a.cc:11:10: fatal error: prettyprint.hpp: No such file or directory
   11 | #include "prettyprint.hpp"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: Java


import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {

	public static Set<boolean[]> amida = new HashSet<>();
	public static boolean[] amicre;
	public static int H, W, K;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		H = sc.nextInt();
		W = sc.nextInt();
		K = sc.nextInt();
		create();
		amida.removeIf(o -> filter(o));
		long count = 0;
		for(boolean[] ami : amida) {
			if(K == play(ami)) {
				count++;
			}
		}
		System.out.println(count % 1000000007);
	}

	public static int play(boolean[] ami) {
		int tmp = 1;
		while(tmp <= H * W) {
			if(ami[tmp - 1]) {
				tmp--;
			} else if(ami[tmp]) {
				tmp++;
			}
			tmp += W;
		}
		int ret = 0;
		if(tmp % W == 0) {
			ret = W;
		} else {
			ret = tmp % W;
		}
		return ret;
	}

	public static boolean filter(boolean[] ami) {
		boolean ans = false;
		for(int i = 0; i < H * W; i += W) {
			if(ami[i]) {
				ans = true;
				break;
			}
		}
		if(!ans) {
			for(int i = 1; i < H * W; i++) {
				if(ami[i] && (ami[i - 1] || ami[i + 1])) {
					ans = true;
					break;
				}
			}
		}
		return ans;
	}

	public static void create(int i) {
		if(i <= H * W) {
			amicre[i] = true;
			create(i + 1);
			amicre[i] = false;
			create(i + 1);
		} else {
			amida.add(amicre);
		}
	}

}


Compiler output:
Main.java:17: error: method create in class Main cannot be applied to given types;
		create();
		^
  required: int
  found:    no arguments
  reason: actual and formal argument lists differ in length
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1000000007;
int main(){
  ll h,w,k;cin>>h>>w>>k;
  ll dp[h+1][w];
  memset(dp,0,sizeof dp);
  dp[0][0]=1;
  ll hon[w][2];
  memset(hon,0,sizeof hon);
  hon[0][0]=1;
  ll h[w+1];
  h[0]=1;
  for(int i=0;i<w-1;i++){
    (hon[i+1][0]+=hon[i][0]+hon[i][1])%=mod;
    (hon[i+1][1]+=hon[i][0])%=mod;
    h[i+1]=hon[i][0]+hon[i][1];
    h[i+1]%=mod;
  }
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
        ll sum=dp[i][j]*h[w-1-j];
        sum%=mod;
        sum*=h[j];
        sum%=mod;
        dp[i+1][j]+=sum;
        dp[i+1][j]%=mod;
        if(j>0){
          sum=dp[i][j]*h[w-1-j];
          sum%=mod;
          sum*=h[j-1];
          sum%=mod;
          dp[i+1][j-1]+=sum;
          dp[i+1][j-1]%=mod;
        }
      if(j<w-1){
        sum=dp[i][j]*h[j];
        sum%=mod;
        sum*=h[w-2-j];
        sum%=mod;
        dp[i+1][j+1]+=sum;
        dp[i+1][j+1]%=mod;
      }
    }
  }
  cout<<dp[h][k-1]<<endl;
}
      
  

Compiler output:
a.cc: In function 'int main()':
a.cc:13:6: error: conflicting declaration 'll h [(w + 1)]'
   13 |   ll h[w+1];
      |      ^
a.cc:6:6: note: previous declaration as 'll h'
    6 |   ll h,w,k;cin>>h>>w>>k;
      |      ^
a.cc:14:4: error: invalid types 'll {aka long long int}[int]' for array subscript
   14 |   h[0]=1;
      |    ^
a.cc:18:6: error: invalid types 'll {aka long long int}[int]' for array subscript
   18 |     h[i+1]=hon[i][0]+hon[i][1];
      |      ^
a.cc:19:6: error: invalid types 'll {aka long long int}[int]' for array subscript
   19 |     h[i+1]%=mod;
      |      ^
a.cc:23:26: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   23 |         ll sum=dp[i][j]*h[w-1-j];
      |                          ^
a.cc:25:15: error: invalid types 'll {aka long long int}[int]' for array subscript
   25 |         sum*=h[j];
      |               ^
a.cc:30:25: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   30 |           sum=dp[i][j]*h[w-1-j];
      |                         ^
a.cc:32:17: error: invalid types 'll {aka long long int}[int]' for array subscript
   32 |           sum*=h[j-1];
      |                 ^
a.cc:38:23: error: invalid types 'll {aka long long int}[int]' for array subscript
   38 |         sum=dp[i][j]*h[j];
      |                       ^
a.cc:40:15: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   40 |         sum*=h[w-2-j];
      |               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod=1000000007;
int main(){
  ll h,w,k;cin>>n>>m>>k;
  ll dp[h+1][w];
  memset(dp,0,sizeof dp);
  dp[0][0]=1;
  ll hon[w][2];
  memset(hon,0,sizeof hon);
  hon[0][0]=1;
  ll h[w+1];
  h[0]=1;
  for(int i=0;i<w-1;i++){
    (hon[i+1][0]+=hon[i][0]+hon[i][1])%=mod;
    (hon[i+1][1]+=hon[i][0])%=mod;
    h[i+1]=hon[i][0]+hon[i][1];
    h[i+1]%=mod;
  }
  for(int i=0;i<h;i++){
    for(int j=0;j<w;j++){
        ll sum=dp[i][j]*h[w-1-j];
        sum%=mod;
        sum*=h[j];
        sum%=mod;
        dp[i+1][j]+=sum;
        dp[i+1][j]%=mod;
        if(j>0){
          sum=dp[i][j]*h[w-1-j];
          sum%=mod;
          sum*=h[j-1];
          sum%=mod;
          dp[i+1][j-1]+=sum;
          dp[i+1][j-1]%=mod;
        }
      if(j<w-1){
        sum=dp[i][j]*h[j];
        sum%=mod;
        sum*=h[w-2-j];
        sum%=mod;
        dp[i+1][j+1]+=sum;
        dp[i+1][j+1]%=mod;
      }
    }
  }
  cout<<dp[h][k-1]<<endl;
}
      
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'n' was not declared in this scope
    6 |   ll h,w,k;cin>>n>>m>>k;
      |                 ^
a.cc:6:20: error: 'm' was not declared in this scope
    6 |   ll h,w,k;cin>>n>>m>>k;
      |                    ^
a.cc:13:6: error: conflicting declaration 'll h [(w + 1)]'
   13 |   ll h[w+1];
      |      ^
a.cc:6:6: note: previous declaration as 'll h'
    6 |   ll h,w,k;cin>>n>>m>>k;
      |      ^
a.cc:14:4: error: invalid types 'll {aka long long int}[int]' for array subscript
   14 |   h[0]=1;
      |    ^
a.cc:18:6: error: invalid types 'll {aka long long int}[int]' for array subscript
   18 |     h[i+1]=hon[i][0]+hon[i][1];
      |      ^
a.cc:19:6: error: invalid types 'll {aka long long int}[int]' for array subscript
   19 |     h[i+1]%=mod;
      |      ^
a.cc:23:26: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   23 |         ll sum=dp[i][j]*h[w-1-j];
      |                          ^
a.cc:25:15: error: invalid types 'll {aka long long int}[int]' for array subscript
   25 |         sum*=h[j];
      |               ^
a.cc:30:25: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   30 |           sum=dp[i][j]*h[w-1-j];
      |                         ^
a.cc:32:17: error: invalid types 'll {aka long long int}[int]' for array subscript
   32 |           sum*=h[j-1];
      |                 ^
a.cc:38:23: error: invalid types 'll {aka long long int}[int]' for array subscript
   38 |         sum=dp[i][j]*h[j];
      |                       ^
a.cc:40:15: error: invalid types 'll {aka long long int}[ll {aka long long int}]' for array subscript
   40 |         sum*=h[w-2-j];
      |               ^
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <utility>
#include <algorithm>
#include <bitset>
#include <numeric>
#include <cmath>
#include <tuple>
#include <queue>
#include <set>

using namespace std;

typedef long long ll;
const ll INF = 1LL<<60;

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

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

ll dp[110][10];
ll memo_comb[8];

const ll MOD = 1e9+7;

int H, W, K;

calc_dp(int h, int k){

    if(h == 0 && k == 1){
        return dp[h][k] = 1;
    }else if(h == 0){
        return dp[h][k] = 0;
    }

    if(dp[h][k] >= 0) return dp[h][k];

    ll tmp_ans = 0;
    tmp_ans = (tmp_ans + calc_dp(h-1, k) * memo_comb[max(0, k-3)] * memo_comb[max(0, W-k-1)])%MOD;
    tmp_ans = (tmp_ans + calc_dp(h-1, k-1) * memo_comb[max(0, W-k-1)] * memo_comb[max(0, k-4)])%MOD;
    tmp_ans = (tmp_ans + calc_dp(h-1, k+1) * memo_comb[max(0, W-k-2)] * memo_comb[max(0, k-3)])%MOD;
    return dp[h][k] = tmp_ans;
}

int main(){
    cin.tie(0);
   	ios::sync_with_stdio(false);
    
    for(int i = 0; i < 110; i++){
        for(int j = 0; j < 10; j++){
            dp[i][j] = -1;
        }
    }

    cin >> H >> W >> K;

    for(int i = 0; i < 110; i++){
            dp[i][0] = 0;
            dp[i][W+1] = 0;
    }
    
    ll memo_comb_sub[8][2];
    memo_comb_sub[0][0] = 1;
    memo_comb_sub[0][1] = 0;
    memo_comb_sub[1][0] = 1;
    memo_comb_sub[1][1] = 1;

    for(int i = 1; i < 7; i++){
        memo_comb_sub[i+1][0] = memo_comb_sub[i][0] + memo_comb_sub[i][1];
        memo_comb_sub[i+1][1] = memo_comb_sub[i][0];
    }

    for(int i = 0; i < 8; i++){
        memo_comb[i] = memo_comb_sub[i][0] + memo_comb_sub[i][1];
    }

    cout << calc_dp(H, K) << endl;

    return 0;
}


Compiler output:
a.cc:34:1: error: ISO C++ forbids declaration of 'calc_dp' with no type [-fpermissive]
   34 | calc_dp(int h, int k){
      | ^~~~~~~
Language: C++

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

int h,w,k;
vector<int> r;

int nextPos(int cur,int row){
int l,r;
  l=cur>0?(row>>cur-1)%2:0;
  r=(row>>(cur))%2;
  if(cur<w-1 && l)return cur+1;
  else if(cur>0 && r)return cur-1;
  else return cur; 
}

signed main(){

cin >>h >>w >>k;

for(int i=0;i<(1<<(w-1))-1;i++){
for(int j=0;j<w-1;j++){
  int x,y;
  x=(i>>j)%2;
  y=(i>>(j+1))%2;
  if(x==1 && y==1)continue;
}
  r.push_back(i);
}
 int ans=0;
  
int dp[h][w];
//fill(dp,dp+w+1,0);
dp[0][0]=1;  
  
for(int i=0;i<h;i++){
  for(int j=0;j<w;j++){
    for(auto&& x:r){
      int y;
      y=nextPos[j][x];
      dp[i+1][y]+=dp[i][j];
    }
  }  
}
cout <<dp[h-1][k-1]<<endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:40:18: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   40 |       y=nextPos[j][x];
      |                  ^
a.cc:40:21: warning: pointer to a function used in arithmetic [-Wpointer-arith]
   40 |       y=nextPos[j][x];
      |                     ^
a.cc:40:21: error: invalid conversion from 'long long int (*)(long long int, long long int)' to 'long long int' [-fpermissive]
   40 |       y=nextPos[j][x];
      |         ~~~~~~~~~~~~^
      |                     |
      |                     long long int (*)(long long int, long long int)
Language: C++

#include <bits/stdc++.h>
using namespace std;
define int long long
int h,w,k;
vector<int> r;

int nextPos(int cur,int row){
int l,r;
  l=(row>>cur)%2;
  r=(row>>(cur+1))%2;
  if(cur<=w && l)return cur+1;
  else if(cur>0 && r)return cur-1;
  else return cur; 
}

signed main(){

cin >>h >>w >>k;

for(int i=0;i<pow(2,w-1);i++){
for(int j=0;j<w-1;j++){
  int x,y;
  x=(i>>j)%2;
  y=(i>>(j+1))%2;
  if(x==1 && y==1)continue;
}
  r.push_back(i);
}
 int ans=0;
  
dp[h][w+1];
  
  
}


Compiler output:
a.cc:3:1: error: 'define' does not name a type
    3 | define int long long
      | ^~~~~~
a.cc: In function 'int nextPos(int, int)':
a.cc:11:11: error: 'w' was not declared in this scope
   11 |   if(cur<=w && l)return cur+1;
      |           ^
a.cc: In function 'int main()':
a.cc:18:7: error: 'h' was not declared in this scope
   18 | cin >>h >>w >>k;
      |       ^
a.cc:18:11: error: 'w' was not declared in this scope
   18 | cin >>h >>w >>k;
      |           ^
a.cc:18:15: error: 'k' was not declared in this scope
   18 | cin >>h >>w >>k;
      |               ^
a.cc:31:1: error: 'dp' was not declared in this scope; did you mean 'dup'?
   31 | dp[h][w+1];
      | ^~
      | dup
a.cc: In function 'int nextPos(int, int)':
a.cc:10:4: warning: control reaches end of non-void function [-Wreturn-type]
   10 |   r=(row>>(cur+1))%2;
      |   ~^~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
define int long long
int h,w,k;
vector<int> r;

int nextPos(int cur,int row){
int l,r;
  l=(row>>cur)%2;
  r=(row>>(cur+1))%2;
  if(cur<=w && l)return cur+1;
  else if(cur>0 && r)return cur-1;
  else return cur; 
}

signed main(){

cin >>h >>w >>k;

for(int i=0;i<pow(2,w-1);i++){
for(int j=0;j<w-1;j++){
  int x,y;
  x=(i>>j)%2;
  y=(i>>(j+1))%2;
  if(x==1 && y==1)continue;
}
  r.push_back(i);
}
 int ans=0;
  
dp[r.size()][w+1];
  
  
}


Compiler output:
a.cc:3:1: error: 'define' does not name a type
    3 | define int long long
      | ^~~~~~
a.cc: In function 'int nextPos(int, int)':
a.cc:11:11: error: 'w' was not declared in this scope
   11 |   if(cur<=w && l)return cur+1;
      |           ^
a.cc: In function 'int main()':
a.cc:18:7: error: 'h' was not declared in this scope
   18 | cin >>h >>w >>k;
      |       ^
a.cc:18:11: error: 'w' was not declared in this scope
   18 | cin >>h >>w >>k;
      |           ^
a.cc:18:15: error: 'k' was not declared in this scope
   18 | cin >>h >>w >>k;
      |               ^
a.cc:31:1: error: 'dp' was not declared in this scope; did you mean 'dup'?
   31 | dp[r.size()][w+1];
      | ^~
      | dup
a.cc: In function 'int nextPos(int, int)':
a.cc:10:4: warning: control reaches end of non-void function [-Wreturn-type]
   10 |   r=(row>>(cur+1))%2;
      |   ~^~~~~~~~~~~~~~~~~
Language: C++

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

int fib(int j){
  if ((j==0)||(j==1)){return 1;}
  else{
    return (fib(j-1)+fib(j-2))%mod;
  }
}

int fib_inv(int j, int W){
  if ((j==W-1)||(j==W-2)){return 1;}
  else{
    return (fib_inv(j+1)+fib_inv(j+2))%mod;
  }
}


int main(){
  int H, W, K;cin>>H>>W>>K;
  vvi dp(H+1, vi (W,0));dp[0][0]=1;

  for (int i=0;i<H;++i){
    for (int j=0;j<W;++j){
      dp[i+1][j]=dp[i][j]*fib(j)*fib_inv(j, W);
      if (j!=0){
        dp[i+1][j]+=dp[i][j-1]*fib(j-1)*fib_inv(j,W);
      }
      if(j!=W-1){
        dp[i+1][j]+=dp[i][j+1]*fib(j)*fib_inv(j+1,W);
      }
      dp[i+1][j]%=mod;
    }
  }
  cout << dp[H][K-1]<< endl;
  return 0;
}


Compiler output:
a.cc: In function 'int fib_inv(int, int)':
a.cc:17:20: error: too few arguments to function 'int fib_inv(int, int)'
   17 |     return (fib_inv(j+1)+fib_inv(j+2))%mod;
      |             ~~~~~~~^~~~~
a.cc:14:5: note: declared here
   14 | int fib_inv(int j, int W){
      |     ^~~~~~~
a.cc:17:33: error: too few arguments to function 'int fib_inv(int, int)'
   17 |     return (fib_inv(j+1)+fib_inv(j+2))%mod;
      |                          ~~~~~~~^~~~~
a.cc:14:5: note: declared here
   14 | int fib_inv(int j, int W){
      |     ^~~~~~~
Language: C++

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

int fib(int j){
  if ((j==0)||(j==1)){return 1;}
  else{
    return (fib(j-1)+fib(j-2))%mod;
  }
}

nt fib_inv(int j, int W){
  if ((j==W-1)||(j==W-2)){return 1;}
  else{
    return (fib(j+1)+fib(j+2))%mod;
  }
}


int main(){
  int H, W, K;cin>>H>>W>>K;
  vvi dp(H+1, vi (W,0));dp[0][0]=1;

  for (int i=0;i<H;++i){
    for (int j=0;j<W;++j){
      dp[i+1][j]=dp[i][j]*fib(j)*fib_inv(j, W);
      if (j!=0){
        dp[i+1][j]+=dp[i][j-1]*fib(j-1)*fib_inv(j,W);
      }
      if(j!=W-1){
        dp[i+1][j]+=dp[i][j+1]*fib(j)*fib_inv(j+1,W);
      }
      dp[i+1][j]%=mod;
    }
  }
  cout << dp[H][K-1]<< endl;
  return 0;
}


Compiler output:
a.cc:14:1: error: 'nt' does not name a type; did you mean 'int'?
   14 | nt fib_inv(int j, int W){
      | ^~
      | int
a.cc: In function 'int main()':
a.cc:28:34: error: 'fib_inv' was not declared in this scope
   28 |       dp[i+1][j]=dp[i][j]*fib(j)*fib_inv(j, W);
      |                                  ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int H,W,K,dp[110][110],i,j,k,m;
int main(){
  cin>>H>>W>>K;
  dp[0][1]=1;
  for(i=1;i<=H;++i)
    for(k=0;k<1<<(W-1);++k)//kは各縦棒に対して横棒があるかどうかのビット列
      if(!(k&k/2))//連続二箇所で横棒がなければ(/2によってkのビット列を右に1ずらすことができる,>>1と同じ)
        for(m=k<<1,j=1;j<=W;++j)
          (dp[i][j]+=dp[i-1][m>>j&1?j+1:m>>(j-1)&1?j-1:j])%=1e9+7;//m>>j&1は現在位置から右方向に横棒があるかどうか、m>>(j-1)&1は現在位置から左方向に横棒があるかどうか
  cout<<dp[H][K]<<endl;
  return 0;
}

/*
dp[i-1][j-1] -(左方向の横棒)- dp[i-1][j] -(右方向の横棒)- dp[i-1][j+1]
                             dp[i][j]

移動元は(i-1,j-1),(i-1,j),(i-1,j+1)
移動先は(i,j)
(i-1,j-1)から右->下と移動して(i,j)
(i-1,j+1)から左->下と移動して(i,j)
(i-1,j)から真下と移動して(i,j)
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:11:59: error: invalid operands of types 'int' and 'double' to binary 'operator%'
   11 |           (dp[i][j]+=dp[i-1][m>>j&1?j+1:m>>(j-1)&1?j-1:j])%=1e9+7;//m>>j&1は現在位置から右方向に横棒があるかどうか、m>>(j-1)&1は現在位置から左方向に横棒があるかどうか
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:11:59: note:   in evaluation of 'operator%=(int, double)'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int H,W,K,M=1e9+7,dp[101][9],i,j,k,l;
bool flag;
int main(){
	cin>>H>>W>>K;
	dp[0][0]=1;
	for(i=0;i<H;++i){
		for(j=0;j<W;++j){
			for(k=0;k<1<<(W-1);++k){//横線の候補は2^{W-1}通りある
				flag=true;
				for(l=0;l<W-2;++l){
					if(((k>>l)&1)&&((k>>(l+1))&1)){//連続二箇所で横棒があったら
						flag=false;//あみだくじの条件を満たさない
					}
				}
				if(ok){
					//下左と移動する場合
					if(j>=1&&((k>>(j-1))&1)){//下左と移動するためには2本目移行にいないといけない、かつ左下の位置から右方向に横棒がないといけない
						dp[i+1][j-1]+=dp[i][j];
						dp[i+1][j-1]%=mod;
					}
					//下右と移動する場合
					else if(j<=W-2&&((k>>j)&1)){//下右と移動するためにはW-1本目までにいないといけない、かつ真下の位置から右方向に横棒がないといけない
						dp[i+1][j+1]+=dp[i][j];
						dp[i+1][j+1]%=mod;
					}
					//真下へ移動する場合
					else{
						dp[i+1][j]+=dp[i][j];
						dp[i+1][j]%=mod;
					}
				}
			}
		}
	}
	cout<<dp[H][K-1]<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:36: error: 'ok' was not declared in this scope; did you mean 'k'?
   17 |                                 if(ok){
      |                                    ^~
      |                                    k
a.cc:21:63: error: 'mod' was not declared in this scope; did you mean 'modf'?
   21 |                                                 dp[i+1][j-1]%=mod;
      |                                                               ^~~
      |                                                               modf
a.cc:26:63: error: 'mod' was not declared in this scope; did you mean 'modf'?
   26 |                                                 dp[i+1][j+1]%=mod;
      |                                                               ^~~
      |                                                               modf
a.cc:31:61: error: 'mod' was not declared in this scope; did you mean 'modf'?
   31 |                                                 dp[i+1][j]%=mod;
      |                                                             ^~~
      |                                                             modf
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define MM = 1000000000;
#define mod = MM + 7;
#define INF (ll)1e18
#define pi acos(-1.0)
#define MAX 100005
#define NIL -1
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main(){
    int h,w,k; cin >> h >> w >> k;
    k--;
    ll dp[h+3][w+3];
    ll dp_only_side[h+3][w+3];
    bool side = true, only_side = true;
    //side = trueならば上から来たので横を通ってよい、
    //side = falseならば横へ行ってはいけない(下のみ)

    dp[1][1] = 1;//上から来たものはこちらに足す、横と下にも足せる
    dp_only_side[1][1] = 0;//横から来たものはこちらに足す
    //下の段にはこちらも足す

    for(int i = 0; i < h+3; i++){
        for(int j = 0; j < w+3; j++){
            dp[i][j] = 0;
            dp_only_side[0][0] = 0;
        }
    }
    dp_only_side[1][2] = 1; //第一行目は2のみが1

    for(int i = 1; i <= h; i++){
        for(int j = 1; j <= w; j++){
            dp[i+1][j] += (dp[i][j]+dp_only_side[i][j]);
            dp[i][j+1] += dp[i][j];
            dp[i][j-1] += dp[i][j];
        }
    }
    ans = dp[h+1][k]+dp_only_side[h+1][k];
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   40 |     ans = dp[h+1][k]+dp_only_side[h+1][k];
      |     ^~~
      |     abs
Language: C++

#include "pch.h"
#include <vector>
//#include <cassert>
#include <iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
const int mod = 1000000007;

int main() {
	int h, w, k;
	cin >> h >> w >> k;
	int dp[105][10] = {};
	dp[0][0] = 1;
	
	rep(i, h) {
		rep(j, w) {
			rep(k, 1 << (w - 1)) {
				bool ok = 1;
				rep(l, w - 2) {
					if ((k >> l & 1) && (k >> (l + 1) & 1))
						ok = 0;
				}
				//*
				if (ok) {
					if ((k >> (j - 1) & 1) && j > 0) {
						dp[i + 1][j] += dp[i][j - 1];
						dp[i + 1][j] % mod;
					}
					else if ((k >> j & 1) && j < w - 1) {
						dp[i + 1][j] += dp[i][j + 1];
						dp[i + 1][j] % mod;
					}
					else {
						dp[i + 1][j] += dp[i][j];
						dp[i + 1][j] % mod;
					}
				}
				//*/
				/*/
				if (ok) {
					if (j >= 1 && ((k >> (j - 1)) & 1)) {
						// The case which goes left
						// 左方向に横線をたどるケース
						dp[i + 1][j - 1] += dp[i][j];
						dp[i + 1][j - 1] %= mod;
					}
					else if (j <= w - 2 && ((k >> j) & 1)) {
						// The case which goes right
						// 右方向に横線をたどるケース
						dp[i + 1][j + 1] += dp[i][j];
						dp[i + 1][j + 1] %= mod;
					}
					else {
						// The case which goes straight
						// 横線をたどらないケース
						dp[i + 1][j] += dp[i][j];
						dp[i + 1][j] %= mod;
					}
				}
				//*/
			}
					   			 		
		}
	}


	cout << dp[h][k-1] << endl;
	return 0;
}



Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

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

int64_t getAmidaNum(const int h, const int w, const int k) {
  std::vector<std::bitset<7>> horizontal_candidates;
  for (int i = 0; i < std::pow(2, w - 1); ++i) {
    std::bitset<7> current(static_cast<unsigned long long>(i));
    bool valid = true;
    for (int j = 0; j < w - 2; ++j) {
      if (current[j] && current[j + 1]) {
        valid = false;
      }
    }
    if (valid) {
      horizontal_candidates.emplace_back(std::move(current));
    }
  }

  std::vector<int> bridge_counts(w + 1, 0);
  for (int i = 1; i <= w; ++i) {
    bridge_counts[i] = std::count_if(
        horizontal_candidates.begin(), horizontal_candidates.end(),
        [i](const std::bitset<7> &bit) {
          return (bit & std::bitset<7>(static_cast<unsigned long long>(
                            std::pow(2, i - 1))))
              .any();
        });
  }
  const int candidate_total_num =
      static_cast<int>(horizontal_candidates.size());

  /*
  for (const auto &candi : horizontal_candidates) {
    std::cout << candi << std::endl;
  }
  for (const auto &cnt : bridge_counts) {
    std::cout << cnt << std::endl;
  }
  */

  // edges are guards
  std::vector<int64_t> current_amida_num(w + 2, 0);
  current_amida_num[1] = 1L;
  static const int64_t CONSTANT = 1000000007L;

  for (int i = 0; i < h; ++i) {
    std::vector<int64_t> current_amida_num2(w + 2, 0);
    for (int j = 1; j <= w; ++j) {
      current_amida_num2[j] +=
          (current_amida_num[j] *
           (candidate_total_num - bridge_counts[j] - bridge_counts[j - 1])) %
          CONSTANT;
      current_amida_num2[j - 1] +=
          (current_amida_num[j] * bridge_counts[j - 1]) % CONSTANT;
      current_amida_num2[j + 1] +=
          (current_amida_num[j] * bridge_counts[j]) % CONSTANT;
    }
    current_amida_num = std::move(current_amida_num2);
    for (auto &num : current_amida_num) {
      num %= CONSTANT;
    }
    /*
    std::cout << "i = " << i << ", ";
    for (const auto n : current_amida_num) {
      std::cout << n << " ";
    }
    std::cout << std::endl;
    */
  }

  return current_amida_num[k];
}
int main() {
  int h, w, k;
  std::cin >> h >> w >> k;
  std::cout << getAmidaNum(h, w, k);
  return 0;
}

Compiler output:
a.cc: In function 'int64_t getAmidaNum(int, int, int)':
a.cc:8:28: error: 'pow' is not a member of 'std'
    8 |   for (int i = 0; i < std::pow(2, w - 1); ++i) {
      |                            ^~~
a.cc: In lambda function:
a.cc:27:34: error: 'pow' is not a member of 'std'
   27 |                             std::pow(2, i - 1))))
      |                                  ^~~
Language: C++

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

#define int long long

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

    int h,w, K;

    cin >> h >> w >> K;

    int dp[w+1][h+1];

    for(int i = 0; i < w+1 ; i++){
        for(int j = 0; j< h+1; j++){
            dp[i][j] = 0;
        }
    }

    dp[0][0] = 1;
    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++){
            for(int k = 0; k < pow(2,w-1); k++){
                bool ok = true;
                for(int l = 0; l < w-2; l++){
                    if(((k >> l) & 1) && ((k >> (l+1)) & 1)){
                        ok = false;
                    }
                }
                if(ok){
                    if((j >= 1) && ((k >> (j-1)) &1)){
                        dp[j-1][i+1] += dp[j][i];
                        dp[j-1][i+1] %=1000000007;
                    }else if(j <= w-2 && (k >> j)&1){
                        dp[j+1][i+1] += dp[j][i];
                        dp[j+1][i+1]%=1000000007;
                    }else{
                        dp[j][i+1] += dp[j][i];
                        dp[j][i+1]%=1000000007;
                    }
                }
            }
        }
    }
    cout << dp[k-1][h] << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:16: error: 'k' was not declared in this scope
   47 |     cout << dp[k-1][h] << endl;
      |                ^
Language: C++

import copy
import sys
H,W,K = list(map(int, input().split()))
if  W == 1:
  print(1)
  sys.exit()
D = [0 for i in range(W)]
T = copy.deepcopy(D)
D[0] = 1
F = [1, 1, 2, 3, 5, 8, 13, 21]
for i in range(H):
  T[0] = D[1] * F[W-2] + D[0] * F[W-1]
  T[W-1] = D[W-2] * F[W-2] + D[W-1] * F[W-1]
  for j in range(1, W-1):
    T[j] = D[j-1] * F[j-1] * F[W-j-1] \
             + D[j+1] * F[j] * F[W-j-2]\
             + D[j] * F[j] * F[W-j-1]
  D = copy.deepcopy(T)
print(D[K-1] % 1000000007)

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import copy
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C

#include<stdio.h>
long int pow2(int s){
    int t=1;
    for(int i=0;i<s;i++){
        t=t*2;
    }
    return t;
}
long int move(int h,int w,int k,int W1,int Amida[][W1]){
    long int c=0;
    int x=0,y=1;
    for(int i=0;i<h+1;i++){
        if(x==0 && Amida[y][x+1]==1){
            x=x+2;
            y++;
        }else if(x==0 && Amida[y][x+1]!=1 ){
            y++;
        }else if(x!=0 && x!=W1-1 && Amida[y][x+1]==1){
            x=x+2;
            y++;
        }else if(x!=0 && x!=W1-1 && Amida[y][x-1]==1){
            x=x-2;
            y++;
        }else if(x!=0 && x!=W1-1 && (Amida[y][x-1]!=1 && Amida[y][x+1]!=1)){
            y++;
        }else if(x==W1-1 && Amida[y][x-1]==1){
            x=x-2;
            y++;
        }else if(x==W1-1 && Amida[y][x-1]!=1){
            y++;
        }
        if(y==h+1)break;
    }
    if(x==(2*k-2) && y==h+1)c++;
                 return c;
}

                 
int main(void){
    
    long int C=0,R,f=0;
    int H,K,o;
    int W;
    scanf("%d",&H);scanf("%d",&W);scanf("%d",&K);
    int W1=2*W-1;
    int Amida[H+2][W1];
    for(int i=0;i<H+2;i++){
        for(int j=0;j<W1;j++){
            Amida[i][j]=0;
        }
    }
    int q=move(H,W,K,W1,Amida);
    C=C+q;
    for(long int m=2;m<=pow2((H)*(W-1));m++){
                    for(int i=1;i<W1;i=i+2){
                        for(int j=1;j<=H;j++){
                            R=pow2(H*(i/2)+j-1);
                            if((m-1)%R==0){
                                if(Amida[j][i]==1){
                                    Amida[j][i]=0;
                                }else if(Amida[j][i]==0){
                                    Amida[j][i]=1;
                                }
                            }
                        }
                    }
        f=0;
        for(int i=1;i<=H;i++){
            for(int j=1;j<W1-2;j=j+2){
                if((Amida[i][j]+Amida[i][j+2])==2){f++;}
            }

        }
        if(f==0){
             hyouji(H+2,W1,Amida);
            o=move(H,W,K,W1,Amida);
            C=C+o;
        }
                }
    long int x=C%1000000007;
                printf("%ld\n",x);
                return 0;
        }
                 


Compiler output:
main.c: In function 'main':
main.c:75:14: error: implicit declaration of function 'hyouji' [-Wimplicit-function-declaration]
   75 |              hyouji(H+2,W1,Amida);
      |              ^~~~~~
Language: C

#include<stdio.h>
int pow2(int s){
    int t=1;
    for(int i=0;i<s;i++){
        t=t*2;
    }
    return t;
}
long int move(int h,int w,int k,int W1,int Amida[][W1]){
    long int c=0;
    int x=0,y=1;
    for(int i=0;i<h+2;i++){
        if(x==0 && Amida[y][x+1]==1){
            x=x+2;
            y++;
        }else if(x==0 && Amida[y][x+1]!=1 ){
            y++;
        }else if(x!=0 && x!=W1-1 && Amida[y][x+1]==1){
            x=x+2;
            y++;
        }else if(x!=0 && x!=W1-1 && Amida[y][x-1]==1){
            x=x-2;
            y++;
        }else if(x!=0 && x!=W1-1 && (Amida[y][x-1]!=1 && Amida[y][x+1]!=1)){
            y++;
        }else if(x==W1-1 && Amida[y][x-1]==1){
            x=x-2;
            y++;
        }else if(x==W1-1 && Amida[y][x-1]!=1){
            y++;
        }
        if(y==h+1)break;
    }
    if(x==(2*k-2) && y==h+1)c++;
                 return c;
}

                 
int main(void){
    
    long int C=0,R,f=0;
    int H,K,o;
    int W;
    scanf("%d",&H);scanf("%d",&W);scanf("%d",&K);
    int W1=2*W-1;
    int Amida[H+2][W1];
    for(int i=0;i<H+2;i++){
        for(int j=0;j<W1;j++){
            Amida[i][j]=0;
        }
    }
    int q=move(H,W,K,W1,Amida);
    C=C+q;
    for(long int m=2;m<=pow2((H)*(W-1));m++){
                    for(int i=1;i<(W1);i=i+2){
                        for(int j=1;j<=H;j++){
                            R=pow2(H*(i/2)+j-1);
                            if((m-1)%R==0){
                                if(Amida[j][i]==1){
                                    Amida[j][i]=0;
                                }else if(Amida[j][i]==0){
                                    Amida[j][i]=1;
                                }
                            }
                        }
                    }
        f=0;
        for(int i=1;i<=H;i++){
            for(int j=1;j<W1-2;j=j+2){
                if((Amida[i][j]+Amida[i][j+2])==2){f++;}
            }
        }
        if(f==0){
            o=move(H,W,K,W1,Amida);
            C=C+o;
        }
                }
    int x=C%1000000007
                printf("%ld\n",C);
                return 0;
        }
                 


Compiler output:
main.c: In function 'main':
main.c:79:17: error: expected ',' or ';' before 'printf'
   79 |                 printf("%ld\n",C);
      |                 ^~~~~~
Language: C++

MOD = 10 ** 9 + 7


def main():
    h, w, k = map(int, input().split())

    if w == 1:
        print(1)
        exit()

    cnt, valid = [0] * (w-1), []
    for i in range(2**(w-1)):
        c = [0] * (w-1)
        for j in range(w-1):
            if (i >> j) & 1:
                c[j] = 1

                if 0 < j and c[j-1] == 1:
                    break

        else:
            valid.append(c)
            for j in range(w-1):
                if c[j] == 1:
                    cnt[j] += 1

    num, ans = len(valid), 0
    for v in valid:
        dp = [[0] * w for i in range(h + 1)]
        if v[0]:
            dp[1][1] += 1
        else:
            dp[1][0] += 1

        for i in range(2, h+1):
            for j in range(w):
                com = num
                if 0 < j:
                    dp[i][j] = (dp[i][j]+dp[i-1][j-1]*cnt[j-1]) % MOD
                    com -= cnt[j-1]
                if j < w - 1:
                    dp[i][j] = (dp[i][j]+dp[i-1][j+1]*cnt[j]) % MOD
                    com -= cnt[j]
                dp[i][j] = (dp[i][j]+dp[i-1][j]*com) % MOD

        ans = (ans+dp[h][k-1]) % MOD

    print(ans)


if __name__ == '__main__':
    main()


Compiler output:
a.cc:51:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   51 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:1:1: error: 'MOD' does not name a type
    1 | MOD = 10 ** 9 + 7
      | ^~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <tuple>

using namespace std;

//#define DEBUG_ //!!提出時にコメントアウト!!
#ifdef DEBUG_
	#define dump(x)  cerr << #x << " = " << (x) << endl;
#else
	#define dump(x)  ; //何もしない文
#endif

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define SZ(x) ((int)(x).size()) //unsignedのサイズをint型に変換

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL; 
const int mod=1e9+7;

int nth_bit(LL num, int n){
    return (num >> n) & 1;
}

inline int add(int x,int y)
{
    return (x + y)%MOD;
}
 
inline int sub(int x,int y)
{
    return (x+MOD-y)%MOD;
}
 
inline int mul(int x,int y)
{
    return (LL)x*y%MOD;
}

//ここから書き始める
int main(int argc, char const *argv[])
{
	int H,W,K;
	cin >> H >> W >> K;

	int dp[H][W];
	int num[W][W];
	REP(i,W)
	{
		REP(j,W) num[i][j] = 0;
	}



    REP(i,pow(2,W-1))
    {
    	bool ok = 1;
    	//重複チェック
    	REP(j,W-1)
    	{
    		if(nth_bit(i,j) == 1 && nth_bit(i,j+1) == 1) ok = 0;
    	}
    	if(!ok) continue;

    	int p[W];
    	REP(j,W) p[j] = j;
    	REP(j,W-1)
    	{
    		if(nth_bit(i,j) == 1) swap(p[j], p[j+1]);
    	}

    	REP(j,W) num[p[j]][j]++;

    }

    dp[0][0] = 1;
    FOR(i,1,W) dp[0][i] = 0;


    FOR(i,1,H+1)
    {
    	REP(j,W)
    	{
    		dp[i][j] = 0;
    		REP(k,W)
    		{
    			dp[i][j] = add(dp[i][j],mul(dp[i-1][k], num[k][j]));
    		}
    	}
    }



    cout << dp[H][K-1] << endl;



}


Compiler output:
a.cc: In function 'int add(int, int)':
a.cc:36:20: error: 'MOD' was not declared in this scope
   36 |     return (x + y)%MOD;
      |                    ^~~
a.cc: In function 'int sub(int, int)':
a.cc:41:15: error: 'MOD' was not declared in this scope
   41 |     return (x+MOD-y)%MOD;
      |               ^~~
a.cc: In function 'int mul(int, int)':
a.cc:46:20: error: 'MOD' was not declared in this scope
   46 |     return (LL)x*y%MOD;
      |                    ^~~
Language: C++

#include <iostream>

using namespace std;

unsigned _int64 f[9] = { 0, 1, 1, 2, 3, 5, 8, 13, 21 };

unsigned _int64 X_i(int i, int w)
{
	return f[i - 1] * f[w - i + 1];
}

unsigned _int64 Y_i(int i, int w)
{
	return f[i] * f[w - i + 1];
}

unsigned _int64 Z_i(int i, int w)
{
	return f[i] * f[w - i];
}

int main()
{
	unsigned  int h, w, k;

	cin >> h >> w >> k;

	unsigned _int64 A[101][10] = {};

	A[0][1] = 1;

	unsigned _int64 mod = 1000000007;

	for (int i = 0; i < h; ++i)
	{
		for (int j = 1; j < w + 1; ++j)
		{
			A[i + 1][j - 1] += (X_i(j, w) * A[i][j]);
			A[i + 1][j - 1] %= mod;

			A[i + 1][j] += (Y_i(j, w) * A[i][j]);
			A[i + 1][j] %= mod;

			A[i + 1][j + 1] += (Z_i(j, w) * A[i][j]);
			A[i + 1][j + 1] %= mod;
		}
	}

	cout << A[h][k];

	return 0;
}

Compiler output:
a.cc:5:17: error: expected initializer before 'f'
    5 | unsigned _int64 f[9] = { 0, 1, 1, 2, 3, 5, 8, 13, 21 };
      |                 ^
a.cc:7:17: error: expected initializer before 'X_i'
    7 | unsigned _int64 X_i(int i, int w)
      |                 ^~~
a.cc:12:17: error: expected initializer before 'Y_i'
   12 | unsigned _int64 Y_i(int i, int w)
      |                 ^~~
a.cc:17:17: error: expected initializer before 'Z_i'
   17 | unsigned _int64 Z_i(int i, int w)
      |                 ^~~
a.cc: In function 'int main()':
a.cc:28:25: error: expected initializer before 'A'
   28 |         unsigned _int64 A[101][10] = {};
      |                         ^
a.cc:30:9: error: 'A' was not declared in this scope
   30 |         A[0][1] = 1;
      |         ^
a.cc:32:25: error: expected initializer before 'mod'
   32 |         unsigned _int64 mod = 1000000007;
      |                         ^~~
a.cc:38:45: error: 'X_i' was not declared in this scope
   38 |                         A[i + 1][j - 1] += (X_i(j, w) * A[i][j]);
      |                                             ^~~
a.cc:39:44: error: 'mod' was not declared in this scope
   39 |                         A[i + 1][j - 1] %= mod;
      |                                            ^~~
a.cc:41:41: error: 'Y_i' was not declared in this scope
   41 |                         A[i + 1][j] += (Y_i(j, w) * A[i][j]);
      |                                         ^~~
a.cc:44:45: error: 'Z_i' was not declared in this scope
   44 |                         A[i + 1][j + 1] += (Z_i(j, w) * A[i][j]);
      |                                             ^~~
Language: C++

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

int main(){
	int H , W , K;
	long long int MOD = 1000000007;
	cin >> H >> W >> K;
	if(W==1)cout << 1 << endl;                                                
	long long int dp[H+1][W];
	int fib[8] = {1,2,3,5,8,13,21,34};
	dp[0][0] = 1;
	for(int i=1;i<W;i++)dp[0][i] = 0;
	if(W==2){
		for(int i=1;i<H+1;i++){
			dp[i][0] = dp[i-1][0] + dp[i-1][1];
			dp[i][1] = dp[i][0];
		}
		cout << dp[H][K-1] << endl;
	}
	for(int i=1;i<H+1;i++){
		dp[i][0] = dp[i-1][0]*fib[W-2] + dp[i-1][1]*fib[W-3];
		dp[i][1] = dp[i-1][0]*fib[W-3] + dp[i-1][1]*fib[W-3]+dp[i-1][2]
		for(int j=2;j<W-2;j++){
			dp[i][j] = dp[i-1][j-1]*fib[j-2]*fib[W-j-2] + dp[i-1][j]*fib[j-1]*fib[W-j-2] + dp[i-1][j+1]*fib[j-1]*fib[W-j-3];
		}
		if(W==3){
			dp[i][2] = dp[i-1][1] + dp[i-1][2]*fib[1];
			break;
		}
		dp[i][W-2] = dp[i-1][W-3]*fib[W-4] + dp[i-1][W-2]*fib[W-3] + dp[i-1][W-1]*fib[W-3];
		dp[i][W-1] = dp[i-1][W-2]*fib[W-3] + dp[i-1][W-1]*fib[W-2];
	}
	cout << dp[H][K-1] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:80: error: expected ';' before 'for'
   22 |                 dp[i][1] = dp[i-1][0]*fib[W-3] + dp[i-1][1]*fib[W-3]+dp[i-1][2]
      |                                                                                ^
      |                                                                                ;
   23 |                 for(int j=2;j<W-2;j++){
      |                 ~~~                                                             
a.cc:23:29: error: 'j' was not declared in this scope
   23 |                 for(int j=2;j<W-2;j++){
      |                             ^
Language: C++

#include <iostream>
#include <vector>
using namespace std;
const int MOD = 1000000007;

int main() {
  int H, W, K;
  cin >> H >> W >> K;
  vector<vector<int>> dp(H + 1, vector<int>(W, 0));
  dp[0][0] = 1;
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      for (int k = 0; k < 1 << (W - 1)) {
        bool ok = true;
        for (int l = 0; l < W - 2; l++)
          if ((k >> l) & 1 == (k >> (l + 1)) & 1)
            ok = false;

        if (ok) {
          if (1 <= j && ((k << (j - 1)) & 1))
            dp[i + 1][j - 1] = (dp[i + 1][j - 1] + dp[i][j]) % MOD;
          else if (j <= W - 2 && ((k << j) & 1))
            dp[i + 1][j + 1] = (dp[i + 1][j + 1] + dp[i][j]) % MOD;
          else
            dp[i + 1][j] = (dp[i + 1][j] + dp[i][j]) % MOD;
        }
      }
    }
  }
  cout << dp[H][K - 1] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:39: error: expected ';' before ')' token
   13 |       for (int k = 0; k < 1 << (W - 1)) {
      |                                       ^
      |                                       ;
Language: C++

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

typedef long long ll;
#define MOD 1000000007
ll extgcd(ll a, ll b, ll &x, ll &y) {
  ll g = a; x = 1; y = 0;
  if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x;
  return g;
}
ll gcd(ll a, ll b) { ll x, y; return extgcd(a, b, x, y);}

class llm{
	ll n;
public:
	llm(){n = 0;}
	llm(ll n){this->n = (n >= 0) ? (n % MOD) : (MOD - 1 - (-n-1 % MOD));}
	operator ll() const {return n;}
	llm operator+(const llm &y) const{ return llm((ll)*this + (ll)y);}
	llm operator-(const llm &y) const{ return llm((ll)*this - (ll)y);}
	llm operator*(const llm &y) const{ return llm((ll)*this * (ll)y);}
	llm operator/(const llm &y) const{ return *this * y.inv();}
	llm inv() const{
		ll x, y;
		if (extgcd(n, MOD, x, y) == 1) return llm(x);
  		return llm(0); // unsolvable
	}
	friend istream& operator >> (istream& os, llm& x);
	friend ostream& operator << (ostream& os, const llm& x);
};
istream& operator >> (istream& is, llm& x){ll n; is >> n; x = llm(n); return is;}
ostream& operator << (ostream& os, const llm& x){os << (ll)x; return os;}

template<typename T> T comb(ll n, ll k){
	T ret = 1;
	for(ll i=1;i<=k;i++) ret = ret * T(n - k + i) / T(i);
	return ret;
}

ll H, W, K;
vector<vector<llm> > dp;
int main(){
  vector<llm> fib = {1, 1, 2, 3, 5, 8, 13, 21, 34};
  cin >> H >> W >> K;
  dp = vector<vector<llm> >(H+1, vector<llm>(W+1));
  dp[0][1] = 1;
  for(ll i=0;i<H;i++){
    for(ll j=1;j<=W;j++){
      if (j>1) dp[i+1][j-1] += dp[i][j] * fib[j-2] * fib[W-j];
      dp[i+1][j] += dp[i][j] * fib[max(0LL, j-2)] * fib[max(0LL, W-j-1)];
      if (j<W) dp[i+1][j+1] += dp[i][j] * fib[j-1] * fib[W-j-1];
    }
  }
  cout << dp[H][K] << endl;
}
  
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:49:29: error: no match for 'operator+=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<llm>, llm>::value_type' {aka 'llm'} and 'llm')
   49 |       if (j>1) dp[i+1][j-1] += dp[i][j] * fib[j-2] * fib[W-j];
a.cc:50:18: error: no match for 'operator+=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<llm>, llm>::value_type' {aka 'llm'} and 'llm')
   50 |       dp[i+1][j] += dp[i][j] * fib[max(0LL, j-2)] * fib[max(0LL, W-j-1)];
a.cc:51:29: error: no match for 'operator+=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<llm>, llm>::value_type' {aka 'llm'} and 'llm')
   51 |       if (j<W) dp[i+1][j+1] += dp[i][j] * fib[j-1] * fib[W-j-1];