結果
| 問題 |
No.3171 Color Restoration
|
| コンテスト | |
| ユーザー |
nikoro256
|
| 提出日時 | 2025-06-06 21:40:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 616 bytes |
| コンパイル時間 | 340 ms |
| コンパイル使用メモリ | 82,360 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2025-06-06 21:40:19 |
| 合計ジャッジ時間 | 2,858 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
s1,s2,s3 = map(str, input().split())
s = [s1,s2,s3]
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==s.count(si):
for ai in a:
if si in ai:
s.remove(si)
a.remove(ai)
b = True
break
if not b:
break
if len(a) == 0:
print("Yes")
else:
print("No")
nikoro256