#P6660. [POI 2019/2020 R1] Pisarze / 作家

[POI 2019/2020 R1] Pisarze / 作家

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.

Problem Description

He found tt 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 tt, the number of fragments.
The next tt lines each contain a string sis_i, representing a fragment.

Output Format

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

3
Petroniusz obudzil sie zaledwie kolo...
Litwo! Ojczyzno moja! ty jestes jak...
W poczatkach roku 1878, kiedy swiat...
Sienkiewicz
Mickiewicz
Prus

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): t100t \le 100, 500si2000500 \le |s_i| \le 2000.
  • Subtask 2 (20 pts): Each line is guaranteed to be a complete sentence.
  • Subtask 3 (30 pts): 30si8030 \le |s_i| \le 80.
  • Subtask 4 (30 pts): No special restrictions.

For 100%100\% of the testdata: 1t10001 \le t \le 1000, 10si200010 \le |s_i| \le 2000, si2×106\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 tt be the number of fragments, and pp be the number of fragments you answered correctly.
  • If p0.9×tp \ge 0.9 \times t, then you will get 100%100\% of the score.
  • If pt3p \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 11 to 44.
  • 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 B Pisarze

Translated by ChatGPT 5