Submission #35562
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #include <stdio.h> #include <string.h> int main() { char s[2048] = "" ; char w[1024]; char buf[1024]; scanf ( "%s %s" , buf, w); int len_buf = strlen (buf); int len_w = strlen (w); int len_s = 0; while (len_s < len_w) { strcat (s, buf); len_s += len_buf; } strcat (s, buf); len_s += len_buf; int i, wp; for (i=0; i+len_w <= len_s; ++i) { wp = 0; while (wp < len_w && w[wp] == s[i+wp]) { ++wp; } if (wp == len_w) break ; } puts (wp == len_w ? "found" : "not found" ); return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0931 - 円環の理 |
ユーザー名 | Arumakan_ei1727 |
投稿日時 | 2018-05-12 20:19:09 |
言語 | C |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 609 Byte |
最大実行時間 | 23 ms |
最大メモリ使用量 | 500 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 19 ms | 380 KB |
1
|
in02.txt | AC | 22 ms | 412 KB |
1
|
in03.txt | AC | 22 ms | 464 KB |
1
|
in04.txt | AC | 23 ms | 428 KB |
1
|
in05.txt | AC | 20 ms | 480 KB |
1
|
in06.txt | AC | 19 ms | 500 KB |
1
|
in07.txt | AC | 21 ms | 424 KB |
1
|
sample_in_01.txt | AC | 16 ms | 384 KB |
1
|
sample_in_02.txt | AC | 19 ms | 408 KB |
1
|
sample_in_03.txt | AC | 14 ms | 464 KB |
1
|