結果
| 問題 |
No.3171 Color Restoration
|
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-06-06 21:35:19 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 39 ms / 2,000 ms |
| コード長 | 627 bytes |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2025-06-06 21:35:22 |
| 合計ジャッジ時間 | 2,100 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
c1=["gray","brown","green","cyan","blue","yellow","orange","red"] c2=["gray","green","blue","yellow","red"] c3=["gray","green","cyan","blue","violet","orange","red"] s1,s2,s3=input().split() ok=set() if (s1 in c1) and (s2 in c2) and (s3 in c3): ok.add((s1,s2,s3)) if (s1 in c1) and (s3 in c2) and (s2 in c3): ok.add((s1,s3,s2)) if (s2 in c1) and (s1 in c2) and (s3 in c3): ok.add((s2,s1,s3)) if (s2 in c1) and (s3 in c2) and (s1 in c3): ok.add((s2,s3,s1)) if (s3 in c1) and (s1 in c2) and (s2 in c3): ok.add((s3,s1,s2)) if (s3 in c1) and (s2 in c2) and (s1 in c3): ok.add((s3,s2,s1)) print(["No","Yes"][len(ok)==1])
sasa8uyauya