結果
問題 | No.430 文字列検索 |
ユーザー | tails |
提出日時 | 2016-10-02 23:31:58 |
言語 | C90 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 664 ms / 2,000 ms |
コード長 | 117 bytes |
コンパイル時間 | 365 ms |
コンパイル使用メモリ | 19,456 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-10 00:04:04 |
合計ジャッジ時間 | 4,689 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 20 ms
5,248 KB |
testcase_02 | AC | 457 ms
5,248 KB |
testcase_03 | AC | 361 ms
5,248 KB |
testcase_04 | AC | 0 ms
5,248 KB |
testcase_05 | AC | 0 ms
5,248 KB |
testcase_06 | AC | 0 ms
5,248 KB |
testcase_07 | AC | 0 ms
5,248 KB |
testcase_08 | AC | 1 ms
5,248 KB |
testcase_09 | AC | 1 ms
5,248 KB |
testcase_10 | AC | 1 ms
5,248 KB |
testcase_11 | AC | 275 ms
5,248 KB |
testcase_12 | AC | 279 ms
5,248 KB |
testcase_13 | AC | 276 ms
5,248 KB |
testcase_14 | AC | 376 ms
5,248 KB |
testcase_15 | AC | 664 ms
5,248 KB |
testcase_16 | AC | 527 ms
5,248 KB |
testcase_17 | AC | 495 ms
5,248 KB |
コンパイルメッセージ
main.c:1:24: warning: data definition has no type or storage class 1 | char s[50010],c[12],*p;r; | ^ main.c:1:24: warning: type defaults to ‘int’ in declaration of ‘r’ [-Wimplicit-int] main.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 2 | main(m){ | ^~~~ main.c: In function ‘main’: main.c:2:1: warning: type of ‘m’ defaults to ‘int’ [-Wimplicit-int] main.c:3:13: warning: implicit declaration of function ‘gets’ [-Wimplicit-function-declaration] 3 | for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r; | ^~~~ main.c:3:48: warning: implicit declaration of function ‘strstr’ [-Wimplicit-function-declaration] 3 | for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r; | ^~~~~~ main.c:1:1: note: include ‘<string.h>’ or provide a declaration of ‘strstr’ +++ |+#include <string.h> 1 | char s[50010],c[12],*p;r; main.c:3:48: warning: incompatible implicit declaration of built-in function ‘strstr’ [-Wbuiltin-declaration-mismatch] 3 | for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r; | ^~~~~~ main.c:3:48: note: include ‘<string.h>’ or provide a declaration of ‘strstr’ main.c:4:12: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] 4 | r=!printf("%d",r); | ^~~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ +++ |+#include <stdio.h> 1 | char s[50010],c[12],*p;r; main.c:4:12: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch] 4 | r=!printf("%d",r); | ^~~~~~ main.c:4:12: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’ /usr/bin/ld: /tmp/ccJ2zgiV.o: in function `main': main.c
ソースコード
char s[50010],c[12],*p;r; main(m){ for(gets(s),gets(c);gets(c);)for(p=s;p=strstr(p,c);++p)++r; r=!printf("%d",r); }