結果
問題 |
No.588 空白と回文
|
ユーザー |
|
提出日時 | 2017-11-13 02:30:56 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 238 bytes |
コンパイル時間 | 694 ms |
コンパイル使用メモリ | 65,660 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-24 23:25:46 |
合計ジャッジ時間 | 1,330 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 9 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; string s;int r; main() { cin>>s; for(int i=0;i<s.size();i++) { int now=0; for(int j=i<s.size()-i-1?i:s.size()-i-1;j>=0;j--)now+=(s[i-j]==s[i+j])*(2-!j); r=r<now?now:r; } cout<<r<<endl; }