Submission #36067


ソースコード

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
37
38
39
40
41
42
43
#include <stdio.h>
#include <string.h>
int main(){
char key[300];
scanf("%s", key);
char input[300];
char str[600];
scanf("%s", input);
strcpy(str, input);
strcat(str, input);
if(strstr(str, key) > 0){
printf("YES\n");
}
else{
int left = 0;
int right = strlen(key) - 1;
while(left < right){
char temp = key[left];
key[left] = key[right];
key[right] = temp;
left++;
right--;
}
if(strstr(str, key) > 0){
printf("YES\n");
}
else{
printf("NO\n");
}
}
return(0);
}

ステータス

項目 データ
問題 0938 - 魔剤が飲みたい
ユーザー名 r1825
投稿日時 2018-05-25 17:22:45
言語 C
状態 Accepted
得点 1
ソースコード長 637 Byte
最大実行時間 26 ms
最大メモリ使用量 476 KB

セット

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

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
case1.txt AC 23 ms 380 KB
1
case2.txt AC 26 ms 408 KB
1
reverse1.txt AC 22 ms 460 KB
1
reverse2.txt AC 23 ms 424 KB
1
test1.txt AC 21 ms 476 KB
1
test2.txt AC 21 ms 408 KB
1
test3.txt AC 20 ms 464 KB
1