#define _USE_MATH_DEFINES #pragma region include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //// #include // #pragma endregion //#include ///////// #pragma region typedef typedef long long LL; typedef long double LD; typedef unsigned long long ULL; #pragma endregion //typedef ////定数 const int INF = (int)1e9; const LL MOD = (LL)1e9+7; const LL LINF = (LL)4e18+20; const LD PI = acos(-1.0); const double EPS = 1e-9; ///////// using namespace::std; void solve(){ //1000000007 MOD int N; cin >> N; vector A(N); for(int i=0;i> A[i]; } LL ans = 0; LL ans0 = 0; LL ans1 = 0; LL ans2 = 0; for(int s=0;s<4;++s){ //前二つ vector > dp(N,vector(4,0)); dp[0][s] = 1; for(int i=0;i