結果
問題 |
No.1390 Get together
|
ユーザー |
![]() |
提出日時 | 2022-11-29 14:28:36 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 328 bytes |
コンパイル時間 | 302 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 54,728 KB |
最終ジャッジ日時 | 2024-10-07 01:44:46 |
合計ジャッジ時間 | 15,041 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 14 |
ソースコード
from collections import defaultdict def main(): n, m = map(int, input().split()) d = defaultdict(set) for _ in range(n): box, color = map(int, input().split()) d[color].add(box) ans = 0 for x in d.values(): ans += len(x) - 1 print(ans) if __name__ == "__main__": main()