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

Yummy Triangular Pizza

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 254    Accepted Submission(s): 142


Problem Description
  Pizzahat has released a new pizza with triangular shaped pieces. This pizza is composed of some equal-sized equilateral triangle. Moreover, all the triangles are connected. Also, if two triangles are directly connected, they must share a common edge.
  How many different shapes of this kind of N-pieces pizza are there? Two patterns are considered as same if they can completely overlap after rotation and shifting (note that flipping is not included).
 

Input
  There are multiple test cases. The first line of input contains a single integer denoting the number of test cases.
  For each test case, there is only one line with only one integer N denoting the number of pieces that can be used. (1 <= N <= 16)
 

Output
  For each test case, output a single integer denoting the number of possible different shapes of the pizza.
 

Sample Input
3 2 4 10
 

Sample Output
Case #1: 1 Case #2: 4 Case #3: 866
 

Hint

Case2£º

 

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-04-24 13:49:50, Gzip enabled