結果
| 問題 |
No.3171 Color Restoration
|
| コンテスト | |
| ユーザー |
timi
|
| 提出日時 | 2025-06-06 21:26:43 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 432 bytes |
| コンパイル時間 | 468 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 57,984 KB |
| 最終ジャッジ日時 | 2025-06-06 21:26:46 |
| 合計ジャッジ時間 | 2,782 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
S=['gray','brown','green','cyan','blue','yellow','orange','red']
T=['gray','green','blue','yellow','red']
U=['gray','green','cyan','blue','violet','orange','red']
a,b,c=input().split()
B=sorted([a,b,c])
B=tuple(B)
D={}
for s in S:
for t in T:
for u in U:
A=sorted([s,t,u])
A=tuple(A)
if A not in D:
D[A]=0
D[A]+=1
if B not in D:
print('No')
elif D[B]==1:
print('Yes')
else:
print('No')
timi