結果
| 問題 | No.3381 Palindrome Substrings (C++) |
| コンテスト | |
| ユーザー |
ID 21712
|
| 提出日時 | 2026-04-27 13:22:00 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 155 bytes |
| 記録 | |
| コンパイル時間 | 205 ms |
| コンパイル使用メモリ | 39,424 KB |
| 実行使用メモリ | 6,400 KB |
| スコア | 68 |
| 最終ジャッジ日時 | 2026-04-27 13:22:08 |
| 合計ジャッジ時間 | 7,564 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 7 WA * 15 |
コンパイルメッセージ
main.cpp:2:15: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | int c,n,a,i,j;main(int d,char*s){scanf("%d%s",&n,s);for(;++c<=n;)for(i=n;i--;a+=!d)for(d=0,j=c;j--;)d+=s[i+j]*(c-1-j-j);printf("%d\n",a);}
| ^~~~
main.cpp:2:15: warning: second argument of 'int main(int, char*)' should be 'char **' [-Wmain]
ソースコード
#include<cstdio>
int c,n,a,i,j;main(int d,char*s){scanf("%d%s",&n,s);for(;++c<=n;)for(i=n;i--;a+=!d)for(d=0,j=c;j--;)d+=s[i+j]*(c-1-j-j);printf("%d\n",a);}
ID 21712