結果
問題 |
No.1679 マスゲーム
|
ユーザー |
|
提出日時 | 2021-09-14 22:09:42 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 794 ms / 2,000 ms |
コード長 | 305 bytes |
コンパイル時間 | 176 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 26,020 KB |
最終ジャッジ日時 | 2024-06-27 13:42:45 |
合計ジャッジ時間 | 13,485 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
N = int(input()) red = [] blue = [] for _ in range(N): a,b,t = map(int,input().split()) if a==0: red.append(b-t) else: blue.append(b-t) from collections import Counter c = Counter(red) c_b = Counter(blue) ans = 0 for key,value in c.items(): ans += value*c_b[key] print(ans)