結果

問題 No.3381 Palindrome Substrings (C++)
ユーザー Kinoko_Sokora
提出日時 2026-11-13 13:36:48
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 170 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,375 ms
コンパイル使用メモリ 213,556 KB
実行使用メモリ 6,400 KB
スコア 0
最終ジャッジ日時 2026-11-13 13:36:54
合計ジャッジ時間 5,550 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 2 WA * 20
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:1:2: warning: '#import' is a deprecated GCC extension [-Wdeprecated]
    1 | #import<bits/stdc++.h>
      |  ^~~~~~
main.cpp:2:29: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | int n,j,k;char s[501],re[2];main(){std::cin>>n>>s;for(*re='0',n++;--n;)for(j=n;j--;)for(k=0;k<n-j&&s[j+k]==s[n-k-1];*re += (k++)==n-j-1);puts(re);}
      |                             ^~~~

ソースコード

diff #
raw source code

#import<bits/stdc++.h>
int n,j,k;char s[501],re[2];main(){std::cin>>n>>s;for(*re='0',n++;--n;)for(j=n;j--;)for(k=0;k<n-j&&s[j+k]==s[n-k-1];*re += (k++)==n-j-1);puts(re);}
0