QOJ.ac

QOJ

时间限制: 1.0 s 内存限制: 512 MB 总分: 100 可 Hack ✓

#12058. 检查矩阵

统计

Prof. Jong 是第 41 届 ACM-ICPC 亚洲平壤区域赛的命题人。

他刚刚完成了 100 组 $2016 \times 1946$ 矩阵与 $1946 \times 2016$ 矩阵乘法的计算。当然,结果是 $2016 \times 2016$ 的矩阵。计算过程耗时约 10 天。这些结果将成为 C 题的 100 组输入输出数据。

在 Prof. Jong 睡觉后,他的儿子在结果上乱涂乱画。他擦掉了一个数字的最后一位,然后在擦除的位置写上了数字 1。第二天,Prof. Jong 非常生气。但他的儿子只有 2 岁,所以他记不清所有细节。Prof. Jong 仔细查看了结果并与他的儿子进行了交谈。他得知了一些事实:对于每一组数据,他的儿子最多乱涂了一个数字,且被乱涂数字的最后一位原本是 2、0、1 或 6。他还发现,被乱涂位置的行号和列号均小于或等于 70。矩阵左上角坐标为 $(1, 1)$。第一个 ID 为行号,第二个 ID 为列号。

他必须在今天提交输入输出数据。因此,他决定检查结果并找出被修改的数据。你是他最得意的学生,请帮助 Prof. Jong。

输入格式

输入文件包含恰好 100 组输入输出数据。

每一组数据的描述如下:

第一行包含 5 个整数 $a_1, a_2, a_3, a_4, a_5$。 你可以按如下方式计算矩阵 $A$: $$A_{ij} = (a_1 \cdot i^4 + a_2 \cdot i^3 + a_3 \cdot j^2 + a_4 \cdot j + a_5) \pmod{1946002016}$$

第二行包含 5 个整数 $b_1, b_2, b_3, b_4, b_5$。 你可以按如下方式计算矩阵 $B$: $$B_{ij} = (b_1 \cdot i^4 + b_2 \cdot i^3 + b_3 \cdot j^2 + b_4 \cdot j + b_5) \pmod{1946002016}$$

随后是一个 $70 \times 70$ 的整数矩阵,它是结果矩阵的左上角区域。 你需要检查这个矩阵。 在进行矩阵乘法时,所有矩阵中的数值都必须对 $2016011010$ 取模。

输出格式

你需要输出哪些输入输出数据组被他的儿子修改了。 输入输出数据的 ID 从 1 到 100。 你的输出必须按升序排列,并用空格分隔。 如果所有输入输出数据组均未被修改,则输出 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.