結果
| 問題 |
No.3171 Color Restoration
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2025-06-06 21:52:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 388 bytes |
| コンパイル時間 | 432 ms |
| コンパイル使用メモリ | 82,044 KB |
| 実行使用メモリ | 54,396 KB |
| 最終ジャッジ日時 | 2025-06-06 21:52:19 |
| 合計ジャッジ時間 | 3,268 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 18 WA * 8 |
ソースコード
from itertools import permutations
coders = [
["gray","brown","green","cyan","blue","yellow","orange","red"],
["gray","green","blue","yellow","red"],
["gray","green","cyan","blue","violet","orange","red"]
]
S = input().split()
cnt = 0
for perm in permutations(S):
if all(s in coders[i] for i, s in enumerate(perm)):
cnt += 1
print("Yes" if cnt == 1 else "No")