結果
| 問題 |
No.588 空白と回文
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-03-09 19:37:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,563 ms / 2,000 ms |
| コード長 | 256 bytes |
| コンパイル時間 | 106 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-09 16:23:10 |
| 合計ジャッジ時間 | 11,035 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 25 |
ソースコード
s,c,i,e,v=input(),6,1,1,0
s=' '+s+' '
for c in range(2,len(s)*2-2):
i,k=1,'' if e else s[c//2]
while 0<(c//2-i) and (c//2+i)<len(s):
a,b=s[c//2-i],s[c//2-e+i]
if a!=b:a=b=' '
k=a+k+b
v=max(v,len(k)-k.count(' '))
i+=1
e^=1
print(v)