結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2020-12-18 18:36:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 1,000 ms |
コード長 | 310 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 81,904 KB |
実行使用メモリ | 53,688 KB |
最終ジャッジ日時 | 2024-09-21 09:14:13 |
合計ジャッジ時間 | 3,523 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
ソースコード
s = tuple(1 if i=="o" else 0 for i in input()) n = int(input()) t = tuple(1 if i=="o" else 0 for i in input()) n = min(n,10) dp = [s] for _ in range(n): ndp = set() for r in dp: ndp.add((r[1],r[0],r[2])) ndp.add((r[0],r[2],r[1])) dp = ndp print("FAILURE" if t in dp else "SUCCESS")