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

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


int dp[101][4][4][4];

int main() {
  int N; 
  cin>>N;
  
  dp[0][0][0][0]=1;
  
  for (int n = 0; n < N; ++n) {
        for (int i = 0; i < 5; ++i) {
            for (int j = 0; j < 5; ++j) {
                 for (int k = 0; k < 5; ++k) {
                     for (int l = 1; l < 5; ++l) {
                       
                       if (i == 1 && j == 2 && l == 3) continue;
                         if (i == 1 && k == 2 && l == 3) continue;
                         if (j == 1 && k == 2 && l == 3) continue;
                         if (j == 2 && k == 1 && l == 3) continue;
                         if (j == 1 && k == 3 && l == 2) continue;
                       
            dp[N+1][i][j][k] += dp[N][i][j][k];
                         
            dp[N+1][i][j][k] %= 1000000007;
          }
        }
      }
    }
  }
  long long  ans=0;
  
  rep(int i=0;i<4;i++){
    rep(int j=0;j<4;j++) {
      rep(int k=0;k<4;k++) {
        ans+= dp[n][i][j][k];
        ans%= 1000000007;
      }
    }
    
  }
  
  cout<<ans<<endl;
 
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:7: error: expected primary-expression before 'int'
   35 |   rep(int i=0;i<4;i++){
      |       ^~~
a.cc:35:15: error: 'i' was not declared in this scope
   35 |   rep(int i=0;i<4;i++){
      |               ^
Language: C++

#include "stdafx.h"
#include <iostream>
#include <set>
#include <queue>
#include <vector>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <string>
#include <cstring>
#include <functional>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
#include <tuple>
#include <numeric>

using namespace std;

/*-----------------------------------------------------------------------------
　定義
 -------------------------------------------------------------------------------*/
#define REP(i, n)				for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n)			for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define INF						2e9
#define MOD						(1000 * 1000 * 1000 + 7)
#define Ceil(x, n)				(((((x))+((n)-1))/n))		/* Nの倍数に切り上げ割り算 */
#define CeilN(x, n)				(((((x))+((n)-1))/n)*n)		/* Nの倍数に切り上げ */
#define FloorN(x, n)			((x)-(x)%(n))				/* Nの倍数に切り下げ */
#define IsOdd(x)				(((x)&0x01UL) == 0x01UL)			
#define IsEven(x)				(!IsOdd((x)))						
#define	BitSetV(Val,Bit)		((Val) |= (Bit))			
#define	BitTstV(Val,Bit)		((Val) & (Bit))				
#define ArrayLength(x)			(sizeof( x ) / sizeof( x[ 0 ]))
#define MAX_DWORD				(0xFFFFFFFF)
#define	MAX_SDWORD				((SDWORD)0x7FFFFFFF)
#define	MIN_SDWORD				((SDWORD)0x80000000)
#define	MAX_QWORD				((QWORD)0xFFFFFFFFFFFFFFFF)
#define	MIN_QWORD				((QWORD)0x0000000000000000)
#define	MAX_SQWORD				((SQWORD)0x7FFFFFFFFFFFFFFF)
#define	MIN_SQWORD				((SQWORD)0x8000000000000000)
#define M_PI					3.14159265358979323846

typedef long					SDWORD;
typedef long long				SQWORD;
typedef unsigned long			DWORD;
typedef unsigned long long int	QWORD;
typedef pair<int, int>			P;

/*-----------------------------------------------------------------------------
　処理
 -------------------------------------------------------------------------------*/
#define N_MAX	(200 * 1000)
#define K_MAX	(10)
#define M_MAX	(10)
#define H_MAX	(1000)
#define W_MAX	(1000)

int main()
{
	int N;
	const int A = 0;
	const int G = 1;
	const int C = 2;
	const int T = 3;
	
	cin >> N;
	static int dp[101][4][4][4];
	dp[0][0][0][0] = 1;	// [0文字][1文字前][2文字前][3文字前]

	REP(n, N) {
		REP(i, 4) {
			REP(j, 4) {
				REP(k, 4) {
					REP(l, 4) {
						if ((k == A) && (j == C) && (i == G) ||
							(k == A) && (j == G) && (i == C) ||
							(k == G) && (j == A) && (i == C) ||
							(l == A) && (j == G) && (i == C) ||
							(l == A) && (k == G) && (i == C)) {
							continue;
						}
						dp[n + 1][i][j][k] = dp[n][i][j][k] + dp[n][j][k][l];
						dp[n + 1][i][j][k] %= MOD;
					}
				}
			}
		}
	}

	int ans = 0;
	REP(i, 4) {
		REP(j, 4) {
			REP(k, 4) {
				ans += dp[N][i][j][k];
				ans %= MOD;
 			}
		}
	}

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



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

#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <algorithm> // sort
#include <map> // sort

#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;

//(AGCも含めてはならない??

//隣接する2文字を入れ替えて AGCとなるパターン
//AGC, ACG, GAC, A?GC, AG?C  
//0: 何でも, 1: A, 2: G, 3: C, 4:T
//AGC (123)
//ACG (132)
//GAC (312)
//A?GC (1023)
//AG?C (1203)

//3文字前までのdp

//多次元 vector 生成
template<class T>
vector<T> make_vec(size_t a){
    return vector<T>(a);
}
template<class T, class... Ts>
auto make_vec(size_t a, Ts... ts){
  return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}

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

    auto dp = make_vec(N+1,5,5,5);

    //dp[i][3文字前][2文字前][1文字前]
    //dp[i+1][2文字前][1文字前][今回の]
    
    dp[0][0][0][0] = 1;
    for(int s = 0; s < N; ++s)
    {
        for(int i = 0; i < 5; ++i){
            for(int j = 0; j < 5; ++j){
                for(int k = 0; k < 5 ++k){
                    for(int l = 1; l < 5; ++l){

                        if(i == 1 && j == 2 && k == 3)continue;
                        if(i == 1 && k == 2 && l == 3)continue;
                        if(j == 1 && k == 2 && l == 3)continue;
                        if(j == 2 && k == 1 && l == 3)continue;
                        if(j == 1 && k == 3 && l == 2)continue;

                        dp[s+1][j][k][l] = dp[s][i][j][k];
                        dp[s+1][j][k][l] %= MOD;

                    }
                }
            }
        }
    }

    //nのやつ足す
    ll res = 0;
    for(int i = 0; i < 5; ++i){
        for(int j = 0; j < 5; ++j){
            for(int k = 0; k < 5 ++k){
                res += dp[n][i][j][k];
                res %= MOD;
            }
        }
    }

    cout << res << endl;



    return 0;    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:41:24: error: 'N' was not declared in this scope
   41 |     auto dp = make_vec(N+1,5,5,5);
      |                        ^
a.cc:51:36: error: lvalue required as increment operand
   51 |                 for(int k = 0; k < 5 ++k){
      |                                    ^
a.cc:51:40: error: expected ';' before 'k'
   51 |                 for(int k = 0; k < 5 ++k){
      |                                        ^
      |                                        ;
a.cc:73:32: error: lvalue required as increment operand
   73 |             for(int k = 0; k < 5 ++k){
      |                                ^
a.cc:73:36: error: expected ';' before 'k'
   73 |             for(int k = 0; k < 5 ++k){
      |                                    ^
      |                                    ;
Language: C++

#ifdef _DEBUG
#include "MyLib.h"
#else
#define main_D main
#include "bits/stdc++.h" 
#include <regex>
#define _USE_MATH_DEFINES
#include <math.h>
#define FOR(i,s,e) for (int i = int(s); i < int(e); ++i)
#define REP(i,e) FOR(i,0,e)
#define INF (INT_MAX/2)
#define EPS (1.0e-8)
#define LINF (LLONG_MAX/2)
const int MGN = 10;
const int ARY_SZ_MAX = 10000000;
using namespace std;
using ll = long long; using ull = unsigned long long;
using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>;
using vb = vector<bool>; using vvb = vector<vb>; using vvvb = vector<vvb>;
using vl = vector<ll>; using vvl = vector<vl>;
using vd = vector<double>; using vs = vector<string>;
using pii = pair<int, int>; using pll = pair<ll, ll>;
using psi = pair<string, int>;
// functions

#endif 

const ll MOD = 1e9 + 7;
string C[4] = { "A","G","C","T" };
int N;
//ll ans = 0;
vector<map<string, ll>> dp;
ll dfs(int n, int i, string res) {
    if (n>=3) {
        string s = res.substr(n-3,3);
        if (s == "AGC" || s == "GAC" || s == "ACG") {
            return 0;
        }
    }
    if (n>=4) {
        string s = res.substr(n-4,4);
        if ((s[0] == 'A' && s[2] == 'G' && s[3]=='C') ||
            (s[0] == 'A' && s[1] == 'G' && s[3]=='C')) {
            return 0;
        }
    }


    if (n >= N) {
        //ans += 1;
        //ans %= MOD;
        return 1;
    }

    if (n>=4) {
        string s = res.substr(n-4,4);
        if (dp[n].count(s) > 0) return dp[n][s];
    }

    ll ret = 0;
    for(int j=0; j<4; j++) {
        ret += dfs(n + 1, j, res+C[j]);
        ret %= MOD;
    }

    if (n>=4) {
        string s = res.substr(n-4,4);
        dp[n][s] = ret;
    }

    return ret;
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

const ll MOD = 1e9 + 7;
const int N = (1e2) + 5;
int memo[N][4][4][4];

int DP(int n, int c, int b, int a) {
  if (n == 3) return 1;
  int& ret = memo[n][c][b][a];
  if (ret != -1) return ret;
  ret = 0;
  for (int i = 0; i < 4; ++i) {
    if (i == 0 and b == 2 and a == 1) continue;
    if (i == 0 and c == 2 and a == 1) continue;
    if (i == 0 and c == 2 and b == 1) continue;
    if (i == 2 and c == 0 and b == 1) continue;
    if (i == 0 and c == 1 and b == 2) continue;
    ret += DP(n - 1, i, c, b);
    ret %= MOD;
  }
  return ret;
}

int main() { // claudio van
  int n; scanf("%d", &n);
  memset(memo, -1, sizeof memo);
  /*int ans = 0;
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 4; ++j) {
      for (int k = 0; k < 4; ++k) {
        if (i == 0 and j == 2 and k == 1) continue;
        if (i == 0 and j == 1 and k == 2) continue;
        if (i == 2 and j == 0 and k == 1) continue;
        ans += DP(n, i, j, k);
        ans %= MOD;
      }
    }
  }
  */
  int ans = dp(n + 1, 3, 3, 3);
  printf("%d\n", ans);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:13: error: 'dp' was not declared in this scope; did you mean 'dup'?
   42 |   int ans = dp(n + 1, 3, 3, 3);
      |             ^~
      |             dup
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd_(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};


  
int main(){
  
  int n;
  cin>>n;
  //0:'A'
  //1:'C'
  //2:'G'
  //3:'T'
  long long dp[n+1][4][4][4]={};
  REP(i,4){
    REP(j,4){
      REP(k,4){
        if((i==0 && j==2 && k==1) || (i==2 && j==0 && k==1) || (i==0 && j==1 && k==2)){
          continue;
        }else{
          dp[4][i][j][k]=1;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:108:2: error: expected '}' at end of input
  108 | }
      |  ^
a.cc:102:15: note: to match this '{'
  102 |       REP(k,4){
      |               ^
a.cc:108:2: error: expected '}' at end of input
  108 | }
      |  ^
a.cc:101:13: note: to match this '{'
  101 |     REP(j,4){
      |             ^
a.cc:108:2: error: expected '}' at end of input
  108 | }
      |  ^
a.cc:100:11: note: to match this '{'
  100 |   REP(i,4){
      |           ^
a.cc:108:2: error: expected '}' at end of input
  108 | }
      |  ^
a.cc:91:11: note: to match this '{'
   91 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <fstream>

using namespace std;

// AGC,ACG,GAC
long long int dp[101][4][4][4];
long long int MOD = 1e9 + 7;
string s = "ACGT";

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

	memset(dp, 0, sizeof(dp));

	for (int i = 0; i < 4; i++)
	{
		for (int j = 0; j < 4; j++)
		{
			for (int k = 0; k < 4; k++)
			{
				if (s[i] == 'A' && s[j] == 'C' && s[k] == 'G')
				{
					continue;
				}
				if (s[i] == 'A' && s[k] == 'C' && s[j] == 'G')
				{
					continue;
				}
				if (s[i] == 'G' && s[j] == 'A' && s[k] == 'C')
				{
					continue;
				}
				dp[3][i][j][k] = 1;
			}
		}
	}

	for (int i = 4; i <= 100; 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++)
					{
						if (s[b] == 'A' && s[c] == 'G' && s[d] == 'C')
						{
							continue;
						}
						if (s[b] == 'A' && s[c] == 'C' && s[d] == 'G')
						{
							continue;
						}
						if (s[b] == 'G' && s[c] == 'A' && s[d] == 'C')
						{
							continue;
						}
						if (s[a] == 'A' && s[b] == 'G' && s[d] == 'C')
						{
							continue;
						}
						if (s[a] == 'A' && s[c] == 'G' && s[d] == 'C')
						{
							continue;
						}
						dp[i][b][c][d] = (dp[i][b][c][d] % MOD) + (dp[i - 1][a][b][c] % MOD);
						dp[i][b][c][d] %= MOD;
					}
				}
			}
		}
	}

	long long int res = 0;
	int n;

	cin >> n;

	for (int i = 0; i < 4; i++)
	{
		for (int j = 0; j < 4; j++)
		{
			for (int k = 0; k < 4; k++)
			{
				res = (res%MOD) + (dp[n][i][j][k] % MOD);
				res %= MOD;
			}
		}
	}

	cout << res << '\n';

	return 0;
}


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

#include <iostream>
#include <map>
#include <vector>

using namespace std;
typedef long long ll;
const int MOD = 1e9 + 7;

int n;
ll dp[110][64]; // [i][j] # of valid string when we read till ith character and
                // last 3 characters are j.
vector<string> candidate = {"A", "C", "G", "T"};
vector<string> invalid = {"AGC", "ACG", "GAC"};

bool valid(string pre, string tmp) {
  return find(invalid.begin(), invalid.end(), tmp) == invalid.end() &&
         pre + tmp.substr(1, 2) != "AGC" &&
         pre + tmp.substr(0, 1) + tmp.substr(2, 1) != "AGC";
}

void solve() {
  map<string, int> m;
  int index = 0;
  for (auto c1 : candidate) {
    for (auto c2 : candidate) {
      for (auto c3 : candidate) {
        string tmp = c1 + c2 + c3;
        if (valid("", tmp)) {
          dp[2][index] = 1;
        }
        m[tmp] = index++;
      }
    }
  }

  for (int i = 2; i < n; i++) {
    for (auto x : m) {
      for (auto c : candidate) {
        string tmp = x.first.substr(1, 2) + c;
        if (valid(x.first.substr(0, 1), tmp)) {
          dp[i + 1][m[tmp]] += dp[i][m[x.first]];
          dp[i + 1][m[tmp]] %= MOD;
        }
      }
    }
  }
  ll sum = 0;
  for (auto x : m) {
    sum = (sum + dp[n - 1][x.second]) % MOD;
  }
  cout << sum << endl;
}

int main() {
  cin >> n;
  solve();
}


Compiler output:
a.cc: In function 'bool valid(std::string, std::string)':
a.cc:16:14: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   16 |   return find(invalid.begin(), invalid.end(), tmp) == invalid.end() &&
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:16:14: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   16 |   return find(invalid.begin(), invalid.end(), tmp) == invalid.end() &&
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb pushback
#define fr(i,n) for(int i=0;i<n;i++)
#define ifr(i,n) for(int i=n-1;i>=0;i--)


int main() {
    int n;
    int x=1000000007
    cin >>n;
    long t[n];
    long a[n];
    long g[n];
    long c[n];
    long ag[n];
    long ac[n];
    long ga[n];
    t[0]=1;
    a[0]=1;
    g[0]=1;
    c[0]=1;
    fr(i,n-1){
      t[i+1]=(t[i]+a[i]+g[i]+c[i]+ag[i]+ac[i]+ga[i])%x;
      a[i+1]=(t[i]+a[i]+c[i]+ga[i]+ac[i])%x;
      g[i+1]=(t[i]+c[i]+g[i]+ag[i])%x;
      c[i+1]=(t[i]+g[i]+c[i]+ac[i])%x;
      ag[i+1]=(a[i]+ga[i])%x;
      ac[i+1]=(a[i])%x;
      ga[i+1]=(g[i]+ag[i])%x;
    }
   
      cout << (t[n-1)+a[n-1]+c[n-1]+g[n-1]+ag[n-1]+ac[n-1]+ga[n-1])%x << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: expected ',' or ';' before 'cin'
   12 |     cin >>n;
      |     ^~~
a.cc:34:21: error: expected ']' before ')' token
   34 |       cout << (t[n-1)+a[n-1]+c[n-1]+g[n-1]+ag[n-1]+ac[n-1]+ga[n-1])%x << endl;
      |                     ^
      |                     ]
a.cc:34:67: error: expected ';' before ')' token
   34 |       cout << (t[n-1)+a[n-1]+c[n-1]+g[n-1]+ag[n-1]+ac[n-1]+ga[n-1])%x << endl;
      |                                                                   ^
      |                                                                   ;
Language: C++

#include <bits/stdc++.h>
#include <string>

#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define pii pair<int,int>
#define ll long long
#define el '\n'

using namespace std;

const string c="ACGT";

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

    int n;
    cin >> n;

    map <string,ll> dp[n+1];
  //  string c="ACGT";

    for (int i=0;i<4;i++){
        for (int j=0;j<4;j++){
            string s=c[i]+c[j];
            dp[2][s]++;
        }
    }

    for (int id=3;id<=n;id++){
        for (int i=0;i<4;i++){
            for (int j=0;j<4;j++){
                for (int k=0;k<4;k++){
                    if (i!=j && k!=i && k!=j && (i!=3 && j!=3 && k!=3)) continue;
                    string st1=c[i]+c[j],st2=c[j]+c[k];
                    dp[id][st2]+=dp[id-1][st1];
                    dp[id][st2]%=MOD;
                }
            }
        }
    }

    ll tot=0;
    for (auto x : dp[n]){
        tot=(tot+x.se)%MOD;
    }

    cout << tot << el;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:26: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   30 |             string s=c[i]+c[j];
a.cc:40:36: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   40 |                     string st1=c[i]+c[j],st2=c[j]+c[k];
a.cc:40:50: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   40 |                     string st1=c[i]+c[j],st2=c[j]+c[k];
Language: C++

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

long An(int);//BAC
long Bn(int);//ACB
long Cn(int);//A?BC
long Dn(int);//AB?C

long ADn(int);//ABAC
long CDn(int);//ABBC

long Pn(int);//true

long An(int n) {
	if (n == 3) {
		return 4;
	}
	else if (n == 4) {
		return 15;
	}
	else {
		return Pn(n - 2) - Bn(n - 2);
	}
}

long Bn(int n) {
	if (n == 3) {
		return 3;
	}
	else if (n == 4) {
		return 15;
	}
	else {
		return Pn(n - 2) - An(n - 1);
	}
}

long Cn(int n) {
	if (n == 3) {
		return 3;
	}
	if (n == 4) {
		return 12;
	}
	else if (n == 5) {
		return 48;
	}
	else {
		return Pn(n - 3);
	}
}

long Dn(int n) {
	if (n == 3) {
		return 3;
	}
	if (n == 4) {
		return 12;
	}
	else if (n == 48) {
		return 15;
	}
	else {
		return Pn(n - 3);
	}
} 

long ADn(int n) {
	if (n == 3) {
		return 1;
	}
	if (n == 4) {
		return 4;
	}
	else if (n == 5) {
		return 16;
	}
	else {
		return Pn(n - 3);
	}
}

long CDn(int n) {
	if (n == 3) {
		return 1;
	}
	if (n == 4) {
		return 4;
	}
	else if (n == 5) {
		return 16;
	}
	else {
		return Pn(n - 3);
	}
}
long Pn(int n) {
	if (n == 3) {
		return 61;
	}
	else {
		return 4 * Pn(n - 1) - (An(n - 1) + Bn(n - 1) + Cn(n - 1) + Dn(n - 1) - ADn(n - 1) - CDn(n - 1) );
	}

}
void main() {
	int N;
	cin >> N;
	long count = Pn(N);
	long mod = count % 1000000007;
	cout << mod << endl;
}


Compiler output:
a.cc:106:1: error: '::main' must return 'int'
  106 | void main() {
      | ^~~~
Language: C++

#include"stdafx.h"
#include <iostream>
using namespace std;

long An(int);//BAC
long Bn(int);//ACB
long Cn(int);//A?BC
long Dn(int);//AB?C

long ADn(int);//ABAC
long CDn(int);//ABBC

long Pn(int);//true

long An(int n) {
	if (n == 3) {
		return 4;
	}
	else if (n == 4) {
		return 15;
	}
	else {
		return Pn(n - 2) - Bn(n - 2);
	}
}

long Bn(int n) {
	if (n == 3) {
		return 3;
	}
	else if (n == 4) {
		return 15;
	}
	else {
		return Pn(n - 2) - An(n - 1);
	}
}

long Cn(int n) {
	if (n == 3) {
		return 3;
	}
	if (n == 4) {
		return 12;
	}
	else if (n == 5) {
		return 48;
	}
	else {
		return Pn(n - 3);
	}
}

long Dn(int n) {
	if (n == 3) {
		return 3;
	}
	if (n == 4) {
		return 12;
	}
	else if (n == 48) {
		return 15;
	}
	else {
		return Pn(n - 3);
	}
} 

long ADn(int n) {
	if (n == 3) {
		return 1;
	}
	if (n == 4) {
		return 4;
	}
	else if (n == 5) {
		return 16;
	}
	else {
		return Pn(n - 3);
	}
}

long CDn(int n) {
	if (n == 3) {
		return 1;
	}
	if (n == 4) {
		return 4;
	}
	else if (n == 5) {
		return 16;
	}
	else {
		return Pn(n - 3);
	}
}
long Pn(int n) {
	if (n == 3) {
		return 61;
	}
	else {
		return 4 * Pn(n - 1) - (An(n - 1) + Bn(n - 1) + Cn(n - 1) + Dn(n - 1) - ADn(n - 1) - CDn(n - 1) );
	}

}
void main() {
	int N;
	cin >> N;
	long count = Pn(N);
	long mod = count % 1000000007;
	cout << mod << endl;
}


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

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

long An(int n) {
	if (n == 3) {
		return 63;
	}
	else  {
		return An(n - 1) * 3 + Bn(n);
	}
}

long Bn(int n) {
	if (n == 3) {
		return 15;
	}
	if (n == 4) {
		return 54;
	}
	if (n == 5) {
		return Bn(n - 1) + Bn(n - 2) * 3 + 116 ;
	}
	if (n == 6) {
		return Bn(n - 1) + An(n - 3) * 5 + Bn(n - 2) * 3 + Bn(n - 3) * 3 + 96;
	}
	else {
		return Bn(n - 1) + An(n - 3) * 5 + Bn(n - 2) * 3 + An(n - 4) * 6 + Bn(n - 3) * 3;
	}
}

}

main() {
	int N;
	cin >> N;
	long count = An(N);
	long mod = count % 1000000007;
	cout << mod << endl;
}


Compiler output:
a.cc: In function 'long int An(int)':
a.cc:9:40: error: 'Bn' was not declared in this scope; did you mean 'n'?
    9 |                 return An(n - 1) * 3 + Bn(n);
      |                                        ^~
      |                                        n
a.cc: At global scope:
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
a.cc:33:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   33 | main() {
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int ans, dp[128][4][4][4];
check(int a, int b, int c){
	return (a == 1 && b == 2 && c == 3);
}
int main(){
	int n;
	cin >> n;
	dp[0][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++){
						if(check(b, c, d) || check(c, b, d) || check(b, d, c))
							continue;
						if(check(a, c, d) || check(a, b, d))
							continue;
						dp[i + 1][b][c][d] += dp[i][a][b][c];
					}
	for(int a = 0; a < 4; a++)
		for(int b = 0; b < 4; b++)
			for(int c = 0; c < 4; c++){
				ans += dp[n][a][b][c];
				ans %= mod;
			}
	cout << ans;
}	

Compiler output:
a.cc:5:1: error: ISO C++ forbids declaration of 'check' with no type [-fpermissive]
    5 | check(int a, int b, int c){
      | ^~~~~
Language: Java

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author teiwa
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        static long dp;
        static long mod = 1000000007;

        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            dp = new long[N + 1][5][5][5][5];

            if (N == 3) {
                out.println(61);
                return;
            }

            long ans = 0;
            for (int i = 0; i < 4; i++) {
                for (int j = 0; j < 4; j++) {
                    for (int k = 0; k < 4; k++) {
                        for (int l = 0; l < 4; l++) {
                            ans += dp(N, i, j, k, l);
                        }
                    }
                }
            }
            out.println(ans % mod);
        }

        private long dp(int n, int i, int j, int k, int l) {
            if (isTarget(i, j, k, l)) {
                return 0;
            }
            if (n == 4) return 1;

            if (dp[n][i][j][k][l] != 0) {
                return dp[n][i][j][k][l];
            }

            long tmp = 0;
            for (int m = 0; m < 4; m++) {
                tmp += dp(n - 1, m, i, j, k);
            }

            tmp %= mod;

            return dp[n][i][j][k][l] = tmp;
        }

        private boolean isTarget(int i, int j, int k, int l) {
            if (i == 0 && j == 1 && k == 2) return true;
            if (i == 1 && j == 0 && k == 2) return true;
            if (i == 0 && j == 2 && k == 1) return true;
            if (i == 0 && k == 1 && l == 2) return true;
            if (i == 0 && j == 1 && l == 2) return true;
            if (j == 0 && k == 1 && l == 2) return true;
            if (j == 1 && k == 0 && l == 2) return true;
            if (j == 0 && k == 2 && l == 1) return true;
            return false;
        }

    }
}



Compiler output:
Main.java:30: error: incompatible types: long[][][][][] cannot be converted to long
            dp = new long[N + 1][5][5][5][5];
                 ^
Main.java:56: error: array required, but long found
            if (dp[n][i][j][k][l] != 0) {
                  ^
Main.java:57: error: array required, but long found
                return dp[n][i][j][k][l];
                         ^
Main.java:67: error: array required, but long found
            return dp[n][i][j][k][l] = tmp;
                     ^
4 errors
Language: C++

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

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

ll add(ll x, ll y) {return (x+y)%MOD;}
ll mlt(ll x, ll y){return (x*y)%MOD;}

bool prohibited(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(a==1&&b==2      &&d==3) return true;
  if(      b==2&&c==1&&d==3) return true;
  if(      b==1&&c==3&&d==2) return true;
  return false;
}

int main(){
  int N;cin>>N;
  ll dp[N+10][4*4*4*4][2];
  memset(dp, 0, sizeof(dp));

  dp[0][0][0]=1;

  for (int i=1;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*4*4+b*4*4+c*4+d;
            for (int e=0;e<4;++e){
              int bcde=b*4*4*4+c*4*4+d*4+e;
              if(prohibited(bcde)){
                dp[i][bcde][1]=add(dp[i][bcde][1], dp[i][abcd][0]);
                dp[i][bcde][1]=add(dp[i][bcde][1], dp[i][abcd][1]);
              }else{
                dp[i][bcde][0]=add(dp[i][bcde][0], dp[i][abcd][0]);
                dp[i][bcde][1]=add(dp[i][bcde][1], dp[i][abcd][1]);
              }
            }
          }
        }
      }
    }
  }

  ll ans=0;
  for (int i=0;i<256;++i){
    ans=add(ans, dp[N][i][0]);
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:34:28: error: too few arguments to function 'bool prohibited(int, int, int, int)'
   34 |               if(prohibited(bcde)){
      |                  ~~~~~~~~~~^~~~~~
a.cc:10:6: note: declared here
   10 | bool prohibited(int a, int b, int c, int d){
      |      ^~~~~~~~~~
Language: C++

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

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

ll add(ll x, ll y) {return (x+y)%MOD;}
ll mlt(ll x, ll y){return (x*y)%MOD;}

bool prohibited(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(a==1&&b==2      &&d==3) return true;
  if(      b==2&&c==1&&d==3) return true;
  if(      b==1&&c==3&&d==2) return true;
  return false;
}

int main(){
  int N;cin>>N;
  ll dp[N+10][4**4**4**4][2];
  memset(dp, 0, sizeof(dp));

  dp[0][0][0]=1;

  for (int i=1;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*4*4+b*4*4+c*4+d;
            for (int e=0;e<4;++e){
              int bcde=b*4*4*4+c*4*4+d*4+e;
              if(prohibited(bcde)){
                dp[i][bcde][1]=add(dp[i][bcde][1], dp[i][abcd][0]);
                dp[i][bcde][1]=add(dp[i][bcde][1], dp[i][abcd][1]);
              }else{
                dp[i][bcde][0]=add(dp[i][bcde][0], dp[i][abcd][0]);
                dp[i][bcde][1]=add(dp[i][bcde][1], dp[i][abcd][1]);
              }
            }
          }
        }
      }
    }
  }

  ll ans=0;
  for (int i=0;i<256;++i){
    ans=add(ans, dp[N][i][0]);
  }

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

Compiler output:
a.cc: In function 'int main()':
a.cc:21:17: error: invalid type argument of unary '*' (have 'int')
   21 |   ll dp[N+10][4**4**4**4][2];
      |                 ^~
a.cc:21:20: error: invalid type argument of unary '*' (have 'int')
   21 |   ll dp[N+10][4**4**4**4][2];
      |                    ^~
a.cc:21:23: error: invalid type argument of unary '*' (have 'int')
   21 |   ll dp[N+10][4**4**4**4][2];
      |                       ^~
a.cc:22:10: error: 'dp' was not declared in this scope; did you mean 'dup'?
   22 |   memset(dp, 0, sizeof(dp));
      |          ^~
      |          dup
a.cc:34:28: error: too few arguments to function 'bool prohibited(int, int, int, int)'
   34 |               if(prohibited(bcde)){
      |                  ~~~~~~~~~~^~~~~~
a.cc:10:6: note: declared here
   10 | bool prohibited(int a, int b, int c, int d){
      |      ^~~~~~~~~~
Language: C++

#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cstring>
#include<string>
#include<cmath>
#include<vector>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
using namespace std;
const int inf=2147483647,dx[]={-1,0,1,0},dy[]={0,-1,0,1};// 上 左 下 右
const int N=100005,M=1000005,mod=1000000007;
const long long llinf=9223372036854775807ll;
int n,ans;
int dp[105][4][4][4];
int main(){
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=4;j++)
			for(int k=1;k<=4;k++)
				for(int l=1;l<=4;l++)
					for(int int m=1;m<=4;m++)
					{
						if(k==0&&l==1&&m==2)
							continue;
						if(k==1&&m==0&&j==2)
							continue;
						if(k==0&&l==2&&m==1)
							continue;
						if(j==0&&k==1&&m==2)
							continue;
						if(j==0&&l==1&&m==2)
							continue;
						dp[i+1][k][l][m]+=dp[i][j][k][l];
					}
	}
	for(int i=1;i<=4;i++)
		for(int j=1;j<=4;j++)
			for(int k=1;k<=4;k++)
				ans+=dp[n][i][j][k];
	cout<<ans;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:45: error: two or more data types in declaration of 'm'
   25 |                                         for(int int m=1;m<=4;m++)
      |                                             ^~~
a.cc:25:57: error: 'm' was not declared in this scope
   25 |                                         for(int int m=1;m<=4;m++)
      |                                                         ^
Language: C++

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

//int dp[100][4][4][4];
//[s.size()+1]
int dp[101][4][4][4];

int main(){
    int n;
    scanf("%d", &n);
    //長さ０の文字列は1、Sは333と考えてもおｋだから
    dp[0][3][3][3] = 1;
    int mod = 1000000000 + 7;

    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++)
                {
                    //あてはまるものがない場合はcontinue
                    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;
}

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

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

//int dp[100][4][4][4];
//[s.size()+1]
int dp[101][4][4][4];

int main(){
    int n;
    scanf("%d", &n);
    //長さ０の文字列は1、Sは333と考えてもおｋだから
    dp[0][3][3][3] = 1;
    int mod = 1'000'000'000 + 7;

    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++)
                {
                    //あてはまるものがない場合はcontinue
                    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;
}

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

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

int main(void)
{
	int N;
	int dp[101][4][4][4];	// 0:A 1:C 2:G 3:T
	int mod = 1e9 + 7;

	cin >> N;

	memset(dp, 0, sizeof(dp));


	dp[0][3][3][3] = 1;
	for (int i = 1; i <= N; i++) {
		for (int j = 0; j < 4; j++) {
			for (int k = 0; k < 4; k++) {
				for (int l = 0; l < 4; l++) {
					if (dp[i - 1][j][k][l] == 0) continue;
					for (int m = 0; m < 4; m++) {
						if ((k == 0) && (l == 1) && (m == 2)) continue;
						if ((k == 0) && (l == 2) && (m == 1)) continue;
						if ((k == 1) && (l == 0) && (m == 2)) continue;
						if ((j == 0) && (l == 1) && (m == 2)) continue;
						if ((j == 0) && (k == 1) && (m == 2)) continue;
						dp[i][k][l][m] += dp[i - 1][j][k][l];
						dp[i][k][l][m] %= mod;
					}
				}
			}
		}
	}

	int ans = 0;
	for (int j = 0; j < 4; j++) {
		for (int k = 0; k < 4; k++) {
			for (int l = 0; l < 4; l++) {
				ans += dp[N][j][k][l];
				ans %= mod;
			}
		}
	}

	cout << ans << endl;

	return 0;
}

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

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


int dp[101][4][4][4];
int mod = 1e9 + 7;

int main() {
    
    int N;
    cin >> N;
    // A - 0, G- 1, C - 2, T - 3
    // dp[文字数][1文字前][2文字前][3文字前]
    // 長さ０の文字列は１
    // ０，１，2に関する制約しかないので，
    // Sは，３３３Sと考えても問題ない．
    dp[0][3][3][3] = 1;
    
    // 文字列の文字数
    for (int len = 0; len < N; i++) {
        // 最後から１文字目のもじ
        for (int c1 = 0; c1 < 4; c1++) {
            // 最後から2文字目のもじ
            for (int c2 = 0; c2 < 4; c2++) {
                // 最後から3文字目のもじ
                for (int c3 = 0; c3 < 4; c3++) {
                    // 条件に当てはまるものがない場合はcontinue;
                    if (dp[len][c1][c2][c3] == 0) continue;

                    // 新しく追加するもじ
                    for (int a = 0; a < 4; a++) {
                        // ダメな5つの条件をカットする
                        // 0 1 2 (AGC)
                        if (a == 2 and c1 == 1 and c2 == 0) continue;
                        // 1 0 2 (GAC)
                        if (a == 2 and c1 == 0 and c2 == 1) continue;
                        // 0 2 1 (ACG)
                        if (a == 1 and c1 == 2 and c2 == 0) continue;
                        // 0 * 1 2 (A*GC)
                        if (a == 2 and c1 == 1 and c3 == 0) continue;
                        // 0 1 * 2 (AG*C)
                        if (a == 2 and c2 == 1 and c3 == 0) continue;

                        // ダメな条件を抜けたら，aを足した文字列が作れる

                        // S = .... c3 c2 c1
                        // NextS = .... c2 c1 a
                        dp[len + 1][a][c1][c2] += dp[len][c1][c2][c3];
                        dp[len + 1][a][c1][c2] %= mod;

                    }
                }
            }
        }
    }
    int ans = 0;
    // 長さNの答えをまとめる
    // 最後から１文字目のもじ
    for (int c1 = 0; c1 < 4; c1++) {
        // 最後から2文字目のもじ
        for (int c2 = 0; c2 < 4; c2++) {
            // 最後から3文字目のもじ
            for (int c3 = 0; c3 < 4; c3++) {
                
                ans += dp[N][c1][c2][c3];
                ans %= mod;

            }
        }
    }
    
    cout << ans << '\n';
}


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

#include<iostream>
using namespace std;


int main {
long m[1000] ;
long N; cin >> N;
 
m[3] = 61;
for (int i = 4 ; i <= N ;i++) m[i] = (m[i]*4 - 14) % 1000000007;
 
cout << m[N] << endl;
}

Compiler output:
a.cc:5:5: error: cannot declare '::main' to be a global variable
    5 | int main {
      |     ^~~~
a.cc:6:1: error: expected primary-expression before 'long'
    6 | long m[1000] ;
      | ^~~~
a.cc:6:1: error: expected '}' before 'long'
a.cc:5:10: note: to match this '{'
    5 | int main {
      |          ^
a.cc:7:9: error: 'cin' does not name a type
    7 | long N; cin >> N;
      |         ^~~
a.cc:9:1: error: 'm' does not name a type; did you mean 'tm'?
    9 | m[3] = 61;
      | ^
      | tm
a.cc:10:1: error: expected unqualified-id before 'for'
   10 | for (int i = 4 ; i <= N ;i++) m[i] = (m[i]*4 - 14) % 1000000007;
      | ^~~
a.cc:10:18: error: 'i' does not name a type
   10 | for (int i = 4 ; i <= N ;i++) m[i] = (m[i]*4 - 14) % 1000000007;
      |                  ^
a.cc:10:26: error: 'i' does not name a type
   10 | for (int i = 4 ; i <= N ;i++) m[i] = (m[i]*4 - 14) % 1000000007;
      |                          ^
a.cc:12:1: error: 'cout' does not name a type
   12 | cout << m[N] << endl;
      | ^~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

long m[1000] ;
long N; cin >> N;

m[3] = 61;
for (int i = 4 ; i <= N ;i++) m[i] = m[i]*4 - 14;

cout << m[N] << endl;


Compiler output:
a.cc:5:9: error: 'cin' does not name a type
    5 | long N; cin >> N;
      |         ^~~
a.cc:7:1: error: 'm' does not name a type; did you mean 'tm'?
    7 | m[3] = 61;
      | ^
      | tm
a.cc:8:1: error: expected unqualified-id before 'for'
    8 | for (int i = 4 ; i <= N ;i++) m[i] = m[i]*4 - 14;
      | ^~~
a.cc:8:18: error: 'i' does not name a type
    8 | for (int i = 4 ; i <= N ;i++) m[i] = m[i]*4 - 14;
      |                  ^
a.cc:8:26: error: 'i' does not name a type
    8 | for (int i = 4 ; i <= N ;i++) m[i] = m[i]*4 - 14;
      |                          ^
a.cc:10:1: error: 'cout' does not name a type
   10 | cout << m[N] << endl;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int f[2][5][5][5][5];
bool bad(int a, int b, int c){
  if(a == 0 && b == 2 && c == 1) return true;
  return false;
}
bool balid(int a, int b, int c, int d){
  bool good = true;
  good &= !bad(a, b, c);
  good &= !bad(b, c, d);
  good &= !bad(b, d, c);
  good &= !bad(a, c, b);
  good &= !bad(b, a, c);
  good &= !bad(c, b, d);
  return good;
}
int doit(int N){
  // ACGT, AGC
  f[0][0][0][0][0] = 1;
  for(int i = 0; i < N; i++){
    int from = i&1, to = 1^from;
    memset(f[to], 0, sizeof(f[to]));
    for(int j = 0; j < 5; j++){
      for(int k = 0; k < 5; k++){
        for(int l = 0; l < 5; l++){
          for(int m = 0; m < 5; m++){
            for(int n = 0; n < 5; n++){
              if(valid(k, l, m, n)){
                f[to][k][l][m][n] += f[from][j][k][l][m];
                if(f[to][k][l][m][n] >= mod) f[to][k][l][m][n] -= mod;
              }
            }
          }
        }
      }
    }
  }
  int ans = 0;
  for(int i = 0; i < 5; i++) 
    for(int j = 0; j < 5; j++)
      for(int k = 0; k < 5; k++)
        for(int l = 0; l < 5; l++){
          ans += f[N&1][i][j][k][l];
          if(ans >= mod) ans -= mod;
        }
  return ans;
}
int main(){
  int n; cin >> n;
  cout << doit(n) << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int doit(int)':
a.cc:30:18: error: 'valid' was not declared in this scope; did you mean 'balid'?
   30 |               if(valid(k, l, m, n)){
      |                  ^~~~~
      |                  balid
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)
      |              ^~~