結果
| 問題 |
No.3171 Color Restoration
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-27 16:33:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 42 ms / 2,000 ms |
| コード長 | 398 bytes |
| コンパイル時間 | 362 ms |
| コンパイル使用メモリ | 82,180 KB |
| 実行使用メモリ | 53,892 KB |
| 最終ジャッジ日時 | 2025-06-27 16:33:22 |
| 合計ジャッジ時間 | 3,085 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
from itertools import permutations
A = ["gray","brown","green","cyan","blue","yellow","orange","red"]
B = ["gray","green","blue","yellow","red"]
C = ["gray","green","cyan","blue","violet","orange","red"]
D = list(input().split())
E = set()
for p in permutations(D,3):
if p[0] in A and p[1] in B and p[2] in C:
E.add((p[0],p[1],p[2]))
if len(E)==1:
print("Yes")
else:
print("No")