title: Tiling With Dominoes
signature: tilingWithDominoes :: Integer -> Integer
  tilingWithDominoes n = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (29) (0) )
  
      printf "TEST-1...%s\n" (driver (13) (0) )
  
      printf "TEST-2...%s\n" (driver (25) (0) )
  
      printf "TEST-3...%s\n" (driver (65) (0) )
  
      printf "TEST-4...%s\n" (driver (27) (0) )
  
      printf "TEST-5...%s\n" (driver (42) (808717138331) )
  
      printf "TEST-6...%s\n" (driver (19) (0) )
  
      printf "TEST-7...%s\n" (driver (50) (156886956080403) )
  
      printf "TEST-8...%s\n" (driver (59) (0) )
  
      printf "TEST-9...%s\n" (driver (13) (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 ];
  }