彩虹蛋糕店
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
有一块 蛋糕,编号规则:
- 第 行: 依次排列。
蛋糕魔法能量 = 自身编号 + 上下左右四个相邻蛋糕编号之和。 求整块蛋糕中最大的魔法能量值。
输入格式
第一行整数 ,表示蛋糕组数。 每组一行一个整数 。
输出格式
对每个 ,输出最大魔法能量值。
输入输出样例 #1
输入 #1
2
2
3
输出 #1
9
29
样例解释
- 时,4号蛋糕能量最大为9;
- 时,8号蛋糕能量最大为29。
说明
答案数值可能很大。
数据范围
对于 的数据满足 。
对于 的数据满足 。
对于 的数据满足 。
2026奉化区小学组比赛
- Status
- Done
- Rule
- IOI(Strict)
- Problem
- 5
- Start at
- 2026-5-31 7:30
- End at
- 2026-5-31 12:30
- Duration
- 5 hour(s)
- Host
- Partic.
- 5