結果
| 問題 | No.3171 Color Restoration |
| コンテスト | |
| ユーザー |
norioc
|
| 提出日時 | 2025-06-06 21:43:02 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 82 ms / 2,000 ms |
| + 990µs | |
| コード長 | 518 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 95,852 KB |
| 実行使用メモリ | 83,072 KB |
| 最終ジャッジ日時 | 2026-07-11 06:13:05 |
| 合計ジャッジ時間 | 4,142 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
from collections import Counter
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()
def solve():
freq = Counter()
for x in a:
for y in b:
for z in c:
t = tuple(sorted([x, y, z]))
freq[t] += 1
ss = tuple(sorted([S1, S2, S3]))
return freq[ss] == 1
if solve():
print('Yes')
else:
print('No')
norioc