QOJ.ac

QOJ

Total points: 100

#2503. Puzzle: Heyawake

统计

有一个矩形,被划分成了$n \times n$的格子,你要将其中涂黑其中一些格子,要求

  • 涂黑的格子不能有公共边。
  • 未涂黑的格子四连通。

问最多能涂黑多少格子。

虽然这个题存在一个最优解,但是为了大家的健康考虑,这是一个有部分分提交答案题。

输入格式

一个整数$n$。

输出格式

$n$行,每行长度为$n$的$01$串,$1$表示涂黑,$0$表示未涂黑。

样例输入

5

样例输出

10101
00000
10101
00000
10101

数据规模与约定

一共$10$个点,保证$n$依次等于$300,301,302,303,304,305,306,307,308,309$。

对于每个$n$,假设最优解黑色个数为$a_n$,你的答案为$b_n$。注:在OEIS上有个对应的数列,但是是错的。

$b_n=a_n$,你将获得$10$分。

$a_n - 1 \leq b_n < a_n$,你将获得$9.5$分。

$a_n - 2 \leq b_n < a_n - 1$,你将获得$9$分。

$a_n - 3 \leq b_n < a_n - 2$,你将获得$8.5$分。

$a_n - 5 \leq b_n < a_n - 3$,你将获得$8$分。

$a_n - 10 \leq b_n < a_n - 5$,你将获得$7.5$分。

$a_n - 20 \leq b_n < a_n - 10$,你将获得$7$分。

$a_n - 30 \leq b_n < a_n - 20$,你将获得$6$分。

$a_n - 40 \leq b_n < a_n - 30$,你将获得$5$分。

$a_n - 60 \leq b_n < a_n - 40$,你将获得$4$分。

$a_n - 80 \leq b_n < a_n - 60$,你将获得$3$分。

$a_n - 100 \leq b_n < a_n - 80$,你将获得$2$分。

$a_n - 300 \leq b_n < a_n - 100$,你将获得$1$分。


或者逐个上传:

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.