文件名称:sgu262
介绍说明--下载内容均来自于网络,请自行研究使用
sgu262:Symbol Recognition(状压DP)
题目大意:
给出k个n∗ m的01矩阵Si,求出一个1尽量少的n∗ m的01矩阵P,满足k个矩阵与该矩阵的交互不相同,也就是说通过该矩阵能表示出给出的k个矩阵。-262. Symbol Recognition
time limit per test: 0.25 sec.
memory limit per test: 65536 KB
input: standard
output: standard
Consider a monochrome computer monitor with N x M pixels resolution. It can display K symbols. Symbol is a non-empty set of black pixels on the screen. You are to write a program, that computes minimal possible amount of pixels, that are enough to recognize a symbol.
Input
First line of input contains integers N, M, K (1 <= N, M <= 10, 2 <= K <= 6). K blocks follow, separated by empty lines. Each block consists of N rows of M characters. It s a symbols representation on the N x M screen. `1 denotes black pixel, `0 denotes white pixel. You may assume that symbols are unique.
Output
Print on the first line of output the minimal possible amount of pixels that enough to recognize symbol. I.e. you have to find set of pixels that has different color in each pair of symbols. If there are several sets with equal amount of pixels, output any
题目大意:
给出k个n∗ m的01矩阵Si,求出一个1尽量少的n∗ m的01矩阵P,满足k个矩阵与该矩阵的交互不相同,也就是说通过该矩阵能表示出给出的k个矩阵。-262. Symbol Recognition
time limit per test: 0.25 sec.
memory limit per test: 65536 KB
input: standard
output: standard
Consider a monochrome computer monitor with N x M pixels resolution. It can display K symbols. Symbol is a non-empty set of black pixels on the screen. You are to write a program, that computes minimal possible amount of pixels, that are enough to recognize a symbol.
Input
First line of input contains integers N, M, K (1 <= N, M <= 10, 2 <= K <= 6). K blocks follow, separated by empty lines. Each block consists of N rows of M characters. It s a symbols representation on the N x M screen. `1 denotes black pixel, `0 denotes white pixel. You may assume that symbols are unique.
Output
Print on the first line of output the minimal possible amount of pixels that enough to recognize symbol. I.e. you have to find set of pixels that has different color in each pair of symbols. If there are several sets with equal amount of pixels, output any
(系统自动生成,下载前可以参看下载内容)
下载文件列表
sgu262.cpp