title: Count Number Of Ways To Fill A N X 4 Grid Using 1 X 4 Tiles
signature: long long countNumberOfWaysToFillANX4GridUsing1X4Tiles(int n) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(long long actual, long long expected){
      return actual == expected;
  }
  
  string driver(int n, long long expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(61, 188941273); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver(22, 657); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver(65, 685792227); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver(57, 52054840); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver(36, 59864); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver(25, 1728); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver(16, 95); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver(26, 2385); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver(92, 4123691589365); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver(5, 3); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
source_py: def count_number_of_ways_to_fill_a_n_x_4_grid_using_1_x_4_tiles(n):
      dp = [0 for _ in range((n + 1))]
      for i in range(1, (n + 1)):
          if (i <= 3):
              dp[i] = 1
          elif (i == 4):
              dp[i] = 2
          else:
              dp[i] = (dp[(i - 1)] + dp[(i - 4)])
      return dp[n]
source_cpp: int count_number_of_ways_to_fill_a_n_x_4_grid_using_1_x_4_tiles(int n) {
    int dp [ n + 1 ];
    dp [ 0 ] = 0;
    for ( int i = 1;
    i <= n;
    i ++ ) {
      if ( i >= 1 && i <= 3 ) dp [ i ] = 1;
      else if ( i == 4 ) dp [ i ] = 2;
      else dp [ i ] = dp [ i - 1 ] + dp [ i - 4 ];
    }
    return dp [ n ];
  }