結果
問題 |
No.3171 Color Restoration
|
ユーザー |
|
提出日時 | 2025-06-06 21:32:11 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 348 bytes |
コンパイル時間 | 333 ms |
コンパイル使用メモリ | 82,972 KB |
実行使用メモリ | 53,856 KB |
最終ジャッジ日時 | 2025-06-06 21:32:14 |
合計ジャッジ時間 | 2,481 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
from itertools import* a='gray','brown','green','cyan','blue','yellow','orange','red' b='gray','green','blue','yellow','red' c='gray','green','cyan','blue','violet','orange','red' s1,s2,s3=input().split() f=set() for s in permutations([s1,s2,s3]): if s[0]in a and s[1]in b and s[2]in c: f|={s} if len(f)==1: print('Yes') else: print('No')