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

#include<iostream>
using namespace std;

int lenght(string str){
  int i=0;
 while(str[i]){
     i++;
 }
 return i;
}


int sub(char c1, char c2, char c3, int n, int N, int count){
    if(n==N){
        return 1;
    }
    if(c2=='A'&&c3=='C'){
        return count + sub('A','C','A',n+1, N,count) +  sub('A','C','T',n+1, N,count)+ sub('A','C','C',n+1, N,count);
    }
    if(c2=='A'&&c3=='G'){
        return count + sub('A','G','A',n+1, N,count) +  sub('A','G','T',n+1, N,count)+ sub('A','G','G',n+1, N,count);
    }
    if(c2=='G'&&c3=='A'){
        return count + sub('A','G','A',n+1, N,count) +  sub('A','G','T',n+1, N,count)+ sub('A','G','G',n+1, N,count);
    }
    if(c1=='A'&&c3=='G'){
        return count + sub(c2,'G','A',n+1, N,count) +  sub(c2,'G','T',n+1, N,count)+ sub(c2,'G','G',n+1, N,count);
    }
    if(c1=='A'&&c2=='G'){
        return count + sub('G',c3,'A',n+1, N,count) +  sub('G',c3,'T',n+1, N,count)+ sub('G', c3, 'G',n+1, N,count);
    }
    return count + sub(c2, c3, 'A', n+1, N,count) +  sub(c2, c3, 'C', n+1, N,count)+ sub(c2, c3, 'G',n+1, N,count)+ sub(c2, c3, 'T',n+1, N,count);
}

int sub2(char c1, char c2, int n, int N, int count){
    if(n==N)
        return 1;
    if(c1=='A'&&c2=='G'){
        return count + sub('A','G','A',n+1, N,count) +  sub('A','G','G',n+1, N,count)+ sub('A', 'G', 'T',n+1, N,count);
    }
    if(c1=='A'&&c2=='C'){
        return count + sub('A','C','A',n+1, N,count) +  sub('A','C','C',n+1, N,count)+ sub('A', 'C', 'T',n+1, N,count);
    }
    if(c1=='G'&&c2=='A'){
        return count + sub('G','A','A',n+1, N,count) +  sub('G','A','G',n+1, N,count)+ sub('G', 'A', 'T',n+1, N,count);
    }
    return count + sub(c1,c2,'A',n+1, N,count) +  sub(c1,c2,'G',n+1, N,count)+ sub(c1, c2, 'T',n+1, N,count) + sub(c1, c2, 'C',n+1, N,count);
}

