結果
問題 |
No.3171 Color Restoration
|
ユーザー |
|
提出日時 | 2025-06-06 21:28:41 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 728 bytes |
コンパイル時間 | 547 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 54,196 KB |
最終ジャッジ日時 | 2025-06-06 21:28:45 |
合計ジャッジ時間 | 2,702 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 18 WA * 8 |
ソースコード
import sys input = lambda :sys.stdin.readline()[:-1] ni = lambda :int(input()) na = lambda :list(map(int,input().split())) yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES") no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO") ####################################################################### c = [["gray","brown","green","cyan","blue","yellow","orange","red"], ["gray","green","blue","yellow","red"], ["gray","green","cyan","blue","violet","orange","red"]] s = input().split() from itertools import permutations n = 3 ans = 0 for p in permutations(range(n), n): if all(s[p[i]] in c[i] for i in range(n)): ans += 1 if ans == 1: Yes() else: No()