#P3845. [TJOI2007] 球赛

    ID: 2761 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 7 上传者: 标签>贪心2007各省省选概率论,统计天津

[TJOI2007] 球赛

Output Format

For each testdata, output a single integer mm, the minimum number of matches that H must have missed.

2
4
1-0
2-0
0-3
2-1
4
5-0
1-3
2-2
0-0
2
3

Hint

In the first testdata, two matches may correspond to 1-0 2-0 0-3 and 2-1.

In the second testdata, three matches may correspond to 0-0, 5-0 3-1, and 2-2.

Constraints: For 100% of the testdata, n5n \leq 5, s1000s \leq 1000, and every score fits in longint(Pascal) / long(C++) (21474836472147483647).

Translated by ChatGPT 5