結果
| 問題 | No.430 文字列検索 |
| コンテスト | |
| ユーザー |
👑 tails
|
| 提出日時 | 2016-10-02 23:38:55 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 99 bytes |
| 記録 | |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 28,612 KB |
| 最終ジャッジ日時 | 2026-02-23 22:26:50 |
|
ジャッジサーバーID (参考情報) |
judge1 / 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,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++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,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++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,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r;r=!printf("%d",r);}
| ^
main.c:1:61: warning: incompatible implicit declaration of built-in function ‘strstr’ [-Wbuiltin-declaration-mismatch]
1 | s[13000];r;main(p,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++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,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r;r=!printf("%d",r);}
main.c:1:68: warning: passing argument 1 of ‘strstr’ makes pointer from integer without a cast [-Wint-conversion]
1 | s[13000];r;main(p,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r;r=!printf("%d",r);}
| ^
| |
| int
main.c:1:68: note: expected ‘const char *’ but argument is of type ‘int’
main.c:1:70: warning: passing argument 2 of ‘strstr’ makes pointer from integer without a cast [-Wint-conversion]
1 | s[13000];r;main(p,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r;r=!printf("%d",r);}
ソースコード
s[13000];r;main(p,c){for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r;r=!printf("%d",r);}
tails