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

建议使用的浏览器:

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

3431:Texture Tile

Special Judge 特殊评判
题目描述

Square raster image is represented by an array of N × N pixels. A texture tile is a square image in which the first row is equal to the last one, and the first column is equal to the last one. This property is valuable when covering the surface of graphics object with repeating copies of texture, because it allows "seamless" transitions between tiles.

Your program must, given an image, find its largest subimage which is a texture tile.

输入解释

Input file contains integer N followed by N2 numbers ci, j — pixel values.

Constraints

1 ≤ N ≤ 370, 0 ≤ ci, j ≤ 255.

输出解释

Output file must contain numbers p q m — coordinates of top left corner and size of the largest texture tile. If several solutions exist, output any of them.

输入样例
Sample input 1
2
0 0
2 3
Sample input 2
4
1 0 0 0
1 2 5 2
1 0 0 0
4 4 4 4
输出样例
Sample output 1
1 1 1
Sample output 2
1 2 3
提示
Bold texts appearing in the sample sections are informative and do not form part of the actual data.

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

源链接: POJ-3431

最后修改于 2020-10-29T07:01:26+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000 65536