結果
問題 |
No.3171 Color Restoration
|
ユーザー |
|
提出日時 | 2025-06-06 21:31:59 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 47 ms / 2,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 314 ms |
コンパイル使用メモリ | 82,220 KB |
実行使用メモリ | 60,932 KB |
最終ジャッジ日時 | 2025-06-06 21:32:02 |
合計ジャッジ時間 | 2,604 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
from collections import defaultdict c1 = ["gray","brown","green","cyan","blue","yellow","orange","red"] c2 = ["gray","green","blue","yellow","red"] c3 = ["gray","green","cyan","blue","violet","orange","red"] d = defaultdict(int) for a in c1: for b in c2: for c in c3: k = [a, b, c] k.sort() d[tuple(k)] += 1 Ss = input().split() Ss.sort() print("Yes" if d[tuple(Ss)] == 1 else "No")