[BOJ 12601] Polygraph (Small)
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
3
Time limit:
5.0s
Memory limit:
512M
Problem type
Allowed languages
On the distant isle of Googlia, there are two cities, Truthtown and Liarville. People from Truthtown always tell the truth and people from Liarville always lie. While exploring Googlia, you have run across a group of N inhabitants, and you want to figure out which city each one came from.
To make life simpler, you begin by numbering these people 1 through N. You then question each person, and record their M statements in the short-hand described below.
| Short-hand | Meaning |
| i T j | Person #i says, "Person #j is from Truthtown." |
| i L j | Person #i says, "Person #j is from Liarville." |
| i S j k | Person #i says, "Persons #j and #k are from the same city." |
| i D j k | Person #i says, "Persons #j and #k are from different cities." |
Comments