結果

問題 No.430 文字列検索
コンテスト
ユーザー 👑 tails
提出日時 2016-10-02 23:42:19
言語 C90(gcc12)
(gcc 12.4.0)
コンパイル:
gcc-12 -O2 -std=c90 -DONLINE_JUDGE -o a.out _filename_ -lm
実行:
./a.out
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 101 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 306 ms
コンパイル使用メモリ 28,736 KB
最終ジャッジ日時 2026-02-23 22:26:54
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 4
other RE * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
    1 | s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++r;r=!printf("%d",r);}
      | ^
main.c:1:10: warning: data definition has no type or storage class
    1 | s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++r;r=!printf("%d",r);}
      |          ^
main.c: In function ‘main’:
main.c:1:56: warning: assignment to ‘int’ from ‘int *’ makes integer from pointer without a cast [-Wint-conversion]
    1 | s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++r;r=!printf("%d",r);}
      |                                                        ^
main.c:1:63: warning: incompatible implicit declaration of built-in function ‘strstr’ [-Wbuiltin-declaration-mismatch]
    1 | s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++r;r=!printf("%d",r);}
      |                                                               ^~~~~~
main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strstr’
  +++ |+#include <string.h>
    1 | s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++r;r=!printf("%d",r);}
main.c:1:70: warning: passing argument 1 of ‘strstr’ makes pointer from integer without a cast [-Wint-conversion]
    1 | s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++r;r=!printf("%d",r);}
      |                                                                      ^
      |                                                                      |
      |                                                                      int
main.c:1:70: note: expected ‘const char *’ but argument is of type ‘int’
main.c:1:72: warning: passing argument 2 of ‘strstr’ from incompatible pointer type [-Wincompatible-pointer-types]
    1 | s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++

ソースコード

diff #
raw source code

s[13000];r;main(p){for(gets(s+4),gets(s);gets(s);)for(p=s+4;p=strstr(p,s);++p)++r;r=!printf("%d",r);}
0