結果
問題 |
No.588 空白と回文
|
ユーザー |
👑 |
提出日時 | 2021-11-19 09:56:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 404 bytes |
コンパイル時間 | 720 ms |
コンパイル使用メモリ | 64,968 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-29 23:29:37 |
合計ジャッジ時間 | 1,878 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 9 |
ソースコード
#include <iostream> using namespace std; int main(){ string s;cin>>s; int ans = 0; for(int i = 0; s.size() > i; i++){ int tmp = 1; //cout << s[i] << endl; for(int j = 1; min(i,(int)s.size()-i-1) >= j; j++){ //cout << s[i-j] << " " << s[i+j] << endl; if(s[i-j] == s[i+j]){ tmp+=2; } } //cout << endl; ans = max(ans,tmp); } cout << ans << endl; }