From c3dbe5c201a657cda877c011d29be9fce34ec87b Mon Sep 17 00:00:00 2001 From: yenru0 Date: Sun, 19 Jan 2025 20:44:01 +0900 Subject: [PATCH] complete 23401.py --- zeta_python/completed/23401.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 zeta_python/completed/23401.py diff --git a/zeta_python/completed/23401.py b/zeta_python/completed/23401.py new file mode 100644 index 0000000..e8b21d8 --- /dev/null +++ b/zeta_python/completed/23401.py @@ -0,0 +1,23 @@ +import sys + +input = sys.stdin.readline + + +def team(a: int): + return 0 if a <= 4 else 1 + + +if __name__ == "__main__": + score = [0, 0] + beforeheads = [-100] * 8 + N = int(input()) + history = [tuple(map(int, input().split())) for _ in range(N)] + for t, a, b in history: + tm, oppo = team(a), team(b) + if tm == oppo: + continue + elif t - beforeheads[a - 1] <= 10: + score[tm] += 50 + score[tm] += 100 + beforeheads[a - 1] = t + print(" ".join(map(str, score)))