当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1821:Get The Treasure

题目描述
One day, a team of archaeologists found a figure and some ancient charactors at a relique. The figure was made up of n points distributing on a circle symmetrically.
After investigating the charactors, they got to know that a treasure was hid beneath the figure. In order to open the door to the treasure, they must redraw all the lines between any two points in the figure with some colors. If the figure was right, the door would open.
Now they want to know how many times they have to try at most to open the door, and they ask you for help.
输入解释
Each test case contains an integer n and a string S in a line. n is the number of points in the figure and S is a string made up of distinct capital letters, each indicating a color that can be used to redraw the figure. 3 <= n <= 50.
输出解释
Each case outputs the maximum times they may try in one line. Note that two figures are considered the same if one can be obtained by having rotation and mirroring on the other one.
输入样例
3 BW
3 RGB
4 RG
输出样例
4
10
19
来自杭电HDUOJ的附加信息
Author GUAN, Yao
Recommend linle

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1821

最后修改于 2020-10-25T22:48:04+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/2000MS(Java/Others) 32768/32768K(Java/Others)