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

建议使用的浏览器:

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

1711:Puncher

题目描述
Puncher is a device with several needles for making holes in tickets. At the factory there is a rectangular form with M rows and N columns, as shown in the picture (M=3, N=4), to make different punchers with 1, 2, ... , M*N needles. The rows and columns of needles are perpendicular to each other. The distance between rows is equal to the distance between columns. Obviously, it is possible to make 2M*N-1 different punchers in this way.

However, sometimes it is not possible to distinguish tickets that are perforated by different punchers. Let us assume that while punching two opposite borders of the ticket are parallel to the rows of the needles, the other pair of opposite borders being parallel to the columns of the needles. The number of the holes in a perforated ticket is always equal to the number of the needles in the corresponding puncher. A composition of the following transformations is allowed:
  • a ticket may be perforated on any side (axial symmetry),
  • it may be inserted into the puncher with any of its four borders downwards (rotation by 90, 180 and 270 degrees),
  • parallel translations are also available.

Your task is to write a program to determine how many actually different punchers can be made with an M*N form. Two punchers are considered actually different, if it is impossible to match using any combination of the above described operations the holes in the two tickets perforated by these punchers.
输入解释
The input file consists of two positive integer numbers M (not greater than 4) and N (not greater than 8) separated by a single space.
输出解释
The output file consists of a single integer indicating the number of the actually different punchers.
输入样例
3 3
输出样例
85

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-1711

最后修改于 2020-10-29T06:11:48+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000 10000