結果
| 問題 | No.3171 Color Restoration |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-27 16:33:18 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 59 ms / 2,000 ms |
| + 110µs | |
| コード長 | 398 bytes |
| 記録 | |
| コンパイル時間 | 541 ms |
| コンパイル使用メモリ | 95,856 KB |
| 実行使用メモリ | 79,076 KB |
| 最終ジャッジ日時 | 2026-07-12 19:52:24 |
| 合計ジャッジ時間 | 3,787 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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")