結果
問題 |
No.3171 Color Restoration
|
ユーザー |
![]() |
提出日時 | 2025-06-06 21:34:44 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 681 bytes |
コンパイル時間 | 388 ms |
コンパイル使用メモリ | 82,168 KB |
実行使用メモリ | 53,916 KB |
最終ジャッジ日時 | 2025-06-06 21:34:46 |
合計ジャッジ時間 | 2,344 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 WA * 9 |
ソースコード
s1,s2,s3 = map(str, input().split()) s = [s1,s2,s3] if len(set(s)) == 1: print("Yes") exit() a=[{"gray","brown","green","cyan","blue","yellow","orange","red"}, {"gray","green","blue","yellow","red"}, {"gray","green","cyan","blue","violet","orange","red"}] while len(a) > 0: b = False for si in s: c = 0 for ai in a: if si in ai: c += 1 if c==1: for ai in a: if si in ai: s.remove(si) a.remove(ai) break b = True break if not b: break if len(a) == 0: print("Yes") else: print("No")