Problem D
Dunglish

Given a sentence in Dutch and a dictionary containing both correct translations as well as phonetic (incorrect) translations of individual words, find the translation of the sentence and indicate whether it is correct, or in case there is more than one find the total number of correct and incorrect translations. A sentence is correctly translated when each word of the sentence is correctly translated.
Input
The input consists of:
-
One line with an integer
( ), the number of words in the Dutch sentence. -
One line with
words, the Dutch sentence . -
One line with an integer
( ), the number of words in the dictionary. -
lines, each with three strings , and , a Dutch word, the English translation, and “correct” if this is the correct translation or “incorrect” otherwise.
A word consists of between
Output
In case there is only a single translation of
Sample Input 1 | Sample Output 1 |
---|---|
7 als mollen mollen mollen mollen mollen mollen 4 als when correct mollen moles correct mollen destroy correct mollen mills incorrect |
64 correct 665 incorrect |
Sample Input 2 | Sample Output 2 |
---|---|
5 de zuigers zijn buiten werking 6 zijn are correct banaan banana correct de the correct zuigers suckers incorrect buiten out correct werking working incorrect |
the suckers are out working incorrect |
Footnotes
- Pun intended.