Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: False Perceptions
Description
You have been reading Harry Potter series for some time. Since the final book will not be out in the store until 2007, and you are curious about what could happen in the final book of the series, you have decided to do some guessing by yourself. After rereading the series for some days, you have divided every piece of information you currently have into three categories: *Extracts*. Extracts are taken from the previous published books in the series, and you don’t need to check for their validities;*Assumptions*. Assumptions are based on different interpretations of other assumptions/extracts from the books. An assumption is plausible if and only if some of the assumptions (or extracts from the book) this assumption relies on are interpreted in ways that support this assumption. No assumption requires itself to be plausible, whether directly or indirectly.*Theories*. Theories are based on extracts and assumptions. If all the extracts and assumptions one theory depends on are believable and interpreted to support this theory, then we say this theory can be argued as believable.
Note that extracts and assumptions may have many different exclusive explanations leading to other theories and/or assumptions. Because of personal preferences, you want to see some scenes in the next book come true much more than the others, thus you have assigned different values to different theories, each being an exponent of 2, less or equal to 2 Input The input consists of several cases, each followed by a blank line. Each test case starts with three integers The following part describes extracts and assumptions. Extracts are always described before assumptions. Each description starts with one string The next part of test case consists of Two successive descriptions are separated by a line with one single character ‘
Output For every test case, output the maximum value followed by the minimum number of explanations you have to make in the format as indicated in the sample output. Print all the plausible theories (with the maximum total value) on the following lines. Separate the result of two successive inputs with one blank line. Sample Input 2 3 1 Extract1 2 Assumption1 Assumption2 - Extract2 2 Assumption2 Assumption3 - Assumption1 2 Assumption2 Theory1 - Assumption2 0 - Assumption3 1 Theory1 - Theory1 1 0 0 0 Sample Output Case 1: 1 4 Theory1 Hint In order to make Source |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator