logo AlgoBeat OnlineJudge
登录 注册

#206201. [NWRRC 2015] Black and White

内存限制:256 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

The jury has a great artistic idea -- to create a rectangular panel out of a huge pile of black and white squares of the same size. The panel should have exactly areas made of black tiles, and areas made of white tiles.

Remember, a area of some color is a maximal set of the panel tiles such that:

any two tiles of the area share the same color;

for any two tiles of the area there is a tile sequence connecting them, such that any two consecutive tiles of the sequence share a common side.

In addition to the artistic idea, the jury has already developed a program that produces design of the panel. But since this problem is about art, any new solution is extremely important for the jury.

输入格式

The only line of the input file contains two integers and -- number of black and white areas .

输出格式

The first line of the output file should contain the picture sizes and -- the number of rows and columns . This line should be followed by lines of symbols each. Each symbol should be either (for black tile) or (for white one). There should be no more than tiles in the panel.

样例

样例输入 1

2 3

样例输出 1

6 7
@@@@@@@
@.@@@@@
@@...@@
@@@@@@@
.......
@@@@@@@

数据范围与提示

Time limit: 2 s, Memory limit: 256 MB.