Language: C++

using System;
namespace inonoa{
    class ABC{
        static void Main(){
            int im = 1000000007;
            long n = long.Parse(Console.ReadLine());
            long[,,,] dp = new long[n-2,4,4,4];
            const int a = 0; const int g = 1; const int c = 2; const int t = 3;

            for(int i=0;i<4;i++){
                for(int j=0;j<4;j++){
                    for(int k=0;k<4;k++){
                        dp[0,i,j,k] = 1;
                    }
                }
            }
            dp[0,a,g,c] = 0;
            dp[0,g,a,c] = 0;
            dp[0,a,c,g] = 0;

            for(int i=1;i<n-2;i++){

                dp[i,a,a,a] = dp[i-1,a,a,a] + dp[i-1,g,a,a] + dp[i-1,c,a,a] + dp[i-1,t,a,a];
                dp[i,a,a,g] = dp[i-1,a,a,a] + dp[i-1,g,a,a] + dp[i-1,c,a,a] + dp[i-1,t,a,a];
                dp[i,a,a,c] = dp[i-1,a,a,a] + dp[i-1,g,a,a] + dp[i-1,c,a,a] + dp[i-1,t,a,a];
                dp[i,a,a,t] = dp[i-1,a,a,a] + dp[i-1,g,a,a] + dp[i-1,c,a,a] + dp[i-1,t,a,a];

                dp[i,a,g,a] = dp[i-1,a,a,g] + dp[i-1,g,a,g] + dp[i-1,c,a,g] + dp[i-1,t,a,g];
                dp[i,a,g,g] = dp[i-1,a,a,g] + dp[i-1,g,a,g] + dp[i-1,c,a,g] + dp[i-1,t,a,g];
                dp[i,a,g,c] = 0                                                            ;
                dp[i,a,g,t] = dp[i-1,a,a,g] + dp[i-1,g,a,g] + dp[i-1,c,a,g] + dp[i-1,t,a,g];

                dp[i,a,c,a] = dp[i-1,a,a,c]                 + dp[i-1,c,a,c] + dp[i-1,t,a,c];
                dp[i,a,c,g] = 0                                                            ;
                dp[i,a,c,c] = dp[i-1,a,a,c] + dp[i-1,g,a,c] + dp[i-1,c,a,c] + dp[i-1,t,a,c];
                dp[i,a,c,t] = dp[i-1,a,a,c] + dp[i-1,g,a,c] + dp[i-1,c,a,c] + dp[i-1,t,a,c];

                dp[i,a,t,a] = dp[i-1,a,a,t] + dp[i-1,g,a,t] + dp[i-1,c,a,t] + dp[i-1,t,a,t];
                dp[i,a,t,g] = dp[i-1,a,a,t] + dp[i-1,g,a,t] + dp[i-1,c,a,t] + dp[i-1,t,a,t];
                dp[i,a,t,c] = dp[i-1,a,a,t] + dp[i-1,g,a,t] + dp[i-1,c,a,t] + dp[i-1,t,a,t];
                dp[i,a,t,t] = dp[i-1,a,a,t] + dp[i-1,g,a,t] + dp[i-1,c,a,t] + dp[i-1,t,a,t];

                
                dp[i,g,a,a] = dp[i-1,a,g,a] + dp[i-1,g,g,a] + dp[i-1,c,g,a] + dp[i-1,t,g,a];
                dp[i,g,a,g] = dp[i-1,a,g,a] + dp[i-1,g,g,a] + dp[i-1,c,g,a] + dp[i-1,t,g,a];
                dp[i,g,a,c] = 0;
                dp[i,g,a,t] = dp[i-1,a,g,a] + dp[i-1,g,g,a] + dp[i-1,c,g,a] + dp[i-1,t,g,a];

                dp[i,g,g,a] = dp[i-1,a,g,g] + dp[i-1,g,g,g] + dp[i-1,c,g,g] + dp[i-1,t,g,g];
                dp[i,g,g,g] = dp[i-1,a,g,g] + dp[i-1,g,g,g] + dp[i-1,c,g,g] + dp[i-1,t,g,g];
                dp[i,g,g,c] =               + dp[i-1,g,g,g] + dp[i-1,c,g,g] + dp[i-1,t,g,g];
                dp[i,g,g,t] = dp[i-1,a,g,g] + dp[i-1,g,g,g] + dp[i-1,c,g,g] + dp[i-1,t,g,g];

                dp[i,g,c,a] =               + dp[i-1,g,g,c] + dp[i-1,c,g,c] + dp[i-1,t,g,c];
                dp[i,g,c,g] =               + dp[i-1,g,g,c] + dp[i-1,c,g,c] + dp[i-1,t,g,c];
                dp[i,g,c,c] =               + dp[i-1,g,g,c] + dp[i-1,c,g,c] + dp[i-1,t,g,c];
                dp[i,g,c,t] =               + dp[i-1,g,g,c] + dp[i-1,c,g,c] + dp[i-1,t,g,c];

                dp[i,g,t,a] = dp[i-1,a,g,t] + dp[i-1,g,g,t] + dp[i-1,c,g,t] + dp[i-1,t,g,t];
                dp[i,g,t,g] = dp[i-1,a,g,t] + dp[i-1,g,g,t] + dp[i-1,c,g,t] + dp[i-1,t,g,t];
                dp[i,g,t,c] =               + dp[i-1,g,g,t] + dp[i-1,c,g,t] + dp[i-1,t,g,t];
                dp[i,g,t,t] = dp[i-1,a,g,t] + dp[i-1,g,g,t] + dp[i-1,c,g,t] + dp[i-1,t,g,t];
                

                dp[i,c,a,a] = dp[i-1,a,c,a] + dp[i-1,g,c,a] + dp[i-1,c,c,a] + dp[i-1,t,c,a];
                dp[i,c,a,g] = dp[i-1,a,c,a] + dp[i-1,g,c,a] + dp[i-1,c,c,a] + dp[i-1,t,c,a];
                dp[i,c,a,c] = dp[i-1,a,c,a] + dp[i-1,g,c,a] + dp[i-1,c,c,a] + dp[i-1,t,c,a];
                dp[i,c,a,t] = dp[i-1,a,c,a] + dp[i-1,g,c,a] + dp[i-1,c,c,a] + dp[i-1,t,c,a];

                dp[i,c,g,a] =               + dp[i-1,g,c,g] + dp[i-1,c,c,g] + dp[i-1,t,c,g];
                dp[i,c,g,g] =               + dp[i-1,g,c,g] + dp[i-1,c,c,g] + dp[i-1,t,c,g];
                dp[i,c,g,c] =               + dp[i-1,g,c,g] + dp[i-1,c,c,g] + dp[i-1,t,c,g];
                dp[i,c,g,t] =               + dp[i-1,g,c,g] + dp[i-1,c,c,g] + dp[i-1,t,c,g];
                
                dp[i,c,c,a] = dp[i-1,a,c,c] + dp[i-1,g,c,c] + dp[i-1,c,c,c] + dp[i-1,t,c,c];
                dp[i,c,c,g] = dp[i-1,a,c,c] + dp[i-1,g,c,c] + dp[i-1,c,c,c] + dp[i-1,t,c,c];
                dp[i,c,c,c] = dp[i-1,a,c,c] + dp[i-1,g,c,c] + dp[i-1,c,c,c] + dp[i-1,t,c,c];
                dp[i,c,c,t] = dp[i-1,a,c,c] + dp[i-1,g,c,c] + dp[i-1,c,c,c] + dp[i-1,t,c,c];

                dp[i,c,t,a] = dp[i-1,a,c,t] + dp[i-1,g,c,t] + dp[i-1,c,c,t] + dp[i-1,t,c,t];
                dp[i,c,t,g] = dp[i-1,a,c,t] + dp[i-1,g,c,t] + dp[i-1,c,c,t] + dp[i-1,t,c,t];
                dp[i,c,t,c] = dp[i-1,a,c,t] + dp[i-1,g,c,t] + dp[i-1,c,c,t] + dp[i-1,t,c,t];
                dp[i,c,t,t] = dp[i-1,a,c,t] + dp[i-1,g,c,t] + dp[i-1,c,c,t] + dp[i-1,t,c,t];

                
                dp[i,t,a,a] = dp[i-1,a,t,a] + dp[i-1,g,t,a] + dp[i-1,c,t,a] + dp[i-1,t,t,a];
                dp[i,t,a,g] = dp[i-1,a,t,a] + dp[i-1,g,t,a] + dp[i-1,c,t,a] + dp[i-1,t,t,a];
                dp[i,t,a,c] = dp[i-1,a,t,a] + dp[i-1,g,t,a] + dp[i-1,c,t,a] + dp[i-1,t,t,a];
                dp[i,t,a,t] = dp[i-1,a,t,a] + dp[i-1,g,t,a] + dp[i-1,c,t,a] + dp[i-1,t,t,a];

                dp[i,t,g,a] = dp[i-1,a,t,g] + dp[i-1,g,t,g] + dp[i-1,c,t,g] + dp[i-1,t,t,g];
                dp[i,t,g,g] = dp[i-1,a,t,g] + dp[i-1,g,t,g] + dp[i-1,c,t,g] + dp[i-1,t,t,g];
                dp[i,t,g,c] =               + dp[i-1,g,t,g] + dp[i-1,c,t,g] + dp[i-1,t,t,g];
                dp[i,t,g,t] = dp[i-1,a,t,g] + dp[i-1,g,t,g] + dp[i-1,c,t,g] + dp[i-1,t,t,g];

                dp[i,t,c,a] = dp[i-1,a,t,c] + dp[i-1,g,t,c] + dp[i-1,c,t,c] + dp[i-1,t,t,c];
                dp[i,t,c,g] = dp[i-1,a,t,c] + dp[i-1,g,t,c] + dp[i-1,c,t,c] + dp[i-1,t,t,c];
                dp[i,t,c,c] = dp[i-1,a,t,c] + dp[i-1,g,t,c] + dp[i-1,c,t,c] + dp[i-1,t,t,c];
                dp[i,t,c,t] = dp[i-1,a,t,c] + dp[i-1,g,t,c] + dp[i-1,c,t,c] + dp[i-1,t,t,c];

                dp[i,t,t,a] = dp[i-1,a,t,t] + dp[i-1,g,t,t] + dp[i-1,c,t,t] + dp[i-1,t,t,t];
                dp[i,t,t,g] = dp[i-1,a,t,t] + dp[i-1,g,t,t] + dp[i-1,c,t,t] + dp[i-1,t,t,t];
                dp[i,t,t,c] = dp[i-1,a,t,t] + dp[i-1,g,t,t] + dp[i-1,c,t,t] + dp[i-1,t,t,t];
                dp[i,t,t,t] = dp[i-1,a,t,t] + dp[i-1,g,t,t] + dp[i-1,c,t,t] + dp[i-1,t,t,t];
if(i%10==9){
                for(int l=0;l<4;l++){
                    for(int j=0;j<4;j++){
                        for(int k=0;k<4;k++){
                            dp[i,l,j,k] %= im;
                        }
                    }
                }}
            }

            long 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-3,i,j,k];
                        ans %= im;
                    }
                }
            }
            Console.WriteLine(ans);
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:126:6: error: expected ';' after class definition
  126 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void inonoa::ABC::Main()':
a.cc:6:22: error: expected primary-expression before 'long'
    6 |             long n = long.Parse(Console.ReadLine());
      |                      ^~~~
a.cc:7:18: error: expected identifier before ',' token
    7 |             long[,,,] dp = new long[n-2,4,4,4];
      |                  ^
a.cc:7:18: error: expected ']' before ',' token
a.cc:7:17: error: structured binding declaration cannot have type 'long int'
    7 |             long[,,,] dp = new long[n-2,4,4,4];
      |                 ^
a.cc:7:17: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:17: error: empty structured binding declaration
a.cc:7:23: error: expected initializer before 'dp'
    7 |             long[,,,] dp = new long[n-2,4,4,4];
      |                       ^~
a.cc:13:25: error: 'dp' was not declared in this scope
   13 |                         dp[0,i,j,k] = 1;
      |                         ^~
a.cc:17:13: error: 'dp' was not declared in this scope
   17 |             dp[0,a,g,c] = 0;
      |             ^~
a.cc:124:13: error: 'Console' was not declared in this scope
  124 |             Console.WriteLine(ans);
      |             ^~~~~~~