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

建议使用的浏览器:

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

3547:Cube evolvent

题目描述

A square sheet of paper is partitioned into N*M equal squares by horizontal and vertical lines, 2 ≤ N ≤ 100, 2 ≤ M ≤ 100, N+M ≥ 7. A natural number not exceeding 20 000 is written in each square.

The task is to cut out a connected figure according to the following rules:

  •  you can cut only along the drawn lines;
  • the figure must contain exactly 6 squares;
  • the figure must a cube evolvent, i.e. it must be possible to obtain a cube model by folding the figure along the drawn lines;
  • the sum of the numbers on the evolvent must be the maximal possible.
输入解释

The first line contains two integers N and M separated by one or more spaces. The next N lines contain M integers each. The integers are separated by one or more spaces.

输出解释

This unique line contains the sum of the numbers on the found evolvent.

输入样例
4 4
1 2 3 4
2 4 3 1
5 8 1 3
4 1 3 2
输出样例
27

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

源链接: POJ-3547

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

共提交 0

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