Submission #35764


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<bits/stdc++.h>
using namespace std;
int main(){
string s,a;
cin>>s>>a;
a+=a;
if (a.find(s)!=-1){
cout<<"YES"<<endl;
}else{
reverse(a.begin(),a.end());
if(a.find(s)!=-1) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
}

ステータス

項目 データ
問題 0938 - 魔剤が飲みたい
ユーザー名 YUSAKU(ei1718)
投稿日時 2018-05-14 17:59:42
言語 C++17
状態 Accepted
得点 1
ソースコード長 271 Byte
最大実行時間 30 ms
最大メモリ使用量 600 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
case1.txt AC 21 ms 480 KB
1
case2.txt AC 18 ms 452 KB
1
reverse1.txt AC 28 ms 552 KB
1
reverse2.txt AC 22 ms 528 KB
1
test1.txt AC 22 ms 500 KB
1
test2.txt AC 30 ms 600 KB
1
test3.txt AC 20 ms 448 KB
1