結果
| 問題 |
No.3171 Color Restoration
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-06 21:22:54 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 144 ms / 2,000 ms |
| コード長 | 724 bytes |
| コンパイル時間 | 599 ms |
| コンパイル使用メモリ | 82,824 KB |
| 実行使用メモリ | 86,436 KB |
| 最終ジャッジ日時 | 2025-06-06 21:23:00 |
| 合計ジャッジ時間 | 5,925 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
#n = int(input())
#a = list(map(int,input().split()))
#a = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# a.append(list(map(int,input().split())))
a = ["gray","brown","green","cyan","blue","yellow","orange","red"]
b = ["gray","green","blue","yellow","red"]
c = ["gray","green","cyan","blue","violet","orange","red"]
x,y,z =input().split()
ans = set()
for i in itertools.permutations([x,y,z]):
if i[0] in a and i[1] in b and i[2] in c:
ans.add((i[0],i[1],i[2]))
print('Yes' if len(ans) == 1 else 'No')