QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 2048 MB Points totaux : 100

#7852. 迷你俄罗斯方块 3023

Statistiques

一个叫 Gry 的人发现了一个名为“Mini-Tetris 3023”的新游戏。这个小型的俄罗斯方块游戏在一个高度仅为 2 的超长网格上进行,共有三种类型的方块:

  • 一个由 4 个小方格组成的 $2 \times 2$ 正方形(Square)。
  • 一个 S 型方块(S-tile),由 4 个小方格组成,其中一行有 2 个,另一行有 2 个且位置略有偏移。
  • 一个角型方块(Corner),由 3 个小方格组成,其中一行有 1 个,另一行有 2 个。

方块可以旋转 0、90、180 或 270 度以相互拼合,但它们不能重叠,也不能超出网格的垂直边界。

Square(正方形)、S-tile(S 型方块)、Corner(角型方块)

游戏提供了 $a$ 个正方形、$b$ 个 S 型方块和 $c$ 个角型方块。Gry 想要通过使用部分或全部提供的方块,拼出一个尽可能大的连续 $2 \times n$ 矩形来打破高分记录,且要求方块不能重叠,也不能超出矩形的边界。

输入格式

  • 输入仅一行,包含三个整数 $a$、$b$ 和 $c$ ($0 \le a, b, c \le 50$),分别代表正方形、S 型方块和角型方块的数量。

输出格式

输出可以被给定的部分或全部方块完美填充的网格的最大宽度 $n$,要求填充过程中方块不重叠且不超出边界。

样例

样例输入 1

2 2 2

样例输出 1

11

样例输入 2

1 1 1

样例输出 2

2

样例输入 3

0 0 0

样例输出 3

0

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.