| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 79 | 71 | 49 | 94.231% |
In the PHP (Paradise Hospital of Prague) they cure people with a lot of different diseases. The PHP is dealing with a shortage of medical personal, therefore the director is afraid of doctors getting sloppy. Doctors make a diagnosis based on the knowledge they gained in university. So there is a known list of possible diseases and a known list of possible symptoms a patient can have. A doctor makes a diagnosis of one or multiple diseases. Those diseases have known symptoms that need to match exactly with the symptoms of the patient.
More formally: given a set of diseases $D = \{d_1, d_2, ..., d_n\},ドル a set of symptoms $S = \{s_1, s_2, ..., s_m\}$ and a function that represents the knowledge about diseases and their symptoms. $f(d) = S'$ with $S' \subseteq S$ and $d \subseteq D$. When a given $D' \subseteq D$ check whether or not the the condition $S = \bigcup_{d \in D'}f(d)$ is true. When it is print "yes" else print "no".
Print "yes" if the symptoms of the diagnosed diseases exactly match the patient's symptoms. Print "no" otherwise.
5 6 3 3 4 5 3 1 2 3 3 2 3 4 2 5 6 3 1 4 5 4 1 2 3 5
yes
5 6 4 1 2 4 5 3 1 2 3 3 2 3 4 2 5 6 3 1 4 5 4 1 2 3 5
no