title: Tiling With Dominoes
signature: tilingWithDominoes(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          29, 
          0)
      }");
  
      print("TEST-1...${driver(
          13, 
          0)
      }");
  
      print("TEST-2...${driver(
          25, 
          0)
      }");
  
      print("TEST-3...${driver(
          65, 
          0)
      }");
  
      print("TEST-4...${driver(
          27, 
          0)
      }");
  
      print("TEST-5...${driver(
          42, 
          808717138331)
      }");
  
      print("TEST-6...${driver(
          19, 
          0)
      }");
  
      print("TEST-7...${driver(
          50, 
          156886956080403)
      }");
  
      print("TEST-8...${driver(
          59, 
          0)
      }");
  
      print("TEST-9...${driver(
          13, 
          0)
      }");
  
      return 0;
  }
source_py: def tiling_with_dominoes(n):
      A = ([0] * (n + 1))
      B = ([0] * (n + 1))
      A[0] = 1
      A[1] = 0
      B[0] = 0
      B[1] = 1
      for i in range(2, (n + 1)):
          A[i] = (A[(i - 2)] + (2 * B[(i - 1)]))
          B[i] = (A[(i - 1)] + B[(i - 2)])
      return A[n]
source_cpp: int tiling_with_dominoes(int n) {
    int A [ n + 1 ], B [ n + 1 ];
    A [ 0 ] = 1, A [ 1 ] = 0, B [ 0 ] = 0, B [ 1 ] = 1;
    for ( int i = 2;
    i <= n;
    i ++ ) {
      A [ i ] = A [ i - 2 ] + 2 * B [ i - 1 ];
      B [ i ] = A [ i - 1 ] + B [ i - 2 ];
    }
    return A [ n ];
  }