結果
| 問題 | No.3171 Color Restoration |
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2025-06-06 21:35:19 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 64 ms / 2,000 ms |
| + 300µs | |
| コード長 | 627 bytes |
| 記録 | |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 95,716 KB |
| 実行使用メモリ | 79,104 KB |
| 最終ジャッジ日時 | 2026-07-11 06:10:48 |
| 合計ジャッジ時間 | 3,598 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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