結果
| 問題 | No.3786 Four Triplets, One Pair |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-06 23:26:53 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 36 ms / 2,000 ms |
| + 86µs | |
| コード長 | 487 bytes |
| 記録 | |
| コンパイル時間 | 748 ms |
| コンパイル使用メモリ | 64,588 KB |
| 実行使用メモリ | 53,660 KB |
| 最終ジャッジ日時 | 2026-11-06 23:26:58 |
| 合計ジャッジ時間 | 3,357 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
A = sorted(list(map(int, input().split())))
from collections import defaultdict
B = defaultdict(int) # 初期値に 0 を自動セット
for i in range(13):
B[A[i]] += 1
C = defaultdict(list)
for key, val in B.items():
C[val].append(key)
if len(C[1]) == 1 and len(C[2]) == 0 and len(C[3]) == 4:
print(len(C[1]))
print(*C[1])
elif len(C[1]) == 0 and len(C[2]) == 2 and len(C[3]) ==3:
print(len(C[2]))
print(*C[2])
else:
print(0)
print()