Submission #35615
ソースコード
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 | #include <bits/stdc++.h> using namespace std; int main(){ string str,t; cin >> str >> t; int check; bool fin = false ; for ( int i = 0;i < str.size() && !fin;i++){ check = i; int j; for (j = 0;j < t.size();j++){ if (t[j] != str[check]) break ; check = (check + 1) % str.size(); } if (j == t.size()) fin = true ; } if (fin){ cout << "found" << endl; } else { cout << "not found" << endl; } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0931 - 円環の理 |
ユーザー名 | ei1719 |
投稿日時 | 2018-05-13 17:46:18 |
言語 | C++11 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 487 Byte |
最大実行時間 | 26 ms |
最大メモリ使用量 | 544 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 25 ms | 480 KB |
1
|
in02.txt | AC | 24 ms | 456 KB |
1
|
in03.txt | AC | 26 ms | 428 KB |
1
|
in04.txt | AC | 21 ms | 400 KB |
1
|
in05.txt | AC | 26 ms | 380 KB |
1
|
in06.txt | AC | 19 ms | 488 KB |
1
|
in07.txt | AC | 20 ms | 464 KB |
1
|
sample_in_01.txt | AC | 21 ms | 440 KB |
1
|
sample_in_02.txt | AC | 21 ms | 544 KB |
1
|
sample_in_03.txt | AC | 25 ms | 520 KB |
1
|