F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Filling

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 117    Accepted Submission(s): 35


Problem Description
The board is a rectangle of unit cells with N rows and N columns. At first, cells are empty. ?? has infinite blocks with the size of 2*2. ?? can put blocks in the board as long as no two blocks overlap. ?? wants to know how many different ways to fill the board, not necessary full. Two ways are consider same if they are same by rotating.
 

Input
The first line of the input gives the number of test cases T; T test cases follow.
Each test case consists of one integers N, as described on the description above.

limits
T <= 20
1 <= N <= 20
 

Output
For each test case, output one line containing ¡°Case #x: y¡± (without quotes) , where x is the test case number (starting from 1) and y is the answer you get for that case, since the answer may be too large, you should output the it modulo 1000000007 (1e9 + 7).
 

Sample Input
5 1 2 3 4 5
 

Sample Output
Case #1: 1 Case #2: 2 Case #3: 2 Case #4: 12 Case #5: 84
 

Hint
In forth case, we have 12 different ways.(0 denotes unfilled,1 denoted filled)
0000 1100 0110 0000 1111 0000 1100 1100 1100 1111 1111 1111
0000 1100 0110 0110 1111 1111 1111 1100 1100 1111 1111 1111
0000 0000 0000 0110 0000 1111 0011 0011 0110 1100 0110 1111
0000 0000 0000 0000 0000 0000 0000 0011 0110 1100 0110 1111

 

Author
FZU
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-12 12:48:56, Gzip enabled