~~~~~~acm翻译~~~~~~~

来源:百度知道 编辑:UC知道 时间:2024/05/21 16:28:04
Tom is a boy having curiosity. Today he wants to divide a newspaper to some pieces. But he likes to put the pieces to some same kinds. This time he is puzzle. How to divide the newspaper and how many pieces he can divide. Your task is easy, to help him dividing the paper.

Input
The first line is an integer T giving you the number of pieces. Then T blocks followed, each block is described by two integers H, W (H,W<=4) and then H lines (each line has W characters). The character is blank standing for empty or '*'.

Then given N, M (N,M<=15) expressing the size of newspaper, followed by N*M characters expressed same with one piece. When coming across T=0, you task should be ended.
Output
One line contains a number expressed the max number to divide the paper to pieces.
大哥,很明显,你是用翻译工具翻译的~~~~~~不通啊

汤姆是个有求知欲的男孩。今天他想要划分报纸,对一些片断。但他喜欢投入片断对一些同样种类。这次他是难题。怎么划分报纸和多少个片断他能划分。您的任务是容易, 帮助他划分本文。 输入 第一线是整数T 给您片断的数量。然后T 块被跟随, 各个块由二个整数描述H, W (H,W