結果

問題 No.2535 多重同値
ユーザー naesiranaesira
提出日時 2023-11-10 22:23:21
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 216 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 639,624 KB
最終ジャッジ日時 2023-11-10 22:23:26
合計ジャッジ時間 5,234 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
62,536 KB
testcase_01 AC 42 ms
55,732 KB
testcase_02 AC 42 ms
55,732 KB
testcase_03 AC 42 ms
55,732 KB
testcase_04 AC 41 ms
55,732 KB
testcase_05 AC 41 ms
55,732 KB
testcase_06 AC 41 ms
55,732 KB
testcase_07 AC 42 ms
55,732 KB
testcase_08 AC 46 ms
55,732 KB
testcase_09 AC 42 ms
55,732 KB
testcase_10 AC 42 ms
55,732 KB
testcase_11 AC 41 ms
55,732 KB
testcase_12 AC 43 ms
55,732 KB
testcase_13 AC 42 ms
55,732 KB
testcase_14 AC 82 ms
77,224 KB
testcase_15 AC 499 ms
236,488 KB
testcase_16 MLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from functools import cache

N = int(input())
P = [input() for i in range(N)]

@cache
def X(l, r):
  if l == r: return P[l-1]
  return P[l-1] == X(l + 1, r) and "Yes" or "No"

for r in range(1, N+1):
  print(X(1, r))
0