shunfurh 于 2017.09.10 00:30 提问

How many

Problem Description
Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me
How many kinds of necklaces total have.(if two necklaces can equal by rotating ,we say the two necklaces are some).
For example 0110 express a necklace, you can rotate it. 0110 -> 1100 -> 1001 -> 0011->0110.

Input
The input contains multiple test cases.
Each test case include: first one integers n. (2<=n<=10000)
Next n lines follow. Each line has a equal length character string. (string only include '0','1').

Output
For each test case output a integer , how many different necklaces.

Sample Input
4
0110
1100
1001
0011
4
1010
0101
1000
0001

Sample Output
1
2

1个回答

devmiao      2017.09.10 08:58

How many的用法
How many 问多少, 　　    可数名词复数紧跟着。 　　    一般疑问句随其后, 　　    其它成分不要丢。 　　    举个例子来说明: 　　    How many days are there in a week?  ***********************************************************1. What animals do
HDU：1213 How Many Tables（简单并查集）
How Many Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 24376    Accepted Submission(s): 12201 Problem Description Today is
HDU 3038 How Many Answers Are Wrong(并查集)

HDU 2138 How many prime numbers【素数判断，卡时间！！】
How many prime numbers Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14873 Accepted Submission(s): 5150 Problem Description Give y
codeforces 9D How many trees? (组合二叉树)

hdu 1978 How many ways (动态规划、记忆化搜索)
How many ways Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2957    Accepted Submission(s): 1733 Problem Description 这是一个简单的生存游戏，
ocp-258
QUESTION NO: 258 How many database instances are used during a database-duplication process?A. One B. Two C. Three D. Four E. Five Answer: B一个数据库的复制进程使用多少数据库实例？Answer: B

How Many Tables Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 17049    Accepted Submission(s): 8349 Problem Description Today is Igna
HDU 1130 How Many Trees?(卡特兰数+大数)
HDU 1130 How Many Trees?(卡特兰数+大数)
FZU 1012 Relatives
RelativesTime Limit:1sMemory limit:32MAccepted Submit:387Total Submit:1304Given n, a positive integer, how many positive integers less than n are relatively prime