There is no higher-level championship that ranks the regional and subregional programming contests themselves, largely because whole contests are hard to compare. Here is one way to do it. We measure how far a contest's result table is from an "ideal" contest with a quantity called negidealness — a weighted sum of the penalties below. Throughout, let $T$ be the number of participating teams and $P$ the number of problems.
Vainness $V$. Every team should solve at least one problem. For each team that solves no problem, add $1/T$.
Oversimplification $O$. No team should solve every problem. For each team that solves all $P$ problems, add $1/T$.
Evenness $E$. The number of problems solved should decrease smoothly down the standings. Teams are listed in standings order. For each pair of teams adjacent in the standings whose solved counts differ by $d > 1$, add $(d-1)/P$ — one $1/P$ for every solved-count value skipped between them. For example, if one team solves 5 problems and the next solves 1, then 2, 3 and 4 are skipped and $3/P$ is added.
Unsolvability $U$. Every problem should be solved by at least one team. For each problem that no team solves, add $1/P$.
Instability $I_1, I_2, \dots, I_P$. If some team solves problem $p$, then every team ranked above it should also solve $p$. For problem $p$, take the lowest-ranked team that solved $p$; for each team ranked strictly above that team (a strictly smaller rank number) that did not solve $p$, add $1/T$ to $I_p$. If no team solves $p$, then $I_p = 0$.
The total negidealness is $$N = 1.03,V + 3.141,O + 2.171,E + 1.414,U + \frac{I_1 + I_2 + \dots + I_P}{P}.$$
Write a program that computes every penalty and the total negidealness for a given result table.
The input is a contest result table in plain ASCII. The only whitespace character is the space, and columns are separated by at least one space.
-).Team, then the problem letters (capital letters A, B, … in alphabetical order), then =, Time, and R.R.+ or +k if the team solved that problem (with $k$ earlier wrong attempts), -k if the team only made wrong attempts, or . if it never tried. A team has solved a problem exactly when its cell begins with +.There are at most 26 problems and at most 300 teams.
Print, each on its own line:
Vainness = followed by $V$,Oversimplification = followed by $O$,Evenness = followed by $E$,Unsolvability = followed by $U$,Instability p = followed by $I_p$ for $p = 1, 2, \dots, P$,Negidealness = followed by $N$.Every value is printed rounded to exactly three digits after the decimal point. The test data is chosen so that no value ever lands on a rounding boundary, so any correct rounding to three decimals produces the same text.