結果
問題 |
No.273 回文分解
|
ユーザー |
|
提出日時 | 2017-10-04 02:17:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 239 bytes |
コンパイル時間 | 507 ms |
コンパイル使用メモリ | 64,232 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-16 06:26:02 |
合計ジャッジ時間 | 1,496 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 9 WA * 23 |
コンパイルメッセージ
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 ans; main() { cin>>s; for(int i=0;i<s.size();i++) { int j; for(j=0;i-j>=0&&i+j<s.size()&&!(i-j==0&&i+j==s.size()-1)&&s[i-j]==s[i+j];j++); ans=ans<j?j:ans; } cout<<ans<<endl; }