P6660 [POI 2019/2020 R1] Pisarze / Writers

Background

Bajtek got some Polish text fragments, and he wants to know which book these fragments come from. **This problem is a data analysis problem.**

Description

He found $t$ fragments and confirmed that these fragments come from the following three books: - Pan Tadeusz by Adam Mickiewicz. - Quo Vadis by Henryk Sienkiewicz. - Lalka by Bolesław Prus. Determine which book each fragment comes from.

Input Format

The first line contains an integer $t$, the number of fragments. The next $t$ lines each contain a string $s_i$, representing a fragment.

Output Format

Output $t$ lines. Each line contains one string as the answer: output the author of the text fragment, Mickiewicz, Prus, or Sienkiewicz.

Explanation/Hint

#### Sample Explanation The sample only shows a part of the data. The real sample is in the additional files sample.in and sample.out. #### Constraints **This problem uses bundled tests.** - Subtask 1 (20 pts): $t \le 100$, $500 \le |s_i| \le 2000$. - Subtask 2 (20 pts): Each line is guaranteed to be a complete sentence. - Subtask 3 (30 pts): $30 \le |s_i| \le 80$. - Subtask 4 (30 pts): No special restrictions. For $100\%$ of the testdata: $1 \le t \le 1000$, $10 \le |s_i| \le 2000$, $\sum|s_i| \le 2 \times 10^6$. **This problem is a data analysis problem.** **This problem uses a Special Judge.** You do not need to correctly identify every test case. The SPJ rules are as follows: - Let $t$ be the number of fragments, and $p$ be the number of fragments you answered correctly. - If $p \ge 0.9 \times t$, then you will get $100\%$ of the score. - If $p \le \dfrac{t}{3}$, unfortunately, you will get no score. - Otherwise, you will get $100 \times \dfrac{p-\frac{t}{3}}{0.9 \times t-\frac{t}{3}}\%$ of the score. In the additional files, Mickiewicz.txt, Prus.txt, and Sienkiewicz.txt are fragments from the three books. The data generator is in the additional file pistestgen.py. Use `python3 pistestgen.py subtask name directory [seed]` to generate a dataset, where: - grupa is the subtask number, from $1$ to $4$. - nazma is the data name, which will be generated as nazma.in and nazma.out. - katalog is the folder containing the three book files. - ziarno is used to generate the same dataset. #### Notes Translated from [POI 2019](https://sio2.mimuw.edu.pl/c/oi27-1/dashboard/) B [Pisarze](https://sio2.mimuw.edu.pl/c/oi27-1/p/pis/)。 Translated by ChatGPT 5