Submission #55656
ソースコード
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 | #include<bits/stdc++.h> #define INF 2147483647 #define inf 1000000007 #define int long long #define SYOU(x) setprecision(x) #define abs(x,y) (max(x,y)-min(x,y)) #define mp make_pair #define fi first #define se second using namespace std; int i[111100]; bool ii[11111]; int u; signed main(){ cin.tie(0); ios::sync_with_stdio( false ); long long a,b,c,d=0,e=0,f=0,g=1,h=2,j; string s,w,p; cin >>s>>w; p=s,s+=s; while (1){ if (s.size()>w.size()*2) break ; s+=p; } if (s.find(w)!=-1) cout << "found\n" ; else cout << "not found\n" ; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0931 - 円環の理 |
ユーザー名 | ei1923 |
投稿日時 | 2019-10-15 16:25:54 |
言語 | C++14 |
状態 | Accepted |
得点 | 1 |
ソースコード長 | 591 Byte |
最大実行時間 | 31 ms |
最大メモリ使用量 | 696 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 1 / 1 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 30 ms | 604 KB |
1
|
in02.txt | AC | 19 ms | 680 KB |
1
|
in03.txt | AC | 20 ms | 628 KB |
1
|
in04.txt | AC | 19 ms | 696 KB |
1
|
in05.txt | AC | 31 ms | 652 KB |
1
|
in06.txt | AC | 16 ms | 480 KB |
1
|
in07.txt | AC | 24 ms | 556 KB |
1
|
sample_in_01.txt | AC | 15 ms | 508 KB |
1
|
sample_in_02.txt | AC | 19 ms | 592 KB |
1
|
sample_in_03.txt | AC | 27 ms | 548 KB |
1
|