int main(){
    int N;
  long long int num = 0;
    cin >> N;
    
    num = sub2('A','A',2,N,0) + sub2('A','G',2,N,0) + sub2('A','C',2,N,0) +sub2('A','T',2,N,0)+
    sub2('G','A',2,N,0) + sub2('G','G',2,N,0) + sub2('G','C',2,N,0) + sub2('G','T',2,N,0)+
    sub2('C','A',2,N,0) + sub2('C','G',2,N,0) + sub2('C','C',2,N,0) + sub2('C','T',2,N,0)+
    sub2('T','A',2,N,0) + sub2('T','G',2,N,0) + sub2('T','C',2,N,0) + sub2('T','T',2,N,0);
    if(num > pow(10*9)+7)
      cout << num%(pow(10,9)+7) << endl;
    else
      cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:14: error: 'pow' was not declared in this scope
   59 |     if(num > pow(10*9)+7)
      |              ^~~
Language: C++

#include<iostream>
using namespace std;

int lenght(string str){
  int i=0;
 while(str[i]){
     i++;
 }
 return i;
}


int sub(char c1, char c2, char c3, int n, int N, int count){
    if(n==N){
        return 1;
    }
    if(c2=='A'&&c3=='C'){
        return count + sub('A','C','A',n+1, N,count) +  sub('A','C','T',n+1, N,count)+ sub('A','C','C',n+1, N,count);
    }
    if(c2=='A'&&c3=='G'){
        return count + sub('A','G','A',n+1, N,count) +  sub('A','G','T',n+1, N,count)+ sub('A','G','G',n+1, N,count);
    }
    if(c2=='G'&&c3=='A'){
        return count + sub('A','G','A',n+1, N,count) +  sub('A','G','T',n+1, N,count)+ sub('A','G','G',n+1, N,count);
    }
    if(c1=='A'&&c3=='G'){
        return count + sub(c2,'G','A',n+1, N,count) +  sub(c2,'G','T',n+1, N,count)+ sub(c2,'G','G',n+1, N,count);
    }
    if(c1=='A'&&c2=='G'){
        return count + sub('G',c3,'A',n+1, N,count) +  sub('G',c3,'T',n+1, N,count)+ sub('G', c3, 'G',n+1, N,count);
    }
    return count + sub(c2, c3, 'A', n+1, N,count) +  sub(c2, c3, 'C', n+1, N,count)+ sub(c2, c3, 'G',n+1, N,count)+ sub(c2, c3, 'T',n+1, N,count);
}

int sub2(char c1, char c2, int n, int N, int count){
    if(n==N)
        return 1;
    if(c1=='A'&&c2=='G'){
        return count + sub('A','G','A',n+1, N,count) +  sub('A','G','G',n+1, N,count)+ sub('A', 'G', 'T',n+1, N,count);
    }
    if(c1=='A'&&c2=='C'){
        return count + sub('A','C','A',n+1, N,count) +  sub('A','C','C',n+1, N,count)+ sub('A', 'C', 'T',n+1, N,count);
    }
    if(c1=='G'&&c2=='A'){
        return count + sub('G','A','A',n+1, N,count) +  sub('G','A','G',n+1, N,count)+ sub('G', 'A', 'T',n+1, N,count);
    }
    return count + sub(c1,c2,'A',n+1, N,count) +  sub(c1,c2,'G',n+1, N,count)+ sub(c1, c2, 'T',n+1, N,count) + sub(c1, c2, 'C',n+1, N,count);
}

int main(){
    int N;
  long long int num = 0;
    cin >> N;
    
    num = sub2('A','A',2,N,0) + sub2('A','G',2,N,0) + sub2('A','C',2,N,0) +sub2('A','T',2,N,0)+
    sub2('G','A',2,N,0) + sub2('G','G',2,N,0) + sub2('G','C',2,N,0) + sub2('G','T',2,N,0)+
    sub2('C','A',2,N,0) + sub2('C','G',2,N,0) + sub2('C','C',2,N,0) + sub2('C','T',2,N,0)+
    sub2('T','A',2,N,0) + sub2('T','G',2,N,0) + sub2('T','C',2,N,0) + sub2('T','T',2,N,0);
    if(num > pow(10*9)+7)
      cout << num%(pow(10*9)+7) << endl;
    else
      cout << num << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:14: error: 'pow' was not declared in this scope
   59 |     if(num > pow(10*9)+7)
      |              ^~~
Language: C++

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

int dp[101][4][4][4];
int mod = 1000000007;

int main(void){
    int n;
    cin>>n;

    dp[0][3][3][3] = 1;   
    for(int len=0; len<n; len++){
        for(int c3=0; c3<4; c3++){
            for(int c2=0; c2<4; c2++){
                for(int c1=0; c1<4; c1++){
                    if(dp[len][c3][c2][c1] == 0)continue;
                    for(int plus=0; plus<4; plus++){
                        if(c2==0 && c1==1 && plus==2)continue;
                        if(c2==1 && c1==0 && plus==2)continue;
                        if(c2==0 && c1==2 && plus==1)continue;
                        if(c3==0 && c1==1 && plus==2)continue;
                        if(c3==0 && c2==1 && plus==2)continue;
           
                        dp[len+1][c2][c1][plus] += dp[len][c3][c2][c1];   
                        dp[len+1][c2][c1][plus] %= mod;                     
                    } 
                }    
            } 
        }
    }
    
    int ans = 0;

    for(int c3=0; c3<4; c3++){
        for(int c2=0; c2<4; c2++){
            for(int c1=0; c1<4; c1++){
                ans += dp[n][c3][c2][c1]; 
                ans%=mod;           
            }
        }
    }

    cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc:2:10: fatal error: ctstdio: No such file or directory
    2 | #include <ctstdio>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

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

typedef long long ll;
const ll mod=1000000007;

ll power(int x, int n){
  ll v=1;
  while(n>=1){
    if(n&1){
      (v*=x)%=mod;
    }
    n=n>>1;
    x=(x*x)%mod;
  }
  return v;
}


bool is_bad(int a, int b, int c, int d){
  if(      b==1&&c==2&&d==3){return true;}
  if(      b==1&&c==3&&d==2){return true;}
  if(      b==2&&c==1&&d==3){return true;}
  if(a==1&&      c==2&&d==3){return true;}
  if(a==1&&b==2&&      d==3){return true;}
  return false;
}


ll solve(int N){
  ll dp[N+1][256][2];
  dp[0][0][0]=1;
  dp[0][0][1]=0;

  for (int i=0;i<N+1;i++){
    for (int a=0;a<4;++a) for(int b=0;b<4;++b) for(int c=0;c<4;++c) for (int d=0;d<4;++d){
      abcd=((a*4+b)*4+c)*4+d;
      for (int e=0;e<4;++e){
        bcde=((b*4+c)*4+d)*4+e;
        bad_=is_bad(b,c,d,e);
        for (int j=0;j<2;++j){
          dp[i+1][bcde][bad_|j]+=dp[i][abcd][j];
        }
      }
    }
  }
  
  ll ans=0;
  for (int i=0;i<256;i++){
    ans+=dp[N][i][1];
  }
  ans=(power(4,N)-ans+mod)%mod;
  return ans;
}

int main(){
  int N;cin>>N;
  cout << solve(N)<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'll solve(int)':
a.cc:37:7: error: 'abcd' was not declared in this scope
   37 |       abcd=((a*4+b)*4+c)*4+d;
      |       ^~~~
a.cc:39:9: error: 'bcde' was not declared in this scope
   39 |         bcde=((b*4+c)*4+d)*4+e;
      |         ^~~~
a.cc:40:9: error: 'bad_' was not declared in this scope
   40 |         bad_=is_bad(b,c,d,e);
      |         ^~~~
Language: C++

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

const ll mod=1000000007LL;
typedef long long ll;

ll power(ll x, int n){
  ll v=1;
  while(n>=1){
    if (n&1==1){(v*=x)%=mod;}
    x=x*x;
    n=n>>1;
  }
  return v;
}

bool bad(int a, int b, int c, int d){
  if (      b==1&&c==2&&d==3){return true;}
  if (a==1&&      c==2&&d==3){return true;}
  if (      b==2&&c==1&&d==3){return true;}
  if (      b==1&&c==3&&d==2){return true;}
  if (a==1&&b==2&&      d==3){return true;}
  return false;
}

ll solve(int N){
  ll dp[101][256][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0]=1;
  for (int i=0;i<N;i++){
    for (int a=0;a<4;a++){
      for (int b=0;b<4;b++){
        for (int c=0;c<4;c++){
          for (int d=0;d<4;d++){
            int abcd=((a*4+b)*4+c)*4+d;
            for (int e=0;e<4;e++){
              int bcde=((b*4+c)*4+d)*4+e;
              bool bcde_=bad(b,c,d,e);
              for (int j=0;j<2;j++){
                (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
              }
            }
          }
        }
      }
    }
  }

  ll n_bad=0;

  for (int i=0;i<256;i++){
    n_bad+=dp[N][i][1];
    n_bad%=mod;
  }

  ll ans=power(4,N)-n_bad+mod;
  ans%=mod;

  return ans;
}

int main(){
  int N;cin>>N;
  ll ans=solve(N);
  cout << ans<< endl;
  return 0;
}

Compiler output:
a.cc:4:7: error: 'll' does not name a type
    4 | const ll mod=1000000007LL;
      |       ^~
a.cc: In function 'll power(ll, int)':
a.cc:10:25: error: 'mod' was not declared in this scope; did you mean 'modf'?
   10 |     if (n&1==1){(v*=x)%=mod;}
      |                         ^~~
      |                         modf
a.cc: In function 'll solve(int)':
a.cc:40:59: error: 'mod' was not declared in this scope; did you mean 'modf'?
   40 |                 (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
      |                                                           ^~~
      |                                                           modf
a.cc:53:12: error: 'mod' was not declared in this scope; did you mean 'modf'?
   53 |     n_bad%=mod;
      |            ^~~
      |            modf
a.cc:56:27: error: 'mod' was not declared in this scope; did you mean 'modf'?
   56 |   ll ans=power(4,N)-n_bad+mod;
      |                           ^~~
      |                           modf
Language: C++

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

const int mod=1000000007LL;
typedef long long ll;

ll power(ll x, int n){
  ll v=1;
  while(n>=1){
    if (n&1==1){(v*=x)%=mod;}
    x=x*x;
    n=n>>1;
  }
  return v;
}

bool bad(int a, int b, int c, int d){
  if (      b==1&&c==2&&d==3){return true;}
  if (a==1&&      c==2&&d==3){return true;}
  if (      b==2&&c==1&&d==3){return true;}
  if (      b==1&&c==3&&d==2){return true;}
  if (a==1&&b==2&&      d==3){return true;}
  return false;
}

ll solve(int N){
  ll dp[N+1][256][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0]=1;
  for (int i=0;i<N;++i){
    for (int a=0;a<4;++a){
      for (int b=0;b<4;++b){
        for (int c=0;c<4;++c){
          for (int d=0;d<4;++d){
            int abcd=((a*4+b)*4+c)*4+d;
            for (int e=0;e<4;++e){
              int bcde=((b*4+c)*4+d)*4+e;
              bool bcde_=bad(b,c,d,e);
              for (int j=0;j<2;++j){
                (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
              }
            }
          }
        }
      }
    }
  }

  ll n_bad=0;

  for (int i=0;i<256;++i){
    n_bad+=dp[N][i][1]
    n_bad%=mod;
  }

  ll ans=power(4,N)-ans+mod;
  ans%=mod;

  return ans;
}

int main(){
  int N;cin>>N;
  ll ans=solve(N);
  cout << ans<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'll solve(int)':
a.cc:52:23: error: expected ';' before 'n_bad'
   52 |     n_bad+=dp[N][i][1]
      |                       ^
      |                       ;
   53 |     n_bad%=mod;
      |     ~~~~~
Language: C++

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

const int mod=1000000007LL;
typedef long long ll;

ll power(ll x, int n){
  ll v=1;
  while(n>=1){
    if (n&1==1){(v*=x)%=mod;}
    x=x*x;
    n=n>>1;
  }
  return v;
}

bool bad(int a, int b, int c, int d){
  if (      b==1&&c==2&&d==3){return true;}
  if (a==1&&      c==2&&d==3){return true;}
  if (      b==2&&c==1&&d==3){return true;}
  if (      b==1&&c==3&&d==2){return true;}
  if (a==1&&b==2&&      d==3){return true;}
  return false;
}

ll solve(int N){
  ll dp[N+1][256][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0]=1;
  for (int i=0;i<N;++i){
    for (int a=0;a<4;++a){
      for (int b=0;b<4;++b){
        for (int c=0;c<4;++c){
          for (int d=0;d<4;++d){
            int abcd=((a*4+b)*4+c)*4+d;
            for (int e=0;e<4;++e){
              int bcde=((b*4+c)*4+d)*4+e;
              bool bcde_=bad(b,c,d,e);
              for (int j=0;j<2;++j){
                (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
              }
            }
          }
        }
      }
    }
  }

  ll ans=0;

  for (int i=0;i<256;++i){
    (ans+=dp[N][i][1])%=mod;
  }

  return (power(4,N)-ans+mod)%=mod;
}

int main(){
  int N;cin>>N;
  ll ans=solve(N);
  cout << ans<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'll solve(int)':
a.cc:55:25: error: lvalue required as left operand of assignment
   55 |   return (power(4,N)-ans+mod)%=mod;
      |          ~~~~~~~~~~~~~~~^~~~~
Language: C++

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

const int mod=1000000007LL;
typedef long long ll;

ll power(ll x, int n){
  ll v=1;
  while(n>=1){
    if (n&1==1){(v*=x)%=mod;}
    x=x*x;
    n=n>>1;
  }
  return v;
}

bool bad(int a, int b, int c, int d){
  if (      b==1&&c==2&&d==3){return true;}
  if (a==1&&      c==2&&d==3){return true;}
  if (      b==2&&c==1&&d==3){return true;}
  if (      b==1&&c==3&&d==2){return true;}
  if (a==1&&b==2&&      d==3){return true;}
  return false;
}

ll solve(int N){
  ll dp[N+1][256][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0]=1;
  for (int i=0;i<N;++i){
    for (int a=0;a<4;++a){
      for (int b=0;b<4;++b){
        for (int c=0;c<4;++c){
          for (int d=0;d<4;++d){
            int abcd=((a*4+b)*4+c)*4+d;
            for (int e=0;e<4;++e){
              int bcde=((b*4+c)*4+d)*4+e;
              bool bcde_=bad(b,c,d,e);
              for (int j=0;j<2;++j){
                (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
              }
            }
          }
        }
      }
    }
  }

  ll n_bad=0;

  for (int i=0;i<256;++i){
    (n_bad+=dp[N][i][1])%=mod;
  }

  ll ans=(power(4,N)-n_bad)
  ans%=mod;
  return ans;
}

int main(){
  int N;cin>>N;
  ll ans=solve(N);
  cout << ans<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'll solve(int)':
a.cc:56:3: error: expected ',' or ';' before 'ans'
   56 |   ans%=mod;
      |   ^~~
Language: C++

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

const int mod=1000000007LL;
typedef long long ll;

ll power(ll x, int n){
  ll v=1;
  while(n>=1){
    if (n&1==1){(v*=x)%=mod;}
    x=x*x;
    n=n>>1;
  }
  return v;
}

bool bad(int a, int b, int c, int d){
  if (      b==1&&c==2&&d==3){return true;}
  if (a==1&&      c==2&&d==3){return true;}
  if (      b==2&&c==1&&d==3){return true;}
  if (      b==1&&c==3&&d==2){return true;}
  if (a==1&&b==2&&      d==3){return true;}
  return false
}

ll solve(int N){
  ll dp[N+1][256][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0]=1;
  for (int i=0;i<N;++i){
    for (int a=0;a<4;++a){
      for (int b=0;b<4;++b){
        for (int c=0;c<4;++c){
          for (int d=0;d<4;++d){
            int abcd=((a*4+b)*4+c)*4+d;
            for (int e=0;e<4;++e){
              int bcde=((b*4+c)*4+d)*4+e;
              bool bcde_=bad(b,c,d,e);
              for (int j=0;j<2;++j){
                (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
              }
            }
          }
        }
      }
    }
  }

  ll n_bad=0;

  for (int i=0;i<256;++i){
    (n_bad+=dp[N][i][1])%=mod;
  }

  ll ans=(power(4,N)-n_bad)%=mod;
  return ans;
}

int main(){
  int N;cin>>N;
  ll ans=solve(N);
  cout << ans<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'bool bad(int, int, int, int)':
a.cc:23:15: error: expected ';' before '}' token
   23 |   return false
      |               ^
      |               ;
   24 | }
      | ~              
a.cc: In function 'll solve(int)':
a.cc:55:21: error: lvalue required as left operand of assignment
   55 |   ll ans=(power(4,N)-n_bad)%=mod;
      |          ~~~~~~~~~~~^~~~~~~
Language: C++

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

const int mod=1000000007LL;
typedef long long ll;

ll power(ll x, int n){
  ll v=1;
  while(n>=1){
    if (n&1==1){(v*=x)%=mod;}
    x=x*x;
    n=>>1;
  }
  return v;
}

bool bad(int a, int b, int c, int d){
  if (      b==1&&c==2&&d==3){return true;}
  if (a==1&&      c==2&&d==3){return true;}
  if (      b==2&&c==1&&d==3){return true;}
  if (      b==1&&c==3&&d==2){return true;}
  if (a==1&&b==2&&      d==3){return true;}
  return false
}

ll solve(int N){
  ll dp[N+1][256][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0]=1;
  for (int i=0;i<N;++i){
    for (int a=0;a<4;++a){
      for (int b=0;b<4;++b){
        for (int c=0;c<4;++c){
          for (int d=0;d<4;++d){
            int abcd=((a*4+b)*4+c)*4+d;
            for (int e=0;e<4;++e){
              int bcde=((b*4+c)*4+d)*4+e;
              bool bcde_=bad(b,c,d,e);
              for (int j=0;j<2;++j){
                (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
              }
            }
          }
        }
      }
    }
  }

  ll n_bad=0;

  for (int i=0;i<256;++i){
    (n_bad+=dp[N][i][1])%=mod;
  }

  ll ans=(power(4,N)-n_bad)%=mod;
  return ans;
}

int main(){
  int N;cin>>N;
  ll ans=solve(N);
  cout << ans<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'll power(ll, int)':
a.cc:12:7: error: expected primary-expression before '>>' token
   12 |     n=>>1;
      |       ^~
a.cc: In function 'bool bad(int, int, int, int)':
a.cc:23:15: error: expected ';' before '}' token
   23 |   return false
      |               ^
      |               ;
   24 | }
      | ~              
a.cc: In function 'll solve(int)':
a.cc:55:21: error: lvalue required as left operand of assignment
   55 |   ll ans=(power(4,N)-n_bad)%=mod;
      |          ~~~~~~~~~~~^~~~~~~
Language: C++

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

const int mod=1000000007LL;
typedef long long ll;

ll power(ll x, int n){
  ll v=1;
  while(n>=1){
    if (n&1==1){(v*=x)=%mod;}
    x=x*x;
    n=>>1;
  }
  return v;
}

bool bad(int a, int b, int c, int d){
  if (      b==1&&c==2&&d==3){return true;}
  if (a==1&&      c==2&&d==3){return true;}
  if (      b==2&&c==1&&d==3){return true;}
  if (      b==1&&c==3&&d==2){return true;}
  if (a==1&&b==2&&      d==3){return true;}
  return false
}

ll solve(int N){
  ll dp[N+1][256][2];
  memset(dp, 0, sizeof(dp));
  dp[0][0][0]=1;
  for (int i=0;i<N;++i){
    for (int a=0;a<4;++a){
      for (int b=0;b<4;++b){
        for (int c=0;c<4;++c){
          for (int d=0;d<4;++d){
            int abcd=((a*4+b)*4+c)*4+d;
            for (int e=0;e<4;++e){
              int bcde=((b*4+c)*4+d)*4+e;
              bool bcde_=bad(b,c,d,e);
              for (int j=0;j<2;++j){
                (dp[i+1][bcde][bcde_|j]+=dp[i][abcd][j])%=mod;
              }
            }
          }
        }
      }
    }
  }

  ll n_bad=0;

  for (int i=0;i<256;++i){
    (n_bad+=dp[N][i][1])%=mod;
  }

  ll ans=(power(4,N)-n_bad)%=mod;
  return ans;
}

int main(){
  int N;cin>>N;
  ll ans=solve(N);
  cout << ans<< endl;
  return 0;
}

Compiler output:
a.cc: In function 'll power(ll, int)':
a.cc:10:24: error: expected primary-expression before '%' token
   10 |     if (n&1==1){(v*=x)=%mod;}
      |                        ^
a.cc:12:7: error: expected primary-expression before '>>' token
   12 |     n=>>1;
      |       ^~
a.cc: In function 'bool bad(int, int, int, int)':
a.cc:23:15: error: expected ';' before '}' token
   23 |   return false
      |               ^
      |               ;
   24 | }
      | ~              
a.cc: In function 'll solve(int)':
a.cc:55:21: error: lvalue required as left operand of assignment
   55 |   ll ans=(power(4,N)-n_bad)%=mod;
      |          ~~~~~~~~~~~^~~~~~~
Language: C++

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


int main(){
  int N;cin>>N;
  vl a(N+1), n(N+1);

  a[0]=1;a[1]=4;a[2]=16;a[3]=61;
  n[0]=0;n[1]=0;n[2]=0;n[3]=3;
  for (int i=4;i<N+1;i++){
    n[i]=n[i-1]+a[i-4]*3+a[i-3]*3;
    a[i]=(ll)pow(4,i)-n[i];
  }
  ll x=a[N];
  cout << x<< endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<bits/stdc++.h>
      | ^~~~~~~
a.cc:4:9: error: 'vector' does not name a type
    4 | typedef vector<ll> vl;
      |         ^~~~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |   int N;cin>>N;
      |         ^~~
a.cc:10:3: error: 'vl' was not declared in this scope; did you mean 'll'?
   10 |   vl a(N+1), n(N+1);
      |   ^~
      |   ll
a.cc:12:3: error: 'a' was not declared in this scope
   12 |   a[0]=1;a[1]=4;a[2]=16;a[3]=61;
      |   ^
a.cc:13:3: error: 'n' was not declared in this scope
   13 |   n[0]=0;n[1]=0;n[2]=0;n[3]=3;
      |   ^
a.cc:16:14: error: 'pow' was not declared in this scope
   16 |     a[i]=(ll)pow(4,i)-n[i];
      |              ^~~
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << x<< endl;
      |   ^~~~
a.cc:19:15: error: 'endl' was not declared in this scope
   19 |   cout << x<< endl;
      |               ^~~~
Language: C++

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

ll dp(int n){
  if (n==0){return 1;}
  else if(n==1){return 4;}
  else if(n==2){return 16;}
  else if(n==3){return 61;}
  else{return dp(n-4)*256-dp(n-4)*3-dp(n-3)*3;}
}

int main(){
  int N;cin>>N;
  ll x=dp(N);
  cout << x<< endl;
  return 0;
}

Compiler output:
a.cc:6:1: error: expected ',' or ';' before 'll'
    6 | ll dp(int n){
      | ^~
a.cc: In function 'int main()':
a.cc:16:8: error: 'dp' was not declared in this scope; did you mean 'dup'?
   16 |   ll x=dp(N);
      |        ^~
      |        dup
Language: Java

import java.util.*;
public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String n = sc.nextInt();
		System.out.println((4^n-3*(n-2)-6*(n-3))%(10^9+7));
	}
}

Compiler output:
Main.java:5: error: incompatible types: int cannot be converted to String
		String n = sc.nextInt();
		                     ^
Main.java:6: error: bad operand types for binary operator '-'
		System.out.println((4^n-3*(n-2)-6*(n-3))%(10^9+7));
		                            ^
  first type:  String
  second type: int
Main.java:6: error: bad operand types for binary operator '-'
		System.out.println((4^n-3*(n-2)-6*(n-3))%(10^9+7));
		                                    ^
  first type:  String
  second type: int
3 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String n = sc.nextInt();
		System.out.println((4^n-3*(n-2)-6*(n-3))%(10^9+7));
		}
	}
}

Compiler output:
Main.java:9: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.util.*;
public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String n = sc.nextInt();
		System.out.println((4^n-3(n-2)-6(n-3))/(10^9+7));
		}
	}
}

Compiler output:
Main.java:6: error: ')' expected
		System.out.println((4^n-3(n-2)-6(n-3))/(10^9+7));
		                         ^
Main.java:6: error: not a statement
		System.out.println((4^n-3(n-2)-6(n-3))/(10^9+7));
		                           ^
Main.java:6: error: ';' expected
		System.out.println((4^n-3(n-2)-6(n-3))/(10^9+7));
		                             ^
Main.java:6: error: not a statement
		System.out.println((4^n-3(n-2)-6(n-3))/(10^9+7));
		                                  ^
Main.java:6: error: ';' expected
		System.out.println((4^n-3(n-2)-6(n-3))/(10^9+7));
		                                    ^
Main.java:9: error: class, interface, enum, or record expected
}
^
6 errors
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define a 0
#define c 1
#define g 2
#define t 3

int main(){
	int N,i,j,k;
	scanf("%d",&N);

	long long ans,memo[101][4][4][4]={0};
	
	for(i=0;i<4;i++){
		for(j=0;j<4;j++){
			for(k=0;k<4;k++){
				memo[3][i][j][k]=1
			}
		}
	}
	memo[3][a][g][c]=0;
	memo[3][a][c][g]=0;
	memo[3][g][a][c]=0;

	for(i=3;i<N;i++){
		for(j=0;j<4;j++){
			for(k=0;k<4;k++){
				for(l=0;l<4;l++){
					for(m=0;m<4;m++){
						if(k==a && l==g && m==c)continue;
						if(k==a && l==c && m==g)continue;
						if(k==g && l==a && m==c)continue;
						if(j==a && k==g && m==c)continue;
						if(j==a && l==g && m==c)continue;

						memo[i+1][k][l][m]+=memo[i][j][k][l];
					}
				}
			}
		}
	}

	for(i=0;i<4;i++){
		for(j=0;j<4;j++){
			for(k=0;k<4;k++){
				ans+=memo[N][i][j][k];
			}
		}
	}

	printf("%lld\n",ans/1000000007);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:51: error: expected ';' before '}' token
   19 |                                 memo[3][i][j][k]=1
      |                                                   ^
      |                                                   ;
   20 |                         }
      |                         ~                          
main.c:30:37: error: 'l' undeclared (first use in this function)
   30 |                                 for(l=0;l<4;l++){
      |                                     ^
main.c:30:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:45: error: 'm' undeclared (first use in this function)
   31 |                                         for(m=0;m<4;m++){
      |                                             ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int dp[101][4][4][4],n;
int main() {
    cin >> n;
    dp[0][3][3][3] = 1;
    for (int len = 0; len < n; len++) {
        for (int c1 = 0; c1 < 4; c1++) {
            for (int c2 = 0; c2 < 4; c2++) {
                for (int c3 = 0; c3 < 4; c3++) {
                    if (dp[len][c1][c2][c3] == 0) continue;
                    for (int a = 0; a < 4; a++) {
                        if (a == 2 && c1 == 1 && c2 == 0) continue;
                        if (a == 2 && c1 == 0 && c2 == 1) continue;
                        if (a == 1 && c1 == 2 && c2 == 0) continue;
                        if (a == 2 && c1 == 1 && c3 == 0) continue;
                        if (a == 2 && c2 == 1 && c3 == 0) continue;

                        dp[len + 1][a][c1][c2] += dp[len][c1][c2][c3];
                        dp[len + 1][a][c1][c2] %= mod;
                    }
                }
            }
        }
    }

    int ans = 0;
    for (int c1 = 0; c1 < 4; c1++) {
        for (int c2 = 0; c2 < 4; c2++) {
            for (int c3 = 0; c3 < 4; c3++) {
                ans += dp[N][c1][c2][c3];
                ans %= mod;
            }
        }
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:27: error: 'N' was not declared in this scope
   32 |                 ans += dp[N][c1][c2][c3];
      |                           ^
Language: C++

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

const int N = 100;
const int P = 1e9+7;

long long dp[N+1][4];

void update(long long& a, long long b) { a = (a+b)%P; }

int main()
{
  memset(dp, 0);
  dp[0][0] = 1;
  
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) for (int j = 0; j < 3; j++) {
    update(dp[i+1][0], dp[i][j]*3);
    update(dp[i+1][j+1], dp[i][j]);
  }
  
  long long res = 0;
  for (int i = 0; i < 3; i++) update(res, dp[n][i]);
  
  printf("%d\n", res);
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:9: error: too few arguments to function 'void* memset(void*, int, size_t)'
   15 |   memset(dp, 0);
      |   ~~~~~~^~~~~~~
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:3:
/usr/include/string.h:61:14: note: declared here
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |              ^~~~~~
Language: C++

#include<stdio.h>
#include<algorithm>
bool _123(int a,int b,int c){
    return (a==1&&b==2&&c==3);
}
const int MOD=1e9+7;
int main(){
    int N;scanf("%d",&N);
    int dp[N][4][4][4];
    memset(dp,0,sizeof(dp));
    dp[0][0][0][0]=1;
    int i,a,b,c,d;
    for(i=0;i<N;i++) for(a=0;a<4;a++) for(b=0;b<4;b++) for(c=0;c<4;c++) for(d=0;d<4;d++){
        if(_123(a,b,c)||_123(a,c,d)||_123(a,b,d)||_123(b,c,d)) continue;
        if(_123(c,b,d)||_123(b,d,c)) continue;
        (dp[i+1][b][c][d]+=dp[i][a][b][c])%=MOD;
    }
    int ans=0;
    for(a=0;a<4;a++) for(b=0;b<4;b++) for(c=0;c<4;c++) (ans+=dp[N][a][b][c])%=MOD;
    printf("%d",ans);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'memset' was not declared in this scope
   10 |     memset(dp,0,sizeof(dp));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<algorithm>
  +++ |+#include <cstring>
    3 | bool _123(int a,int b,int c){
Language: C

#include<stdio.h>
#include<algorithm>
bool _123(int a,int b,int c){
    return (a==1&&b==2&&c==3);
}
const int MOD=1e9+7;
int main(){
    int N;scanf("%d",&N);
    int dp[N][4][4][4];
    memset(dp,0,sizeof(dp));
    dp[0][0][0][0]=1;
    int i,a,b,c,d;
    for(i=0;i<N;i++) for(a=0;a<4;a++) for(b=0;b<4;b++) for(c=0;c<4;c++) for(d=0;d<4;d++){
        if(_123(a,b,c)||_123(a,c,d)||_123(a,b,d)||_123(b,c,d)) continue;
        if(_123(c,b,d)||_123(b,d,c)) continue;
        (dp[i+1][b][c][d]+=dp[i][a][b][c])%=MOD;
    }
    int ans=0;
    for(a=0;a<4;a++) for(b=0;b<4;b++) for(c=0;c<4;c++) (ans+=dp[N][a][b][c])%=MOD;
    printf("%d",ans);
    return 0;
}


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

#include<cstdio>
#include<algorithm>
bool _123(int a,int b,int c){
    return (a==1&&b==2&&c==3);
}
const int MOD=1e9+7;
int main(){
    int N;scanf("%d",&N);
    int dp[N][4][4][4];
    memset(dp,0,sizeof(dp));
    dp[0][0][0][0]=1;
    int i,a,b,c,d;
    for(i=0;i<N;i++) for(a=0;a<4;a++) for(b=0;b<4;b++) for(c=0;c<4;c++) for(d=0;d<4;d++){
        if(_123(a,b,c)||_123(a,c,d)||_123(a,b,d)||_123(b,c,d)) continue;
        if(_123(c,b,d)||_123(b,d,c)) continue;
        (dp[i+1][b][c][d]+=dp[i][a][b][c])%=MOD;
    }
    int ans=0;
    for(a=0;a<4;a++) for(b=0;b<4;b++) for(c=0;c<4;c++) (ans+=dp[N][a][b][c])%=MOD;
    printf("%d",ans);
    return 0;
}


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

/*
 * author: Tran Minh Khoa
 * Ho Chi Minh University of Science
 */

#include <bits/stdc++.h>

using namespace std;

const int inf = (int) 1e9 + 7;
const long long INF = (long long) 1e18 + 7;

const int N = 123456;
const int M = 1010;
const int MOD = 1e9 + 7;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define sz(a) (int) a.size()
#define all(a) a.begin(), a.end()
#define sqrt(x) (x) * (x)

#define REP(i, a, b) for (int i = (a); i < (b); i++)
#define DEBUG(x) cerr << #x << " = " << x << '\n';
#define PR(x, a, b) { cerr << #x << " = "; REP(i, a, b) cerr << x[i] << ' '; cerr << '\n'; }

#define x1 gg1
#define x2 wp1
#define x3 ggwp1


long long dp[M][5][5][5];

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr); cout.tie(nullptr);

  int n;
  cin >> n;
  
  const int A = 0, G = 1, C = 2, T = 3;
  memset(dp, 0, sizeof dp);
  
  
  for (int x1 = 0; x1 < 4; x1++) {
    for (int x2 = 0; x2 < 4; x2++) {
      for (int x3 = 0; x3 < 4; x3++) {
        if (x1 == A && x2 == G && x3 == C) continue;
        if (x1 == A && x2 == C && x3 == G) continue;
        if (x1 == G && x2 == A && x3 == C) continue;
        dp[3][x1][x2][x3] = 1;
      }
    }
  }
  
  for(int i = 0; i < 4; i++) {
    for(int j = 0; j < 4; j++) {
      for(int k = 0; k < 4; k++) {
        if(isValid(i, j, k) && isValid(j, i, k) && isValid(i, k, j)) {
          dp[3][i][j][k] = 1;
        }
      }
    }
  } 

  for (int i = 4; i <= n; i++) {
    for (int x2 = 0; x2 < 4; x2++) {
      for (int x3 = 0; x3 < 4; x3++) {
        for (int x4 = 0; x4 < 4; x4++) {
          for (int x1 = 0; x1 < 4; x1++) {
            if (x1 == A && x3 == G && x4 == C) continue;
            if (x1 == A && x2 == G && x3 == C) continue;
            if (x2 == A && x3 == G && x4 == C) continue;
            if (x3 == A && x2 == G && x4 == C) continue;
            if (x2 == A && x4 == G && x3 == C) continue;
            if (x1 == A && x2 == G && x4 == C) continue;
            dp[i][x2][x3][x4] = (dp[i][x2][x3][x4] + dp[i - 1][x1][x2][x3]) % MOD;
          }
        }
      }
    }
  }


  long long result = 0;
  for (int x1 = 0; x1 < 4; x1++) {
    for (int x2 = 0; x2 < 4; x2++) {
      for (int x3 = 0; x3 < 4; x3++) {
        result = (result + dp[n][x1][x2][x3]) % MOD;
      }
    }
  }
  cout << result << '\n';
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:60:12: error: 'isValid' was not declared in this scope
   60 |         if(isValid(i, j, k) && isValid(j, i, k) && isValid(i, k, j)) {
      |            ^~~~~~~
Language: C++

N, MOD = int(input()), 10 ** 9 + 7
memo = [{} for i in range(N + 1)]


def ok(last4):
    for i in range(4):
        t = list(last4)
        if i >= 1:
            t[i - 1], t[i] = t[i], t[i - 1]
        if ''.join(t).count('AGC') >= 1:
            return False
    return True


def dfs(cur, last3):
    if last3 in memo[cur]:
        return memo[cur][last3]
    if cur == N:
        return 1
    ret = 0
    for c in 'ACGT':
        if ok(last3 + c):
            ret = (ret + dfs(cur + 1, last3[1:] + c)) % MOD
    memo[cur][last3] = ret
    return ret


print(dfs(0, 'TTT'))


Compiler output:
a.cc:10:12: error: empty character constant
   10 |         if ''.join(t).count('AGC') >= 1:
      |            ^~
a.cc:10:29: warning: multi-character character constant [-Wmultichar]
   10 |         if ''.join(t).count('AGC') >= 1:
      |                             ^~~~~
a.cc:21:14: warning: multi-character character constant [-Wmultichar]
   21 |     for c in 'ACGT':
      |              ^~~~~~
a.cc:28:14: warning: multi-character character constant [-Wmultichar]
   28 | print(dfs(0, 'TTT'))
      |              ^~~~~
a.cc:1:1: error: 'N' does not name a type
    1 | N, MOD = int(input()), 10 ** 9 + 7
      | ^
a.cc:2:12: error: expected unqualified-id before 'for'
    2 | memo = [{} for i in range(N + 1)]
      |            ^~~
Language: C++

#include<iostream>
using namespace std;
int dp[101][4][4][4];

int main(){
  int N;
  cin>>N;
  dp[0][3][3][3] = 1;
  
  for(int len = 0; len < N; i++){
    for(int i = 0; i < 4; i++){
      for(int j = 0; j < 4; j++){
        for(int k = 0; k < 4; k++){
          if(dp[len][i][j][k] == 0)continue;
          
          for(int a = 0; a < 4; a++){
            if(a == 2 and i == 1 and j == 0)continue;
             if(a == 2 and i == 0 and j == 1)continue;
             if(a == 1 and i == 2 and j == 0)continue;
             if(a == 2 and i == 1 and k == 0)continue;
             if(a == 2 and j == 1 and k == 0)continue;
            
            dp[len + 1][a][i][j] += dp[len][i][j][k];
            dp[len + 1][a][i][j] %= 100000007;
          }
        }
      }
    }
  }
  int ans = 0;
   for(int i = 0; i < 4; i++){
      for(int j = 0; j < 4; j++){
        for(int k = 0; k < 4; k++){
          ans += dp[N][i][j][k];
          ans %= 100000007;
        }
      }
   }
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:29: error: 'i' was not declared in this scope
   10 |   for(int len = 0; len < N; i++){
      |                             ^
Language: C++

#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
#include <set>
#include <cassert>
using namespace std;
#define MOD 1000000007
int dp[110][5][5][5][5];




long long count(int n,int a,int b,int c,int d) {
	if (dp[n][a][b][c][d] != -1)return dp[n][a][b][c][d];

	long long temp = 0;
	

	
	if ((b==0&&c == 2 && d == 3)|| (b == 3 && c == 0 && d == 2)||(b==0&&c==3&&d==2)) {
		dp[n][a][b][c][d] = 0;
		return 0;
	}
	else if ((a == 0 && c == 3 && d == 2) || (a == 0 && b == 3 && d == 2)) {
		dp[n][a][b][c][d] = 0;
		return 0;
	}
	if (n == 1)return 1;
	for (int i = 0; i < 4; i++) {
		temp += count(n - 1, b, c, d, i);
	}

	dp[n][a][b][c][d] = temp % MOD;
	return dp[n][a][b][c][d];

	


}


int main() {
	int n;
	cin >> n;
	int ans;
	memset(dp, -1, sizeof(dp));
	ans = count(n+1, 4, 4, 4, 4);
	cout << ans;
	


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:9: error: 'memset' was not declared in this scope
   47 |         memset(dp, -1, sizeof(dp));
      |         ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <cassert>
  +++ |+#include <cstring>
    7 | using namespace std;
Language: C++

#include <iostream>
#include<vector>
#include<algorithm>
#include<string>
using namespace std;
#define MOD 1000000007
int dp[110][5][5][5][5];




long long count(int n,int a,int b,int c,int d) {
	if (dp[n][a][b][c][d] != -1)return dp[n][a][b][c][d];

	long long temp = 0;
	

	
	if ((b==0&&c == 2 && d == 3)|| (b == 3 && c == 0 && d == 2)||(b==0&&c==3&&d==2)) {
		dp[n][a][b][c][d] = 0;
		return 0;
	}
	else if ((a == 0 && c == 3 && d == 2) || (a == 0 && b == 3 && d == 2)) {
		dp[n][a][b][c][d] = 0;
		return 0;
	}
	if (n == 1)return 1;
	for (int i = 0; i < 4; i++) {
		temp += count(n - 1, b, c, d, i);
	}

	dp[n][a][b][c][d] = temp % MOD;
	return dp[n][a][b][c][d];

	


}


int main() {
	int n;
	cin >> n;
	int ans;
	memset(dp, -1, sizeof(dp));
	ans = count(n+1, 4, 4, 4, 4);
	cout << ans;
	


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: 'memset' was not declared in this scope
   45 |         memset(dp, -1, sizeof(dp));
      |         ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<algorithm>
  +++ |+#include <cstring>
    4 | #include<string>
Language: C++

#include <iostream>
using namespace std;

const long mod = 1e9 + 7;
int N;
long dp[110][6][6][6][6];

long find(int now, int back1, int back2, int back3, int back4) {
  if (dp[now][back1][back2][back3][back4] != -1) {
    return dp[now][back1][back2][back3][back4];
  }
  if (back2==0 and back3==1 and back4==2) {
    return 0;
  }
  if (back2==0 and back3==2 and back4==1) {
    return 0;
  }
  if (back2==1 and back3==0 and back4==2) {
    return 0;
  }
  if (back1==0 and back3==1 and back4==2) {
    return 0;
  }
  if (back1==0 and back2==1 and back4==2) {
    return 0;
  }

  if (now == N) {
    return 1;
  }
  long ans = 0;
  for (int i = 0; i < 4; i++) {
    ans += find(now+1, back2, back3, back4, i);
  }
  return dp[now][back1][back2][back3][back4] = ans % mod;
}

int main() {
  cin >> N;
  memset(dp, -1, sizeof(dp));
  cout << find(0, 4, 4, 4, 4) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:3: error: 'memset' was not declared in this scope
   40 |   memset(dp, -1, sizeof(dp));
      |   ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include<iostream>
using namespace std;
const int INF = 1000000007;
int main () {
  int N;
  cin >> N;
  int A[4][101];
  //A[i][j] -> j文字目がi(０ = A, 1 = G, 2 = C, 3 = T)の時の並べ方
  for (int i = 0; i < 4; i ++) {
    A[i][1] = 1;
    A[i][2] = 4;
  }
  int B[101];
  B[1] = 4;
  B[2] = 16;
  for (int i = 3; i <= N; i ++) {
    A[0][i] = B[i - 1] % INF;
    A[1][i] = (B[i - 1] - A[0][i - 2]) % INF;
    A[2][i] = (B[i - 1] - A[1][i - 2] - A[0][i - 3] * 7) % INF;
    A[3][i] = B[i - 1] % INF;
    B[i] = (A[0] + A[1] + A[2] + A[3]) % INF;
  }
  cout << B[N] << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:21:18: error: invalid operands of types 'int [101]' and 'int [101]' to binary 'operator+'
   21 |     B[i] = (A[0] + A[1] + A[2] + A[3]) % INF;
      |             ~~~~ ^ ~~~~
      |                |      |
      |                |      int [101]
      |                int [101]
Language: C++

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

const int INF = 0x3f3f3f3f;
typedef long long ll;

const int maxn = 110;

int N;

vector<unordered_map<string, ll>> memo(maxn);

bool check(string last4) {
    for (int i = 0; i < 3; ++i) {
        swap(last4[i], last4[i + 1]);
        if (last4.find("AGC") != string::npos) {
            return false;
        }
    }
    return true;
}

ll dfs(int cur, string last3) {
    if (memo[cur].count(last3)) {
        return memp[cur][last3];
    }
    if (cur == N) {
        return 1;
    }
    ll ret = 0;
    for (char c : "ACGT") {
        if (check(last3 + c)) {
            ret = (ret + dfs(cur + 1, last3.substr(1) + c)) % MOD;
        }
    }
    return memo[cur][last3] = ret;
}

int main() {
    cin >> N;
    cout << dfs(0, "TTT") << endl;
    return 0;
}

Compiler output:
a.cc: In function 'll dfs(int, std::string)':
a.cc:25:16: error: 'memp' was not declared in this scope; did you mean 'memo'?
   25 |         return memp[cur][last3];
      |                ^~~~
      |                memo
a.cc:33:63: error: 'MOD' was not declared in this scope
   33 |             ret = (ret + dfs(cur + 1, last3.substr(1) + c)) % MOD;
      |                                                               ^~~
Language: C++

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

const int INF = 0x3f3f3f3f;
typedef long long ll;

const int maxn = 110;

int N;

vector<unordered_map<string, ll>> memo(maxn);

bool check(string last4) {
    for (int i = 0; i < 3; ++i) {
        swap(last4[i], last4[i + 1]);
        if (last4.find("AGC") != string::npos) {
            return false;
        }
    }
    return true;
}

ll dfs(int cur, string last3) {
    if (memo[cur].count(last3)) {
        return memp[cur][last3];
    }
    if (cur == N) {
        return 1;
    }
    ll ret = 0;
    for (char &c : "ACGT") {
        if (check(last3 + c)) {
            ret = (ret + dfs(cur + 1, last3.substr(1) + c)) % MOD;
        }
    }
    return memo[cur][last3] = ret;
}

int main() {
    cin >> N;
    cout << dfs(0, "TTT") << endl;
    return 0;
}

Compiler output:
a.cc: In function 'll dfs(int, std::string)':
a.cc:25:16: error: 'memp' was not declared in this scope; did you mean 'memo'?
   25 |         return memp[cur][last3];
      |                ^~~~
      |                memo
a.cc:31:20: error: binding reference of type 'char&' to 'const char' discards qualifiers
   31 |     for (char &c : "ACGT") {
      |                    ^~~~~~
a.cc:33:63: error: 'MOD' was not declared in this scope
   33 |             ret = (ret + dfs(cur + 1, last3.substr(1) + c)) % MOD;
      |                                                               ^~~
Language: C++

#!bin/python3
from sys import exit
def check(a, b, c):
	d = a + b + c;
	off = ['ACG', 'AGC', 'GAC']
	if d in off:
		return False
	else:
		return True


n = int(input())

base = 1000000007

c = ['A', 'C', 'G', 'T']
pre = {}
cur = {}
for ch1 in c:
	for ch2 in c:
		for ch3 in c:
			if check (ch1, ch2, ch3):
				pre[ch1 + ch2 + ch3] = 1
for i in range(4, n+1):
	for s in pre.keys():
		for ch in c:
			st = s + ch
			if check(st[1], st[2], st[3]) and st[0] + st[2] + st[3] != 'AGC' and st[0] + st[1] + st[3] != 'AGC':
				key = st[1] + st[2] + st[3]
				if key in cur:
					tmp = cur[st[1] + st[2] + st[3]]
					tmp = (tmp + pre[s]) % base
					cur[st[1] + st[2] + st[3]] = tmp
				else:
					cur[key] = pre[s] 
				#cur[st[1] + st[2] + st[3]] += pre[s]
	pre = cur
	cur = {} 

res = 0
for num in pre.values():
	res = (res + num) % base 

print(res)

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!bin/python3
      |  ^
a.cc:5:16: warning: multi-character character constant [-Wmultichar]
    5 |         off = ['ACG', 'AGC', 'GAC']
      |                ^~~~~
a.cc:5:23: warning: multi-character character constant [-Wmultichar]
    5 |         off = ['ACG', 'AGC', 'GAC']
      |                       ^~~~~
a.cc:5:30: warning: multi-character character constant [-Wmultichar]
    5 |         off = ['ACG', 'AGC', 'GAC']
      |                              ^~~~~
a.cc:28:84: warning: multi-character character constant [-Wmultichar]
   28 |                         if check(st[1], st[2], st[3]) and st[0] + st[2] + st[3] != 'AGC' and st[0] + st[1] + st[3] != 'AGC':
      |                                                                                    ^~~~~
a.cc:28:119: warning: multi-character character constant [-Wmultichar]
   28 |                         if check(st[1], st[2], st[3]) and st[0] + st[2] + st[3] != 'AGC' and st[0] + st[1] + st[3] != 'AGC':
      |                                                                                                                       ^~~~~
a.cc:36:34: error: invalid preprocessing directive #cur
   36 |                                 #cur[st[1] + st[2] + st[3]] += pre[s]
      |                                  ^~~
a.cc:2:1: error: 'from' does not name a type
    2 | from sys import exit
      | ^~~~
a.cc:5:9: error: 'off' does not name a type
    5 |         off = ['ACG', 'AGC', 'GAC']
      |         ^~~
a.cc:18:1: error: 'cur' does not name a type
   18 | cur = {}
      | ^~~
a.cc:19:1: error: expected unqualified-id before 'for'
   19 | for ch1 in c:
      | ^~~
a.cc:40:1: error: 'res' does not name a type
   40 | res = 0
      | ^~~
Language: Java

import java.io.*;

public class test {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
        int[] arr = {61,230,865,3247,12185,45719,171531,643550,2414454,9058467,33985227,127504505,478366600,794717734,733354121,261943303,776803305,580025381,51688048,44657419,737209731,604119499,159693437,858533109,639056669,549054109,996291083,531294469,23314687,783022045,855462856,649970414,68697295,409213624,604356692,88638656,978442997,534833116,763737161,785892908,123883652,639213333,181836645,998121103,124885216,501575626,39816123,113468411,799008836,775465589,256852905,664630886,971550783,751629411,51018086,702530485,725438992,696683714,792638194,221791721,149602322,414054379,986519078,981760191,305799096,515140586,406959393,975058685,245601370,324759692,673385295,191483611,570246669,427196161,781042769,569725155,842176273,25328739,847501730,206282374,353770801,323137024,371653459,940737264,123820509,915711339,847205021,252858375,718889563,866398347,738390145,133009077,333099663,170591295,329869205,616680192,597534442,388130742};
        int N = Integer.parseInt(br.readLine())-3;
        out.write(String.valueOf(arr[N]));
        out.flush();
    }
}


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