結果

問題 No.2204 Palindrome Splitting (No Rearrangement ver.)
ユーザー ntudantuda
提出日時 2023-02-06 21:01:08
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 320 bytes
コンパイル時間 1,306 ms
コンパイル使用メモリ 86,916 KB
実行使用メモリ 98,200 KB
最終ジャッジ日時 2023-09-18 07:13:03
合計ジャッジ時間 18,000 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,552 KB
testcase_01 AC 68 ms
71,436 KB
testcase_02 AC 67 ms
71,452 KB
testcase_03 AC 655 ms
77,552 KB
testcase_04 AC 163 ms
77,392 KB
testcase_05 AC 124 ms
77,448 KB
testcase_06 AC 1,492 ms
78,204 KB
testcase_07 AC 1,167 ms
78,328 KB
testcase_08 AC 1,099 ms
78,152 KB
testcase_09 AC 1,196 ms
78,432 KB
testcase_10 AC 1,543 ms
78,060 KB
testcase_11 AC 1,240 ms
78,228 KB
testcase_12 AC 1,587 ms
78,336 KB
testcase_13 AC 1,432 ms
78,548 KB
testcase_14 AC 1,475 ms
78,372 KB
testcase_15 AC 1,358 ms
78,264 KB
testcase_16 AC 430 ms
77,712 KB
testcase_17 AC 640 ms
77,920 KB
testcase_18 AC 1,541 ms
78,444 KB
testcase_19 AC 1,427 ms
78,152 KB
testcase_20 AC 1,404 ms
78,092 KB
testcase_21 AC 1,517 ms
78,524 KB
testcase_22 AC 1,718 ms
78,156 KB
testcase_23 AC 1,653 ms
78,468 KB
testcase_24 AC 1,475 ms
78,484 KB
testcase_25 AC 1,400 ms
77,976 KB
testcase_26 AC 1,439 ms
78,412 KB
testcase_27 AC 774 ms
78,484 KB
testcase_28 AC 1,482 ms
78,080 KB
testcase_29 AC 1,396 ms
78,260 KB
testcase_30 AC 69 ms
71,480 KB
testcase_31 AC 66 ms
71,608 KB
testcase_32 TLE -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

S = input()
N = len(S)
T = S[::-1]
E = [[i+1] for i in range(N)]
for i in range(N):
    for j in range(2, N - i + 1):
        if S[i:i + j] == T[N - i - j:N - i]:
            E[i].append(i + j)
dp = [0] * (N + 1)
dp[0] = N
for i in range(N):
    for j in E[i]:
        dp[j] = max(dp[j], min(dp[i], j - i))
print(dp[N])
0