Test Case for Question #5 in DWITE 2008-2009 High School Round 5
Contest: DWITE 2008-2009 High School Round 5
Question: #5
Input File: DATA5.txt
Output File: OUT5.txt
Input
100
2
AB 42
BZ 56
100
2
AB 52
BZ 1+x/100
100
4
AB 41
BZ 42
AC 43
CZ 44
400
4
AB 40
BZ 1+x/100
AC 42
CZ 1+x/100
400
5
AB 1+x/100
BZ 42
BC 1+x/100
AC 1+x/100
CZ 40
Output
98
54
83
44
44