本地题面缓存已迁移,解析内容待补充。
OJ: noi_openjudge
题目 ID: ch0113-37
难度:未知
标签:python
日期: 2026-07-30 23:01
题意
完整题面见同目录的 problem.md。
思路
代码
Python代码
python
import sys
records = "".join(sys.stdin.read().split()).split("E", 1)[0]
def scores(limit: int) -> list[tuple[int, int]]:
result = []
left = right = 0
for record in records:
if record == "W":
left += 1
else:
right += 1
if max(left, right) >= limit and abs(left - right) >= 2:
result.append((left, right))
left = right = 0
result.append((left, right))
return result
for left, right in scores(11):
print(f"{left}:{right}")
print()
for left, right in scores(21):
print(f"{left}:{right}")