**1 人解决**，4 人已尝试。

**1 份提交通过**，共有 8 份提交。

**9.9** EMB 奖励。

**单点时限: **2.0 sec

**内存限制: **256 MB

Imagine some Soccer World Cup. After the first stage, 16 countries are remaining now, among which the winner is determined by the following tournament (the names are from the sample input but could also be different):

For each possible match A vs. B between these 16 nations, you are iven the probability that team A wins against B. Your task is to determine for each nation the chance to become the world champion.

The first line contains the number of scenarios. For each scenario, the first 16 lines tell the names of the 16 countries (each a single string of up to 10 letters), from top to bottom according to the structure given above. Next, a 16×16 integer matrix p is specified, where element pi,j gives the probability in percent that the ith country defeats the jth country in a direct match, e. g. the p1,13 = 57 in the sample input means that in a match between Germany and Brazil, Germany wins with a probability of 57%. Note that matches may not end in a draw, i. e. pi,j + pj,i = 100 for all i, j.

The output for every scenario begins with a line containing “Scenario #i:”, where i is the number of the scenario starting at 1. Then print 16 lines of width 17, on the left the country’s name, on the right its chance in percent to become world champion, rounded to two decimal places. Print space characters to fill the middle. Use the same order of countries as given in the input file. Terminate each scenario with a blank line.

**1 人解决**，4 人已尝试。

**1 份提交通过**，共有 8 份提交。

**9.9** EMB 奖励。

**创建**: 17 年，11 月前.

**修改**: 6 年，9 月前.

**最后提交**: 15 年，7 月前.

**来源**: TUD Programming Contest 2006 (Training Session), Darmstadt, Germ

题目标签