codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

1182A.md (934B)


      1 Source: https://codeforces.com/problemset/problem/1182/A
      2 
      3 A. Filling Shapes
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 standard input
     16 
     17 output
     18 
     19 standard output
     20 
     21 You have a given integer $n$. Find the number of ways to fill all $3 \times n$ tiles with the shape described in the picture below. Upon filling, no empty spaces are allowed. Shapes cannot overlap.
     22 
     23  ![](https://espresso.codeforces.com/87c303f887fa1c553f93820abb8e1eee0ee2593a.png) This picture describes when $n = 4$. The left one is the shape and the right one is $3 \times n$ tiles.
     24 
     25 Input
     26 
     27 The only line contains one integer $n$ ($1 \le n \le 60$) — the length.
     28 
     29 Output
     30 
     31 Print the number of ways to fill.
     32 
     33 Examples
     34 
     35 Input
     36 
     37 ```
     38 4
     39 ```
     40 
     41 Output
     42 
     43 ```
     44 4
     45 ```
     46 
     47 Input
     48 
     49 ```
     50 1
     51 ```
     52 
     53 Output
     54 
     55 ```
     56 0
     57 ```
     58 
     59 Note
     60 
     61 In the first example, there are $4$ possible cases of filling.
     62 
     63 In the second example, you cannot fill the shapes in $3 \times 1$ tiles.