Submission #51538


ソースコード

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
36
#include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pb push_back
#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define reps(i, m, n) for (int i = m; i <= n; ++i)
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fLL;
signed main()
{
cin.tie(0); ios::sync_with_stdio(false);
string str, t;
cin >> str >> t;
string tmpstr = str;
tmpstr += str;
if( str.length() >= t.length() ) {
if( tmpstr.find(t) + 1 ) cout << "found" << endl;
else cout << "not found" << endl;
}
else {
if( t.find(str) + 1 ) cout << "found" << endl;
else cout << "not found" << endl;
}
return 0;
}

ステータス

項目 データ
問題 0931 - 円環の理
ユーザー名 もけ
投稿日時 2019-07-14 18:15:08
言語 C++14
状態 Accepted
得点 1
ソースコード長 827 Byte
最大実行時間 24 ms
最大メモリ使用量 620 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in01.txt AC 23 ms 604 KB
1
in02.txt AC 23 ms 428 KB
1
in03.txt AC 21 ms 508 KB
1
in04.txt AC 18 ms 452 KB
1
in05.txt AC 18 ms 404 KB
1
in06.txt AC 22 ms 620 KB
1
in07.txt AC 24 ms 576 KB
1
sample_in_01.txt AC 22 ms 528 KB
1
sample_in_02.txt AC 17 ms 484 KB
1
sample_in_03.txt AC 16 ms 440 KB
1