loj#P3233. 「POI2019 R1」Pisarze
「POI2019 R1」Pisarze
Description
Source Problem: POI XXVII - I etap (Pisarze)
Bytie encountered a text excerpt that certainly comes from one of the following three masterpieces of Polish literature:
- “Pan Tadeusz” by Adam Mickiewicz,
- “Quo Vadis” by Henryk Sienkiewicz,
- “The Doll” by Bolesław Prus.
The issue is that he is not so certain which one it is. Help him out by writing a program that will determine the book the excerpt comes from.
Input Format
In the first input line, there is an integer specifying the number of test cases. Each of the following lines contains an excerpt from one of the three aforementioned books. The excerpt is stripped of Polish diacritics, contains between and words, and both begins and ends with a complete word (or punctuation mark).
The total length of all the excerpts given on input will not exceed two million characters.
Output Format
Exactly lines should be printed to the standard output, the -th of which should contain a single word Mickiewicz
, Prus
, or Sienkiewicz
, corresponding to the author of the -th input excerpt.
3
Petroniusz obudzil sie zaledwie kolo...
Litwo! Ojczyzno moja! ty jestes jak...
W poczatkach roku 1878, kiedy swiat...
Sienkiewicz
Mickiewicz
Prus
Grading
Attention: This is a data analysis task. There may be no ideal solution that correctly recognizes all excerpts.
The grading will be as follows:
- Let be the number of excerpts on input.
- Let be the number of correct answers given by contestant’s program.
- If , the contestant is awarded of the points for the test.
- If , the contestant is awarded of the points for the test.
- Otherwise, the contestant is awarded of the points for the test.
All excerpts come from the files supplied with the task statement. Moreover, a program
pistestgen.py
is also supplied, which allows generating a random test with the commandpython3 pistestgen.py subtask name directory [seed]
, where:subtask
is the number of the test subset (an integer between 1 and 4),name
is the name of the test (the program will create files nazwa.in and nazwa.out),directory
is the path to the directory which containing the (texts of the) works,seed
is an optional parameter (a string of characters) which uniquely determines the output test, thus allowing generating the same test repeatedly.
This very program has been used to generate (all) test cases on which the contestants’ solutions will be evaluated.
Grading and Constraints
Subtask # | Additional Constraints | Score |
---|---|---|
, the excerpts contain between and words | ||
, the excerpts consist of full sentences | ||
, the excerpts contain between and words | ||