QOJ.ac

QOJ

Límite de tiempo: 60 s Límite de memoria: 1024 MB Puntuación total: 31

#12448. 作弊检测

Estadísticas

有 100 名选手参加一场包含 10000 道题的知识竞赛;选手编号为 1 到 100。选手 $i$ 的技能水平为 $S_i$,题目 $j$ 的难度为 $Q_j$。每个技能水平和每道题的难度都是从区间 $[-3.00, 3.00]$ 中均匀随机选择的,且与其他所有选择相互独立。例如,选手的技能水平可以是 $2.47853$,题目的难度可以是 $-1.4172$。

当选手 $i$ 尝试回答题目 $j$ 时,他们答对的概率为 $f(S_i - Q_j)$,其中 $f$ 是 Sigmoid 函数:

$$f(x) = \frac{1}{1 + e^{-x}}$$

其中 $e$ 是欧拉数(约等于 $2.718\dots$),即数学常数。注意对于所有 $x$,$0 < f(x) < 1$,因此 $f(S_i - Q_j)$ 始终是一个有效的概率。每一次答题尝试都是独立随机选择的。

有一个例外:选手中有且仅有一名作弊者!作弊者是从所有选手中均匀随机选出的,且与其他所有选择相互独立。作弊者的行为如下:在回答每道题之前,他们会掷一枚公平的硬币。如果正面朝上,他们不作弊,规则正常运作。如果反面朝上,他们会偷偷在互联网上查找答案并正确回答该题。形式上,他们以 $0.5$ 的概率随机决定是否对每道题作弊,且与其他所有选择相互独立。

竞赛结果仅包含每位选手对每道题的答题结果(正确或错误)。除了上述一般描述外,你对选手的技能水平或题目的难度一无所知。

你必须在至少 $P$ 百分比的测试用例中正确识别出作弊者。也就是说,你必须在 $T$ 个测试用例中至少成功识别出 $P \cdot T/100$ 个。

输入格式

输入的第一行给出测试用例的数量 $T$。第二行给出你必须正确回答的测试用例百分比 $P$。接下来是 $T$ 个测试用例。每个测试用例包含 100 行,每行 10000 个字符。第 $i$ 行的第 $j$ 个字符如果为 1,表示第 $i$ 位选手正确回答了第 $j$ 道题;如果为 0,表示回答错误。

输出格式

对于每个测试用例,输出一行 Case #x: y,其中 $x$ 是测试用例编号(从 1 开始),$y$ 是作弊者的编号(选手编号从 1 开始)。

数据范围

$T = 50$。

子任务 1(可见判决)

$P = 10$。

子任务 2(可见判决)

$P = 86$。

样例

样例输入 1

1
0
00111010001010100000100000010001
-------------------------------
99 lines of input omitted.
Use the download button above
to view the full sample input.
-------------------------------

样例输出 1

Case #1: 59

说明

请注意,样例输入中 $T = 1$ 且 $P = 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.