node_ids
listlengths 4
1.4k
| edge_index
listlengths 1
2.22k
| text
listlengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
13,
3,
14,
2,
2,
2,
13,
17,
4,
18,
13,
2,
18,
13,
13,
18,
13,
2,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
127,
5
],
[
127,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
40,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
55,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
70,
80
],
[
69,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
81,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
103,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
8,
121
],
[
121,
122
],
[
122,
123
],
[
6,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tboolean b=false;\n\t\tString str1=sc.next();\n\t\tString str2=sc.next();\n\t\tString str3=str1+str1;\n\t\tchar [] ch2=str2.toCharArray();\n\t\tchar [] ch3=str3.toCharArray();\n\t\tfor(int i=0;i<str1.length();i++) {\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(b==true) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tsc.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tboolean b=false;\n\t\tString str1=sc.next();\n\t\tString str2=sc.next();\n\t\tString str3=str1+str1;\n\t\tchar [] ch2=str2.toCharArray();\n\t\tchar [] ch3=str3.toCharArray();\n\t\tfor(int i=0;i<str1.length();i++) {\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(b==true) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tboolean b=false;\n\t\tString str1=sc.next();\n\t\tString str2=sc.next();\n\t\tString str3=str1+str1;\n\t\tchar [] ch2=str2.toCharArray();\n\t\tchar [] ch3=str3.toCharArray();\n\t\tfor(int i=0;i<str1.length();i++) {\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(b==true) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tboolean b=false;\n\t\tString str1=sc.next();\n\t\tString str2=sc.next();\n\t\tString str3=str1+str1;\n\t\tchar [] ch2=str2.toCharArray();\n\t\tchar [] ch3=str3.toCharArray();\n\t\tfor(int i=0;i<str1.length();i++) {\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(b==true) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"boolean b=false;",
"b",
"false",
"String str1=sc.next();",
"str1",
"sc.next()",
"sc.next",
"sc",
"String str2=sc.next();",
"str2",
"sc.next()",
"sc.next",
"sc",
"String str3=str1+str1;",
"str3",
"str1+str1",
"str1",
"str1",
"char [] ch2=str2.toCharArray();",
"ch2",
"str2.toCharArray()",
"str2.toCharArray",
"str2",
"char [] ch3=str3.toCharArray();",
"ch3",
"str3.toCharArray()",
"str3.toCharArray",
"str3",
"for(int i=0;i<str1.length();i++) {\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<str1.length()",
"i",
"str1.length()",
"str1.length",
"str1",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<str2.length()",
"j",
"str2.length()",
"str2.length",
"str2",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}",
"if(ch2[j]!=ch3[i+j])break;",
"ch2[j]!=ch3[i+j]",
"ch2[j]",
"ch2",
"j",
"ch3[i+j]",
"ch3",
"i+j",
"i",
"j",
"break;",
"if(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}",
"j+1==str2.length()&&ch2[j]==ch3[i+j]",
"j+1==str2.length()",
"j+1",
"j",
"1",
"str2.length()",
"str2.length",
"str2",
"ch2[j]==ch3[i+j]",
"ch2[j]",
"ch2",
"j",
"ch3[i+j]",
"ch3",
"i+j",
"i",
"j",
"{\n\t\t\t\t\tb=true;\n\t\t\t\t}",
"b=true",
"b",
"true",
"if(b==true) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"b==true",
"b",
"true",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tboolean b=false;\n\t\tString str1=sc.next();\n\t\tString str2=sc.next();\n\t\tString str3=str1+str1;\n\t\tchar [] ch2=str2.toCharArray();\n\t\tchar [] ch3=str3.toCharArray();\n\t\tfor(int i=0;i<str1.length();i++) {\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(b==true) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tsc.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tboolean b=false;\n\t\tString str1=sc.next();\n\t\tString str2=sc.next();\n\t\tString str3=str1+str1;\n\t\tchar [] ch2=str2.toCharArray();\n\t\tchar [] ch3=str3.toCharArray();\n\t\tfor(int i=0;i<str1.length();i++) {\n\t\t\tfor(int j=0;j<str2.length();j++) {\n\t\t\t\tif(ch2[j]!=ch3[i+j])break;\n\t\t\t\tif(j+1==str2.length()&&ch2[j]==ch3[i+j]) {\n\t\t\t\t\tb=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(b==true) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
boolean b=false;
String str1=sc.next();
String str2=sc.next();
String str3=str1+str1;
char [] ch2=str2.toCharArray();
char [] ch3=str3.toCharArray();
for(int i=0;i<str1.length();i++) {
for(int j=0;j<str2.length();j++) {
if(ch2[j]!=ch3[i+j])break;
if(j+1==str2.length()&&ch2[j]==ch3[i+j]) {
b=true;
}
}
}
if(b==true) {
System.out.println("Yes");
}else {
System.out.println("No");
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
18,
13,
17,
18,
13,
13,
30,
41,
13,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
18,
13,
13,
30,
0,
13,
17,
14,
4,
18,
18,
13,
13,
18,
13,
13,
30,
40,
13,
40,
13,
30,
3,
14,
2,
13,
18,
13,
13,
30,
0,
13,
17,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
31,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
39,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
54,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
63,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
72,
82
],
[
82,
83
],
[
83,
84
],
[
72,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
86,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
97,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
97,
111
],
[
111,
112
],
[
63,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
8,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
123,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
6,
139
],
[
139,
140
]
]
| [
"import java.util.*;\n\nclass Main{\n public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n\n String text1 = sc.next();\n\n String text2 = sc.next();\n\n String[] ring = text1.split(\"\", 0);\n\n String[] belt = text2.split(\"\", 0);\n\n boolean check = false;\n for(int i = 0; i < ring.length; i++){\n if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n\n String text1 = sc.next();\n\n String text2 = sc.next();\n\n String[] ring = text1.split(\"\", 0);\n\n String[] belt = text2.split(\"\", 0);\n\n boolean check = false;\n for(int i = 0; i < ring.length; i++){\n if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String args[]){\n \n Scanner sc = new Scanner(System.in);\n\n String text1 = sc.next();\n\n String text2 = sc.next();\n\n String[] ring = text1.split(\"\", 0);\n\n String[] belt = text2.split(\"\", 0);\n\n boolean check = false;\n for(int i = 0; i < ring.length; i++){\n if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n\n String text1 = sc.next();\n\n String text2 = sc.next();\n\n String[] ring = text1.split(\"\", 0);\n\n String[] belt = text2.split(\"\", 0);\n\n boolean check = false;\n for(int i = 0; i < ring.length; i++){\n if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String text1 = sc.next();",
"text1",
"sc.next()",
"sc.next",
"sc",
"String text2 = sc.next();",
"text2",
"sc.next()",
"sc.next",
"sc",
"String[] ring = text1.split(\"\", 0);",
"ring",
"text1.split(\"\", 0)",
"text1.split",
"text1",
"\"\"",
"0",
"String[] belt = text2.split(\"\", 0);",
"belt",
"text2.split(\"\", 0)",
"text2.split",
"text2",
"\"\"",
"0",
"boolean check = false;",
"check",
"false",
"for(int i = 0; i < ring.length; i++){\n if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ring.length",
"i",
"ring.length",
"ring",
"ring.length",
"i++",
"i++",
"i",
"{\n if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }\n }",
"{\n if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }\n }",
"if(belt[0].equals(ring[i])){\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }",
"belt[0].equals(ring[i])",
"belt[0].equals",
"belt[0]",
"belt",
"0",
"ring[i]",
"ring",
"i",
"{\n int ring_check = i + 1;\n int count = 1;\n for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }\n if(count == belt.length){\n check = true;\n }\n }",
"int ring_check = i + 1;",
"ring_check",
"i + 1",
"i",
"1",
"int count = 1;",
"count",
"1",
"for(int j = 1; j < belt.length; j++){\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j < belt.length",
"j",
"belt.length",
"belt",
"belt.length",
"j++",
"j++",
"j",
"{\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }",
"{\n if(ring_check >= ring.length){\n ring_check = 0;\n }\n if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }\n }",
"if(ring_check >= ring.length){\n ring_check = 0;\n }",
"ring_check >= ring.length",
"ring_check",
"ring.length",
"ring",
"ring.length",
"{\n ring_check = 0;\n }",
"ring_check = 0",
"ring_check",
"0",
"if(belt[j].equals(ring[ring_check])){\n count++;\n ring_check++;\n }else{\n break;\n }",
"belt[j].equals(ring[ring_check])",
"belt[j].equals",
"belt[j]",
"belt",
"j",
"ring[ring_check]",
"ring",
"ring_check",
"{\n count++;\n ring_check++;\n }",
"count++",
"count",
"ring_check++",
"ring_check",
"{\n break;\n }",
"break;",
"if(count == belt.length){\n check = true;\n }",
"count == belt.length",
"count",
"belt.length",
"belt",
"belt.length",
"{\n check = true;\n }",
"check = true",
"check",
"true",
"if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"check",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args"
]
| import java.util.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
String text1 = sc.next();
String text2 = sc.next();
String[] ring = text1.split("", 0);
String[] belt = text2.split("", 0);
boolean check = false;
for(int i = 0; i < ring.length; i++){
if(belt[0].equals(ring[i])){
int ring_check = i + 1;
int count = 1;
for(int j = 1; j < belt.length; j++){
if(ring_check >= ring.length){
ring_check = 0;
}
if(belt[j].equals(ring[ring_check])){
count++;
ring_check++;
}else{
break;
}
}
if(count == belt.length){
check = true;
}
}
}
if(check){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
0,
13,
2,
13,
13,
4,
18,
13,
8,
4,
18,
13,
13,
17,
17,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
29,
4,
18,
13,
12,
13,
30,
14,
2,
2,
13,
17,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
117,
8
],
[
117,
9
],
[
9,
10
],
[
9,
11
],
[
117,
12
],
[
12,
13
],
[
12,
14
],
[
117,
15
],
[
15,
16
],
[
15,
17
],
[
117,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
37,
42
],
[
37,
43
],
[
117,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
117,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
117,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
72,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
71,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
117,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
117,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
117,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n void run() {\n String S = read();\n String P = read();\n S = S + S;\n sysout.println(S.contains(P) ? \"Yes\" : \"No\");\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n // flush automatically iff you call `println` or `printf` or `format`.\n PrintWriter sysout = new PrintWriter(System.out, true);\n\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer buffer = null;\n\n String readLine() {\n buffer = null;\n try {\n return in.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n String read() {\n if (buffer == null || !buffer.hasMoreTokens()) {\n buffer = new StringTokenizer(readLine());\n }\n return buffer.nextToken();\n }\n\n int readInt() {\n return Integer.parseInt(read());\n }\n\n long readLong() {\n return Long.parseLong(read());\n }\n\n double readDouble() {\n return Double.parseDouble(read());\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n void run() {\n String S = read();\n String P = read();\n S = S + S;\n sysout.println(S.contains(P) ? \"Yes\" : \"No\");\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n // flush automatically iff you call `println` or `printf` or `format`.\n PrintWriter sysout = new PrintWriter(System.out, true);\n\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer buffer = null;\n\n String readLine() {\n buffer = null;\n try {\n return in.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n String read() {\n if (buffer == null || !buffer.hasMoreTokens()) {\n buffer = new StringTokenizer(readLine());\n }\n return buffer.nextToken();\n }\n\n int readInt() {\n return Integer.parseInt(read());\n }\n\n long readLong() {\n return Long.parseLong(read());\n }\n\n double readDouble() {\n return Double.parseDouble(read());\n }\n}",
"Main",
"// flush automatically iff you call `println` or `printf` or `format`.\n PrintWriter sysout = new PrintWriter(System.out, true);",
"sysout",
"new PrintWriter(System.out, true)",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer buffer = null;",
"buffer",
"null",
"void run() {\n String S = read();\n String P = read();\n S = S + S;\n sysout.println(S.contains(P) ? \"Yes\" : \"No\");\n }",
"run",
"{\n String S = read();\n String P = read();\n S = S + S;\n sysout.println(S.contains(P) ? \"Yes\" : \"No\");\n }",
"String S = read();",
"S",
"read()",
"read",
"String P = read();",
"P",
"read()",
"read",
"S = S + S",
"S",
"S + S",
"S",
"S",
"sysout.println(S.contains(P) ? \"Yes\" : \"No\")",
"sysout.println",
"sysout",
"S.contains(P) ? \"Yes\" : \"No\"",
"S.contains(P)",
"S.contains",
"S",
"P",
"\"Yes\"",
"\"No\"",
"public static void main(String[] args) {\n new Main().run();\n }",
"main",
"{\n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"String readLine() {\n buffer = null;\n try {\n return in.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"readLine",
"{\n buffer = null;\n try {\n return in.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"buffer = null",
"buffer",
"null",
"try {\n return in.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n return in.readLine();\n }",
"return in.readLine();",
"in.readLine()",
"in.readLine",
"in",
"String read() {\n if (buffer == null || !buffer.hasMoreTokens()) {\n buffer = new StringTokenizer(readLine());\n }\n return buffer.nextToken();\n }",
"read",
"{\n if (buffer == null || !buffer.hasMoreTokens()) {\n buffer = new StringTokenizer(readLine());\n }\n return buffer.nextToken();\n }",
"if (buffer == null || !buffer.hasMoreTokens()) {\n buffer = new StringTokenizer(readLine());\n }",
"buffer == null || !buffer.hasMoreTokens()",
"buffer == null",
"buffer",
"null",
"!buffer.hasMoreTokens()",
"buffer.hasMoreTokens()",
"buffer.hasMoreTokens",
"buffer",
"{\n buffer = new StringTokenizer(readLine());\n }",
"buffer = new StringTokenizer(readLine())",
"buffer",
"new StringTokenizer(readLine())",
"return buffer.nextToken();",
"buffer.nextToken()",
"buffer.nextToken",
"buffer",
"int readInt() {\n return Integer.parseInt(read());\n }",
"readInt",
"{\n return Integer.parseInt(read());\n }",
"return Integer.parseInt(read());",
"Integer.parseInt(read())",
"Integer.parseInt",
"Integer",
"read()",
"read",
"long readLong() {\n return Long.parseLong(read());\n }",
"readLong",
"{\n return Long.parseLong(read());\n }",
"return Long.parseLong(read());",
"Long.parseLong(read())",
"Long.parseLong",
"Long",
"read()",
"read",
"double readDouble() {\n return Double.parseDouble(read());\n }",
"readDouble",
"{\n return Double.parseDouble(read());\n }",
"return Double.parseDouble(read());",
"Double.parseDouble(read())",
"Double.parseDouble",
"Double",
"read()",
"read",
"public class Main {\n void run() {\n String S = read();\n String P = read();\n S = S + S;\n sysout.println(S.contains(P) ? \"Yes\" : \"No\");\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n // flush automatically iff you call `println` or `printf` or `format`.\n PrintWriter sysout = new PrintWriter(System.out, true);\n\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer buffer = null;\n\n String readLine() {\n buffer = null;\n try {\n return in.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n String read() {\n if (buffer == null || !buffer.hasMoreTokens()) {\n buffer = new StringTokenizer(readLine());\n }\n return buffer.nextToken();\n }\n\n int readInt() {\n return Integer.parseInt(read());\n }\n\n long readLong() {\n return Long.parseLong(read());\n }\n\n double readDouble() {\n return Double.parseDouble(read());\n }\n}",
"public class Main {\n void run() {\n String S = read();\n String P = read();\n S = S + S;\n sysout.println(S.contains(P) ? \"Yes\" : \"No\");\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n // flush automatically iff you call `println` or `printf` or `format`.\n PrintWriter sysout = new PrintWriter(System.out, true);\n\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer buffer = null;\n\n String readLine() {\n buffer = null;\n try {\n return in.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n String read() {\n if (buffer == null || !buffer.hasMoreTokens()) {\n buffer = new StringTokenizer(readLine());\n }\n return buffer.nextToken();\n }\n\n int readInt() {\n return Integer.parseInt(read());\n }\n\n long readLong() {\n return Long.parseLong(read());\n }\n\n double readDouble() {\n return Double.parseDouble(read());\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
void run() {
String S = read();
String P = read();
S = S + S;
sysout.println(S.contains(P) ? "Yes" : "No");
}
public static void main(String[] args) {
new Main().run();
}
// flush automatically iff you call `println` or `printf` or `format`.
PrintWriter sysout = new PrintWriter(System.out, true);
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer buffer = null;
String readLine() {
buffer = null;
try {
return in.readLine();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
String read() {
if (buffer == null || !buffer.hasMoreTokens()) {
buffer = new StringTokenizer(readLine());
}
return buffer.nextToken();
}
int readInt() {
return Integer.parseInt(read());
}
long readLong() {
return Long.parseLong(read());
}
double readDouble() {
return Double.parseDouble(read());
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
0,
13,
40,
17,
41,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
30,
4,
18,
13,
13,
4,
18,
13,
2,
13,
17,
13,
30,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
2,
13,
17,
4,
18,
13,
13,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
3,
0,
13,
20,
4,
18,
13,
17,
4,
18,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
179,
5
],
[
179,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
36,
46
],
[
46,
47
],
[
47,
48
],
[
36,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
50,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
64,
74
],
[
74,
75
],
[
75,
76
],
[
64,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
78,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
85,
95
],
[
95,
96
],
[
96,
97
],
[
85,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
106,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
100,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
118,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
129,
131
],
[
126,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
78,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
78,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
146,
147
],
[
78,
148
],
[
148,
149
],
[
148,
150
],
[
78,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
151,
155
],
[
155,
156
],
[
156,
157
],
[
8,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
163,
168
],
[
158,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
170,
175
],
[
6,
176
],
[
176,
177
],
[
0,
178
],
[
178,
179
],
[
178,
180
]
]
| [
"\n\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString str = scan.next();\n\t\tString p = scan.next();\n\t\tint result;\n\t\tresult = -1;// ?????????\n\t\tchar c;\n\t\tList<String> list = new ArrayList<String>();\n\n\t\t// ????????????????????????????????????????´?\n\n\t\tfor (int count = 0; count < str.length(); count++) {\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}\n\t\tif (result == 0) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString str = scan.next();\n\t\tString p = scan.next();\n\t\tint result;\n\t\tresult = -1;// ?????????\n\t\tchar c;\n\t\tList<String> list = new ArrayList<String>();\n\n\t\t// ????????????????????????????????????????´?\n\n\t\tfor (int count = 0; count < str.length(); count++) {\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}\n\t\tif (result == 0) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString str = scan.next();\n\t\tString p = scan.next();\n\t\tint result;\n\t\tresult = -1;// ?????????\n\t\tchar c;\n\t\tList<String> list = new ArrayList<String>();\n\n\t\t// ????????????????????????????????????????´?\n\n\t\tfor (int count = 0; count < str.length(); count++) {\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}\n\t\tif (result == 0) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString str = scan.next();\n\t\tString p = scan.next();\n\t\tint result;\n\t\tresult = -1;// ?????????\n\t\tchar c;\n\t\tList<String> list = new ArrayList<String>();\n\n\t\t// ????????????????????????????????????????´?\n\n\t\tfor (int count = 0; count < str.length(); count++) {\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}\n\t\tif (result == 0) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"String str = scan.next();",
"str",
"scan.next()",
"scan.next",
"scan",
"String p = scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"int result;",
"result",
"result = -1",
"result",
"-1",
"1",
"char c;",
"c",
"List<String> list = new ArrayList<String>();",
"list",
"new ArrayList<String>()",
"for (int count = 0; count < str.length(); count++) {\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}",
"int count = 0;",
"int count = 0;",
"count",
"0",
"count < str.length()",
"count",
"str.length()",
"str.length",
"str",
"count++",
"count++",
"count",
"{\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}",
"{\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}",
"c = str.charAt(count)",
"c",
"str.charAt(count)",
"str.charAt",
"str",
"count",
"list.add(String.valueOf(c))",
"list.add",
"list",
"String.valueOf(c)",
"String.valueOf",
"String",
"c",
"for (int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < str.length()",
"i",
"str.length()",
"str.length",
"str",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}",
"String min = list.get(0);",
"min",
"list.get(0)",
"list.get",
"list",
"0",
"for (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}",
"int count2 = 1;",
"int count2 = 1;",
"count2",
"1",
"count2 <= str.length()",
"count2",
"str.length()",
"str.length",
"str",
"count2++",
"count2++",
"count2",
"{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}",
"if (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}",
"count2 == str.length()",
"count2",
"str.length()",
"str.length",
"str",
"{\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t}",
"sb.append(min)",
"sb.append",
"sb",
"min",
"list.set(count2-1, min)",
"list.set",
"list",
"count2-1",
"count2",
"1",
"min",
"{\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}",
"sb.append(list.get(count2))",
"sb.append",
"sb",
"list.get(count2)",
"list.get",
"list",
"count2",
"list.set(count2-1, list.get(count2))",
"list.set",
"list",
"count2-1",
"count2",
"1",
"list.get(count2)",
"list.get",
"list",
"count2",
"result = sb.indexOf(p)",
"result",
"sb.indexOf(p)",
"sb.indexOf",
"sb",
"p",
"if (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"result == 0",
"result",
"0",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"str = new String(sb)",
"str",
"new String(sb)",
"sb.delete(0, sb.length())",
"sb.delete",
"sb",
"0",
"sb.length()",
"sb.length",
"sb",
"if (result == 0) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"result == 0",
"result",
"0",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString str = scan.next();\n\t\tString p = scan.next();\n\t\tint result;\n\t\tresult = -1;// ?????????\n\t\tchar c;\n\t\tList<String> list = new ArrayList<String>();\n\n\t\t// ????????????????????????????????????????´?\n\n\t\tfor (int count = 0; count < str.length(); count++) {\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}\n\t\tif (result == 0) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString str = scan.next();\n\t\tString p = scan.next();\n\t\tint result;\n\t\tresult = -1;// ?????????\n\t\tchar c;\n\t\tList<String> list = new ArrayList<String>();\n\n\t\t// ????????????????????????????????????????´?\n\n\t\tfor (int count = 0; count < str.length(); count++) {\n\t\t\tc = str.charAt(count);\n\t\t\t// char??????String??????????????????\n\t\t\tlist.add(String.valueOf(c));\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\n\t\t\t//?????????????????????????????????????????????\n\t\t\tString min = list.get(0);\n\t\t\t\n\t\t\t// ??????????????????\n\t\t\tfor (int count2 = 1; count2 <= str.length(); count2++) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// list???????????????????????????????????????p???????????????????????????????????????????????????????????????\n\t\t\t\t// list?????????String???\n\t\t\t\tif (count2 == str.length()) {\n\t\t\t\t\tsb.append(min);\n\t\t\t\t\tlist.set(count2-1, min);\n\t\t\t\t} else {\n\t\t\t\t\t//StringBuilder?????\\?????????????????????????????????????????????\n\t\t\t\t\tsb.append(list.get(count2));\n\t\t\t\t\tlist.set(count2-1, list.get(count2));\n\t\t\t\t}\n\t\t\t\t//System.out.print(list.get(count2 - 1));\n\t\t\t}\n\t\t\t\tresult = sb.indexOf(p);\n\t\t\t\t// ????????????????????????????????? ????????´???0 ??????????????´???-1\n\t\t\t\tif (result == 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tstr = new String(sb);\n\t\t\t\tsb.delete(0, sb.length());\n\t\t\t\n\t\t}\n\t\tif (result == 0) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"Main"
]
|
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
StringBuilder sb = new StringBuilder();
String str = scan.next();
String p = scan.next();
int result;
result = -1;// ?????????
char c;
List<String> list = new ArrayList<String>();
// ????????????????????????????????????????´?
for (int count = 0; count < str.length(); count++) {
c = str.charAt(count);
// char??????String??????????????????
list.add(String.valueOf(c));
}
for (int i = 0; i < str.length(); i++) {
//?????????????????????????????????????????????
String min = list.get(0);
// ??????????????????
for (int count2 = 1; count2 <= str.length(); count2++) {
// list???????????????????????????????????????p???????????????????????????????????????????????????????????????
// list?????????String???
if (count2 == str.length()) {
sb.append(min);
list.set(count2-1, min);
} else {
//StringBuilder?????\?????????????????????????????????????????????
sb.append(list.get(count2));
list.set(count2-1, list.get(count2));
}
//System.out.print(list.get(count2 - 1));
}
result = sb.indexOf(p);
// ????????????????????????????????? ????????´???0 ??????????????´???-1
if (result == 0) {
break;
}
str = new String(sb);
sb.delete(0, sb.length());
}
if (result == 0) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
0,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
14,
2,
13,
17,
30,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
68,
5
],
[
68,
6
],
[
6,
7
],
[
6,
8
],
[
68,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
11,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
23,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
11,
45
],
[
45,
46
],
[
9,
47
],
[
47,
48
],
[
68,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
68,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
0,
67
],
[
67,
68
],
[
67,
69
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tString s = input();\n\t\tString p = input();\n\n\t\ts += s;\n\n\t\tif (s.indexOf(p) != -1) {\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tString s = input();\n\t\tString p = input();\n\n\t\ts += s;\n\n\t\tif (s.indexOf(p) != -1) {\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"Main",
"public static Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\n\t\tString s = input();\n\t\tString p = input();\n\n\t\ts += s;\n\n\t\tif (s.indexOf(p) != -1) {\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}\n\n\t\tclose();\n\n\t}",
"main",
"{\n\n\t\tString s = input();\n\t\tString p = input();\n\n\t\ts += s;\n\n\t\tif (s.indexOf(p) != -1) {\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}\n\n\t\tclose();\n\n\t}",
"String s = input();",
"s",
"input()",
"input",
"String p = input();",
"p",
"input()",
"input",
"s += s",
"s",
"s",
"if (s.indexOf(p) != -1) {\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}",
"s.indexOf(p) != -1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"{\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"close()",
"close",
"String[] args",
"args",
"public static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}",
"input",
"{\n\n\t\treturn scanner.nextLine();\n\n\t}",
"return scanner.nextLine();",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"public static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}",
"close",
"{\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}",
"if (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}",
"scanner != null",
"scanner",
"null",
"{\n\n\t\t\tscanner.close();\n\n\t\t}",
"scanner.close()",
"scanner.close",
"scanner",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tString s = input();\n\t\tString p = input();\n\n\t\ts += s;\n\n\t\tif (s.indexOf(p) != -1) {\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static Scanner scanner = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tString s = input();\n\t\tString p = input();\n\n\t\ts += s;\n\n\t\tif (s.indexOf(p) != -1) {\n\n\t\t\tSystem.out.println(\"Yes\");\n\n\t\t} else {\n\n\t\t\tSystem.out.println(\"No\");\n\n\t\t}\n\n\t\tclose();\n\n\t}\n\n\tpublic static String input() {\n\n\t\treturn scanner.nextLine();\n\n\t}\n\n\tpublic static void close() {\n\n\t\tif (scanner != null) {\n\n\t\t\tscanner.close();\n\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
String s = input();
String p = input();
s += s;
if (s.indexOf(p) != -1) {
System.out.println("Yes");
} else {
System.out.println("No");
}
close();
}
public static String input() {
return scanner.nextLine();
}
public static void close() {
if (scanner != null) {
scanner.close();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
13,
30,
14,
2,
2,
13,
17,
13,
30,
0,
13,
17,
3,
14,
2,
2,
13,
17,
13,
30,
0,
13,
17,
30,
40,
13,
0,
13,
4,
18,
13,
13,
30,
3,
14,
4,
18,
13,
17,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
133,
8
],
[
133,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
19,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
19,
40
],
[
40,
41
],
[
40,
42
],
[
19,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
55,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
78,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
85,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
97,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
97,
107
],
[
107,
108
],
[
108,
109
],
[
85,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
78,
116
],
[
116,
117
],
[
55,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
118,
123
],
[
19,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
9,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tdo {\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t} while (br.ready());\n\t}\t\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tdo {\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t} while (br.ready());\n\t}\t\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tdo {\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t} while (br.ready());\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tdo {\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t} while (br.ready());\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"do {\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t} while (br.ready());",
"br.ready()",
"br.ready",
"br",
"{\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t}",
"String circleStr = br.readLine();",
"circleStr",
"br.readLine()",
"br.readLine",
"br",
"String answer = br.readLine();",
"answer",
"br.readLine()",
"br.readLine",
"br",
"int circleLen = circleStr.length();",
"circleLen",
"circleStr.length()",
"circleStr.length",
"circleStr",
"int answerLen = answer.length();",
"answerLen",
"answer.length()",
"answer.length",
"answer",
"String result = \"No\";",
"result",
"\"No\"",
"for (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < circleLen",
"i",
"circleLen",
"i++",
"i++",
"i",
"{\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}",
"{\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}",
"char c = circleStr.charAt(i);",
"c",
"circleStr.charAt(i)",
"circleStr.charAt",
"circleStr",
"i",
"int cIndex = i;",
"cIndex",
"i",
"for (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < answerLen",
"j",
"answerLen",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}",
"{\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}",
"if (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}",
"c == answer.charAt(j)",
"c",
"answer.charAt(j)",
"answer.charAt",
"answer",
"j",
"{\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t}",
"if (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"answerLen - 1 == j",
"answerLen - 1",
"answerLen",
"1",
"j",
"{\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"result = \"Yes\"",
"result",
"\"Yes\"",
"break;",
"if (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}",
"circleLen - 1 == cIndex",
"circleLen - 1",
"circleLen",
"1",
"cIndex",
"{\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t}",
"cIndex = 0",
"cIndex",
"0",
"{\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}",
"cIndex++",
"cIndex",
"c = circleStr.charAt(cIndex)",
"c",
"circleStr.charAt(cIndex)",
"circleStr.charAt",
"circleStr",
"cIndex",
"{\n\t\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if (result.equals(\"Yes\")) break;",
"result.equals(\"Yes\")",
"result.equals",
"result",
"\"Yes\"",
"break;",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tdo {\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t} while (br.ready());\n\t}\t\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tdo {\n\t\t\tString circleStr = br.readLine();\n\t\t\tString answer = br.readLine();\n\t\t\tint circleLen = circleStr.length();\n\t\t\tint answerLen = answer.length();\n\t\t\tString result = \"No\";\n\t\t\tfor (int i = 0; i < circleLen; i++) {\n\t\t\t\tchar c = circleStr.charAt(i);\n\t\t\t\tint cIndex = i;\n\t\t\t\tfor (int j = 0; j < answerLen; j++) {\n\t\t\t\t\tif (c == answer.charAt(j)) {\n\t\t\t\t\t\tif (answerLen - 1 == j) {\n\t\t\t\t\t\t\tresult = \"Yes\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (circleLen - 1 == cIndex) {\n\t\t\t\t\t\t\tcIndex = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcIndex++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc = circleStr.charAt(cIndex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tif (result.equals(\"Yes\")) break;\n\t\t\t}\n\t\t\tSystem.out.println(result);\n\t\t} while (br.ready());\n\t}\t\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
do {
String circleStr = br.readLine();
String answer = br.readLine();
int circleLen = circleStr.length();
int answerLen = answer.length();
String result = "No";
for (int i = 0; i < circleLen; i++) {
char c = circleStr.charAt(i);
int cIndex = i;
for (int j = 0; j < answerLen; j++) {
if (c == answer.charAt(j)) {
if (answerLen - 1 == j) {
result = "Yes";
break;
}
if (circleLen - 1 == cIndex) {
cIndex = 0;
} else {
cIndex++;
}
c = circleStr.charAt(cIndex);
} else {
break;
}
}
if (result.equals("Yes")) break;
}
System.out.println(result);
} while (br.ready());
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
31,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
25,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
6,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString strIn = scan.nextLine();\n\t\tString strCheck = scan.nextLine();\n\t\tstrIn += strIn;\n\t\tif(strIn.indexOf(strCheck) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscan.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString strIn = scan.nextLine();\n\t\tString strCheck = scan.nextLine();\n\t\tstrIn += strIn;\n\t\tif(strIn.indexOf(strCheck) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscan.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString strIn = scan.nextLine();\n\t\tString strCheck = scan.nextLine();\n\t\tstrIn += strIn;\n\t\tif(strIn.indexOf(strCheck) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscan.close();\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString strIn = scan.nextLine();\n\t\tString strCheck = scan.nextLine();\n\t\tstrIn += strIn;\n\t\tif(strIn.indexOf(strCheck) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscan.close();\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String strIn = scan.nextLine();",
"strIn",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String strCheck = scan.nextLine();",
"strCheck",
"scan.nextLine()",
"scan.nextLine",
"scan",
"strIn += strIn",
"strIn",
"strIn",
"if(strIn.indexOf(strCheck) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"strIn.indexOf(strCheck) != -1",
"strIn.indexOf(strCheck)",
"strIn.indexOf",
"strIn",
"strCheck",
"-1",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString strIn = scan.nextLine();\n\t\tString strCheck = scan.nextLine();\n\t\tstrIn += strIn;\n\t\tif(strIn.indexOf(strCheck) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscan.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString strIn = scan.nextLine();\n\t\tString strCheck = scan.nextLine();\n\t\tstrIn += strIn;\n\t\tif(strIn.indexOf(strCheck) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscan.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String strIn = scan.nextLine();
String strCheck = scan.nextLine();
strIn += strIn;
if(strIn.indexOf(strCheck) != -1){
System.out.println("Yes");
}else{
System.out.println("No");
}
scan.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
2,
4,
18,
13,
2,
4,
18,
13,
17,
4,
18,
13,
17,
2,
4,
18,
13,
17,
41,
13,
4,
18,
13,
17,
4,
18,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
46,
50
],
[
42,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
55,
59
],
[
39,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
39,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
69,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
8,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
78,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
6,
94
],
[
94,
95
]
]
| [
"import java.util.Scanner;\n\n class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n\n String str = scan.nextLine();\n String str2 = scan.nextLine();\n boolean a = false;\n\n for(int i=0;i<str.length();i++){\n\n str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);\n\n String str3 =str.substring(0,str2.length());\n\n if(str3.equals(str2)){\n\n a = true;\n\n }\n\n }\n\n if(a){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n }",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n\n String str = scan.nextLine();\n String str2 = scan.nextLine();\n boolean a = false;\n\n for(int i=0;i<str.length();i++){\n\n str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);\n\n String str3 =str.substring(0,str2.length());\n\n if(str3.equals(str2)){\n\n a = true;\n\n }\n\n }\n\n if(a){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n }",
"Main",
"public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n\n String str = scan.nextLine();\n String str2 = scan.nextLine();\n boolean a = false;\n\n for(int i=0;i<str.length();i++){\n\n str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);\n\n String str3 =str.substring(0,str2.length());\n\n if(str3.equals(str2)){\n\n a = true;\n\n }\n\n }\n\n if(a){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n\n String str = scan.nextLine();\n String str2 = scan.nextLine();\n boolean a = false;\n\n for(int i=0;i<str.length();i++){\n\n str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);\n\n String str3 =str.substring(0,str2.length());\n\n if(str3.equals(str2)){\n\n a = true;\n\n }\n\n }\n\n if(a){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String str = scan.nextLine();",
"str",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String str2 = scan.nextLine();",
"str2",
"scan.nextLine()",
"scan.nextLine",
"scan",
"boolean a = false;",
"a",
"false",
"for(int i=0;i<str.length();i++){\n\n str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);\n\n String str3 =str.substring(0,str2.length());\n\n if(str3.equals(str2)){\n\n a = true;\n\n }\n\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<str.length()",
"i",
"str.length()",
"str.length",
"str",
"i++",
"i++",
"i",
"{\n\n str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);\n\n String str3 =str.substring(0,str2.length());\n\n if(str3.equals(str2)){\n\n a = true;\n\n }\n\n }",
"{\n\n str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);\n\n String str3 =str.substring(0,str2.length());\n\n if(str3.equals(str2)){\n\n a = true;\n\n }\n\n }",
"str =str.charAt(str.length()-1)+str.substring(0,str.length()-1)",
"str",
"str.charAt(str.length()-1)+str.substring(0,str.length()-1)",
"str.charAt(str.length()-1)",
"str.charAt",
"str",
"str.length()-1",
"str.length()",
"str.length",
"str",
"1",
"str.substring(0,str.length()-1)",
"str.substring",
"str",
"0",
"str.length()-1",
"str.length()",
"str.length",
"str",
"1",
"String str3 =str.substring(0,str2.length());",
"str3",
"str.substring(0,str2.length())",
"str.substring",
"str",
"0",
"str2.length()",
"str2.length",
"str2",
"if(str3.equals(str2)){\n\n a = true;\n\n }",
"str3.equals(str2)",
"str3.equals",
"str3",
"str2",
"{\n\n a = true;\n\n }",
"a = true",
"a",
"true",
"if(a){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"a",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
String str = scan.nextLine();
String str2 = scan.nextLine();
boolean a = false;
for(int i=0;i<str.length();i++){
str =str.charAt(str.length()-1)+str.substring(0,str.length()-1);
String str3 =str.substring(0,str2.length());
if(str3.equals(str2)){
a = true;
}
}
if(a){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
2,
13,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
14,
4,
18,
18,
13,
13,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
7,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
0,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
27,
35
],
[
35,
36
],
[
0,
37
],
[
77,
38
],
[
77,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
41,
48
],
[
48,
49
],
[
48,
50
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
51,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
51,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
39,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
]
| [
"import java.io.*;\nimport java.util.*;\n\nclass Ring{\n\tString str1;\n\n\tRing(String str1){\n\t\tthis.str1 = str1 + str1;\n\t}\n}\n\nclass Keyword{\n\tString str2;\n\n\tKeyword(String str2){\n\t\tthis.str2 = str2;\n\t}\n}\n\npublic class Main{\n\tpublic static void main(String[] args) throws IOException{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tRing x = new Ring(br.readLine());\n\tKeyword y = new Keyword(br.readLine());\n\n\t\tif(x.str1.contains(y.str2)){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Ring{\n\tString str1;\n\n\tRing(String str1){\n\t\tthis.str1 = str1 + str1;\n\t}\n}",
"Ring",
"String str1;",
"str1",
"Ring(String str1){\n\t\tthis.str1 = str1 + str1;\n\t}",
"Ring",
"{\n\t\tthis.str1 = str1 + str1;\n\t}",
"this.str1 = str1 + str1",
"this.str1",
"this",
"this.str1",
"str1 + str1",
"str1",
"str1",
"String str1",
"str1",
"class Keyword{\n\tString str2;\n\n\tKeyword(String str2){\n\t\tthis.str2 = str2;\n\t}\n}",
"Keyword",
"String str2;",
"str2",
"Keyword(String str2){\n\t\tthis.str2 = str2;\n\t}",
"Keyword",
"{\n\t\tthis.str2 = str2;\n\t}",
"this.str2 = str2",
"this.str2",
"this",
"this.str2",
"str2",
"String str2",
"str2",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tRing x = new Ring(br.readLine());\n\tKeyword y = new Keyword(br.readLine());\n\n\t\tif(x.str1.contains(y.str2)){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tRing x = new Ring(br.readLine());\n\tKeyword y = new Keyword(br.readLine());\n\n\t\tif(x.str1.contains(y.str2)){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}",
"main",
"{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tRing x = new Ring(br.readLine());\n\tKeyword y = new Keyword(br.readLine());\n\n\t\tif(x.str1.contains(y.str2)){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"Ring x = new Ring(br.readLine());",
"x",
"new Ring(br.readLine())",
"Keyword y = new Keyword(br.readLine());",
"y",
"new Keyword(br.readLine())",
"if(x.str1.contains(y.str2)){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}",
"x.str1.contains(y.str2)",
"x.str1.contains",
"x.str1",
"x",
"x.str1",
"y.str2",
"y",
"y.str2",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tRing x = new Ring(br.readLine());\n\tKeyword y = new Keyword(br.readLine());\n\n\t\tif(x.str1.contains(y.str2)){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) throws IOException{\n\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\tRing x = new Ring(br.readLine());\n\tKeyword y = new Keyword(br.readLine());\n\n\t\tif(x.str1.contains(y.str2)){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
class Ring{
String str1;
Ring(String str1){
this.str1 = str1 + str1;
}
}
class Keyword{
String str2;
Keyword(String str2){
this.str2 = str2;
}
}
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
Ring x = new Ring(br.readLine());
Keyword y = new Keyword(br.readLine());
if(x.str1.contains(y.str2)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
4,
18,
13,
4,
18,
18,
13,
13,
8,
4,
18,
13,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
46,
5
],
[
46,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
36,
41
],
[
36,
42
],
[
6,
43
],
[
43,
44
],
[
0,
45
],
[
45,
46
],
[
45,
47
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String s = sc.next();\n String p = sc.next();\n\n s += s.substring(0, p.length());\n\n System.out.println((s.contains(p))? \"Yes\" : \"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String s = sc.next();\n String p = sc.next();\n\n s += s.substring(0, p.length());\n\n System.out.println((s.contains(p))? \"Yes\" : \"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String s = sc.next();\n String p = sc.next();\n\n s += s.substring(0, p.length());\n\n System.out.println((s.contains(p))? \"Yes\" : \"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n String s = sc.next();\n String p = sc.next();\n\n s += s.substring(0, p.length());\n\n System.out.println((s.contains(p))? \"Yes\" : \"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"s += s.substring(0, p.length())",
"s",
"s.substring(0, p.length())",
"s.substring",
"s",
"0",
"p.length()",
"p.length",
"p",
"System.out.println((s.contains(p))? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"(s.contains(p))? \"Yes\" : \"No\"",
"(s.contains(p))",
"s.contains",
"s",
"p",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String s = sc.next();\n String p = sc.next();\n\n s += s.substring(0, p.length());\n\n System.out.println((s.contains(p))? \"Yes\" : \"No\");\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String s = sc.next();\n String p = sc.next();\n\n s += s.substring(0, p.length());\n\n System.out.println((s.contains(p))? \"Yes\" : \"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
s += s.substring(0, p.length());
System.out.println((s.contains(p))? "Yes" : "No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
41,
13,
17,
41,
13,
41,
13,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
38,
41
],
[
6,
42
],
[
42,
43
]
]
| [
"import java.io.*;\n\nclass Main {\n public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n char[] str = br.readLine().toCharArray();\n char[] target = br.readLine().toCharArray();\n boolean answer = false;\n int i, j;\n loop: for (i = 0; i < str.length; i++) {\n if (str[i] == target[0]) {\n for (j = 1; j < target.length; j++) {\n if (str[(i+j)%str.length] != target[j]) continue loop;\n }\n answer = true;\n }\n }\n System.out.println((answer) ? \"Yes\" : \"No\");\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n char[] str = br.readLine().toCharArray();\n char[] target = br.readLine().toCharArray();\n boolean answer = false;\n int i, j;\n loop: for (i = 0; i < str.length; i++) {\n if (str[i] == target[0]) {\n for (j = 1; j < target.length; j++) {\n if (str[(i+j)%str.length] != target[j]) continue loop;\n }\n answer = true;\n }\n }\n System.out.println((answer) ? \"Yes\" : \"No\");\n }\n}",
"Main",
"public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n char[] str = br.readLine().toCharArray();\n char[] target = br.readLine().toCharArray();\n boolean answer = false;\n int i, j;\n loop: for (i = 0; i < str.length; i++) {\n if (str[i] == target[0]) {\n for (j = 1; j < target.length; j++) {\n if (str[(i+j)%str.length] != target[j]) continue loop;\n }\n answer = true;\n }\n }\n System.out.println((answer) ? \"Yes\" : \"No\");\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n char[] str = br.readLine().toCharArray();\n char[] target = br.readLine().toCharArray();\n boolean answer = false;\n int i, j;\n loop: for (i = 0; i < str.length; i++) {\n if (str[i] == target[0]) {\n for (j = 1; j < target.length; j++) {\n if (str[(i+j)%str.length] != target[j]) continue loop;\n }\n answer = true;\n }\n }\n System.out.println((answer) ? \"Yes\" : \"No\");\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"char[] str = br.readLine().toCharArray();",
"str",
"br.readLine().toCharArray()",
"br.readLine().toCharArray",
"br.readLine()",
"br.readLine",
"br",
"char[] target = br.readLine().toCharArray();",
"target",
"br.readLine().toCharArray()",
"br.readLine().toCharArray",
"br.readLine()",
"br.readLine",
"br",
"boolean answer = false;",
"answer",
"false",
"int i",
"i",
"j;",
"j",
"System.out.println((answer) ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"(answer) ? \"Yes\" : \"No\"",
"(answer)",
"\"Yes\"",
"\"No\"",
"String[] args",
"args"
]
| import java.io.*;
class Main {
public static void main (String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
char[] str = br.readLine().toCharArray();
char[] target = br.readLine().toCharArray();
boolean answer = false;
int i, j;
loop: for (i = 0; i < str.length; i++) {
if (str[i] == target[0]) {
for (j = 1; j < target.length; j++) {
if (str[(i+j)%str.length] != target[j]) continue loop;
}
answer = true;
}
}
System.out.println((answer) ? "Yes" : "No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
27,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
27,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
6,
46
],
[
46,
47
]
]
| [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n \n String a = scan.nextLine();\n String b = scan.nextLine();\n String a2 = a + a;\n \n if(a2.contains(b)){\n \n System.out.println(\"Yes\");\n \n }else{\n \n System.out.println(\"No\");\n \n }\n \n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n \n String a = scan.nextLine();\n String b = scan.nextLine();\n String a2 = a + a;\n \n if(a2.contains(b)){\n \n System.out.println(\"Yes\");\n \n }else{\n \n System.out.println(\"No\");\n \n }\n \n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n \n String a = scan.nextLine();\n String b = scan.nextLine();\n String a2 = a + a;\n \n if(a2.contains(b)){\n \n System.out.println(\"Yes\");\n \n }else{\n \n System.out.println(\"No\");\n \n }\n \n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n \n String a = scan.nextLine();\n String b = scan.nextLine();\n String a2 = a + a;\n \n if(a2.contains(b)){\n \n System.out.println(\"Yes\");\n \n }else{\n \n System.out.println(\"No\");\n \n }\n \n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String a = scan.nextLine();",
"a",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String b = scan.nextLine();",
"b",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String a2 = a + a;",
"a2",
"a + a",
"a",
"a",
"if(a2.contains(b)){\n \n System.out.println(\"Yes\");\n \n }else{\n \n System.out.println(\"No\");\n \n }",
"a2.contains(b)",
"a2.contains",
"a2",
"b",
"{\n \n System.out.println(\"Yes\");\n \n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \n System.out.println(\"No\");\n \n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String a = scan.nextLine();
String b = scan.nextLine();
String a2 = a + a;
if(a2.contains(b)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
2,
13,
13,
14,
2,
13,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
2,
13,
17,
14,
4,
18,
13,
13,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
43,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
57,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
77,
81
],
[
81,
82
],
[
81,
83
],
[
39,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
84,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
]
| [
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString s = scanner.next();\n\t\tString p = scanner.next();\n\t\t\n\t\tString out = \"No\";\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(out);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString s = scanner.next();\n\t\tString p = scanner.next();\n\t\t\n\t\tString out = \"No\";\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(out);\n\t}\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString s = scanner.next();\n\t\tString p = scanner.next();\n\t\t\n\t\tString out = \"No\";\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(out);\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString s = scanner.next();\n\t\tString p = scanner.next();\n\t\t\n\t\tString out = \"No\";\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(out);\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String s = scanner.next();",
"s",
"scanner.next()",
"scanner.next",
"scanner",
"String p = scanner.next();",
"p",
"scanner.next()",
"scanner.next",
"scanner",
"String out = \"No\";",
"out",
"\"No\"",
"for(int i=0; i<s.length(); i++)\n\t\t{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"String str = \"\";",
"str",
"\"\"",
"for(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}",
"{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}",
"int k = i+j;",
"k",
"i+j",
"i",
"j",
"if(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}",
"k >= s.length()",
"k",
"s.length()",
"s.length",
"s",
"{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}",
"k -= s.length()",
"k",
"s.length()",
"s.length",
"s",
"str += s.substring(k, k+1)",
"str",
"s.substring(k, k+1)",
"s.substring",
"s",
"k",
"k+1",
"k",
"1",
"if(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}",
"p.equals(str)",
"p.equals",
"p",
"str",
"{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}",
"out = \"Yes\"",
"out",
"\"Yes\"",
"break;",
"System.out.println(out)",
"System.out.println",
"System.out",
"System",
"System.out",
"out",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString s = scanner.next();\n\t\tString p = scanner.next();\n\t\t\n\t\tString out = \"No\";\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(out);\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\t\n\t\tString s = scanner.next();\n\t\tString p = scanner.next();\n\t\t\n\t\tString out = \"No\";\n\t\tfor(int i=0; i<s.length(); i++)\n\t\t{\n\t\t\tString str = \"\";\n\t\t\tfor(int j=0; j<p.length(); j++)\n\t\t\t{\n\t\t\t\tint k = i+j;\n\t\t\t\tif(k >= s.length())\n\t\t\t\t{\n\t\t\t\t\tk -= s.length(); \n\t\t\t\t}\n\t\t\t\tstr += s.substring(k, k+1);\n\t\t\t}\n\t\t\t\n\t\t\tif(p.equals(str))\n\t\t\t{\n\t\t\t\tout = \"Yes\";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(out);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
String s = scanner.next();
String p = scanner.next();
String out = "No";
for(int i=0; i<s.length(); i++)
{
String str = "";
for(int j=0; j<p.length(); j++)
{
int k = i+j;
if(k >= s.length())
{
k -= s.length();
}
str += s.substring(k, k+1);
}
if(p.equals(str))
{
out = "Yes";
break;
}
}
System.out.println(out);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
14,
4,
18,
13,
13,
29,
17,
29,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
4,
13,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
64,
5
],
[
64,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
15,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
6,
24
],
[
24,
25
],
[
6,
26
],
[
26,
27
],
[
64,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
30,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
30,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
45,
48
],
[
44,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
44,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
28,
61
],
[
61,
62
],
[
0,
63
],
[
63,
64
],
[
63,
65
]
]
| [
"import java.util.Scanner;\npublic class Main{\n public static boolean judge(String s, String p){\n String ss = s.concat(s);\n if(ss.contains(p))\n return true;\n return false;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n if(judge(s,p))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static boolean judge(String s, String p){\n String ss = s.concat(s);\n if(ss.contains(p))\n return true;\n return false;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n if(judge(s,p))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"Main",
"public static boolean judge(String s, String p){\n String ss = s.concat(s);\n if(ss.contains(p))\n return true;\n return false;\n }",
"judge",
"{\n String ss = s.concat(s);\n if(ss.contains(p))\n return true;\n return false;\n }",
"String ss = s.concat(s);",
"ss",
"s.concat(s)",
"s.concat",
"s",
"s",
"if(ss.contains(p))\n return true;",
"ss.contains(p)",
"ss.contains",
"ss",
"p",
"return true;",
"true",
"return false;",
"false",
"String s",
"s",
"String p",
"p",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n if(judge(s,p))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n if(judge(s,p))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"if(judge(s,p))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"judge(s,p)",
"judge",
"s",
"p",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n public static boolean judge(String s, String p){\n String ss = s.concat(s);\n if(ss.contains(p))\n return true;\n return false;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n if(judge(s,p))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"public class Main{\n public static boolean judge(String s, String p){\n String ss = s.concat(s);\n if(ss.contains(p))\n return true;\n return false;\n }\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n if(judge(s,p))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static boolean judge(String s, String p){
String ss = s.concat(s);
if(ss.contains(p))
return true;
return false;
}
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
if(judge(s,p))
System.out.println("Yes");
else
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
52,
8
],
[
52,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
30,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
9,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n\n String ss = s + s;\n\n if (ss.contains(p)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n\n String ss = s + s;\n\n if (ss.contains(p)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n\n String ss = s + s;\n\n if (ss.contains(p)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n\n String ss = s + s;\n\n if (ss.contains(p)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"String p = br.readLine();",
"p",
"br.readLine()",
"br.readLine",
"br",
"String ss = s + s;",
"ss",
"s + s",
"s",
"s",
"if (ss.contains(p)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"ss.contains(p)",
"ss.contains",
"ss",
"p",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n\n String ss = s + s;\n\n if (ss.contains(p)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n\n String ss = s + s;\n\n if (ss.contains(p)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
String p = br.readLine();
String ss = s + s;
if (ss.contains(p)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
36,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
30,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
6,
52
],
[
52,
53
]
]
| [
"//import java.util.Scanner;\nimport java.io.*;\n\nclass Main {\n public static void main(String[] args)throws IOException{ \n \tInputStreamReader in = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(in);\n \t \t \n \tString s = reader.readLine();\n String p = reader.readLine(); \n s = s + s;\n\n if(s.indexOf(p) != -1){\n System.out.println(\"Yes\");\n } \n else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String[] args)throws IOException{ \n \tInputStreamReader in = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(in);\n \t \t \n \tString s = reader.readLine();\n String p = reader.readLine(); \n s = s + s;\n\n if(s.indexOf(p) != -1){\n System.out.println(\"Yes\");\n } \n else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args)throws IOException{ \n \tInputStreamReader in = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(in);\n \t \t \n \tString s = reader.readLine();\n String p = reader.readLine(); \n s = s + s;\n\n if(s.indexOf(p) != -1){\n System.out.println(\"Yes\");\n } \n else{\n System.out.println(\"No\");\n }\n }",
"main",
"{ \n \tInputStreamReader in = new InputStreamReader(System.in);\n BufferedReader reader = new BufferedReader(in);\n \t \t \n \tString s = reader.readLine();\n String p = reader.readLine(); \n s = s + s;\n\n if(s.indexOf(p) != -1){\n System.out.println(\"Yes\");\n } \n else{\n System.out.println(\"No\");\n }\n }",
"InputStreamReader in = new InputStreamReader(System.in);",
"in",
"new InputStreamReader(System.in)",
"BufferedReader reader = new BufferedReader(in);",
"reader",
"new BufferedReader(in)",
"String s = reader.readLine();",
"s",
"reader.readLine()",
"reader.readLine",
"reader",
"String p = reader.readLine();",
"p",
"reader.readLine()",
"reader.readLine",
"reader",
"s = s + s",
"s",
"s + s",
"s",
"s",
"if(s.indexOf(p) != -1){\n System.out.println(\"Yes\");\n } \n else{\n System.out.println(\"No\");\n }",
"s.indexOf(p) != -1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| //import java.util.Scanner;
import java.io.*;
class Main {
public static void main(String[] args)throws IOException{
InputStreamReader in = new InputStreamReader(System.in);
BufferedReader reader = new BufferedReader(in);
String s = reader.readLine();
String p = reader.readLine();
s = s + s;
if(s.indexOf(p) != -1){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
0,
13,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
47,
5
],
[
47,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
25,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
25,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
6,
44
],
[
44,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[]args){\n Scanner sc= new Scanner(System.in);\n String text = sc.nextLine();\n text+=text;\n String pat = sc.nextLine();\n if (text.contains(pat)) {\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[]args){\n Scanner sc= new Scanner(System.in);\n String text = sc.nextLine();\n text+=text;\n String pat = sc.nextLine();\n if (text.contains(pat)) {\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[]args){\n Scanner sc= new Scanner(System.in);\n String text = sc.nextLine();\n text+=text;\n String pat = sc.nextLine();\n if (text.contains(pat)) {\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner sc= new Scanner(System.in);\n String text = sc.nextLine();\n text+=text;\n String pat = sc.nextLine();\n if (text.contains(pat)) {\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner sc= new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String text = sc.nextLine();",
"text",
"sc.nextLine()",
"sc.nextLine",
"sc",
"text+=text",
"text",
"text",
"String pat = sc.nextLine();",
"pat",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if (text.contains(pat)) {\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"text.contains(pat)",
"text.contains",
"text",
"pat",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[]args",
"args",
"public class Main{\n public static void main(String[]args){\n Scanner sc= new Scanner(System.in);\n String text = sc.nextLine();\n text+=text;\n String pat = sc.nextLine();\n if (text.contains(pat)) {\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String[]args){\n Scanner sc= new Scanner(System.in);\n String text = sc.nextLine();\n text+=text;\n String pat = sc.nextLine();\n if (text.contains(pat)) {\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[]args){
Scanner sc= new Scanner(System.in);
String text = sc.nextLine();
text+=text;
String pat = sc.nextLine();
if (text.contains(pat)) {
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
18,
13,
17,
18,
13,
13,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
18,
13,
13,
14,
2,
13,
2,
18,
13,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
4,
18,
13,
13,
30,
0,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
155,
11
],
[
155,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
14,
22
],
[
22,
23
],
[
14,
24
],
[
24,
25
],
[
24,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
14,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
30,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
43,
48
],
[
40,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
40,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
40,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
60,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
75,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
88,
98
],
[
98,
99
],
[
99,
100
],
[
88,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
102,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
84,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
123,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
123,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
40,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
136,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
12,
152
],
[
152,
153
],
[
0,
154
],
[
154,
155
],
[
154,
156
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s[],p[],str1,str2=\"\";\n\t\tboolean flag=false;\n\t\ttry {\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s[],p[],str1,str2=\"\";\n\t\tboolean flag=false;\n\t\ttry {\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s[],p[],str1,str2=\"\";\n\t\tboolean flag=false;\n\t\ttry {\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s[],p[],str1,str2=\"\";\n\t\tboolean flag=false;\n\t\ttry {\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s[]",
"s",
"p[]",
"p",
"str1",
"str1",
"str2=\"\";",
"str2",
"\"\"",
"boolean flag=false;",
"flag",
"false",
"try {\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}",
"catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}",
"IOException e",
"{\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}",
"System.err.println(e)",
"System.err.println",
"System.err",
"System",
"System.err",
"e",
"{\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t}",
"s=br.readLine().split(\"\")",
"s",
"br.readLine().split(\"\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\"\"",
"str1=br.readLine()",
"str1",
"br.readLine()",
"br.readLine",
"br",
"p=str1.split(\"\")",
"p",
"str1.split(\"\")",
"str1.split",
"str1",
"\"\"",
"for(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<s.length",
"i",
"s.length",
"s",
"s.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"if(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}",
"p[0].equals(s[i])",
"p[0].equals",
"p[0]",
"p",
"0",
"s[i]",
"s",
"i",
"{\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}",
"int c = i;",
"c",
"i",
"for(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"int k=0;",
"int k=0;",
"k",
"0",
"k<p.length",
"k",
"p.length",
"p",
"p.length",
"k++",
"k++",
"k",
"{\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"str2+=s[c]",
"str2",
"s[c]",
"s",
"c",
"if(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}",
"c<s.length-1",
"c",
"s.length-1",
"s.length",
"s",
"s.length",
"1",
"{\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}",
"c++",
"c",
"{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}",
"c=0",
"c",
"0",
"if(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}",
"str2.equals(str1)",
"str2.equals",
"str2",
"str1",
"{\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}",
"flag=true",
"flag",
"true",
"{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}",
"str2=\"\"",
"str2",
"\"\"",
"if(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}",
"flag",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s[],p[],str1,str2=\"\";\n\t\tboolean flag=false;\n\t\ttry {\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s[],p[],str1,str2=\"\";\n\t\tboolean flag=false;\n\t\ttry {\n\t\t\ts=br.readLine().split(\"\");\n\t\t\tstr1=br.readLine();\n\t\t\tp=str1.split(\"\");\n\t\t\tfor(int i = 0; i<s.length;i++){\n\t\t\t\tif(p[0].equals(s[i])){\n\t\t\t\t\tint c = i;\n\t\t\t\t\tfor(int k=0;k<p.length;k++){\n\t\t\t\t\t\tstr2+=s[c];\n\t\t\t\t\t\tif(c<s.length-1){\n\t\t\t\t\t\t\tc++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tc=0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(str2.equals(str1)){\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstr2=\"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(flag){\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO ????????????????????? catch ????????????\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s[],p[],str1,str2="";
boolean flag=false;
try {
s=br.readLine().split("");
str1=br.readLine();
p=str1.split("");
for(int i = 0; i<s.length;i++){
if(p[0].equals(s[i])){
int c = i;
for(int k=0;k<p.length;k++){
str2+=s[c];
if(c<s.length-1){
c++;
}
else{
c=0;
}
}
if(str2.equals(str1)){
flag=true;
}
else{
str2="";
}
}
}
if(flag){
System.out.println("Yes");
}else{
System.out.println("No");
}
} catch (IOException e) {
// TODO ????????????????????? catch ????????????
System.err.println(e);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
13,
40,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
0,
13,
17,
3,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
36,
46
],
[
46,
47
],
[
47,
48
],
[
36,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
51,
61
],
[
61,
62
],
[
62,
63
],
[
51,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
65,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
77,
79
],
[
65,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
88,
98
],
[
98,
99
],
[
99,
100
],
[
88,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
109,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
111,
118
],
[
118,
119
],
[
118,
120
],
[
111,
121
],
[
8,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
6,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String p = sc.nextLine();\n String ss = s + s;\n int OK = 0;\n int[] check = new int[s.length()];\n for(int i = 0; i < s.length(); i++){\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }\n for (int i = 0; i < s.length(); i++) {\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }\n if (OK == 0) System.out.println(\"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String p = sc.nextLine();\n String ss = s + s;\n int OK = 0;\n int[] check = new int[s.length()];\n for(int i = 0; i < s.length(); i++){\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }\n for (int i = 0; i < s.length(); i++) {\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }\n if (OK == 0) System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String p = sc.nextLine();\n String ss = s + s;\n int OK = 0;\n int[] check = new int[s.length()];\n for(int i = 0; i < s.length(); i++){\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }\n for (int i = 0; i < s.length(); i++) {\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }\n if (OK == 0) System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String p = sc.nextLine();\n String ss = s + s;\n int OK = 0;\n int[] check = new int[s.length()];\n for(int i = 0; i < s.length(); i++){\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }\n for (int i = 0; i < s.length(); i++) {\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }\n if (OK == 0) System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String p = sc.nextLine();",
"p",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String ss = s + s;",
"ss",
"s + s",
"s",
"s",
"int OK = 0;",
"OK",
"0",
"int[] check = new int[s.length()];",
"check",
"new int[s.length()]",
"s.length()",
"s.length",
"s",
"for(int i = 0; i < s.length(); i++){\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }",
"{\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }",
"for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }",
"{\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }",
"char pj = p.charAt(j);",
"pj",
"p.charAt(j)",
"p.charAt",
"p",
"j",
"char ssj = ss.charAt(j+i);",
"ssj",
"ss.charAt(j+i)",
"ss.charAt",
"ss",
"j+i",
"j",
"i",
"if (pj == ssj) check[i] ++;",
"pj == ssj",
"pj",
"ssj",
"check[i] ++",
"check[i]",
"check",
"i",
"for (int i = 0; i < s.length(); i++) {\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }",
"{\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }",
"if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }",
"check[i] == p.length()",
"check[i]",
"check",
"i",
"p.length()",
"p.length",
"p",
"{\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"OK = 1",
"OK",
"1",
"break;",
"if (OK == 0) System.out.println(\"No\");",
"OK == 0",
"OK",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String p = sc.nextLine();\n String ss = s + s;\n int OK = 0;\n int[] check = new int[s.length()];\n for(int i = 0; i < s.length(); i++){\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }\n for (int i = 0; i < s.length(); i++) {\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }\n if (OK == 0) System.out.println(\"No\");\n }\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String p = sc.nextLine();\n String ss = s + s;\n int OK = 0;\n int[] check = new int[s.length()];\n for(int i = 0; i < s.length(); i++){\n for(int j = 0; j < p.length(); j++){\n char pj = p.charAt(j);\n char ssj = ss.charAt(j+i);\n if (pj == ssj) check[i] ++; \n }\n }\n for (int i = 0; i < s.length(); i++) {\n if (check[i] == p.length()) {\n System.out.println(\"Yes\");\n OK = 1;\n break;\n }\n }\n if (OK == 0) System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
String p = sc.nextLine();
String ss = s + s;
int OK = 0;
int[] check = new int[s.length()];
for(int i = 0; i < s.length(); i++){
for(int j = 0; j < p.length(); j++){
char pj = p.charAt(j);
char ssj = ss.charAt(j+i);
if (pj == ssj) check[i] ++;
}
}
for (int i = 0; i < s.length(); i++) {
if (check[i] == p.length()) {
System.out.println("Yes");
OK = 1;
break;
}
}
if (OK == 0) System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
4,
18,
13,
4,
18,
13,
30,
0,
13,
2,
2,
13,
4,
18,
13,
4,
18,
13,
4,
18,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
30,
4,
18,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
14,
4,
18,
4,
18,
13,
13,
30,
40,
13,
3,
4,
18,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
137,
5
],
[
137,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
34,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
59,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
71,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
83,
87
],
[
49,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
48,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
102,
107
],
[
101,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
48,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
8,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
116,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
6,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
]
| [
"import java.io.*;\n\npublic class Main {\n\tpublic static void main(String[] age)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint x = 0;\n\n\t\tfor( i=0 ; i<s.length() ; i++ ){\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\n\t\tif( j==0){\n\t\t\tSystem.out.println(\"No\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\tpublic static void main(String[] age)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint x = 0;\n\n\t\tfor( i=0 ; i<s.length() ; i++ ){\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\n\t\tif( j==0){\n\t\t\tSystem.out.println(\"No\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] age)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint x = 0;\n\n\t\tfor( i=0 ; i<s.length() ; i++ ){\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\n\t\tif( j==0){\n\t\t\tSystem.out.println(\"No\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint x = 0;\n\n\t\tfor( i=0 ; i<s.length() ; i++ ){\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\n\t\tif( j==0){\n\t\t\tSystem.out.println(\"No\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"String p = br.readLine();",
"p",
"br.readLine()",
"br.readLine",
"br",
"StringBuffer sb = new StringBuffer();",
"sb",
"new StringBuffer()",
"int i = 0;",
"i",
"0",
"int j = 0;",
"j",
"0",
"int x = 0;",
"x",
"0",
"for( i=0 ; i<s.length() ; i++ ){\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}",
"i=0 ;",
"i=0",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}",
"{\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}",
"if ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}",
"(i+p.length())>s.length()",
"(i+p.length())",
"i",
"p.length()",
"p.length",
"p",
"s.length()",
"s.length",
"s",
"{\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}",
"x = (i+p.length())-s.length()",
"x",
"(i+p.length())-s.length()",
"(i+p.length())",
"i",
"p.length()",
"p.length",
"p",
"s.length()",
"s.length",
"s",
"sb.append(s.substring(i, s.length())).append(s.substring(0, x))",
"sb.append(s.substring(i, s.length())).append",
"sb.append(s.substring(i, s.length()))",
"sb.append",
"sb",
"s.substring(i, s.length())",
"s.substring",
"s",
"i",
"s.length()",
"s.length",
"s",
"s.substring(0, x)",
"s.substring",
"s",
"0",
"x",
"{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}",
"sb.append(s.substring(i, i+p.length()))",
"sb.append",
"sb",
"s.substring(i, i+p.length())",
"s.substring",
"s",
"i",
"i+p.length()",
"i",
"p.length()",
"p.length",
"p",
"if( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}",
"sb.toString().equals(p)",
"sb.toString().equals",
"sb.toString()",
"sb.toString",
"sb",
"p",
"{\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}",
"j++",
"j",
"break;",
"sb.setLength(0)",
"sb.setLength",
"sb",
"0",
"if( j==0){\n\t\t\tSystem.out.println(\"No\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"j==0",
"j",
"0",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"String[] age",
"age",
"public class Main {\n\tpublic static void main(String[] age)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint x = 0;\n\n\t\tfor( i=0 ; i<s.length() ; i++ ){\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\n\t\tif( j==0){\n\t\t\tSystem.out.println(\"No\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] age)throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tStringBuffer sb = new StringBuffer();\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tint x = 0;\n\n\t\tfor( i=0 ; i<s.length() ; i++ ){\n\t\t\tif ( (i+p.length())>s.length() ){\n\t\t\t\tx = (i+p.length())-s.length();\n\t\t\t\tsb.append(s.substring(i, s.length())).append(s.substring(0, x));\n\t\t\t}else{\n\t\t\t\tsb.append(s.substring(i, i+p.length()));\n\t\t\t}\n\t\t\tif( sb.toString().equals(p) ){\n\t\t\t\tj++;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tsb.setLength(0);\n\t\t}\n\n\t\tif( j==0){\n\t\t\tSystem.out.println(\"No\");\n\t\t}else{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
public class Main {
public static void main(String[] age)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
String p = br.readLine();
StringBuffer sb = new StringBuffer();
int i = 0;
int j = 0;
int x = 0;
for( i=0 ; i<s.length() ; i++ ){
if ( (i+p.length())>s.length() ){
x = (i+p.length())-s.length();
sb.append(s.substring(i, s.length())).append(s.substring(0, x));
}else{
sb.append(s.substring(i, i+p.length()));
}
if( sb.toString().equals(p) ){
j++;
break;
}
sb.setLength(0);
}
if( j==0){
System.out.println("No");
}else{
System.out.println("Yes");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
2,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
17,
4,
18,
13,
13,
30,
14,
4,
18,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
99,
11
],
[
99,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
16,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
16,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
16,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
46,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
62,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
72,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
16,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
12,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }\n }",
"main",
"{\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }\n }",
"try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }",
"{\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String result = \"No\";",
"result",
"\"No\"",
"String inStr = br.readLine();",
"inStr",
"br.readLine()",
"br.readLine",
"br",
"String target = br.readLine();",
"target",
"br.readLine()",
"br.readLine",
"br",
"String ring = inStr + inStr;",
"ring",
"inStr + inStr",
"inStr",
"inStr",
"if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }",
"inStr.length() >= target.length()",
"inStr.length()",
"inStr.length",
"inStr",
"target.length()",
"target.length",
"target",
"for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < inStr.length()",
"i",
"inStr.length()",
"inStr.length",
"inStr",
"i++",
"i++",
"i",
"{\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }",
"{\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }",
"if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }",
"target.charAt(0) == ring.charAt(i)",
"target.charAt(0)",
"target.charAt",
"target",
"0",
"ring.charAt(i)",
"ring.charAt",
"ring",
"i",
"{\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }",
"if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }",
"target.equals(ring.substring(i, i+target.length()))",
"target.equals",
"target",
"ring.substring(i, i+target.length())",
"ring.substring",
"ring",
"i",
"i+target.length()",
"i",
"target.length()",
"target.length",
"target",
"{\n result = \"Yes\";\n break;\n }",
"result = \"Yes\"",
"result",
"\"Yes\"",
"break;",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length())\n for(int i = 0; i < inStr.length(); i++) {\n if( target.charAt(0) == ring.charAt(i) ){\n if(target.equals(ring.substring(i, i+target.length()))) {\n result = \"Yes\";\n break;\n }\n }\n }\n\n System.out.println(result);\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String result = "No";
String inStr = br.readLine();
String target = br.readLine();
String ring = inStr + inStr;
if( inStr.length() >= target.length())
for(int i = 0; i < inStr.length(); i++) {
if( target.charAt(0) == ring.charAt(i) ){
if(target.equals(ring.substring(i, i+target.length()))) {
result = "Yes";
break;
}
}
}
System.out.println(result);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
20,
0,
13,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
0,
13,
4,
18,
13,
13,
14,
2,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
51,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
51,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
6,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tString str, search_str;\n\t\tStringBuilder prostr;\n\t\tint result;\n\t\t\n\t\tstr = scan.nextLine();\n\t\tsearch_str = scan.nextLine();\n\t\t\n\t\tprostr = new StringBuilder(str);\n\t\tprostr = prostr.append(str.substring(0, search_str.length()));\n\t\t\n\t\tresult = prostr.indexOf(search_str);\n\t\t\n\t\tif ( result != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\t\t\n\t\tscan.close();\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tString str, search_str;\n\t\tStringBuilder prostr;\n\t\tint result;\n\t\t\n\t\tstr = scan.nextLine();\n\t\tsearch_str = scan.nextLine();\n\t\t\n\t\tprostr = new StringBuilder(str);\n\t\tprostr = prostr.append(str.substring(0, search_str.length()));\n\t\t\n\t\tresult = prostr.indexOf(search_str);\n\t\t\n\t\tif ( result != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\t\t\n\t\tscan.close();\n\t}\n}",
"Main",
"public static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tString str, search_str;\n\t\tStringBuilder prostr;\n\t\tint result;\n\t\t\n\t\tstr = scan.nextLine();\n\t\tsearch_str = scan.nextLine();\n\t\t\n\t\tprostr = new StringBuilder(str);\n\t\tprostr = prostr.append(str.substring(0, search_str.length()));\n\t\t\n\t\tresult = prostr.indexOf(search_str);\n\t\t\n\t\tif ( result != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\t\t\n\t\tscan.close();\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner (System.in);\n\t\tString str, search_str;\n\t\tStringBuilder prostr;\n\t\tint result;\n\t\t\n\t\tstr = scan.nextLine();\n\t\tsearch_str = scan.nextLine();\n\t\t\n\t\tprostr = new StringBuilder(str);\n\t\tprostr = prostr.append(str.substring(0, search_str.length()));\n\t\t\n\t\tresult = prostr.indexOf(search_str);\n\t\t\n\t\tif ( result != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\t\t\n\t\tscan.close();\n\t}",
"Scanner scan = new Scanner (System.in);",
"scan",
"new Scanner (System.in)",
"String str",
"str",
"search_str;",
"search_str",
"StringBuilder prostr;",
"prostr",
"int result;",
"result",
"str = scan.nextLine()",
"str",
"scan.nextLine()",
"scan.nextLine",
"scan",
"search_str = scan.nextLine()",
"search_str",
"scan.nextLine()",
"scan.nextLine",
"scan",
"prostr = new StringBuilder(str)",
"prostr",
"new StringBuilder(str)",
"prostr = prostr.append(str.substring(0, search_str.length()))",
"prostr",
"prostr.append(str.substring(0, search_str.length()))",
"prostr.append",
"prostr",
"str.substring(0, search_str.length())",
"str.substring",
"str",
"0",
"search_str.length()",
"search_str.length",
"search_str",
"result = prostr.indexOf(search_str)",
"result",
"prostr.indexOf(search_str)",
"prostr.indexOf",
"prostr",
"search_str",
"if ( result != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"result != -1",
"result",
"-1",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scan.close()",
"scan.close",
"scan",
"String [] args",
"args",
"public class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tString str, search_str;\n\t\tStringBuilder prostr;\n\t\tint result;\n\t\t\n\t\tstr = scan.nextLine();\n\t\tsearch_str = scan.nextLine();\n\t\t\n\t\tprostr = new StringBuilder(str);\n\t\tprostr = prostr.append(str.substring(0, search_str.length()));\n\t\t\n\t\tresult = prostr.indexOf(search_str);\n\t\t\n\t\tif ( result != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\t\t\n\t\tscan.close();\n\t}\n}",
"public class Main {\n\tpublic static void main (String [] args) {\n\t\tScanner scan = new Scanner (System.in);\n\t\tString str, search_str;\n\t\tStringBuilder prostr;\n\t\tint result;\n\t\t\n\t\tstr = scan.nextLine();\n\t\tsearch_str = scan.nextLine();\n\t\t\n\t\tprostr = new StringBuilder(str);\n\t\tprostr = prostr.append(str.substring(0, search_str.length()));\n\t\t\n\t\tresult = prostr.indexOf(search_str);\n\t\t\n\t\tif ( result != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\t\t\n\t\tscan.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main (String [] args) {
Scanner scan = new Scanner (System.in);
String str, search_str;
StringBuilder prostr;
int result;
str = scan.nextLine();
search_str = scan.nextLine();
prostr = new StringBuilder(str);
prostr = prostr.append(str.substring(0, search_str.length()));
result = prostr.indexOf(search_str);
if ( result != -1) {
System.out.println("Yes");
} else {
System.out.println("No");
}
scan.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
0,
13,
2,
13,
13,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
13,
40,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
53,
8
],
[
53,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
22,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
36,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
30,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
9,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"\nimport java.util.*;\nimport java.util.regex.Pattern;\n\npublic class Main {\n\t \n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\tString str=cin.nextLine();\n\t\tstr=str+str;\n\t\tString jstr=cin.nextLine();\n\t\t\n\t\tif(str.indexOf(jstr)!=-1)System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\t\n}",
"import java.util.*;",
"util.*",
"java",
"import java.util.regex.Pattern;",
"Pattern",
"java.util.regex",
"public class Main {\n\t \n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\tString str=cin.nextLine();\n\t\tstr=str+str;\n\t\tString jstr=cin.nextLine();\n\t\t\n\t\tif(str.indexOf(jstr)!=-1)System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\tString str=cin.nextLine();\n\t\tstr=str+str;\n\t\tString jstr=cin.nextLine();\n\t\t\n\t\tif(str.indexOf(jstr)!=-1)System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\tString str=cin.nextLine();\n\t\tstr=str+str;\n\t\tString jstr=cin.nextLine();\n\t\t\n\t\tif(str.indexOf(jstr)!=-1)System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"Scanner cin=new Scanner(System.in);",
"cin",
"new Scanner(System.in)",
"String str=cin.nextLine();",
"str",
"cin.nextLine()",
"cin.nextLine",
"cin",
"str=str+str",
"str",
"str+str",
"str",
"str",
"String jstr=cin.nextLine();",
"jstr",
"cin.nextLine()",
"cin.nextLine",
"cin",
"if(str.indexOf(jstr)!=-1)System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"str.indexOf(jstr)!=-1",
"str.indexOf(jstr)",
"str.indexOf",
"str",
"jstr",
"-1",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\t \n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\tString str=cin.nextLine();\n\t\tstr=str+str;\n\t\tString jstr=cin.nextLine();\n\t\t\n\t\tif(str.indexOf(jstr)!=-1)System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\t\n}",
"public class Main {\n\t \n\tpublic static void main(String[] args) {\n\t\tScanner cin=new Scanner(System.in);\n\t\t\n\t\tString str=cin.nextLine();\n\t\tstr=str+str;\n\t\tString jstr=cin.nextLine();\n\t\t\n\t\tif(str.indexOf(jstr)!=-1)System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\t\n}",
"Main"
]
|
import java.util.*;
import java.util.regex.Pattern;
public class Main {
public static void main(String[] args) {
Scanner cin=new Scanner(System.in);
String str=cin.nextLine();
str=str+str;
String jstr=cin.nextLine();
if(str.indexOf(jstr)!=-1)System.out.println("Yes");
else System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
4,
18,
2,
13,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
46,
5
],
[
46,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
22,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
22,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
6,
43
],
[
43,
44
],
[
0,
45
],
[
45,
46
],
[
45,
47
]
]
| [
"\n\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString P = sc.next();\n\n\t\tif ((S + S).contains(P)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString P = sc.next();\n\n\t\tif ((S + S).contains(P)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString P = sc.next();\n\n\t\tif ((S + S).contains(P)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString P = sc.next();\n\n\t\tif ((S + S).contains(P)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String P = sc.next();",
"P",
"sc.next()",
"sc.next",
"sc",
"if ((S + S).contains(P)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"(S + S).contains(P)",
"(S + S).contains",
"(S + S)",
"S",
"S",
"P",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString P = sc.next();\n\n\t\tif ((S + S).contains(P)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString P = sc.next();\n\n\t\tif ((S + S).contains(P)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
String P = sc.next();
if ((S + S).contains(P)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
50,
11
],
[
50,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
31,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
12,
47
],
[
47,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n boolean check = false;\n label:for(int i=0;i<s.length();i++){\n if(s.charAt(i)==p.charAt(0)){\n for(int j=1;j<p.length();j++){\n if(s.charAt((i+j)%s.length())!=p.charAt(j)) continue label;\n }\n check = true;\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n boolean check = false;\n label:for(int i=0;i<s.length();i++){\n if(s.charAt(i)==p.charAt(0)){\n for(int j=1;j<p.length();j++){\n if(s.charAt((i+j)%s.length())!=p.charAt(j)) continue label;\n }\n check = true;\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n boolean check = false;\n label:for(int i=0;i<s.length();i++){\n if(s.charAt(i)==p.charAt(0)){\n for(int j=1;j<p.length();j++){\n if(s.charAt((i+j)%s.length())!=p.charAt(j)) continue label;\n }\n check = true;\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n boolean check = false;\n label:for(int i=0;i<s.length();i++){\n if(s.charAt(i)==p.charAt(0)){\n for(int j=1;j<p.length();j++){\n if(s.charAt((i+j)%s.length())!=p.charAt(j)) continue label;\n }\n check = true;\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"String p = br.readLine();",
"p",
"br.readLine()",
"br.readLine",
"br",
"boolean check = false;",
"check",
"false",
"if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"check",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n boolean check = false;\n label:for(int i=0;i<s.length();i++){\n if(s.charAt(i)==p.charAt(0)){\n for(int j=1;j<p.length();j++){\n if(s.charAt((i+j)%s.length())!=p.charAt(j)) continue label;\n }\n check = true;\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n boolean check = false;\n label:for(int i=0;i<s.length();i++){\n if(s.charAt(i)==p.charAt(0)){\n for(int j=1;j<p.length();j++){\n if(s.charAt((i+j)%s.length())!=p.charAt(j)) continue label;\n }\n check = true;\n }\n }\n if(check){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
String p = br.readLine();
boolean check = false;
label:for(int i=0;i<s.length();i++){
if(s.charAt(i)==p.charAt(0)){
for(int j=1;j<p.length();j++){
if(s.charAt((i+j)%s.length())!=p.charAt(j)) continue label;
}
check = true;
}
}
if(check){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
17,
18,
13,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
2,
13,
13,
4,
18,
13,
30,
40,
13,
30,
3,
14,
2,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
32,
42
],
[
42,
43
],
[
43,
44
],
[
32,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
59,
69
],
[
69,
70
],
[
70,
71
],
[
59,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
86,
87
],
[
74,
88
],
[
88,
89
],
[
89,
90
],
[
74,
91
],
[
91,
92
],
[
73,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
94,
98
],
[
93,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
99,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
6,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
]
| [
"import java.util.Scanner;\n\n// import java.util.ArrayList;\n// import java.util.List;\n// import java.io.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.nextLine();\n\t\tString p = scan.nextLine();\n\t\tchar[] sC = s.toCharArray();\n\t\tchar[] pC = p.toCharArray();\n\t\tfor (int i = 0; i < sC.length; i++) {\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.nextLine();\n\t\tString p = scan.nextLine();\n\t\tchar[] sC = s.toCharArray();\n\t\tchar[] pC = p.toCharArray();\n\t\tfor (int i = 0; i < sC.length; i++) {\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.nextLine();\n\t\tString p = scan.nextLine();\n\t\tchar[] sC = s.toCharArray();\n\t\tchar[] pC = p.toCharArray();\n\t\tfor (int i = 0; i < sC.length; i++) {\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.nextLine();\n\t\tString p = scan.nextLine();\n\t\tchar[] sC = s.toCharArray();\n\t\tchar[] pC = p.toCharArray();\n\t\tfor (int i = 0; i < sC.length; i++) {\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.nextLine();",
"s",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String p = scan.nextLine();",
"p",
"scan.nextLine()",
"scan.nextLine",
"scan",
"char[] sC = s.toCharArray();",
"sC",
"s.toCharArray()",
"s.toCharArray",
"s",
"char[] pC = p.toCharArray();",
"pC",
"p.toCharArray()",
"p.toCharArray",
"p",
"for (int i = 0; i < sC.length; i++) {\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sC.length",
"i",
"sC.length",
"sC",
"sC.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}",
"if (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}",
"pC[0] == sC[i]",
"pC[0]",
"pC",
"0",
"sC[i]",
"sC",
"i",
"{\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}",
"int cnt = 0;",
"cnt",
"0",
"for (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}",
"if(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"pC[j] == sC[(i + j) % s.length()]",
"pC[j]",
"pC",
"j",
"sC[(i + j) % s.length()]",
"sC",
"(i + j) % s.length()",
"(i + j)",
"i",
"j",
"s.length()",
"s.length",
"s",
"{\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}",
"cnt ++",
"cnt",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"break;",
"if(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}",
"p.length() == cnt",
"p.length()",
"p.length",
"p",
"cnt",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.nextLine();\n\t\tString p = scan.nextLine();\n\t\tchar[] sC = s.toCharArray();\n\t\tchar[] pC = p.toCharArray();\n\t\tfor (int i = 0; i < sC.length; i++) {\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.nextLine();\n\t\tString p = scan.nextLine();\n\t\tchar[] sC = s.toCharArray();\n\t\tchar[] pC = p.toCharArray();\n\t\tfor (int i = 0; i < sC.length; i++) {\n\t\t\tif (pC[0] == sC[i]) {\n\t\t\t\tint cnt = 0;\n\t\t\t\tfor (int j = 0; j < p.length(); j++) {\n\t\t\t\t\tif(pC[j] == sC[(i + j) % s.length()]){\n\t\t\t\t\tcnt ++;\n\t\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(p.length() == cnt){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
// import java.util.ArrayList;
// import java.util.List;
// import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String p = scan.nextLine();
char[] sC = s.toCharArray();
char[] pC = p.toCharArray();
for (int i = 0; i < sC.length; i++) {
if (pC[0] == sC[i]) {
int cnt = 0;
for (int j = 0; j < p.length(); j++) {
if(pC[j] == sC[(i + j) % s.length()]){
cnt ++;
}else{
break;
}
if(p.length() == cnt){
System.out.println("Yes");
return;
}
}
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
17,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
10,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
27,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
44,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
41,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
54,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
59,
66
],
[
10,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
6,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\ttry (Scanner sc = new Scanner(System.in);) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\ttry (Scanner sc = new Scanner(System.in);) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\ttry (Scanner sc = new Scanner(System.in);) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\t\n\t\ttry (Scanner sc = new Scanner(System.in);) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"try (Scanner sc = new Scanner(System.in);) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"{\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"String search = s;",
"search",
"s",
"for(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"search = s.substring(i) + s.substring(0, i)",
"search",
"s.substring(i) + s.substring(0, i)",
"s.substring(i)",
"s.substring",
"s",
"i",
"s.substring(0, i)",
"s.substring",
"s",
"0",
"i",
"if(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"search.contains(p)",
"search.contains",
"search",
"p",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\ttry (Scanner sc = new Scanner(System.in);) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\ttry (Scanner sc = new Scanner(System.in);) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\t\n\t\t\tString search = s;\n\t\t\t\n\t\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\t\t\n\t\t\t\tsearch = s.substring(i) + s.substring(0, i);\n\t\t\t\t\n\t\t\t\tif(search.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in);) {
String s = sc.next();
String p = sc.next();
String search = s;
for(int i = 0; i < s.length(); i++) {
search = s.substring(i) + s.substring(0, i);
if(search.contains(p)) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
50,
5
],
[
50,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
31,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
25,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
6,
47
],
[
47,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n String s = sc.next();\n String p = sc.next();\n \n s += s;\n if(s.indexOf(p)!=-1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n String s = sc.next();\n String p = sc.next();\n \n s += s;\n if(s.indexOf(p)!=-1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n String s = sc.next();\n String p = sc.next();\n \n s += s;\n if(s.indexOf(p)!=-1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n String s = sc.next();\n String p = sc.next();\n \n s += s;\n if(s.indexOf(p)!=-1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"s += s",
"s",
"s",
"if(s.indexOf(p)!=-1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }",
"s.indexOf(p)!=-1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"{\n \tSystem.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \tSystem.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n String s = sc.next();\n String p = sc.next();\n \n s += s;\n if(s.indexOf(p)!=-1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n }\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n String s = sc.next();\n String p = sc.next();\n \n s += s;\n if(s.indexOf(p)!=-1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
s += s;
if(s.indexOf(p)!=-1){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
13,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
0,
13,
13,
41,
13,
2,
4,
18,
13,
13,
13,
4,
18,
13,
17,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
204,
17
],
[
204,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
20,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
20,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
20,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
20,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
62,
68
],
[
68,
69
],
[
68,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
75,
81
],
[
81,
82
],
[
81,
83
],
[
62,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
92,
96
],
[
62,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
97,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
20,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
18,
113
],
[
113,
114
],
[
204,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
115,
119
],
[
119,
120
],
[
115,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
115,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
130,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
140,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
129,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
115,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
159,
162
],
[
162,
163
],
[
115,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
168,
171
],
[
171,
172
],
[
115,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
177,
180
],
[
180,
181
],
[
115,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
188,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
184,
201
],
[
201,
202
],
[
0,
203
],
[
203,
204
],
[
203,
205
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.lang.reflect.Array;\nimport java.util.*;\n\n\npublic class Main {\n public static void main(String[] args) {\n FastReader f = new FastReader();\n HashMap<Integer,Integer> histogram = new HashMap<>();\n // fill in the dictionary with the initial value\n String match = \"No\";\n String s = f.nextLine();\n String p = f.nextLine();\n int size = p.length();\n int len = s.length();\n for(int i = 0; i < len; i++){\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }\n\n System.out.println(match);\n }\n\n // Helper class to speed up IO\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n FastReader f = new FastReader();\n HashMap<Integer,Integer> histogram = new HashMap<>();\n // fill in the dictionary with the initial value\n String match = \"No\";\n String s = f.nextLine();\n String p = f.nextLine();\n int size = p.length();\n int len = s.length();\n for(int i = 0; i < len; i++){\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }\n\n System.out.println(match);\n }\n\n // Helper class to speed up IO\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n FastReader f = new FastReader();\n HashMap<Integer,Integer> histogram = new HashMap<>();\n // fill in the dictionary with the initial value\n String match = \"No\";\n String s = f.nextLine();\n String p = f.nextLine();\n int size = p.length();\n int len = s.length();\n for(int i = 0; i < len; i++){\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }\n\n System.out.println(match);\n }",
"main",
"{\n FastReader f = new FastReader();\n HashMap<Integer,Integer> histogram = new HashMap<>();\n // fill in the dictionary with the initial value\n String match = \"No\";\n String s = f.nextLine();\n String p = f.nextLine();\n int size = p.length();\n int len = s.length();\n for(int i = 0; i < len; i++){\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }\n\n System.out.println(match);\n }",
"FastReader f = new FastReader();",
"f",
"new FastReader()",
"HashMap<Integer,Integer> histogram = new HashMap<>();",
"histogram",
"new HashMap<>()",
"String match = \"No\";",
"match",
"\"No\"",
"String s = f.nextLine();",
"s",
"f.nextLine()",
"f.nextLine",
"f",
"String p = f.nextLine();",
"p",
"f.nextLine()",
"f.nextLine",
"f",
"int size = p.length();",
"size",
"p.length()",
"p.length",
"p",
"int len = s.length();",
"len",
"s.length()",
"s.length",
"s",
"for(int i = 0; i < len; i++){\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"{\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }",
"{\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }",
"int endOne = i+size;",
"endOne",
"i+size",
"i",
"size",
"int endTwo = 0;",
"endTwo",
"0",
"if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }",
"endOne >= len",
"endOne",
"len",
"{\n endTwo = endOne % len;\n endOne = len;\n }",
"endTwo = endOne % len",
"endTwo",
"endOne % len",
"endOne",
"len",
"endOne = len",
"endOne",
"len",
"String result = s.substring(i, endOne) + s.substring(0,endTwo);",
"result",
"s.substring(i, endOne) + s.substring(0,endTwo)",
"s.substring(i, endOne)",
"s.substring",
"s",
"i",
"endOne",
"s.substring(0,endTwo)",
"s.substring",
"s",
"0",
"endTwo",
"if(result.equals(p)){\n match = \"Yes\";\n break;\n }",
"result.equals(p)",
"result.equals",
"result",
"p",
"{\n match = \"Yes\";\n break;\n }",
"match = \"Yes\"",
"match",
"\"Yes\"",
"break;",
"System.out.println(match)",
"System.out.println",
"System.out",
"System",
"System.out",
"match",
"String[] args",
"args",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"br = new BufferedReader(new\n InputStreamReader(System.in))",
"br",
"new BufferedReader(new\n InputStreamReader(System.in))",
"String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n public static void main(String[] args) {\n FastReader f = new FastReader();\n HashMap<Integer,Integer> histogram = new HashMap<>();\n // fill in the dictionary with the initial value\n String match = \"No\";\n String s = f.nextLine();\n String p = f.nextLine();\n int size = p.length();\n int len = s.length();\n for(int i = 0; i < len; i++){\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }\n\n System.out.println(match);\n }\n\n // Helper class to speed up IO\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n FastReader f = new FastReader();\n HashMap<Integer,Integer> histogram = new HashMap<>();\n // fill in the dictionary with the initial value\n String match = \"No\";\n String s = f.nextLine();\n String p = f.nextLine();\n int size = p.length();\n int len = s.length();\n for(int i = 0; i < len; i++){\n int endOne = i+size;\n int endTwo = 0;\n if(endOne >= len){\n endTwo = endOne % len;\n endOne = len;\n }\n String result = s.substring(i, endOne) + s.substring(0,endTwo);\n if(result.equals(p)){\n match = \"Yes\";\n break;\n }\n\n }\n\n System.out.println(match);\n }\n\n // Helper class to speed up IO\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Array;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastReader f = new FastReader();
HashMap<Integer,Integer> histogram = new HashMap<>();
// fill in the dictionary with the initial value
String match = "No";
String s = f.nextLine();
String p = f.nextLine();
int size = p.length();
int len = s.length();
for(int i = 0; i < len; i++){
int endOne = i+size;
int endTwo = 0;
if(endOne >= len){
endTwo = endOne % len;
endOne = len;
}
String result = s.substring(i, endOne) + s.substring(0,endTwo);
if(result.equals(p)){
match = "Yes";
break;
}
}
System.out.println(match);
}
// Helper class to speed up IO
static class FastReader {
BufferedReader br;
StringTokenizer st;
FastReader() {
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
17,
41,
13,
2,
18,
13,
13,
18,
13,
13,
41,
13,
41,
13,
41,
13,
0,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
4,
18,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
3,
14,
2,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
131,
5
],
[
131,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
8,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
73,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
89,
96
],
[
96,
97
],
[
96,
98
],
[
88,
99
],
[
99,
100
],
[
100,
101
],
[
69,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
102,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
108,
115
],
[
8,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
116,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
6,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString x = scan.next();\n\t\tString y = scan.next();\n\t\tString[] ya = y.split(\"\");\n\t\tString a = x + x;\n\t\tString[] aa = a.split(\"\");\n\t\tint len = aa.length - ya.length;\n\t\tint i,m,t;\n\t\tt = 0;\n\t\tfor(i = 0; i < len; i++){\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\tif(t != y.length())\n\t\t\tSystem.out.println(\"No\");\n \t\t\t}\n\n\t}\n\n\n\t",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString x = scan.next();\n\t\tString y = scan.next();\n\t\tString[] ya = y.split(\"\");\n\t\tString a = x + x;\n\t\tString[] aa = a.split(\"\");\n\t\tint len = aa.length - ya.length;\n\t\tint i,m,t;\n\t\tt = 0;\n\t\tfor(i = 0; i < len; i++){\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\tif(t != y.length())\n\t\t\tSystem.out.println(\"No\");\n \t\t\t}\n\n\t}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString x = scan.next();\n\t\tString y = scan.next();\n\t\tString[] ya = y.split(\"\");\n\t\tString a = x + x;\n\t\tString[] aa = a.split(\"\");\n\t\tint len = aa.length - ya.length;\n\t\tint i,m,t;\n\t\tt = 0;\n\t\tfor(i = 0; i < len; i++){\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\tif(t != y.length())\n\t\t\tSystem.out.println(\"No\");\n \t\t\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString x = scan.next();\n\t\tString y = scan.next();\n\t\tString[] ya = y.split(\"\");\n\t\tString a = x + x;\n\t\tString[] aa = a.split(\"\");\n\t\tint len = aa.length - ya.length;\n\t\tint i,m,t;\n\t\tt = 0;\n\t\tfor(i = 0; i < len; i++){\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\tif(t != y.length())\n\t\t\tSystem.out.println(\"No\");\n \t\t\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String x = scan.next();",
"x",
"scan.next()",
"scan.next",
"scan",
"String y = scan.next();",
"y",
"scan.next()",
"scan.next",
"scan",
"String[] ya = y.split(\"\");",
"ya",
"y.split(\"\")",
"y.split",
"y",
"\"\"",
"String a = x + x;",
"a",
"x + x",
"x",
"x",
"String[] aa = a.split(\"\");",
"aa",
"a.split(\"\")",
"a.split",
"a",
"\"\"",
"int len = aa.length - ya.length;",
"len",
"aa.length - ya.length",
"aa.length",
"aa",
"aa.length",
"ya.length",
"ya",
"ya.length",
"int i",
"i",
"m",
"m",
"t;",
"t",
"t = 0",
"t",
"0",
"for(i = 0; i < len; i++){\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}",
"i = 0;",
"i = 0",
"i",
"0",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"{\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}",
"{\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}",
"t = 0",
"t",
"0",
"for(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}",
"m = 0;",
"m = 0",
"m",
"0",
"m < y.length()",
"m",
"y.length()",
"y.length",
"y",
"m++",
"m++",
"m",
"{\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}",
"if(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}",
"aa[i + m].equals(ya[m])",
"aa[i + m].equals",
"aa[i + m]",
"aa",
"i + m",
"i",
"m",
"ya[m]",
"ya",
"m",
"{\n\t\t\t\t\t++t;\n\t\t\t\t}",
"++t",
"t",
"if(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"t == y.length()",
"t",
"y.length()",
"y.length",
"y",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"break;",
"if(t != y.length())\n\t\t\tSystem.out.println(\"No\");",
"t != y.length()",
"t",
"y.length()",
"y.length",
"y",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString x = scan.next();\n\t\tString y = scan.next();\n\t\tString[] ya = y.split(\"\");\n\t\tString a = x + x;\n\t\tString[] aa = a.split(\"\");\n\t\tint len = aa.length - ya.length;\n\t\tint i,m,t;\n\t\tt = 0;\n\t\tfor(i = 0; i < len; i++){\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\tif(t != y.length())\n\t\t\tSystem.out.println(\"No\");\n \t\t\t}\n\n\t}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\tString x = scan.next();\n\t\tString y = scan.next();\n\t\tString[] ya = y.split(\"\");\n\t\tString a = x + x;\n\t\tString[] aa = a.split(\"\");\n\t\tint len = aa.length - ya.length;\n\t\tint i,m,t;\n\t\tt = 0;\n\t\tfor(i = 0; i < len; i++){\n\t\t\tt = 0;\n\t\t\tfor(m = 0; m < y.length(); m++){\n\t\t\t\tif(aa[i + m].equals(ya[m])){\n\t\t\t\t\t++t;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\tif(t == y.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\tif(t != y.length())\n\t\t\tSystem.out.println(\"No\");\n \t\t\t}\n\n\t}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String x = scan.next();
String y = scan.next();
String[] ya = y.split("");
String a = x + x;
String[] aa = a.split("");
int len = aa.length - ya.length;
int i,m,t;
t = 0;
for(i = 0; i < len; i++){
t = 0;
for(m = 0; m < y.length(); m++){
if(aa[i + m].equals(ya[m])){
++t;
}
}
if(t == y.length()){
System.out.println("Yes");
break;
}
}
if(t != y.length())
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
13,
41,
13,
4,
18,
13,
13,
14,
2,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
55,
5
],
[
55,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
33,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
33,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
6,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner scanner=new Scanner(System.in);\n String s=scanner.next();\n String p=scanner.next();\n s=s+s;\n int index=s.indexOf(p);\n if(index==-1){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n }\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner scanner=new Scanner(System.in);\n String s=scanner.next();\n String p=scanner.next();\n s=s+s;\n int index=s.indexOf(p);\n if(index==-1){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n }\n\n}",
"Main",
"public static void main(String[] args) {\n // write your code here\n Scanner scanner=new Scanner(System.in);\n String s=scanner.next();\n String p=scanner.next();\n s=s+s;\n int index=s.indexOf(p);\n if(index==-1){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n }",
"main",
"{\n // write your code here\n Scanner scanner=new Scanner(System.in);\n String s=scanner.next();\n String p=scanner.next();\n s=s+s;\n int index=s.indexOf(p);\n if(index==-1){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n }",
"Scanner scanner=new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String s=scanner.next();",
"s",
"scanner.next()",
"scanner.next",
"scanner",
"String p=scanner.next();",
"p",
"scanner.next()",
"scanner.next",
"scanner",
"s=s+s",
"s",
"s+s",
"s",
"s",
"int index=s.indexOf(p);",
"index",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"if(index==-1){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }",
"index==-1",
"index",
"-1",
"1",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner scanner=new Scanner(System.in);\n String s=scanner.next();\n String p=scanner.next();\n s=s+s;\n int index=s.indexOf(p);\n if(index==-1){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n // write your code here\n Scanner scanner=new Scanner(System.in);\n String s=scanner.next();\n String p=scanner.next();\n s=s+s;\n int index=s.indexOf(p);\n if(index==-1){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n }\n\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// write your code here
Scanner scanner=new Scanner(System.in);
String s=scanner.next();
String p=scanner.next();
s=s+s;
int index=s.indexOf(p);
if(index==-1){
System.out.println("No");
}else{
System.out.println("Yes");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
4,
18,
13,
17,
4,
18,
13,
14,
2,
4,
18,
13,
13,
40,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
39,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
33,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
6,
53
],
[
53,
54
]
]
| [
"import java.util.Scanner;\n \nclass Main{\n public static void main(String[] arg){\n \n Scanner in = new Scanner(System.in);\n\n String s = in.nextLine();\n String p = in.nextLine();\n\n String tmp = s + s.substring(0, p.length());\n\n if(tmp.indexOf(p) != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] arg){\n \n Scanner in = new Scanner(System.in);\n\n String s = in.nextLine();\n String p = in.nextLine();\n\n String tmp = s + s.substring(0, p.length());\n\n if(tmp.indexOf(p) != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\n }\n}",
"Main",
"public static void main(String[] arg){\n \n Scanner in = new Scanner(System.in);\n\n String s = in.nextLine();\n String p = in.nextLine();\n\n String tmp = s + s.substring(0, p.length());\n\n if(tmp.indexOf(p) != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\n }",
"main",
"{\n \n Scanner in = new Scanner(System.in);\n\n String s = in.nextLine();\n String p = in.nextLine();\n\n String tmp = s + s.substring(0, p.length());\n\n if(tmp.indexOf(p) != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String s = in.nextLine();",
"s",
"in.nextLine()",
"in.nextLine",
"in",
"String p = in.nextLine();",
"p",
"in.nextLine()",
"in.nextLine",
"in",
"String tmp = s + s.substring(0, p.length());",
"tmp",
"s + s.substring(0, p.length())",
"s",
"s.substring(0, p.length())",
"s.substring",
"s",
"0",
"p.length()",
"p.length",
"p",
"if(tmp.indexOf(p) != -1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"tmp.indexOf(p) != -1",
"tmp.indexOf(p)",
"tmp.indexOf",
"tmp",
"p",
"-1",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] arg",
"arg"
]
| import java.util.Scanner;
class Main{
public static void main(String[] arg){
Scanner in = new Scanner(System.in);
String s = in.nextLine();
String p = in.nextLine();
String tmp = s + s.substring(0, p.length());
if(tmp.indexOf(p) != -1)
System.out.println("Yes");
else
System.out.println("No");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
14,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
94,
17
],
[
94,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
34,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
34,
56
],
[
56,
57
],
[
56,
58
],
[
56,
59
],
[
18,
60
],
[
60,
61
],
[
94,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
64,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
71,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
62,
89
],
[
89,
90
],
[
62,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\n\n\npublic class Main{\n\tpublic static void main(String[] args){\n\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}\n\t}\n\n\tprivate static void check(Pattern pat, String ss){\n\t\tMatcher m=pat.matcher(ss);\n\t\tif(m.find()){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.regex.Matcher;",
"Matcher",
"java.util.regex",
"import java.util.regex.Pattern;",
"Pattern",
"java.util.regex",
"public class Main{\n\tpublic static void main(String[] args){\n\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}\n\t}\n\n\tprivate static void check(Pattern pat, String ss){\n\t\tMatcher m=pat.matcher(ss);\n\t\tif(m.find()){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}\n\t}",
"main",
"{\n\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}\n\t}",
"BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"try{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}",
"catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}",
"IOException e",
"{\n\t\t\tSystem.out.print(e);\n\t\t}",
"System.out.print(e)",
"System.out.print",
"System.out",
"System",
"System.out",
"e",
"{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}",
"String s=reader.readLine();",
"s",
"reader.readLine()",
"reader.readLine",
"reader",
"String p=reader.readLine();",
"p",
"reader.readLine()",
"reader.readLine",
"reader",
"String ss=s+s;",
"ss",
"s+s",
"s",
"s",
"Pattern pat=Pattern.compile(p);",
"pat",
"Pattern.compile(p)",
"Pattern.compile",
"Pattern",
"p",
"check(pat, ss)",
"check",
"pat",
"ss",
"String[] args",
"args",
"private static void check(Pattern pat, String ss){\n\t\tMatcher m=pat.matcher(ss);\n\t\tif(m.find()){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"check",
"{\n\t\tMatcher m=pat.matcher(ss);\n\t\tif(m.find()){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Matcher m=pat.matcher(ss);",
"m",
"pat.matcher(ss)",
"pat.matcher",
"pat",
"ss",
"if(m.find()){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"m.find()",
"m.find",
"m",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"Pattern pat",
"pat",
"String ss",
"ss",
"public class Main{\n\tpublic static void main(String[] args){\n\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}\n\t}\n\n\tprivate static void check(Pattern pat, String ss){\n\t\tMatcher m=pat.matcher(ss);\n\t\tif(m.find()){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\n\t\ttry{\n\t\tString s=reader.readLine();\n\t\tString p=reader.readLine();\n\t\tString ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????\n\n\t\t//??£?????¨???????????£????±??????????\n\n\t\tPattern pat=Pattern.compile(p);\n\n\t\tcheck(pat, ss);\n\n\n\t\t}catch(IOException e){\n\t\t\tSystem.out.print(e);\n\t\t}\n\t}\n\n\tprivate static void check(Pattern pat, String ss){\n\t\tMatcher m=pat.matcher(ss);\n\t\tif(m.find()){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main{
public static void main(String[] args){
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
try{
String s=reader.readLine();
String p=reader.readLine();
String ss=s+s;//s????????????????????¨??§???????????°???1?????¨???????????????
//??£?????¨???????????£????±??????????
Pattern pat=Pattern.compile(p);
check(pat, ss);
}catch(IOException e){
System.out.print(e);
}
}
private static void check(Pattern pat, String ss){
Matcher m=pat.matcher(ss);
if(m.find()){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
8,
2,
4,
18,
13,
13,
40,
17,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
65,
11
],
[
65,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
24,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
14,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
53,
58
],
[
58,
59
],
[
52,
60
],
[
52,
61
],
[
12,
62
],
[
62,
63
],
[
0,
64
],
[
64,
65
],
[
64,
66
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString s = \"\";\n\t\t\tString p = \"\";\n\n\t\t\ttry {\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ts = s + s;\n\t\t\tSystem.out.println(s.indexOf(p) != -1? \"Yes\" : \"No\");\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString s = \"\";\n\t\t\tString p = \"\";\n\n\t\t\ttry {\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ts = s + s;\n\t\t\tSystem.out.println(s.indexOf(p) != -1? \"Yes\" : \"No\");\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString s = \"\";\n\t\t\tString p = \"\";\n\n\t\t\ttry {\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ts = s + s;\n\t\t\tSystem.out.println(s.indexOf(p) != -1? \"Yes\" : \"No\");\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString s = \"\";\n\t\t\tString p = \"\";\n\n\t\t\ttry {\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ts = s + s;\n\t\t\tSystem.out.println(s.indexOf(p) != -1? \"Yes\" : \"No\");\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = \"\";",
"s",
"\"\"",
"String p = \"\";",
"p",
"\"\"",
"try {\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t}",
"s = br.readLine()",
"s",
"br.readLine()",
"br.readLine",
"br",
"p = br.readLine()",
"p",
"br.readLine()",
"br.readLine",
"br",
"s = s + s",
"s",
"s + s",
"s",
"s",
"System.out.println(s.indexOf(p) != -1? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"s.indexOf(p) != -1? \"Yes\" : \"No\"",
"s.indexOf(p) != -1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"\"Yes\"",
"\"No\"",
"String args[]",
"args",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString s = \"\";\n\t\t\tString p = \"\";\n\n\t\t\ttry {\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ts = s + s;\n\t\t\tSystem.out.println(s.indexOf(p) != -1? \"Yes\" : \"No\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString s = \"\";\n\t\t\tString p = \"\";\n\n\t\t\ttry {\n\t\t\t\ts = br.readLine();\n\t\t\t\tp = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ts = s + s;\n\t\t\tSystem.out.println(s.indexOf(p) != -1? \"Yes\" : \"No\");\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String args[]) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = "";
String p = "";
try {
s = br.readLine();
p = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
s = s + s;
System.out.println(s.indexOf(p) != -1? "Yes" : "No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
20,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
49,
5
],
[
49,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
22,
27
],
[
27,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
21,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
6,
46
],
[
46,
47
],
[
0,
48
],
[
48,
49
],
[
48,
50
]
]
| [
"import java.util.*;\n \npublic class Main {\n \n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s1 = new String(sc.nextLine());\n String s2 = new String(s1+s1);\n String s3 = new String(sc.nextLine());\n \n if(s2.indexOf(s3) != -1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n sc.close();\n }\n \n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s1 = new String(sc.nextLine());\n String s2 = new String(s1+s1);\n String s3 = new String(sc.nextLine());\n \n if(s2.indexOf(s3) != -1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n sc.close();\n }\n \n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s1 = new String(sc.nextLine());\n String s2 = new String(s1+s1);\n String s3 = new String(sc.nextLine());\n \n if(s2.indexOf(s3) != -1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n sc.close();\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n String s1 = new String(sc.nextLine());\n String s2 = new String(s1+s1);\n String s3 = new String(sc.nextLine());\n \n if(s2.indexOf(s3) != -1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s1 = new String(sc.nextLine());",
"s1",
"new String(sc.nextLine())",
"String s2 = new String(s1+s1);",
"s2",
"new String(s1+s1)",
"String s3 = new String(sc.nextLine());",
"s3",
"new String(sc.nextLine())",
"if(s2.indexOf(s3) != -1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }",
"s2.indexOf(s3) != -1",
"s2.indexOf(s3)",
"s2.indexOf",
"s2",
"s3",
"-1",
"1",
"{\n \tSystem.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \tSystem.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s1 = new String(sc.nextLine());\n String s2 = new String(s1+s1);\n String s3 = new String(sc.nextLine());\n \n if(s2.indexOf(s3) != -1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n sc.close();\n }\n \n}",
"public class Main {\n \n public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s1 = new String(sc.nextLine());\n String s2 = new String(s1+s1);\n String s3 = new String(sc.nextLine());\n \n if(s2.indexOf(s3) != -1){\n \tSystem.out.println(\"Yes\");\n }\n else{\n \tSystem.out.println(\"No\");\n }\n sc.close();\n }\n \n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s1 = new String(sc.nextLine());
String s2 = new String(s1+s1);
String s3 = new String(sc.nextLine());
if(s2.indexOf(s3) != -1){
System.out.println("Yes");
}
else{
System.out.println("No");
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
0,
13,
20,
4,
18,
13,
41,
13,
0,
13,
20,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
13,
11,
1,
41,
13,
13,
2,
13,
2,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
18,
13,
13,
0,
13,
2,
13,
17,
14,
4,
18,
13,
13,
30,
0,
13,
17,
0,
13,
17,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
35,
36
],
[
36,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
44,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
58,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
74,
76
],
[
8,
77
],
[
77,
78
],
[
77,
79
],
[
8,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
80,
90
],
[
90,
91
],
[
91,
92
],
[
80,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
105,
109
],
[
98,
110
],
[
110,
111
],
[
111,
112
],
[
98,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
114,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
130,
131
],
[
130,
132
],
[
114,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
114,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
138,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
94,
147
],
[
147,
148
],
[
147,
149
],
[
8,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
150,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
160,
165
],
[
8,
166
],
[
166,
167
],
[
167,
168
],
[
6,
169
],
[
169,
170
]
]
| [
"import java.util.Scanner; \n\n\nclass Main {\n\n\n\n\tpublic static void main(String[] args) { \n\n\t\tScanner scanner = new Scanner(System.in);\n\n\n\t\t\tString s= scanner.nextLine();//文字列sの入力\n\t\t\tString p= scanner.nextLine();//文字列pの入力\n\t\t\t\n\t\t\n\t\t\tchar[] chars; \n\t\t\tchars=new char[s.length()];//文字列sを格納する配列chars\n\t\t\tString[] Strings;\n\t\t\tStrings=new String[s.length()];\n\t\t\tString compare=\"\";//文字列pと比較する変数\n\t\t\tboolean anther =false; \n\t\t\t\n\t\t\tfor(int i=0;i < s.length();i++){//桁数分くりかえす\n\t\t\t\tchars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納\n\t\t\t\tStrings[i]=String.valueOf(chars[i]);//String型に変換\n\t\t\t}\n\n\t\t\tint loop=0;//ループを制御する変数\n\t\t\tfor(int i =0;i<s.length();i++){\n\t\t\t\tloop=i;\n\t\t\tfor(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\tcompare=\"\";\n\t\t\t}\n\t\t\t\tif(anther){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\n\n\n\t\tscanner.close();\n\n\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n\n\n\tpublic static void main(String[] args) { \n\n\t\tScanner scanner = new Scanner(System.in);\n\n\n\t\t\tString s= scanner.nextLine();//文字列sの入力\n\t\t\tString p= scanner.nextLine();//文字列pの入力\n\t\t\t\n\t\t\n\t\t\tchar[] chars; \n\t\t\tchars=new char[s.length()];//文字列sを格納する配列chars\n\t\t\tString[] Strings;\n\t\t\tStrings=new String[s.length()];\n\t\t\tString compare=\"\";//文字列pと比較する変数\n\t\t\tboolean anther =false; \n\t\t\t\n\t\t\tfor(int i=0;i < s.length();i++){//桁数分くりかえす\n\t\t\t\tchars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納\n\t\t\t\tStrings[i]=String.valueOf(chars[i]);//String型に変換\n\t\t\t}\n\n\t\t\tint loop=0;//ループを制御する変数\n\t\t\tfor(int i =0;i<s.length();i++){\n\t\t\t\tloop=i;\n\t\t\tfor(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\tcompare=\"\";\n\t\t\t}\n\t\t\t\tif(anther){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\n\n\n\t\tscanner.close();\n\n\n\t}\n}",
"Main",
"public static void main(String[] args) { \n\n\t\tScanner scanner = new Scanner(System.in);\n\n\n\t\t\tString s= scanner.nextLine();//文字列sの入力\n\t\t\tString p= scanner.nextLine();//文字列pの入力\n\t\t\t\n\t\t\n\t\t\tchar[] chars; \n\t\t\tchars=new char[s.length()];//文字列sを格納する配列chars\n\t\t\tString[] Strings;\n\t\t\tStrings=new String[s.length()];\n\t\t\tString compare=\"\";//文字列pと比較する変数\n\t\t\tboolean anther =false; \n\t\t\t\n\t\t\tfor(int i=0;i < s.length();i++){//桁数分くりかえす\n\t\t\t\tchars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納\n\t\t\t\tStrings[i]=String.valueOf(chars[i]);//String型に変換\n\t\t\t}\n\n\t\t\tint loop=0;//ループを制御する変数\n\t\t\tfor(int i =0;i<s.length();i++){\n\t\t\t\tloop=i;\n\t\t\tfor(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\tcompare=\"\";\n\t\t\t}\n\t\t\t\tif(anther){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\n\n\n\t\tscanner.close();\n\n\n\t}",
"main",
"{ \n\n\t\tScanner scanner = new Scanner(System.in);\n\n\n\t\t\tString s= scanner.nextLine();//文字列sの入力\n\t\t\tString p= scanner.nextLine();//文字列pの入力\n\t\t\t\n\t\t\n\t\t\tchar[] chars; \n\t\t\tchars=new char[s.length()];//文字列sを格納する配列chars\n\t\t\tString[] Strings;\n\t\t\tStrings=new String[s.length()];\n\t\t\tString compare=\"\";//文字列pと比較する変数\n\t\t\tboolean anther =false; \n\t\t\t\n\t\t\tfor(int i=0;i < s.length();i++){//桁数分くりかえす\n\t\t\t\tchars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納\n\t\t\t\tStrings[i]=String.valueOf(chars[i]);//String型に変換\n\t\t\t}\n\n\t\t\tint loop=0;//ループを制御する変数\n\t\t\tfor(int i =0;i<s.length();i++){\n\t\t\t\tloop=i;\n\t\t\tfor(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\tcompare=\"\";\n\t\t\t}\n\t\t\t\tif(anther){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\n\n\n\t\tscanner.close();\n\n\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String s= scanner.nextLine();",
"s",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String p= scanner.nextLine();",
"p",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"char[] chars;",
"chars",
"chars=new char[s.length()]",
"chars",
"new char[s.length()]",
"s.length()",
"s.length",
"s",
"String[] Strings;",
"Strings",
"Strings=new String[s.length()]",
"Strings",
"new String[s.length()]",
"s.length()",
"s.length",
"s",
"String compare=\"\";",
"compare",
"\"\"",
"boolean anther =false;",
"anther",
"false",
"for(int i=0;i < s.length();i++){//桁数分くりかえす\n\t\t\t\tchars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納\n\t\t\t\tStrings[i]=String.valueOf(chars[i]);//String型に変換\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{//桁数分くりかえす\n\t\t\t\tchars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納\n\t\t\t\tStrings[i]=String.valueOf(chars[i]);//String型に変換\n\t\t\t}",
"{//桁数分くりかえす\n\t\t\t\tchars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納\n\t\t\t\tStrings[i]=String.valueOf(chars[i]);//String型に変換\n\t\t\t}",
"chars[i]=s.charAt(i)",
"chars[i]",
"chars",
"i",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"Strings[i]=String.valueOf(chars[i])",
"Strings[i]",
"Strings",
"i",
"String.valueOf(chars[i])",
"String.valueOf",
"String",
"chars[i]",
"chars",
"i",
"int loop=0;",
"loop",
"0",
"for(int i =0;i<s.length();i++){\n\t\t\t\tloop=i;\n\t\t\tfor(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\tcompare=\"\";\n\t\t\t}",
"int i =0;",
"int i =0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\t\tloop=i;\n\t\t\tfor(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\tcompare=\"\";\n\t\t\t}",
"{\n\t\t\t\tloop=i;\n\t\t\tfor(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\tcompare=\"\";\n\t\t\t}",
"loop=i",
"loop",
"i",
"for(int ii=i;ii<p.length()+i;ii++){\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}",
"int ii=i;",
"int ii=i;",
"ii",
"i",
"ii<p.length()+i",
"ii",
"p.length()+i",
"p.length()",
"p.length",
"p",
"i",
"ii++",
"ii++",
"ii",
"{\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}",
"{\n\t\t\t\t \n\t\t\t\t\n\t\t\t\tif(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcompare = compare.concat(Strings[loop]);\t\n\t\t\t\t\n\t\t\t\tloop=loop+1;\n\t\t\t\t\n\t\t\t\tif(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}",
"if(loop == s.length()){\n\t\t\t\t\tloop=0;\n\t\t\t\t}",
"loop == s.length()",
"loop",
"s.length()",
"s.length",
"s",
"{\n\t\t\t\t\tloop=0;\n\t\t\t\t}",
"loop=0",
"loop",
"0",
"compare = compare.concat(Strings[loop])",
"compare",
"compare.concat(Strings[loop])",
"compare.concat",
"compare",
"Strings[loop]",
"Strings",
"loop",
"loop=loop+1",
"loop",
"loop+1",
"loop",
"1",
"if(compare.equals(p)){\n\t\t\t\t\tanther=true;\n\t\t\t\t}",
"compare.equals(p)",
"compare.equals",
"compare",
"p",
"{\n\t\t\t\t\tanther=true;\n\t\t\t\t}",
"anther=true",
"anther",
"true",
"compare=\"\"",
"compare",
"\"\"",
"if(anther){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}",
"anther",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String s= scanner.nextLine();//文字列sの入力
String p= scanner.nextLine();//文字列pの入力
char[] chars;
chars=new char[s.length()];//文字列sを格納する配列chars
String[] Strings;
Strings=new String[s.length()];
String compare="";//文字列pと比較する変数
boolean anther =false;
for(int i=0;i < s.length();i++){//桁数分くりかえす
chars[i]=s.charAt(i);//文字列を1文字ずつ配列に格納
Strings[i]=String.valueOf(chars[i]);//String型に変換
}
int loop=0;//ループを制御する変数
for(int i =0;i<s.length();i++){
loop=i;
for(int ii=i;ii<p.length()+i;ii++){
if(loop == s.length()){
loop=0;
}
compare = compare.concat(Strings[loop]);
loop=loop+1;
if(compare.equals(p)){
anther=true;
}
}
compare="";
}
if(anther){
System.out.println("Yes");
}
else{
System.out.println("No");
}
scanner.close();
}
}
|
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
2,
2,
13,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
100,
2
],
[
100,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
5,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
5,
19
],
[
19,
20
],
[
19,
21
],
[
5,
22
],
[
22,
23
],
[
22,
24
],
[
5,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
43,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
39,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
70,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
5,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
79,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
3,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"public class Main {\n public static void main(String[] args) {\n\n // ??????????????????????????????.\n // ?????????????????????????????? 2 ??????????????????.\n java.util.Scanner sc = new java.util.Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n\n // ????????°??¶???????????? s ?????????????????? p ????????????????????????.\n boolean tf = false;\n String x = \"\";\n for (int i = 0; i < s.length(); i ++) {\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }\n if (tf == true) { System.out.println(\"Yes\"); }\n else { System.out.println(\"No\"); }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\n // ??????????????????????????????.\n // ?????????????????????????????? 2 ??????????????????.\n java.util.Scanner sc = new java.util.Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n\n // ????????°??¶???????????? s ?????????????????? p ????????????????????????.\n boolean tf = false;\n String x = \"\";\n for (int i = 0; i < s.length(); i ++) {\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }\n if (tf == true) { System.out.println(\"Yes\"); }\n else { System.out.println(\"No\"); }\n }\n}",
"Main",
"public static void main(String[] args) {\n\n // ??????????????????????????????.\n // ?????????????????????????????? 2 ??????????????????.\n java.util.Scanner sc = new java.util.Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n\n // ????????°??¶???????????? s ?????????????????? p ????????????????????????.\n boolean tf = false;\n String x = \"\";\n for (int i = 0; i < s.length(); i ++) {\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }\n if (tf == true) { System.out.println(\"Yes\"); }\n else { System.out.println(\"No\"); }\n }",
"main",
"{\n\n // ??????????????????????????????.\n // ?????????????????????????????? 2 ??????????????????.\n java.util.Scanner sc = new java.util.Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n\n // ????????°??¶???????????? s ?????????????????? p ????????????????????????.\n boolean tf = false;\n String x = \"\";\n for (int i = 0; i < s.length(); i ++) {\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }\n if (tf == true) { System.out.println(\"Yes\"); }\n else { System.out.println(\"No\"); }\n }",
"java.util.Scanner sc = new java.util.Scanner(System.in);",
"sc",
"new java.util.Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"boolean tf = false;",
"tf",
"false",
"String x = \"\";",
"x",
"\"\"",
"for (int i = 0; i < s.length(); i ++) {\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i ++",
"i ++",
"i",
"{\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }",
"{\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }",
"x = \"\"",
"x",
"\"\"",
"for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < p.length()",
"j",
"p.length()",
"p.length",
"p",
"j ++",
"j ++",
"j",
"{ x += s.charAt((i + j) % s.length()); }",
"{ x += s.charAt((i + j) % s.length()); }",
"x += s.charAt((i + j) % s.length())",
"x",
"s.charAt((i + j) % s.length())",
"s.charAt",
"s",
"(i + j) % s.length()",
"(i + j)",
"i",
"j",
"s.length()",
"s.length",
"s",
"if (x.equals(p)) { tf = true; }",
"x.equals(p)",
"x.equals",
"x",
"p",
"{ tf = true; }",
"tf = true",
"tf",
"true",
"if (tf == true) { System.out.println(\"Yes\"); }\n else { System.out.println(\"No\"); }",
"tf == true",
"tf",
"true",
"{ System.out.println(\"Yes\"); }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{ System.out.println(\"No\"); }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n\n // ??????????????????????????????.\n // ?????????????????????????????? 2 ??????????????????.\n java.util.Scanner sc = new java.util.Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n\n // ????????°??¶???????????? s ?????????????????? p ????????????????????????.\n boolean tf = false;\n String x = \"\";\n for (int i = 0; i < s.length(); i ++) {\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }\n if (tf == true) { System.out.println(\"Yes\"); }\n else { System.out.println(\"No\"); }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n\n // ??????????????????????????????.\n // ?????????????????????????????? 2 ??????????????????.\n java.util.Scanner sc = new java.util.Scanner(System.in);\n String s = sc.next();\n String p = sc.next();\n\n // ????????°??¶???????????? s ?????????????????? p ????????????????????????.\n boolean tf = false;\n String x = \"\";\n for (int i = 0; i < s.length(); i ++) {\n x = \"\";\n for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }\n if (x.equals(p)) { tf = true; }\n }\n if (tf == true) { System.out.println(\"Yes\"); }\n else { System.out.println(\"No\"); }\n }\n}",
"Main"
]
| public class Main {
public static void main(String[] args) {
// ??????????????????????????????.
// ?????????????????????????????? 2 ??????????????????.
java.util.Scanner sc = new java.util.Scanner(System.in);
String s = sc.next();
String p = sc.next();
// ????????°??¶???????????? s ?????????????????? p ????????????????????????.
boolean tf = false;
String x = "";
for (int i = 0; i < s.length(); i ++) {
x = "";
for (int j = 0; j < p.length(); j ++) { x += s.charAt((i + j) % s.length()); }
if (x.equals(p)) { tf = true; }
}
if (tf == true) { System.out.println("Yes"); }
else { System.out.println("No"); }
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
30,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
9,
49
],
[
49,
50
]
]
| [
"import java.io.*;\nimport java.util.Scanner;\n \nclass Main {\n \tpublic static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tString str = sc.nextLine();\n \tString str2 = sc.nextLine();\n \tString str3 = str + str;\n \tif (str3.contains(str2)) {\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \t\tSystem.out.println(\"No\");\n \t}\n \t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n \tpublic static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tString str = sc.nextLine();\n \tString str2 = sc.nextLine();\n \tString str3 = str + str;\n \tif (str3.contains(str2)) {\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \t\tSystem.out.println(\"No\");\n \t}\n \t}\n}",
"Main",
"public static void main(String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tString str = sc.nextLine();\n \tString str2 = sc.nextLine();\n \tString str3 = str + str;\n \tif (str3.contains(str2)) {\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \t\tSystem.out.println(\"No\");\n \t}\n \t}",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tString str = sc.nextLine();\n \tString str2 = sc.nextLine();\n \tString str3 = str + str;\n \tif (str3.contains(str2)) {\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \t\tSystem.out.println(\"No\");\n \t}\n \t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String str = sc.nextLine();",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String str2 = sc.nextLine();",
"str2",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String str3 = str + str;",
"str3",
"str + str",
"str",
"str",
"if (str3.contains(str2)) {\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \t\tSystem.out.println(\"No\");\n \t}",
"str3.contains(str2)",
"str3.contains",
"str3",
"str2",
"{\n \t\tSystem.out.println(\"Yes\");\n \t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \t\tSystem.out.println(\"No\");\n \t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.io.*;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
String str2 = sc.nextLine();
String str3 = str + str;
if (str3.contains(str2)) {
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
49,
2
],
[
49,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
5,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
5,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
5,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
25,
30
],
[
30,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
24,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
3,
46
],
[
46,
47
],
[
0,
48
],
[
48,
49
],
[
48,
50
]
]
| [
"public class Main {\n\tpublic static void main(String[] args){\n\t\tjava.util.Scanner scan = new java.util.Scanner(System.in);\n\t\tString str1 = scan.nextLine();\n\t\tString str2 = scan.nextLine();\n\n\t\tstr1 = str1 +str1;\n\t\tif(str1.indexOf(str2) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tjava.util.Scanner scan = new java.util.Scanner(System.in);\n\t\tString str1 = scan.nextLine();\n\t\tString str2 = scan.nextLine();\n\n\t\tstr1 = str1 +str1;\n\t\tif(str1.indexOf(str2) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\tjava.util.Scanner scan = new java.util.Scanner(System.in);\n\t\tString str1 = scan.nextLine();\n\t\tString str2 = scan.nextLine();\n\n\t\tstr1 = str1 +str1;\n\t\tif(str1.indexOf(str2) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tjava.util.Scanner scan = new java.util.Scanner(System.in);\n\t\tString str1 = scan.nextLine();\n\t\tString str2 = scan.nextLine();\n\n\t\tstr1 = str1 +str1;\n\t\tif(str1.indexOf(str2) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"java.util.Scanner scan = new java.util.Scanner(System.in);",
"scan",
"new java.util.Scanner(System.in)",
"String str1 = scan.nextLine();",
"str1",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String str2 = scan.nextLine();",
"str2",
"scan.nextLine()",
"scan.nextLine",
"scan",
"str1 = str1 +str1",
"str1",
"str1 +str1",
"str1",
"str1",
"if(str1.indexOf(str2) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"str1.indexOf(str2) != -1",
"str1.indexOf(str2)",
"str1.indexOf",
"str1",
"str2",
"-1",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tjava.util.Scanner scan = new java.util.Scanner(System.in);\n\t\tString str1 = scan.nextLine();\n\t\tString str2 = scan.nextLine();\n\n\t\tstr1 = str1 +str1;\n\t\tif(str1.indexOf(str2) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tjava.util.Scanner scan = new java.util.Scanner(System.in);\n\t\tString str1 = scan.nextLine();\n\t\tString str2 = scan.nextLine();\n\n\t\tstr1 = str1 +str1;\n\t\tif(str1.indexOf(str2) != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main"
]
| public class Main {
public static void main(String[] args){
java.util.Scanner scan = new java.util.Scanner(System.in);
String str1 = scan.nextLine();
String str2 = scan.nextLine();
str1 = str1 +str1;
if(str1.indexOf(str2) != -1){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
27,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString strS = sc.nextLine();\n\t\tString strP = sc.nextLine();\n\n\t\tString str2S = strS + strS;\n\n\t//\tSystem.out.println(\"str2S.indexOf(strP);\"+str2S.indexOf(strP));\n\n\t\tif(str2S.indexOf(strP) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString strS = sc.nextLine();\n\t\tString strP = sc.nextLine();\n\n\t\tString str2S = strS + strS;\n\n\t//\tSystem.out.println(\"str2S.indexOf(strP);\"+str2S.indexOf(strP));\n\n\t\tif(str2S.indexOf(strP) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString strS = sc.nextLine();\n\t\tString strP = sc.nextLine();\n\n\t\tString str2S = strS + strS;\n\n\t//\tSystem.out.println(\"str2S.indexOf(strP);\"+str2S.indexOf(strP));\n\n\t\tif(str2S.indexOf(strP) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString strS = sc.nextLine();\n\t\tString strP = sc.nextLine();\n\n\t\tString str2S = strS + strS;\n\n\t//\tSystem.out.println(\"str2S.indexOf(strP);\"+str2S.indexOf(strP));\n\n\t\tif(str2S.indexOf(strP) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String strS = sc.nextLine();",
"strS",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String strP = sc.nextLine();",
"strP",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String str2S = strS + strS;",
"str2S",
"strS + strS",
"strS",
"strS",
"if(str2S.indexOf(strP) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"str2S.indexOf(strP) != -1",
"str2S.indexOf(strP)",
"str2S.indexOf",
"str2S",
"strP",
"-1",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString strS = sc.nextLine();\n\t\tString strP = sc.nextLine();\n\n\t\tString str2S = strS + strS;\n\n\t//\tSystem.out.println(\"str2S.indexOf(strP);\"+str2S.indexOf(strP));\n\n\t\tif(str2S.indexOf(strP) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString strS = sc.nextLine();\n\t\tString strP = sc.nextLine();\n\n\t\tString str2S = strS + strS;\n\n\t//\tSystem.out.println(\"str2S.indexOf(strP);\"+str2S.indexOf(strP));\n\n\t\tif(str2S.indexOf(strP) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
|
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String strS = sc.nextLine();
String strP = sc.nextLine();
String str2S = strS + strS;
// System.out.println("str2S.indexOf(strP);"+str2S.indexOf(strP));
if(str2S.indexOf(strP) != -1) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
13,
30,
14,
4,
18,
4,
18,
13,
13,
2,
13,
13,
13,
30,
0,
13,
17,
30,
14,
4,
18,
13,
2,
4,
18,
13,
13,
13,
4,
18,
13,
17,
2,
2,
13,
13,
13,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
0,
37
],
[
37,
38
],
[
37,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
],
[
0,
46
],
[
275,
47
],
[
275,
48
],
[
48,
49
],
[
275,
50
],
[
50,
51
],
[
275,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
54,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
54,
67
],
[
67,
68
],
[
68,
69
],
[
52,
70
],
[
70,
71
],
[
275,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
76,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
76,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
76,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
76,
97
],
[
97,
98
],
[
97,
99
],
[
76,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
105,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
100,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
113,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
121,
130
],
[
120,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
113,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
141,
145
],
[
140,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
146,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
136,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
76,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
162,
165
],
[
159,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
275,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
171,
175
],
[
175,
176
],
[
171,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
177,
183
],
[
183,
184
],
[
171,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
188,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
187,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
202,
205
],
[
205,
206
],
[
206,
207
],
[
171,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
212,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
211,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
210,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
225,
228
],
[
228,
229
],
[
229,
230
],
[
171,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
234,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
233,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
171,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
255,
259
],
[
259,
260
],
[
260,
261
],
[
261,
262
],
[
254,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
253,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
268,
271
],
[
271,
272
],
[
272,
273
],
[
0,
274
],
[
274,
275
],
[
274,
276
]
]
| [
"import java.awt.Frame;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\nimport javax.sql.rowset.FilteredRowSet;\nimport javax.xml.parsers.DocumentBuilder;\nimport javax.xml.stream.events.EndDocument;\nimport java.math.BigInteger;\nimport java.time.chrono.MinguoChronology;\nimport java.util.Scanner;\n\npublic class Main {\n static InputReader in;\n static PrintWriter out;\n \n static class Solution {\n void solve() throws IOException {\n String s = in.next();\n String p = in.next();\n int slength = s.length();\n int plength = p.length(); \n boolean flg = false;\n \n for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }\n \n \n if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n// End solve()\n }\n \n// End solution\n } \n \n\n public static void main(String[] args) throws IOException {\n in = new InputReader(System.in);\n out = new PrintWriter(System.out);\n Solution solver = new Solution();\n solver.solve();\n out.close();\n}\n\n static class InputReader {\n public BufferedReader br;\n public StringTokenizer st;\n \n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n \n public int nextInt() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Integer.parseInt(st.nextToken());\n }\n \n public long nextLong() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Long.parseLong(st.nextToken()); \n }\n \n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return st.nextToken();\n }\n \n public double nextDouble() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Double.parseDouble(st.nextToken());\n }\n \n }\n \n}",
"import java.awt.Frame;",
"Frame",
"java.awt",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import javax.sql.rowset.FilteredRowSet;",
"FilteredRowSet",
"javax.sql.rowset",
"import javax.xml.parsers.DocumentBuilder;",
"DocumentBuilder",
"javax.xml.parsers",
"import javax.xml.stream.events.EndDocument;",
"EndDocument",
"javax.xml.stream.events",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.time.chrono.MinguoChronology;",
"MinguoChronology",
"java.time.chrono",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n static InputReader in;\n static PrintWriter out;\n \n static class Solution {\n void solve() throws IOException {\n String s = in.next();\n String p = in.next();\n int slength = s.length();\n int plength = p.length(); \n boolean flg = false;\n \n for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }\n \n \n if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n// End solve()\n }\n \n// End solution\n } \n \n\n public static void main(String[] args) throws IOException {\n in = new InputReader(System.in);\n out = new PrintWriter(System.out);\n Solution solver = new Solution();\n solver.solve();\n out.close();\n}\n\n static class InputReader {\n public BufferedReader br;\n public StringTokenizer st;\n \n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n \n public int nextInt() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Integer.parseInt(st.nextToken());\n }\n \n public long nextLong() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Long.parseLong(st.nextToken()); \n }\n \n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return st.nextToken();\n }\n \n public double nextDouble() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Double.parseDouble(st.nextToken());\n }\n \n }\n \n}",
"Main",
"static InputReader in;",
"in",
"static PrintWriter out;",
"out",
"public static void main(String[] args) throws IOException {\n in = new InputReader(System.in);\n out = new PrintWriter(System.out);\n Solution solver = new Solution();\n solver.solve();\n out.close();\n}",
"main",
"{\n in = new InputReader(System.in);\n out = new PrintWriter(System.out);\n Solution solver = new Solution();\n solver.solve();\n out.close();\n}",
"in = new InputReader(System.in)",
"in",
"new InputReader(System.in)",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"Solution solver = new Solution();",
"solver",
"new Solution()",
"solver.solve()",
"solver.solve",
"solver",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class Solution {\n void solve() throws IOException {\n String s = in.next();\n String p = in.next();\n int slength = s.length();\n int plength = p.length(); \n boolean flg = false;\n \n for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }\n \n \n if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n// End solve()\n }\n \n// End solution\n }",
"Solution",
"void solve() throws IOException {\n String s = in.next();\n String p = in.next();\n int slength = s.length();\n int plength = p.length(); \n boolean flg = false;\n \n for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }\n \n \n if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n// End solve()\n }",
"solve",
"{\n String s = in.next();\n String p = in.next();\n int slength = s.length();\n int plength = p.length(); \n boolean flg = false;\n \n for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }\n \n \n if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n// End solve()\n }",
"String s = in.next();",
"s",
"in.next()",
"in.next",
"in",
"String p = in.next();",
"p",
"in.next()",
"in.next",
"in",
"int slength = s.length();",
"slength",
"s.length()",
"s.length",
"s",
"int plength = p.length();",
"plength",
"p.length()",
"p.length",
"p",
"boolean flg = false;",
"flg",
"false",
"for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < slength",
"i",
"slength",
"i++",
"i++",
"i",
"{\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }",
"{\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }",
"if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n }",
"slength - i >= plength",
"slength - i",
"slength",
"i",
"plength",
"{\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n }",
"if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }",
"s.substring(i , plength + i).equals(p)",
"s.substring(i , plength + i).equals",
"s.substring(i , plength + i)",
"s.substring",
"s",
"i",
"plength + i",
"plength",
"i",
"p",
"{\n flg = true;\n }",
"flg = true",
"flg",
"true",
"{\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n }",
"if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }",
"p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))",
"p.equals",
"p",
"s.substring(i, slength) + s.substring(0, plength - slength + i)",
"s.substring(i, slength)",
"s.substring",
"s",
"i",
"slength",
"s.substring(0, plength - slength + i)",
"s.substring",
"s",
"0",
"plength - slength + i",
"plength - slength",
"plength",
"slength",
"i",
"{\n flg = true;\n }",
"flg = true",
"flg",
"true",
"if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }",
"flg",
"{\n out.println(\"Yes\");\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"{\n out.println(\"No\");\n }",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"static class InputReader {\n public BufferedReader br;\n public StringTokenizer st;\n \n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n \n public int nextInt() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Integer.parseInt(st.nextToken());\n }\n \n public long nextLong() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Long.parseLong(st.nextToken()); \n }\n \n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return st.nextToken();\n }\n \n public double nextDouble() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Double.parseDouble(st.nextToken());\n }\n \n }",
"InputReader",
"public BufferedReader br;",
"br",
"public StringTokenizer st;",
"st",
"public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }",
"InputReader",
"{\n br = new BufferedReader(new InputStreamReader(stream));\n }",
"br = new BufferedReader(new InputStreamReader(stream))",
"br",
"new BufferedReader(new InputStreamReader(stream))",
"InputStream stream",
"stream",
"public int nextInt() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Integer.parseInt(st.nextToken());\n }",
"nextInt",
"{\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Integer.parseInt(st.nextToken());\n }",
"while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return Integer.parseInt(st.nextToken());",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"public long nextLong() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Long.parseLong(st.nextToken()); \n }",
"nextLong",
"{\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Long.parseLong(st.nextToken()); \n }",
"while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return Long.parseLong(st.nextToken());",
"Long.parseLong(st.nextToken())",
"Long.parseLong",
"Long",
"st.nextToken()",
"st.nextToken",
"st",
"public String next() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public double nextDouble() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Double.parseDouble(st.nextToken());\n }",
"nextDouble",
"{\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Double.parseDouble(st.nextToken());\n }",
"while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return Double.parseDouble(st.nextToken());",
"Double.parseDouble(st.nextToken())",
"Double.parseDouble",
"Double",
"st.nextToken()",
"st.nextToken",
"st",
"public class Main {\n static InputReader in;\n static PrintWriter out;\n \n static class Solution {\n void solve() throws IOException {\n String s = in.next();\n String p = in.next();\n int slength = s.length();\n int plength = p.length(); \n boolean flg = false;\n \n for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }\n \n \n if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n// End solve()\n }\n \n// End solution\n } \n \n\n public static void main(String[] args) throws IOException {\n in = new InputReader(System.in);\n out = new PrintWriter(System.out);\n Solution solver = new Solution();\n solver.solve();\n out.close();\n}\n\n static class InputReader {\n public BufferedReader br;\n public StringTokenizer st;\n \n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n \n public int nextInt() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Integer.parseInt(st.nextToken());\n }\n \n public long nextLong() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Long.parseLong(st.nextToken()); \n }\n \n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return st.nextToken();\n }\n \n public double nextDouble() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Double.parseDouble(st.nextToken());\n }\n \n }\n \n}",
"public class Main {\n static InputReader in;\n static PrintWriter out;\n \n static class Solution {\n void solve() throws IOException {\n String s = in.next();\n String p = in.next();\n int slength = s.length();\n int plength = p.length(); \n boolean flg = false;\n \n for (int i = 0; i < slength; i++) {\n if (slength - i >= plength) {\n if (s.substring(i , plength + i).equals(p)) {\n flg = true;\n }\n } else {\n if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {\n flg = true;\n }\n } \n }\n \n \n if (flg) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n// End solve()\n }\n \n// End solution\n } \n \n\n public static void main(String[] args) throws IOException {\n in = new InputReader(System.in);\n out = new PrintWriter(System.out);\n Solution solver = new Solution();\n solver.solve();\n out.close();\n}\n\n static class InputReader {\n public BufferedReader br;\n public StringTokenizer st;\n \n public InputReader(InputStream stream) {\n br = new BufferedReader(new InputStreamReader(stream));\n }\n \n public int nextInt() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Integer.parseInt(st.nextToken());\n }\n \n public long nextLong() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Long.parseLong(st.nextToken()); \n }\n \n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return st.nextToken();\n }\n \n public double nextDouble() throws IOException {\n while (st == null || !st.hasMoreTokens()) {\n st = new StringTokenizer(br.readLine());\n }\n return Double.parseDouble(st.nextToken());\n }\n \n }\n \n}",
"Main"
]
| import java.awt.Frame;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
import javax.sql.rowset.FilteredRowSet;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.stream.events.EndDocument;
import java.math.BigInteger;
import java.time.chrono.MinguoChronology;
import java.util.Scanner;
public class Main {
static InputReader in;
static PrintWriter out;
static class Solution {
void solve() throws IOException {
String s = in.next();
String p = in.next();
int slength = s.length();
int plength = p.length();
boolean flg = false;
for (int i = 0; i < slength; i++) {
if (slength - i >= plength) {
if (s.substring(i , plength + i).equals(p)) {
flg = true;
}
} else {
if (p.equals(s.substring(i, slength) + s.substring(0, plength - slength + i))) {
flg = true;
}
}
}
if (flg) {
out.println("Yes");
} else {
out.println("No");
}
// End solve()
}
// End solution
}
public static void main(String[] args) throws IOException {
in = new InputReader(System.in);
out = new PrintWriter(System.out);
Solution solver = new Solution();
solver.solve();
out.close();
}
static class InputReader {
public BufferedReader br;
public StringTokenizer st;
public InputReader(InputStream stream) {
br = new BufferedReader(new InputStreamReader(stream));
}
public int nextInt() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Integer.parseInt(st.nextToken());
}
public long nextLong() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Long.parseLong(st.nextToken());
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return st.nextToken();
}
public double nextDouble() throws IOException {
while (st == null || !st.hasMoreTokens()) {
st = new StringTokenizer(br.readLine());
}
return Double.parseDouble(st.nextToken());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
2,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
30,
0,
18,
13,
13,
4,
18,
13,
2,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
18,
13,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
3,
14,
2,
2,
13,
17,
4,
18,
13,
30,
29,
17,
29,
17,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
176,
5
],
[
176,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
27,
29
],
[
27,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
31,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
6,
47
],
[
47,
48
],
[
176,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
62,
76
],
[
76,
77
],
[
77,
78
],
[
62,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
81,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
51,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
116,
124
],
[
109,
125
],
[
125,
126
],
[
126,
127
],
[
109,
128
],
[
129,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
130,
140
],
[
140,
141
],
[
141,
142
],
[
130,
143
],
[
144,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
146,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
145,
156
],
[
156,
157
],
[
144,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
164,
165
],
[
158,
166
],
[
166,
167
],
[
167,
168
],
[
51,
169
],
[
169,
170
],
[
49,
171
],
[
171,
172
],
[
49,
173
],
[
173,
174
],
[
0,
175
],
[
175,
176
],
[
175,
177
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tsc.close();\n\t\t\n\t\tboolean answer = computeRingPattern(s,p);\n\t\t\n\t\tif(answer){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n\tprivate static boolean computeRingPattern(String s, String p) {\n\t\t\n\t\tchar[] strings = new char[s.length()+p.length()];\n\t\t\n\t\tfor(int i= 0; i< s.length() +p.length();i++){\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<strings.length -p.length() +1 ;i++){\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tsc.close();\n\t\t\n\t\tboolean answer = computeRingPattern(s,p);\n\t\t\n\t\tif(answer){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n\tprivate static boolean computeRingPattern(String s, String p) {\n\t\t\n\t\tchar[] strings = new char[s.length()+p.length()];\n\t\t\n\t\tfor(int i= 0; i< s.length() +p.length();i++){\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<strings.length -p.length() +1 ;i++){\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tsc.close();\n\t\t\n\t\tboolean answer = computeRingPattern(s,p);\n\t\t\n\t\tif(answer){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tsc.close();\n\t\t\n\t\tboolean answer = computeRingPattern(s,p);\n\t\t\n\t\tif(answer){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"sc.close()",
"sc.close",
"sc",
"boolean answer = computeRingPattern(s,p);",
"answer",
"computeRingPattern(s,p)",
"computeRingPattern",
"s",
"p",
"if(answer){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"answer",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"private static boolean computeRingPattern(String s, String p) {\n\t\t\n\t\tchar[] strings = new char[s.length()+p.length()];\n\t\t\n\t\tfor(int i= 0; i< s.length() +p.length();i++){\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<strings.length -p.length() +1 ;i++){\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"computeRingPattern",
"{\n\t\t\n\t\tchar[] strings = new char[s.length()+p.length()];\n\t\t\n\t\tfor(int i= 0; i< s.length() +p.length();i++){\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<strings.length -p.length() +1 ;i++){\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}",
"char[] strings = new char[s.length()+p.length()];",
"strings",
"new char[s.length()+p.length()]",
"s.length()+p.length()",
"s.length()",
"s.length",
"s",
"p.length()",
"p.length",
"p",
"for(int i= 0; i< s.length() +p.length();i++){\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"int i= 0;",
"int i= 0;",
"i",
"0",
"i< s.length() +p.length()",
"i",
"s.length() +p.length()",
"s.length()",
"s.length",
"s",
"p.length()",
"p.length",
"p",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"if(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}",
"strings[i] = s.charAt(i)",
"strings[i]",
"strings",
"i",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}",
"strings[i] = s.charAt(i -s.length())",
"strings[i]",
"strings",
"i",
"s.charAt(i -s.length())",
"s.charAt",
"s",
"i -s.length()",
"i",
"s.length()",
"s.length",
"s",
"for(int i = 0; i<strings.length -p.length() +1 ;i++){\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<strings.length -p.length() +1",
"i",
"strings.length -p.length() +1",
"strings.length -p.length()",
"strings.length",
"strings",
"strings.length",
"p.length()",
"p.length",
"p",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"for(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"int j =0;",
"int j =0;",
"j",
"0",
"j<p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"if(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"strings[i+j] != p.charAt(j)",
"strings[i+j]",
"strings",
"i+j",
"i",
"j",
"p.charAt(j)",
"p.charAt",
"p",
"j",
"{\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}",
"(j + 1) == p.length()",
"(j + 1)",
"j",
"1",
"p.length()",
"p.length",
"p",
"{\n\t\t\t\t\treturn true;\n\t\t\t\t}",
"return true;",
"true",
"return false;",
"false",
"String s",
"s",
"String p",
"p",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tsc.close();\n\t\t\n\t\tboolean answer = computeRingPattern(s,p);\n\t\t\n\t\tif(answer){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n\tprivate static boolean computeRingPattern(String s, String p) {\n\t\t\n\t\tchar[] strings = new char[s.length()+p.length()];\n\t\t\n\t\tfor(int i= 0; i< s.length() +p.length();i++){\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<strings.length -p.length() +1 ;i++){\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tsc.close();\n\t\t\n\t\tboolean answer = computeRingPattern(s,p);\n\t\t\n\t\tif(answer){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n\tprivate static boolean computeRingPattern(String s, String p) {\n\t\t\n\t\tchar[] strings = new char[s.length()+p.length()];\n\t\t\n\t\tfor(int i= 0; i< s.length() +p.length();i++){\n\t\t\t\n\t\t\tif(i < s.length()){\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i);\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tstrings[i] = s.charAt(i -s.length());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(int i = 0; i<strings.length -p.length() +1 ;i++){\n\t\t\t\n\t\t\tfor(int j =0; j<p.length();j++){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(strings[i+j] != p.charAt(j)){\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((j + 1) == p.length()){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\treturn false;\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
sc.close();
boolean answer = computeRingPattern(s,p);
if(answer){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
private static boolean computeRingPattern(String s, String p) {
char[] strings = new char[s.length()+p.length()];
for(int i= 0; i< s.length() +p.length();i++){
if(i < s.length()){
strings[i] = s.charAt(i);
}else{
strings[i] = s.charAt(i -s.length());
}
}
for(int i = 0; i<strings.length -p.length() +1 ;i++){
for(int j =0; j<p.length();j++){
if(strings[i+j] != p.charAt(j)){
break;
}
if((j + 1) == p.length()){
return true;
}
}
}
return false;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
17,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
2,
13,
13,
18,
13,
13,
18,
13,
13,
30,
0,
13,
17,
3,
14,
13,
30,
3,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
29,
39
],
[
39,
40
],
[
40,
41
],
[
29,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
72,
82
],
[
82,
83
],
[
82,
84
],
[
71,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
52,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
8,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
94,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
8,
110
],
[
110,
111
],
[
111,
112
],
[
6,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
]
| [
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] p = sc.next().toCharArray();\n\t\t\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flag) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tsc.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] p = sc.next().toCharArray();\n\t\t\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flag) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] p = sc.next().toCharArray();\n\t\t\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flag) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] p = sc.next().toCharArray();\n\t\t\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flag) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"char[] s = sc.next().toCharArray();",
"s",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"char[] p = sc.next().toCharArray();",
"p",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"boolean flag = false;",
"flag",
"false",
"for (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length",
"i",
"s.length",
"s",
"s.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"if (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"s[i] == p[0]",
"s[i]",
"s",
"i",
"p[0]",
"p",
"0",
"{\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"flag = true",
"flag",
"true",
"for (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < p.length",
"j",
"p.length",
"p",
"p.length",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"s[(i + j) % s.length] != p[j]",
"s[(i + j) % s.length]",
"s",
"(i + j) % s.length",
"(i + j)",
"i",
"j",
"s.length",
"s",
"s.length",
"p[j]",
"p",
"j",
"{\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"flag = false",
"flag",
"false",
"break;",
"if (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"flag",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if (flag) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"flag",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] p = sc.next().toCharArray();\n\t\t\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flag) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tsc.close();\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in); \n\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] p = sc.next().toCharArray();\n\t\t\n\t\tboolean flag = false;\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == p[0]) {\n\t\t\t\tflag = true;\n\t\t\t\tfor (int j = 0; j < p.length; j++) {\n\t\t\t\t\tif (s[(i + j) % s.length] != p[j]) {\n\t\t\t\t\t\tflag = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (flag) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (flag) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] s = sc.next().toCharArray();
char[] p = sc.next().toCharArray();
boolean flag = false;
for (int i = 0; i < s.length; i++) {
if (s[i] == p[0]) {
flag = true;
for (int j = 0; j < p.length; j++) {
if (s[(i + j) % s.length] != p[j]) {
flag = false;
break;
}
}
if (flag) {
break;
}
}
}
if (flag) {
System.out.println("Yes");
} else {
System.out.println("No");
}
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
17,
17,
14,
4,
18,
13,
13,
30,
41,
13,
4,
18,
13,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
0,
13,
4,
13,
2,
13,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
3,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
17,
41,
13,
4,
18,
13,
13,
2,
13,
17,
14,
40,
4,
18,
13,
13,
30,
29,
17,
29,
17,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
163,
5
],
[
163,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
39,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
39,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
56,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
61,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
61,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
61,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
90,
97
],
[
8,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
6,
109
],
[
109,
110
],
[
163,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
114,
124
],
[
124,
125
],
[
125,
126
],
[
114,
127
],
[
128,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
131,
135
],
[
135,
136
],
[
135,
137
],
[
128,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
140,
144
],
[
144,
145
],
[
144,
146
],
[
128,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
147,
153
],
[
153,
154
],
[
154,
155
],
[
113,
156
],
[
156,
157
],
[
111,
158
],
[
158,
159
],
[
111,
160
],
[
160,
161
],
[
0,
162
],
[
162,
163
],
[
162,
164
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\tboolean check = false;\n\t\tfor(int i = 0 ; i < s.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(check == false) {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static boolean search(String s , String p) {\n\t\tfor(int i = 0 ; i < p.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\tboolean check = false;\n\t\tfor(int i = 0 ; i < s.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(check == false) {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static boolean search(String s , String p) {\n\t\tfor(int i = 0 ; i < p.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\tboolean check = false;\n\t\tfor(int i = 0 ; i < s.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(check == false) {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\tboolean check = false;\n\t\tfor(int i = 0 ; i < s.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(check == false) {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String p = scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"boolean check = false;",
"check",
"false",
"for(int i = 0 ; i < s.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"String fs = s.substring(i,i+1);",
"fs",
"s.substring(i,i+1)",
"s.substring",
"s",
"i",
"i+1",
"i",
"1",
"String fp = p.substring(0,1);",
"fp",
"p.substring(0,1)",
"p.substring",
"p",
"0",
"1",
"if(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"fs.equals(fp)",
"fs.equals",
"fs",
"fp",
"{\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"String sort = s.substring(i,s.length());",
"sort",
"s.substring(i,s.length())",
"s.substring",
"s",
"i",
"s.length()",
"s.length",
"s",
"String c = s.substring(0,i);",
"c",
"s.substring(0,i)",
"s.substring",
"s",
"0",
"i",
"check = search(sort+c,p)",
"check",
"search(sort+c,p)",
"search",
"sort+c",
"sort",
"c",
"p",
"if(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"check == true",
"check",
"true",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"break;",
"if(check == false) {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"check == false",
"check",
"false",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public static boolean search(String s , String p) {\n\t\tfor(int i = 0 ; i < p.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"search",
"{\n\t\tfor(int i = 0 ; i < p.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"for(int i = 0 ; i < p.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < p.length()",
"i",
"p.length()",
"p.length",
"p",
"i++",
"i++",
"i",
"{\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"String fs = s.substring(i,i+1);",
"fs",
"s.substring(i,i+1)",
"s.substring",
"s",
"i",
"i+1",
"i",
"1",
"String fp = p.substring(i,i+1);",
"fp",
"p.substring(i,i+1)",
"p.substring",
"p",
"i",
"i+1",
"i",
"1",
"if(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}",
"!fs.equals(fp)",
"fs.equals(fp)",
"fs.equals",
"fs",
"fp",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"String s",
"s",
"String p",
"p",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\tboolean check = false;\n\t\tfor(int i = 0 ; i < s.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(check == false) {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static boolean search(String s , String p) {\n\t\tfor(int i = 0 ; i < p.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\tboolean check = false;\n\t\tfor(int i = 0 ; i < s.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(0,1);\n\t\t\tif(fs.equals(fp)){\n\t\t\t\tString sort = s.substring(i,s.length());\n\t\t\t\tString c = s.substring(0,i);\n\t\t\t\tcheck = search(sort+c,p);\n\t\t\t\tif(check == true) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(check == false) {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static boolean search(String s , String p) {\n\t\tfor(int i = 0 ; i < p.length() ; i++) {\n\t\t\tString fs = s.substring(i,i+1);\n\t\t\tString fp = p.substring(i,i+1);\n\t\t\tif(!fs.equals(fp)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.next();
String p = scan.next();
boolean check = false;
for(int i = 0 ; i < s.length() ; i++) {
String fs = s.substring(i,i+1);
String fp = p.substring(0,1);
if(fs.equals(fp)){
String sort = s.substring(i,s.length());
String c = s.substring(0,i);
check = search(sort+c,p);
if(check == true) {
System.out.println("Yes");
break;
}
}
}
if(check == false) {
System.out.println("No");
}
}
public static boolean search(String s , String p) {
for(int i = 0 ; i < p.length() ; i++) {
String fs = s.substring(i,i+1);
String fp = p.substring(i,i+1);
if(!fs.equals(fp)){
return false;
}
}
return true;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
0,
13,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
47,
5
],
[
47,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
25,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
25,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
6,
44
],
[
44,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n s += s;\n String p = sc.nextLine();\n\n if(s.contains(p)) {\n \tSystem.out.println(\"Yes\");\n } else {\n \tSystem.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n s += s;\n String p = sc.nextLine();\n\n if(s.contains(p)) {\n \tSystem.out.println(\"Yes\");\n } else {\n \tSystem.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n s += s;\n String p = sc.nextLine();\n\n if(s.contains(p)) {\n \tSystem.out.println(\"Yes\");\n } else {\n \tSystem.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n s += s;\n String p = sc.nextLine();\n\n if(s.contains(p)) {\n \tSystem.out.println(\"Yes\");\n } else {\n \tSystem.out.println(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"s += s",
"s",
"s",
"String p = sc.nextLine();",
"p",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(s.contains(p)) {\n \tSystem.out.println(\"Yes\");\n } else {\n \tSystem.out.println(\"No\");\n }",
"s.contains(p)",
"s.contains",
"s",
"p",
"{\n \tSystem.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \tSystem.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String... args",
"args",
"public class Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n s += s;\n String p = sc.nextLine();\n\n if(s.contains(p)) {\n \tSystem.out.println(\"Yes\");\n } else {\n \tSystem.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String... args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n s += s;\n String p = sc.nextLine();\n\n if(s.contains(p)) {\n \tSystem.out.println(\"Yes\");\n } else {\n \tSystem.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String... args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
s += s;
String p = sc.nextLine();
if(s.contains(p)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
17,
4,
18,
13,
13,
30,
41,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
2,
13,
13,
13,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
3,
14,
2,
13,
13,
30,
3,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
138,
11
],
[
138,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
28,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
28,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
28,
49
],
[
49,
50
],
[
49,
51
],
[
28,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
66,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
100,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
99,
109
],
[
109,
110
],
[
64,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
28,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
117,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
12,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n } catch( IOException e ) {\n System.err.println( e );\n }\n\n\t}\n\n}\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n } catch( IOException e ) {\n System.err.println( e );\n }\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n } catch( IOException e ) {\n System.err.println( e );\n }\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n } catch( IOException e ) {\n System.err.println( e );\n }\n\n\t}",
"BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );",
"kb",
"new BufferedReader( new InputStreamReader( System.in ) )",
"try {\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n } catch( IOException e ) {\n System.err.println( e );\n }",
"catch( IOException e ) {\n System.err.println( e );\n }",
"IOException e",
"{\n System.err.println( e );\n }",
"System.err.println( e )",
"System.err.println",
"System.err",
"System",
"System.err",
"e",
"{\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n }",
"String ringStr = kb.readLine();",
"ringStr",
"kb.readLine()",
"kb.readLine",
"kb",
"String targetStr = kb.readLine();",
"targetStr",
"kb.readLine()",
"kb.readLine",
"kb",
"int ringStrLen = ringStr.length();",
"ringStrLen",
"ringStr.length()",
"ringStr.length",
"ringStr",
"int targetStrLen = targetStr.length();",
"targetStrLen",
"targetStr.length()",
"targetStr.length",
"targetStr",
"int j = 0;",
"j",
"0",
"for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ringStrLen",
"i",
"ringStrLen",
"i++",
"i++",
"i",
"{\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }",
"{\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }",
"if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }",
"targetStr.charAt( 0 ) == ringStr.charAt( i )",
"targetStr.charAt( 0 )",
"targetStr.charAt",
"targetStr",
"0",
"ringStr.charAt( i )",
"ringStr.charAt",
"ringStr",
"i",
"{\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }",
"int ij = i;",
"ij",
"i",
"for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }",
"j = 0;",
"j = 0",
"j",
"0",
"j < targetStrLen",
"j",
"targetStrLen",
"j++",
"j++",
"j",
"{\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }",
"{\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }",
"ij = ( i+j ) % ringStrLen",
"ij",
"( i+j ) % ringStrLen",
"( i+j )",
"i",
"j",
"ringStrLen",
"if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }",
"targetStr.charAt( j ) != ringStr.charAt( ij )",
"targetStr.charAt( j )",
"targetStr.charAt",
"targetStr",
"j",
"ringStr.charAt( ij )",
"ringStr.charAt",
"ringStr",
"ij",
"{\n break;\n }",
"break;",
"if( targetStrLen == j ) { break; }",
"targetStrLen == j",
"targetStrLen",
"j",
"{ break; }",
"break;",
"if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }",
"targetStrLen == j",
"targetStrLen",
"j",
"{\n System.out.println( \"Yes\" ); \n }",
"System.out.println( \"Yes\" )",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println( \"No\" );\n }",
"System.out.println( \"No\" )",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n } catch( IOException e ) {\n System.err.println( e );\n }\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n try {\n String ringStr = kb.readLine(); // リング状の文字列\n String targetStr = kb.readLine(); // 対象の文字列\n\n int ringStrLen = ringStr.length(); // リング状の文字列の長さ\n int targetStrLen = targetStr.length(); // 対象の文字列の長さ\n int j = 0;\n for( int i = 0; i < ringStrLen; i++ ) {\n if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {\n \t// リング状の文字列における対象の文字列のインデックス用\n int ij = i;\n for( j = 0; j < targetStrLen; j++ ) {\n \t// リング状の文字列のインデックスを超えないように剰余演算\n ij = ( i+j ) % ringStrLen;\n // 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける\n if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {\n break;\n }\n }\n }\n // 対象の文字列が見つかった場合、処理を抜ける\n if( targetStrLen == j ) { break; }\n }\n\n // 対象の文字列が見つかった場合、j = 0 にリセットされないので、\n if( targetStrLen == j ) {\n System.out.println( \"Yes\" ); \n } else {\n System.out.println( \"No\" );\n }\n } catch( IOException e ) {\n System.err.println( e );\n }\n\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
try {
String ringStr = kb.readLine(); // リング状の文字列
String targetStr = kb.readLine(); // 対象の文字列
int ringStrLen = ringStr.length(); // リング状の文字列の長さ
int targetStrLen = targetStr.length(); // 対象の文字列の長さ
int j = 0;
for( int i = 0; i < ringStrLen; i++ ) {
if( targetStr.charAt( 0 ) == ringStr.charAt( i ) ) {
// リング状の文字列における対象の文字列のインデックス用
int ij = i;
for( j = 0; j < targetStrLen; j++ ) {
// リング状の文字列のインデックスを超えないように剰余演算
ij = ( i+j ) % ringStrLen;
// 文字が一致しない場合、リング状の文字列の次の文字に進めるため処理を抜ける
if( targetStr.charAt( j ) != ringStr.charAt( ij ) ) {
break;
}
}
}
// 対象の文字列が見つかった場合、処理を抜ける
if( targetStrLen == j ) { break; }
}
// 対象の文字列が見つかった場合、j = 0 にリセットされないので、
if( targetStrLen == j ) {
System.out.println( "Yes" );
} else {
System.out.println( "No" );
}
} catch( IOException e ) {
System.err.println( e );
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
2,
4,
18,
13,
4,
18,
13,
30,
14,
2,
4,
18,
13,
13,
40,
17,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
67,
11
],
[
67,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
16,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
16,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
16,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
48,
53
],
[
53,
54
],
[
47,
55
],
[
55,
56
],
[
55,
57
],
[
16,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
12,
64
],
[
64,
65
],
[
0,
66
],
[
66,
67
],
[
66,
68
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }\n }",
"main",
"{\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }\n }",
"try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }",
"{\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String result = \"No\";",
"result",
"\"No\"",
"String inStr = br.readLine();",
"inStr",
"br.readLine()",
"br.readLine",
"br",
"String target = br.readLine();",
"target",
"br.readLine()",
"br.readLine",
"br",
"String ring = inStr + inStr;",
"ring",
"inStr + inStr",
"inStr",
"inStr",
"if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }",
"inStr.length() >= target.length()",
"inStr.length()",
"inStr.length",
"inStr",
"target.length()",
"target.length",
"target",
"{\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }",
"if( ring.indexOf(target) != -1) result = \"Yes\";",
"ring.indexOf(target) != -1",
"ring.indexOf(target)",
"ring.indexOf",
"ring",
"target",
"-1",
"1",
"result = \"Yes\"",
"result",
"\"Yes\"",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n \n try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String result = \"No\";\n String inStr = br.readLine();\n String target = br.readLine();\n String ring = inStr + inStr;\n\n if( inStr.length() >= target.length()) {\n if( ring.indexOf(target) != -1) result = \"Yes\";\n }\n\n System.out.println(result);\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
try( BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String result = "No";
String inStr = br.readLine();
String target = br.readLine();
String ring = inStr + inStr;
if( inStr.length() >= target.length()) {
if( ring.indexOf(target) != -1) result = "Yes";
}
System.out.println(result);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
27,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString a=sc.nextLine();\n\t\tString b=sc.nextLine();\n\t\tString s=a+a;\n\t\tif(s.indexOf(b)!=-1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t}\n\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString a=sc.nextLine();\n\t\tString b=sc.nextLine();\n\t\tString s=a+a;\n\t\tif(s.indexOf(b)!=-1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t}\n\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString a=sc.nextLine();\n\t\tString b=sc.nextLine();\n\t\tString s=a+a;\n\t\tif(s.indexOf(b)!=-1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString a=sc.nextLine();\n\t\tString b=sc.nextLine();\n\t\tString s=a+a;\n\t\tif(s.indexOf(b)!=-1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String a=sc.nextLine();",
"a",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String b=sc.nextLine();",
"b",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String s=a+a;",
"s",
"a+a",
"a",
"a",
"if(s.indexOf(b)!=-1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"s.indexOf(b)!=-1",
"s.indexOf(b)",
"s.indexOf",
"s",
"b",
"-1",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString a=sc.nextLine();\n\t\tString b=sc.nextLine();\n\t\tString s=a+a;\n\t\tif(s.indexOf(b)!=-1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t}\n\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString a=sc.nextLine();\n\t\tString b=sc.nextLine();\n\t\tString s=a+a;\n\t\tif(s.indexOf(b)!=-1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t}\n\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String a=sc.nextLine();
String b=sc.nextLine();
String s=a+a;
if(s.indexOf(b)!=-1){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
0,
13,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
4,
18,
13,
13,
17,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
4,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
30,
36
],
[
9,
37
],
[
37,
38
]
]
| [
"import java.util.*;\n\nclass Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\t\n\t\tString s = sc.next(); s += s;\n\t\tString t = sc.next();\n\t\tSystem.out.println(s.contains(t)?\"Yes\":\"No\");\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\t\n\t\tString s = sc.next(); s += s;\n\t\tString t = sc.next();\n\t\tSystem.out.println(s.contains(t)?\"Yes\":\"No\");\n\t\t\n\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\t\t\n\t\tString s = sc.next(); s += s;\n\t\tString t = sc.next();\n\t\tSystem.out.println(s.contains(t)?\"Yes\":\"No\");\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tString s = sc.next(); s += s;\n\t\tString t = sc.next();\n\t\tSystem.out.println(s.contains(t)?\"Yes\":\"No\");\n\t\t\n\t}",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"s += s",
"s",
"s",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"System.out.println(s.contains(t)?\"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"s.contains(t)?\"Yes\":\"No\"",
"s.contains(t)",
"s.contains",
"s",
"t",
"\"Yes\"",
"\"No\"",
"String[] args",
"args"
]
| import java.util.*;
class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
String s = sc.next(); s += s;
String t = sc.next();
System.out.println(s.contains(t)?"Yes":"No");
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
31,
5
],
[
31,
6
],
[
6,
7
],
[
6,
8
],
[
31,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
9,
28
],
[
28,
29
],
[
0,
30
],
[
30,
31
],
[
30,
32
]
]
| [
"import java.util.Scanner;\n\npublic class Main{\n\n\tstatic final Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String args[]){\n\t\tString a=s.next(),b=s.next();\n\t\touter:\n\t\tfor(int i=0;i<a.length();i++) {\n\t\t\tfor(int j=0;j<b.length();j++) {\n\t\t\t\tif(a.charAt((i+j)%a.length())!=b.charAt(j))\n\t\t\t\t\tcontinue outer;\n\t\t\t\t//System.err.printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\tstatic final Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String args[]){\n\t\tString a=s.next(),b=s.next();\n\t\touter:\n\t\tfor(int i=0;i<a.length();i++) {\n\t\t\tfor(int j=0;j<b.length();j++) {\n\t\t\t\tif(a.charAt((i+j)%a.length())!=b.charAt(j))\n\t\t\t\t\tcontinue outer;\n\t\t\t\t//System.err.printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main",
"static final Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"public static void main(String args[]){\n\t\tString a=s.next(),b=s.next();\n\t\touter:\n\t\tfor(int i=0;i<a.length();i++) {\n\t\t\tfor(int j=0;j<b.length();j++) {\n\t\t\t\tif(a.charAt((i+j)%a.length())!=b.charAt(j))\n\t\t\t\t\tcontinue outer;\n\t\t\t\t//System.err.printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tString a=s.next(),b=s.next();\n\t\touter:\n\t\tfor(int i=0;i<a.length();i++) {\n\t\t\tfor(int j=0;j<b.length();j++) {\n\t\t\t\tif(a.charAt((i+j)%a.length())!=b.charAt(j))\n\t\t\t\t\tcontinue outer;\n\t\t\t\t//System.err.printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"String a=s.next()",
"a",
"s.next()",
"s.next",
"s",
"b=s.next();",
"b",
"s.next()",
"s.next",
"s",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"public class Main{\n\n\tstatic final Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String args[]){\n\t\tString a=s.next(),b=s.next();\n\t\touter:\n\t\tfor(int i=0;i<a.length();i++) {\n\t\t\tfor(int j=0;j<b.length();j++) {\n\t\t\t\tif(a.charAt((i+j)%a.length())!=b.charAt(j))\n\t\t\t\t\tcontinue outer;\n\t\t\t\t//System.err.printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"public class Main{\n\n\tstatic final Scanner s=new Scanner(System.in);\n\n\tpublic static void main(String args[]){\n\t\tString a=s.next(),b=s.next();\n\t\touter:\n\t\tfor(int i=0;i<a.length();i++) {\n\t\t\tfor(int j=0;j<b.length();j++) {\n\t\t\t\tif(a.charAt((i+j)%a.length())!=b.charAt(j))\n\t\t\t\t\tcontinue outer;\n\t\t\t\t//System.err.printf(\"%d %d\\n\",i,j);\n\t\t\t}\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\treturn;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
static final Scanner s=new Scanner(System.in);
public static void main(String args[]){
String a=s.next(),b=s.next();
outer:
for(int i=0;i<a.length();i++) {
for(int j=0;j<b.length();j++) {
if(a.charAt((i+j)%a.length())!=b.charAt(j))
continue outer;
//System.err.printf("%d %d\n",i,j);
}
System.out.println("Yes");
return;
}
System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
2,
13,
13,
4,
18,
13,
4,
18,
13,
13,
30,
0,
13,
17,
3,
14,
13,
30,
3,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
105,
5
],
[
105,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
43,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
58,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
39,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
8,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
83,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
6,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\t\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\tboolean signal=true;\n\t\t\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(signal){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\t\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\tboolean signal=true;\n\t\t\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(signal){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\t\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\tboolean signal=true;\n\t\t\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(signal){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\t}",
"main",
"{\n\t\tScanner scan=new Scanner(System.in);\n\t\t\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\tboolean signal=true;\n\t\t\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(signal){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\t}",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s=scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String p=scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"boolean signal=true;",
"signal",
"true",
"for(int i=0;i<s.length();i++){\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"signal=true",
"signal",
"true",
"for(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"s.charAt((i+j)%s.length())!=p.charAt(j)",
"s.charAt((i+j)%s.length())",
"s.charAt",
"s",
"(i+j)%s.length()",
"(i+j)",
"i",
"j",
"s.length()",
"s.length",
"s",
"p.charAt(j)",
"p.charAt",
"p",
"j",
"{\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"signal=false",
"signal",
"false",
"break;",
"if(signal){\n\t\t\t\tbreak;\n\t\t\t}",
"signal",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"if(signal){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"signal",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\t\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\tboolean signal=true;\n\t\t\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(signal){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\t\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\tboolean signal=true;\n\t\t\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tsignal=true;\n\t\t\tfor(int j=0;j<p.length();j++){\n\t\t\t\tif(s.charAt((i+j)%s.length())!=p.charAt(j)){\n\t\t\t\t\tsignal=false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(signal){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(signal){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
String s=scan.next();
String p=scan.next();
boolean signal=true;
for(int i=0;i<s.length();i++){
signal=true;
for(int j=0;j<p.length();j++){
if(s.charAt((i+j)%s.length())!=p.charAt(j)){
signal=false;
break;
}
}
if(signal){
break;
}
}
if(signal){
System.out.println("Yes");
}else{
System.out.println("No");
}
scan.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
4,
18,
13,
2,
2,
17,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
32,
32
],
[
32,
33
],
[
32,
34
],
[
32,
35
],
[
27,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
27,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
6,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString S = s + s;\n\t\t\n\t\tif (S.matches(\".*\" + p + \".*\")) {\n\t\t System.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t System.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString S = s + s;\n\t\t\n\t\tif (S.matches(\".*\" + p + \".*\")) {\n\t\t System.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t System.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString S = s + s;\n\t\t\n\t\tif (S.matches(\".*\" + p + \".*\")) {\n\t\t System.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t System.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString S = s + s;\n\t\t\n\t\tif (S.matches(\".*\" + p + \".*\")) {\n\t\t System.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t System.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String p = scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"String S = s + s;",
"S",
"s + s",
"s",
"s",
"if (S.matches(\".*\" + p + \".*\")) {\n\t\t System.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t System.out.println(\"No\");\n\t\t}",
"S.matches(\".*\" + p + \".*\")",
"S.matches",
"S",
"\".*\" + p + \".*\"",
"\".*\" + p + \".*\"",
"\".*\"",
"p",
"\".*\"",
"{\n\t\t System.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t System.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString S = s + s;\n\t\t\n\t\tif (S.matches(\".*\" + p + \".*\")) {\n\t\t System.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t System.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString S = s + s;\n\t\t\n\t\tif (S.matches(\".*\" + p + \".*\")) {\n\t\t System.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t System.out.println(\"No\");\n\t\t}\n\t\t\n\t\t\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner scan = new Scanner(System.in);
String s = scan.next();
String p = scan.next();
String S = s + s;
if (S.matches(".*" + p + ".*")) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
4,
18,
13,
13,
17,
41,
13,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
17,
1,
40,
13,
30,
30,
14,
4,
18,
4,
18,
13,
13,
2,
13,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
0,
13,
17,
3,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
96,
5
],
[
96,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
16,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
48,
52
],
[
41,
53
],
[
53,
54
],
[
54,
55
],
[
41,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
58,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
71,
78
],
[
78,
79
],
[
78,
80
],
[
71,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
6,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
]
| [
"import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n //StringBuilder bd = new StringBuilder();\n //ArrayList<Integer> A = new ArrayList<Integer>();\n int[] A = new int[26];\n Arrays.fill(A, 0);\n String str;\n\n boolean flag = false;\n\n String s = sc.next();\n String t = sc.next();\n\n s = s + s;\n\n for (int i=0; i<s.length()/2; i++) {\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }\n if (flag == false) {\n System.out.println(\"No\");\n }\n\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n //StringBuilder bd = new StringBuilder();\n //ArrayList<Integer> A = new ArrayList<Integer>();\n int[] A = new int[26];\n Arrays.fill(A, 0);\n String str;\n\n boolean flag = false;\n\n String s = sc.next();\n String t = sc.next();\n\n s = s + s;\n\n for (int i=0; i<s.length()/2; i++) {\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }\n if (flag == false) {\n System.out.println(\"No\");\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n //StringBuilder bd = new StringBuilder();\n //ArrayList<Integer> A = new ArrayList<Integer>();\n int[] A = new int[26];\n Arrays.fill(A, 0);\n String str;\n\n boolean flag = false;\n\n String s = sc.next();\n String t = sc.next();\n\n s = s + s;\n\n for (int i=0; i<s.length()/2; i++) {\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }\n if (flag == false) {\n System.out.println(\"No\");\n }\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n //StringBuilder bd = new StringBuilder();\n //ArrayList<Integer> A = new ArrayList<Integer>();\n int[] A = new int[26];\n Arrays.fill(A, 0);\n String str;\n\n boolean flag = false;\n\n String s = sc.next();\n String t = sc.next();\n\n s = s + s;\n\n for (int i=0; i<s.length()/2; i++) {\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }\n if (flag == false) {\n System.out.println(\"No\");\n }\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int[] A = new int[26];",
"A",
"new int[26]",
"26",
"Arrays.fill(A, 0)",
"Arrays.fill",
"Arrays",
"A",
"0",
"String str;",
"str",
"boolean flag = false;",
"flag",
"false",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"s = s + s",
"s",
"s + s",
"s",
"s",
"for (int i=0; i<s.length()/2; i++) {\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()/2",
"i",
"s.length()/2",
"s.length()",
"s.length",
"s",
"2",
"i++",
"i++",
"i",
"{\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }",
"{\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }",
"if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }",
"s.substring(i, i+t.length()).equals(t)",
"s.substring(i, i+t.length()).equals",
"s.substring(i, i+t.length())",
"s.substring",
"s",
"i",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"t",
"{\n System.out.println(\"Yes\");\n flag = true;\n break;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"flag = true",
"flag",
"true",
"break;",
"if (flag == false) {\n System.out.println(\"No\");\n }",
"flag == false",
"flag",
"false",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n //StringBuilder bd = new StringBuilder();\n //ArrayList<Integer> A = new ArrayList<Integer>();\n int[] A = new int[26];\n Arrays.fill(A, 0);\n String str;\n\n boolean flag = false;\n\n String s = sc.next();\n String t = sc.next();\n\n s = s + s;\n\n for (int i=0; i<s.length()/2; i++) {\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }\n if (flag == false) {\n System.out.println(\"No\");\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n //StringBuilder bd = new StringBuilder();\n //ArrayList<Integer> A = new ArrayList<Integer>();\n int[] A = new int[26];\n Arrays.fill(A, 0);\n String str;\n\n boolean flag = false;\n\n String s = sc.next();\n String t = sc.next();\n\n s = s + s;\n\n for (int i=0; i<s.length()/2; i++) {\n if (s.substring(i, i+t.length()).equals(t)) {\n System.out.println(\"Yes\");\n flag = true;\n break;\n }\n }\n if (flag == false) {\n System.out.println(\"No\");\n }\n\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
//StringBuilder bd = new StringBuilder();
//ArrayList<Integer> A = new ArrayList<Integer>();
int[] A = new int[26];
Arrays.fill(A, 0);
String str;
boolean flag = false;
String s = sc.next();
String t = sc.next();
s = s + s;
for (int i=0; i<s.length()/2; i++) {
if (s.substring(i, i+t.length()).equals(t)) {
System.out.println("Yes");
flag = true;
break;
}
}
if (flag == false) {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
2,
13,
4,
18,
13,
17,
2,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
18,
13,
17,
2,
18,
13,
2,
2,
13,
13,
17,
18,
13,
2,
13,
17,
30,
14,
2,
13,
17,
30,
0,
13,
17,
3,
11,
1,
0,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
9,
3,
14,
2,
13,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
56,
68
],
[
68,
69
],
[
69,
70
],
[
56,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
82,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
73,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
95,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
105,
115
],
[
115,
116
],
[
116,
117
],
[
105,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
121,
127
],
[
127,
128
],
[
127,
129
],
[
120,
130
],
[
130,
131
],
[
120,
132
],
[
95,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
133,
139
],
[
139,
140
],
[
139,
141
],
[
8,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
6,
148
],
[
148,
149
],
[
0,
150
],
[
150,
151
],
[
150,
152
]
]
| [
"import java.io.*;\npublic class Main {\n public static void main(String[] args)throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String sln;\n String pln;\n String ans=\"No\";\n int plen,j;\n sln=br.readLine();\n pln=br.readLine();\n plen=pln.length();\n char s[]=(sln+sln.substring(0,plen-1)).toCharArray();\n char p[]=pln.toCharArray();\n \n for(int i=0;i<=s.length-plen;i++){\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }\n System.out.println(ans);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args)throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String sln;\n String pln;\n String ans=\"No\";\n int plen,j;\n sln=br.readLine();\n pln=br.readLine();\n plen=pln.length();\n char s[]=(sln+sln.substring(0,plen-1)).toCharArray();\n char p[]=pln.toCharArray();\n \n for(int i=0;i<=s.length-plen;i++){\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args)throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String sln;\n String pln;\n String ans=\"No\";\n int plen,j;\n sln=br.readLine();\n pln=br.readLine();\n plen=pln.length();\n char s[]=(sln+sln.substring(0,plen-1)).toCharArray();\n char p[]=pln.toCharArray();\n \n for(int i=0;i<=s.length-plen;i++){\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String sln;\n String pln;\n String ans=\"No\";\n int plen,j;\n sln=br.readLine();\n pln=br.readLine();\n plen=pln.length();\n char s[]=(sln+sln.substring(0,plen-1)).toCharArray();\n char p[]=pln.toCharArray();\n \n for(int i=0;i<=s.length-plen;i++){\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }\n System.out.println(ans);\n }",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String sln;",
"sln",
"String pln;",
"pln",
"String ans=\"No\";",
"ans",
"\"No\"",
"int plen",
"plen",
"j;",
"j",
"sln=br.readLine()",
"sln",
"br.readLine()",
"br.readLine",
"br",
"pln=br.readLine()",
"pln",
"br.readLine()",
"br.readLine",
"br",
"plen=pln.length()",
"plen",
"pln.length()",
"pln.length",
"pln",
"char s[]=(sln+sln.substring(0,plen-1)).toCharArray();",
"s",
"(sln+sln.substring(0,plen-1)).toCharArray()",
"(sln+sln.substring(0,plen-1)).toCharArray",
"(sln+sln.substring(0,plen-1))",
"sln",
"sln.substring(0,plen-1)",
"sln.substring",
"sln",
"0",
"plen-1",
"plen",
"1",
"char p[]=pln.toCharArray();",
"p",
"pln.toCharArray()",
"pln.toCharArray",
"pln",
"for(int i=0;i<=s.length-plen;i++){\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=s.length-plen",
"i",
"s.length-plen",
"s.length",
"s",
"s.length",
"plen",
"i++",
"i++",
"i",
"{\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }",
"{\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }",
"if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }",
"(s[i]==p[0])&&(s[i+plen-1]==p[plen-1])",
"(s[i]==p[0])",
"s[i]",
"s",
"i",
"p[0]",
"p",
"0",
"(s[i+plen-1]==p[plen-1])",
"s[i+plen-1]",
"s",
"i+plen-1",
"i+plen",
"i",
"plen",
"1",
"p[plen-1]",
"p",
"plen-1",
"plen",
"1",
"{\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }",
"if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }",
"plen==1",
"plen",
"1",
"{\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }",
"ans=\"Yes\"",
"ans",
"\"Yes\"",
"break;",
"for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }",
"j=1;",
"j=1",
"j",
"1",
"j<plen-1",
"j",
"plen-1",
"plen",
"1",
"j++",
"j++",
"j",
"{\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }",
"{\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }",
"if(s[i+j]==p[j]){\n continue;\n }else break;",
"s[i+j]==p[j]",
"s[i+j]",
"s",
"i+j",
"i",
"j",
"p[j]",
"p",
"j",
"{\n continue;\n }",
"continue;",
"break;",
"if(j==plen-1) ans=\"Yes\";",
"j==plen-1",
"j",
"plen-1",
"plen",
"1",
"ans=\"Yes\"",
"ans",
"\"Yes\"",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args)throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String sln;\n String pln;\n String ans=\"No\";\n int plen,j;\n sln=br.readLine();\n pln=br.readLine();\n plen=pln.length();\n char s[]=(sln+sln.substring(0,plen-1)).toCharArray();\n char p[]=pln.toCharArray();\n \n for(int i=0;i<=s.length-plen;i++){\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args)throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n String sln;\n String pln;\n String ans=\"No\";\n int plen,j;\n sln=br.readLine();\n pln=br.readLine();\n plen=pln.length();\n char s[]=(sln+sln.substring(0,plen-1)).toCharArray();\n char p[]=pln.toCharArray();\n \n for(int i=0;i<=s.length-plen;i++){\n if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){\n if(plen==1){\n\t \tans=\"Yes\" ;\n\t \tbreak;\n\t }\n for(j=1;j<plen-1;j++){\n if(s[i+j]==p[j]){\n continue;\n }else break;\n \n }\n if(j==plen-1) ans=\"Yes\";\n }\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.io.*;
public class Main {
public static void main(String[] args)throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String sln;
String pln;
String ans="No";
int plen,j;
sln=br.readLine();
pln=br.readLine();
plen=pln.length();
char s[]=(sln+sln.substring(0,plen-1)).toCharArray();
char p[]=pln.toCharArray();
for(int i=0;i<=s.length-plen;i++){
if((s[i]==p[0])&&(s[i+plen-1]==p[plen-1])){
if(plen==1){
ans="Yes" ;
break;
}
for(j=1;j<plen-1;j++){
if(s[i+j]==p[j]){
continue;
}else break;
}
if(j==plen-1) ans="Yes";
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
0,
13,
20,
4,
18,
13,
0,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
17,
1,
40,
13,
30,
30,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
4,
18,
13,
30,
3,
0,
13,
17,
14,
2,
13,
4,
18,
13,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
11,
19
],
[
19,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
11,
32
],
[
32,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
11,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
11,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
11,
49
],
[
49,
50
],
[
49,
51
],
[
52,
53
],
[
53,
54
],
[
11,
55
],
[
55,
56
],
[
55,
57
],
[
58,
59
],
[
59,
60
],
[
11,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
61,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
11,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
84,
94
],
[
94,
95
],
[
95,
96
],
[
84,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
11,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
114,
118
],
[
107,
119
],
[
119,
120
],
[
120,
121
],
[
107,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
124,
134
],
[
134,
135
],
[
135,
136
],
[
124,
137
],
[
138,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
140,
146
],
[
146,
147
],
[
146,
148
],
[
139,
149
],
[
149,
150
],
[
150,
151
],
[
139,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
123,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
156,
162
],
[
162,
163
],
[
123,
164
],
[
164,
165
],
[
164,
166
],
[
11,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
167,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
177,
182
],
[
167,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
187,
192
],
[
9,
193
],
[
193,
194
]
]
| [
"import java.util.*;\nimport java.io.*;\n\n/**\n * @author kawakami\n *\n */\nclass Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString s;\n\t\tString p;\n\t\tString str;\n\t\tint j = 0;\n\t\tint count = 0;\n\t\tint test = 0;\n\t char sli[];\n\t char pli[];\n\t //int count[];\n\t \n\t s = as.nextLine();\n\t p = as.nextLine();\n\t \n\t s = s+s;\n\t \n\t sli = new char[s.length()];\n\t pli = new char[p.length()];\n\t //count = new int[p.length()];\n\t \n\t for(int i=0;i<s.length();i++){ //?????????????????????????????????????´???????\n \n sli[i] = s.charAt(i);\n \n }\n\t \n\t\tfor(int i=0;i<p.length();i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tpli[i] = p.charAt(i);\n\t\t \n\t\t}\n\t\t\n\t\tfor(int i=0;i<(s.length()/2);i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\t\n }\n\t\t\n\t\tif(count == p.length()){\n\t\t\t\n\t\t\tstr = \"Yes\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tstr = \"No\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t \n\t \n\t \n\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString s;\n\t\tString p;\n\t\tString str;\n\t\tint j = 0;\n\t\tint count = 0;\n\t\tint test = 0;\n\t char sli[];\n\t char pli[];\n\t //int count[];\n\t \n\t s = as.nextLine();\n\t p = as.nextLine();\n\t \n\t s = s+s;\n\t \n\t sli = new char[s.length()];\n\t pli = new char[p.length()];\n\t //count = new int[p.length()];\n\t \n\t for(int i=0;i<s.length();i++){ //?????????????????????????????????????´???????\n \n sli[i] = s.charAt(i);\n \n }\n\t \n\t\tfor(int i=0;i<p.length();i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tpli[i] = p.charAt(i);\n\t\t \n\t\t}\n\t\t\n\t\tfor(int i=0;i<(s.length()/2);i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\t\n }\n\t\t\n\t\tif(count == p.length()){\n\t\t\t\n\t\t\tstr = \"Yes\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tstr = \"No\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t \n\t \n\t \n\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString s;\n\t\tString p;\n\t\tString str;\n\t\tint j = 0;\n\t\tint count = 0;\n\t\tint test = 0;\n\t char sli[];\n\t char pli[];\n\t //int count[];\n\t \n\t s = as.nextLine();\n\t p = as.nextLine();\n\t \n\t s = s+s;\n\t \n\t sli = new char[s.length()];\n\t pli = new char[p.length()];\n\t //count = new int[p.length()];\n\t \n\t for(int i=0;i<s.length();i++){ //?????????????????????????????????????´???????\n \n sli[i] = s.charAt(i);\n \n }\n\t \n\t\tfor(int i=0;i<p.length();i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tpli[i] = p.charAt(i);\n\t\t \n\t\t}\n\t\t\n\t\tfor(int i=0;i<(s.length()/2);i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\t\n }\n\t\t\n\t\tif(count == p.length()){\n\t\t\t\n\t\t\tstr = \"Yes\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tstr = \"No\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t \n\t \n\t \n\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tScanner as = new Scanner(System.in);\n\t\t\n\t\tString s;\n\t\tString p;\n\t\tString str;\n\t\tint j = 0;\n\t\tint count = 0;\n\t\tint test = 0;\n\t char sli[];\n\t char pli[];\n\t //int count[];\n\t \n\t s = as.nextLine();\n\t p = as.nextLine();\n\t \n\t s = s+s;\n\t \n\t sli = new char[s.length()];\n\t pli = new char[p.length()];\n\t //count = new int[p.length()];\n\t \n\t for(int i=0;i<s.length();i++){ //?????????????????????????????????????´???????\n \n sli[i] = s.charAt(i);\n \n }\n\t \n\t\tfor(int i=0;i<p.length();i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tpli[i] = p.charAt(i);\n\t\t \n\t\t}\n\t\t\n\t\tfor(int i=0;i<(s.length()/2);i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\t\n }\n\t\t\n\t\tif(count == p.length()){\n\t\t\t\n\t\t\tstr = \"Yes\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tstr = \"No\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t \n\t \n\t \n\n\t}",
"Scanner as = new Scanner(System.in);",
"as",
"new Scanner(System.in)",
"String s;",
"s",
"String p;",
"p",
"String str;",
"str",
"int j = 0;",
"j",
"0",
"int count = 0;",
"count",
"0",
"int test = 0;",
"test",
"0",
"char sli[];",
"sli",
"char pli[];",
"pli",
"s = as.nextLine()",
"s",
"as.nextLine()",
"as.nextLine",
"as",
"p = as.nextLine()",
"p",
"as.nextLine()",
"as.nextLine",
"as",
"s = s+s",
"s",
"s+s",
"s",
"s",
"sli = new char[s.length()]",
"sli",
"new char[s.length()]",
"s.length()",
"s.length",
"s",
"pli = new char[p.length()]",
"pli",
"new char[p.length()]",
"p.length()",
"p.length",
"p",
"for(int i=0;i<s.length();i++){ //?????????????????????????????????????´???????\n \n sli[i] = s.charAt(i);\n \n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{ //?????????????????????????????????????´???????\n \n sli[i] = s.charAt(i);\n \n }",
"{ //?????????????????????????????????????´???????\n \n sli[i] = s.charAt(i);\n \n }",
"sli[i] = s.charAt(i)",
"sli[i]",
"sli",
"i",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"for(int i=0;i<p.length();i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tpli[i] = p.charAt(i);\n\t\t \n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<p.length()",
"i",
"p.length()",
"p.length",
"p",
"i++",
"i++",
"i",
"{ //?????????????????????????????????????´???????\n\t\t \n\t\t\tpli[i] = p.charAt(i);\n\t\t \n\t\t}",
"{ //?????????????????????????????????????´???????\n\t\t \n\t\t\tpli[i] = p.charAt(i);\n\t\t \n\t\t}",
"pli[i] = p.charAt(i)",
"pli[i]",
"pli",
"i",
"p.charAt(i)",
"p.charAt",
"p",
"i",
"for(int i=0;i<(s.length()/2);i++){ //?????????????????????????????????????´???????\n\t\t \n\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\t\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<(s.length()/2)",
"i",
"(s.length()/2)",
"s.length()",
"s.length",
"s",
"2",
"i++",
"i++",
"i",
"{ //?????????????????????????????????????´???????\n\t\t \n\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\t\n }",
"{ //?????????????????????????????????????´???????\n\t\t \n\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tcount = 0;\n\t\t\t\n\t\t\t\n }",
"for(j=0;j<p.length();j++){\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}",
"j=0;",
"j=0",
"j",
"0",
"j<p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}",
"{\n\t\t\t\n\t\t\t\t//System.out.println(sli[j+i]+ \"==\"+ pli[j]);\n\t\t\t\tif(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"!\");\t\n\t\t\t\t\n\t\t\t}",
"if(sli[j+i] == pli[j]){\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}",
"sli[j+i] == pli[j]",
"sli[j+i]",
"sli",
"j+i",
"j",
"i",
"pli[j]",
"pli",
"j",
"{\n\t\t \t\n\t\t\t\t\tcount++;\n\t\t\t\t\t//System.out.println(count);\n\t\t\t\t\t//System.out.println((s.length())/2);\n\t\t\t\t\t//System.out.println(p.length());\n\t\t \t\n\t\t\t\t}",
"count++",
"count",
"{\n\t\t\t\t\t\n\t\t\t\t\tcount = 0;\n\t\t\t\t\n\t\t\t\t}",
"count = 0",
"count",
"0",
"if(count == p.length()){\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}",
"count == p.length()",
"count",
"p.length()",
"p.length",
"p",
"{\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}",
"break;",
"count = 0",
"count",
"0",
"if(count == p.length()){\n\t\t\t\n\t\t\tstr = \"Yes\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tstr = \"No\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}",
"count == p.length()",
"count",
"p.length()",
"p.length",
"p",
"{\n\t\t\t\n\t\t\tstr = \"Yes\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}",
"str = \"Yes\"",
"str",
"\"Yes\"",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"{\n\t\t\t\n\t\t\tstr = \"No\";\n\t\t\tSystem.out.println(str);\n\t\t\t\n\t\t}",
"str = \"No\"",
"str",
"\"No\"",
"System.out.println(str)",
"System.out.println",
"System.out",
"System",
"System.out",
"str",
"String[] args",
"args"
]
| import java.util.*;
import java.io.*;
/**
* @author kawakami
*
*/
class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner as = new Scanner(System.in);
String s;
String p;
String str;
int j = 0;
int count = 0;
int test = 0;
char sli[];
char pli[];
//int count[];
s = as.nextLine();
p = as.nextLine();
s = s+s;
sli = new char[s.length()];
pli = new char[p.length()];
//count = new int[p.length()];
for(int i=0;i<s.length();i++){ //?????????????????????????????????????´???????
sli[i] = s.charAt(i);
}
for(int i=0;i<p.length();i++){ //?????????????????????????????????????´???????
pli[i] = p.charAt(i);
}
for(int i=0;i<(s.length()/2);i++){ //?????????????????????????????????????´???????
for(j=0;j<p.length();j++){
//System.out.println(sli[j+i]+ "=="+ pli[j]);
if(sli[j+i] == pli[j]){
count++;
//System.out.println(count);
//System.out.println((s.length())/2);
//System.out.println(p.length());
}
else{
count = 0;
}
//System.out.println("!");
}
if(count == p.length()){
break;
}
count = 0;
}
if(count == p.length()){
str = "Yes";
System.out.println(str);
}
else{
str = "No";
System.out.println(str);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
13,
14,
2,
4,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
29,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
29,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
6,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(s);\n\t\tsb.append(s);\n\t\t\n\t\tif(sb.indexOf(p) >= 0){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(s);\n\t\tsb.append(s);\n\t\t\n\t\tif(sb.indexOf(p) >= 0){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(s);\n\t\tsb.append(s);\n\t\t\n\t\tif(sb.indexOf(p) >= 0){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(s);\n\t\tsb.append(s);\n\t\t\n\t\tif(sb.indexOf(p) >= 0){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"StringBuilder sb = new StringBuilder(s);",
"sb",
"new StringBuilder(s)",
"sb.append(s)",
"sb.append",
"sb",
"s",
"if(sb.indexOf(p) >= 0){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"sb.indexOf(p) >= 0",
"sb.indexOf(p)",
"sb.indexOf",
"sb",
"p",
"0",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(s);\n\t\tsb.append(s);\n\t\t\n\t\tif(sb.indexOf(p) >= 0){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\t\n\t\tStringBuilder sb = new StringBuilder(s);\n\t\tsb.append(s);\n\t\t\n\t\tif(sb.indexOf(p) >= 0){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
StringBuilder sb = new StringBuilder(s);
sb.append(s);
if(sb.indexOf(p) >= 0){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
0,
13,
13,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
13,
40,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
10,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
37,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
31,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
15,
51
],
[
51,
52
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] Args) throws IOException{\n String s = br.readLine();\n s += s;\n final String p = br.readLine();\n if(s.indexOf(p)!=-1) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main{\n private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n public static void main(String[] Args) throws IOException{\n String s = br.readLine();\n s += s;\n final String p = br.readLine();\n if(s.indexOf(p)!=-1) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"Main",
"private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"public static void main(String[] Args) throws IOException{\n String s = br.readLine();\n s += s;\n final String p = br.readLine();\n if(s.indexOf(p)!=-1) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"main",
"{\n String s = br.readLine();\n s += s;\n final String p = br.readLine();\n if(s.indexOf(p)!=-1) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"s += s",
"s",
"s",
"final String p = br.readLine();",
"p",
"br.readLine()",
"br.readLine",
"br",
"if(s.indexOf(p)!=-1) System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"s.indexOf(p)!=-1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] Args",
"Args"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
public static void main(String[] Args) throws IOException{
String s = br.readLine();
s += s;
final String p = br.readLine();
if(s.indexOf(p)!=-1) System.out.println("Yes");
else System.out.println("No");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
17,
4,
18,
13,
13,
30,
14,
2,
2,
13,
4,
18,
13,
4,
18,
13,
30,
14,
4,
18,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
40,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
110,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
11,
36
],
[
36,
37
],
[
36,
38
],
[
11,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
39,
49
],
[
49,
50
],
[
50,
51
],
[
39,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
55,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
76,
89
],
[
89,
90
],
[
11,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
91,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
9,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n \tString sinput = br.readLine();\n \tString p = br.readLine();\n \tString s = sinput + sinput;\n \tint count = 0;\n \tint index = 0;\n \t\n \tfor (int i = 0; i < s.length(); i++)\n \t{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \tif (count >= 1)\n \t\tSystem.out.println(\"Yes\");\n \telse\n \t\tSystem.out.println(\"No\");\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n \tString sinput = br.readLine();\n \tString p = br.readLine();\n \tString s = sinput + sinput;\n \tint count = 0;\n \tint index = 0;\n \t\n \tfor (int i = 0; i < s.length(); i++)\n \t{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \tif (count >= 1)\n \t\tSystem.out.println(\"Yes\");\n \telse\n \t\tSystem.out.println(\"No\");\n\t}\n\n}",
"Main",
"public static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n \tString sinput = br.readLine();\n \tString p = br.readLine();\n \tString s = sinput + sinput;\n \tint count = 0;\n \tint index = 0;\n \t\n \tfor (int i = 0; i < s.length(); i++)\n \t{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \tif (count >= 1)\n \t\tSystem.out.println(\"Yes\");\n \telse\n \t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n \tString sinput = br.readLine();\n \tString p = br.readLine();\n \tString s = sinput + sinput;\n \tint count = 0;\n \tint index = 0;\n \t\n \tfor (int i = 0; i < s.length(); i++)\n \t{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \tif (count >= 1)\n \t\tSystem.out.println(\"Yes\");\n \telse\n \t\tSystem.out.println(\"No\");\n\t}",
"InputStreamReader isr = new InputStreamReader(System.in);",
"isr",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(isr);",
"br",
"new BufferedReader(isr)",
"String sinput = br.readLine();",
"sinput",
"br.readLine()",
"br.readLine",
"br",
"String p = br.readLine();",
"p",
"br.readLine()",
"br.readLine",
"br",
"String s = sinput + sinput;",
"s",
"sinput + sinput",
"sinput",
"sinput",
"int count = 0;",
"count",
"0",
"int index = 0;",
"index",
"0",
"for (int i = 0; i < s.length(); i++)\n \t{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}",
"{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}",
"if (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}",
"p.charAt(0) == s.charAt(i)",
"p.charAt(0)",
"p.charAt",
"p",
"0",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}",
"if (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}",
"i + p.length() < s.length()",
"i + p.length()",
"i",
"p.length()",
"p.length",
"p",
"s.length()",
"s.length",
"s",
"{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}",
"if (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;",
"p.equals(s.substring(i, i + p.length() ))",
"p.equals",
"p",
"s.substring(i, i + p.length() )",
"s.substring",
"s",
"i",
"i + p.length()",
"i",
"p.length()",
"p.length",
"p",
"count++",
"count",
"if (count >= 1)\n \t\tSystem.out.println(\"Yes\");\n \telse\n \t\tSystem.out.println(\"No\");",
"count >= 1",
"count",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n \tString sinput = br.readLine();\n \tString p = br.readLine();\n \tString s = sinput + sinput;\n \tint count = 0;\n \tint index = 0;\n \t\n \tfor (int i = 0; i < s.length(); i++)\n \t{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \tif (count >= 1)\n \t\tSystem.out.println(\"Yes\");\n \telse\n \t\tSystem.out.println(\"No\");\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args)throws Exception{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(isr);\n \n \tString sinput = br.readLine();\n \tString p = br.readLine();\n \tString s = sinput + sinput;\n \tint count = 0;\n \tint index = 0;\n \t\n \tfor (int i = 0; i < s.length(); i++)\n \t{\n \t\tif (p.charAt(0) == s.charAt(i))\n \t\t{\n \t\t\tif (i + p.length() < s.length())\n \t\t\t{\n \t\t\t\tif (p.equals(s.substring(i, i + p.length() )))\n \t\tcount++;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \tif (count >= 1)\n \t\tSystem.out.println(\"Yes\");\n \telse\n \t\tSystem.out.println(\"No\");\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args)throws Exception{
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String sinput = br.readLine();
String p = br.readLine();
String s = sinput + sinput;
int count = 0;
int index = 0;
for (int i = 0; i < s.length(); i++)
{
if (p.charAt(0) == s.charAt(i))
{
if (i + p.length() < s.length())
{
if (p.equals(s.substring(i, i + p.length() )))
count++;
}
}
}
if (count >= 1)
System.out.println("Yes");
else
System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
38,
30,
4,
18,
13,
30,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
60,
5
],
[
60,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
15,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
20,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
40,
45
],
[
45,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
20,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
6,
57
],
[
57,
58
],
[
0,
59
],
[
59,
60
],
[
59,
61
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = null;\n\t\tString output = \"No\";\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = null;\n\t\tString output = \"No\";\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = null;\n\t\tString output = \"No\";\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = null;\n\t\tString output = \"No\";\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}",
"Scanner sc = null;",
"sc",
"null",
"String output = \"No\";",
"output",
"\"No\"",
"try {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}",
"{\n\t\t\tsc.close();\n\t\t}",
"sc.close()",
"sc.close",
"sc",
"{\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t}",
"sc = new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"String str = sc.nextLine();",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String ring = str + str;",
"ring",
"str + str",
"str",
"str",
"String check = sc.nextLine();",
"check",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}",
"ring.indexOf(check) != -1",
"ring.indexOf(check)",
"ring.indexOf",
"ring",
"check",
"-1",
"1",
"{\n\t\t\t\toutput = \"Yes\";\n\t\t\t}",
"output = \"Yes\"",
"output",
"\"Yes\"",
"System.out.println(output)",
"System.out.println",
"System.out",
"System",
"System.out",
"output",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = null;\n\t\tString output = \"No\";\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = null;\n\t\tString output = \"No\";\n\n\t\ttry {\n\t\t\tsc = new Scanner(System.in);\n\n\t\t\tString str = sc.nextLine();\n\t\t\tString ring = str + str;\n\n\t\t\tString check = sc.nextLine();\n\n\t\t\tif (ring.indexOf(check) != -1) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t} finally {\n\t\t\tsc.close();\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = null;
String output = "No";
try {
sc = new Scanner(System.in);
String str = sc.nextLine();
String ring = str + str;
String check = sc.nextLine();
if (ring.indexOf(check) != -1) {
output = "Yes";
}
System.out.println(output);
} finally {
sc.close();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
17,
30,
11,
1,
41,
13,
13,
2,
13,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
17,
14,
2,
4,
18,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
40,
13,
40,
13,
14,
2,
13,
4,
18,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
31,
41
],
[
41,
42
],
[
42,
43
],
[
31,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
47,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
57,
69
],
[
69,
70
],
[
70,
71
],
[
57,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
81,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
80,
90
],
[
90,
91
],
[
80,
92
],
[
92,
93
],
[
92,
94
],
[
74,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
96,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
95,
109
],
[
109,
110
],
[
73,
111
],
[
111,
112
],
[
56,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
56,
122
],
[
122,
123
],
[
122,
124
],
[
56,
125
],
[
125,
126
],
[
125,
127
],
[
8,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
128,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
6,
144
],
[
144,
145
]
]
| [
"import java.util.Scanner;\n\nclass Main{\n \n public static void main(String[] args){\n \n Scanner sc =new Scanner(System.in);\n \n String S = sc.nextLine();\n String P = sc.nextLine();\n int count=0,k=0,flag=0;\n \n for(int i=0;i<S.length();i++) {\n \t\n\t if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }\n\t \n }\n\t \n\t if(flag==1) System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t \n }\n \n \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n \n public static void main(String[] args){\n \n Scanner sc =new Scanner(System.in);\n \n String S = sc.nextLine();\n String P = sc.nextLine();\n int count=0,k=0,flag=0;\n \n for(int i=0;i<S.length();i++) {\n \t\n\t if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }\n\t \n }\n\t \n\t if(flag==1) System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t \n }\n \n \n}",
"Main",
"public static void main(String[] args){\n \n Scanner sc =new Scanner(System.in);\n \n String S = sc.nextLine();\n String P = sc.nextLine();\n int count=0,k=0,flag=0;\n \n for(int i=0;i<S.length();i++) {\n \t\n\t if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }\n\t \n }\n\t \n\t if(flag==1) System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t \n }",
"main",
"{\n \n Scanner sc =new Scanner(System.in);\n \n String S = sc.nextLine();\n String P = sc.nextLine();\n int count=0,k=0,flag=0;\n \n for(int i=0;i<S.length();i++) {\n \t\n\t if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }\n\t \n }\n\t \n\t if(flag==1) System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t \n }",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.nextLine();",
"S",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String P = sc.nextLine();",
"P",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int count=0",
"count",
"0",
"k=0",
"k",
"0",
"flag=0;",
"flag",
"0",
"for(int i=0;i<S.length();i++) {\n \t\n\t if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }\n\t \n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<S.length()",
"i",
"S.length()",
"S.length",
"S",
"i++",
"i++",
"i",
"{\n \t\n\t if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }\n\t \n }",
"{\n \t\n\t if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }\n\t \n }",
"if(S.charAt(i) == P.charAt(0)) {\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }",
"S.charAt(i) == P.charAt(0)",
"S.charAt(i)",
"S.charAt",
"S",
"i",
"P.charAt(0)",
"P.charAt",
"P",
"0",
"{\n\t \t \n\t for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }\n\t \n\t if(count==P.length()) flag=1;\n\t \n\t count=0;\n\t k=0;\n\t \n\t }",
"for(int j=i;j<i+P.length();j++) {\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }",
"int j=i;",
"int j=i;",
"j",
"i",
"j<i+P.length()",
"j",
"i+P.length()",
"i",
"P.length()",
"P.length",
"P",
"j++",
"j++",
"j",
"{\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }",
"{\n\t \t \n\t if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++; \n\n\t k++;\n\t }",
"if(j<S.length())\n\t\t if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;\n\t \n\t\t else if(S.charAt(j-S.length())==P.charAt(k)) count++;",
"j<S.length()",
"j",
"S.length()",
"S.length",
"S",
"if(S.charAt(j)==P.charAt(k)) count++;\n\t\t else count+=0;",
"S.charAt(j)==P.charAt(k)",
"S.charAt(j)",
"S.charAt",
"S",
"j",
"P.charAt(k)",
"P.charAt",
"P",
"k",
"count++",
"count",
"count+=0",
"count",
"0",
"if(S.charAt(j-S.length())==P.charAt(k)) count++;",
"S.charAt(j-S.length())==P.charAt(k)",
"S.charAt(j-S.length())",
"S.charAt",
"S",
"j-S.length()",
"j",
"S.length()",
"S.length",
"S",
"P.charAt(k)",
"P.charAt",
"P",
"k",
"count++",
"count",
"k++",
"k",
"if(count==P.length()) flag=1;",
"count==P.length()",
"count",
"P.length()",
"P.length",
"P",
"flag=1",
"flag",
"1",
"count=0",
"count",
"0",
"k=0",
"k",
"0",
"if(flag==1) System.out.println(\"Yes\");\n\t else System.out.println(\"No\");",
"flag==1",
"flag",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
String S = sc.nextLine();
String P = sc.nextLine();
int count=0,k=0,flag=0;
for(int i=0;i<S.length();i++) {
if(S.charAt(i) == P.charAt(0)) {
for(int j=i;j<i+P.length();j++) {
if(j<S.length())
if(S.charAt(j)==P.charAt(k)) count++;
else count+=0;
else if(S.charAt(j-S.length())==P.charAt(k)) count++;
k++;
}
if(count==P.length()) flag=1;
count=0;
k=0;
}
}
if(flag==1) System.out.println("Yes");
else System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
30,
44
],
[
44,
45
],
[
45,
46
],
[
30,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
48,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
60,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
75,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString first = scan.nextLine();\n\t\tString fRep = first + first;\n\t\tString second = scan.nextLine();\n\t\tboolean flg = false;\n\n\t\tfor(int i = 0; i < fRep.length() - second.length(); i++){\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println((flg)? \"Yes\" : \"No\");\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString first = scan.nextLine();\n\t\tString fRep = first + first;\n\t\tString second = scan.nextLine();\n\t\tboolean flg = false;\n\n\t\tfor(int i = 0; i < fRep.length() - second.length(); i++){\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println((flg)? \"Yes\" : \"No\");\n\t}\n}",
"Main",
"public static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString first = scan.nextLine();\n\t\tString fRep = first + first;\n\t\tString second = scan.nextLine();\n\t\tboolean flg = false;\n\n\t\tfor(int i = 0; i < fRep.length() - second.length(); i++){\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println((flg)? \"Yes\" : \"No\");\n\t}",
"main",
"{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString first = scan.nextLine();\n\t\tString fRep = first + first;\n\t\tString second = scan.nextLine();\n\t\tboolean flg = false;\n\n\t\tfor(int i = 0; i < fRep.length() - second.length(); i++){\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println((flg)? \"Yes\" : \"No\");\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String first = scan.nextLine();",
"first",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String fRep = first + first;",
"fRep",
"first + first",
"first",
"first",
"String second = scan.nextLine();",
"second",
"scan.nextLine()",
"scan.nextLine",
"scan",
"boolean flg = false;",
"flg",
"false",
"for(int i = 0; i < fRep.length() - second.length(); i++){\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < fRep.length() - second.length()",
"i",
"fRep.length() - second.length()",
"fRep.length()",
"fRep.length",
"fRep",
"second.length()",
"second.length",
"second",
"i++",
"i++",
"i",
"{\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"String subF = fRep.substring(i, i + second.length());",
"subF",
"fRep.substring(i, i + second.length())",
"fRep.substring",
"fRep",
"i",
"i + second.length()",
"i",
"second.length()",
"second.length",
"second",
"if(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}",
"subF.equals(second)",
"subF.equals",
"subF",
"second",
"{\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}",
"flg = true",
"flg",
"true",
"break;",
"System.out.println((flg)? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"(flg)? \"Yes\" : \"No\"",
"(flg)",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString first = scan.nextLine();\n\t\tString fRep = first + first;\n\t\tString second = scan.nextLine();\n\t\tboolean flg = false;\n\n\t\tfor(int i = 0; i < fRep.length() - second.length(); i++){\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println((flg)? \"Yes\" : \"No\");\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tString first = scan.nextLine();\n\t\tString fRep = first + first;\n\t\tString second = scan.nextLine();\n\t\tboolean flg = false;\n\n\t\tfor(int i = 0; i < fRep.length() - second.length(); i++){\n\t\t\tString subF = fRep.substring(i, i + second.length());\n\t\t\tif(subF.equals(second)){\n\t\t\t\tflg = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println((flg)? \"Yes\" : \"No\");\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String first = scan.nextLine();
String fRep = first + first;
String second = scan.nextLine();
boolean flg = false;
for(int i = 0; i < fRep.length() - second.length(); i++){
String subF = fRep.substring(i, i + second.length());
if(subF.equals(second)){
flg = true;
break;
}
}
System.out.println((flg)? "Yes" : "No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
27,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
]
]
| [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n String a = scanner.nextLine();\n String p = scanner.nextLine();\n \n String custom_a = a + a;\n if(custom_a.indexOf(p) != -1){\n System.out.println(\"Yes\"); \n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n String a = scanner.nextLine();\n String p = scanner.nextLine();\n \n String custom_a = a + a;\n if(custom_a.indexOf(p) != -1){\n System.out.println(\"Yes\"); \n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n String a = scanner.nextLine();\n String p = scanner.nextLine();\n \n String custom_a = a + a;\n if(custom_a.indexOf(p) != -1){\n System.out.println(\"Yes\"); \n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n String a = scanner.nextLine();\n String p = scanner.nextLine();\n \n String custom_a = a + a;\n if(custom_a.indexOf(p) != -1){\n System.out.println(\"Yes\"); \n } else {\n System.out.println(\"No\");\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String a = scanner.nextLine();",
"a",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String p = scanner.nextLine();",
"p",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String custom_a = a + a;",
"custom_a",
"a + a",
"a",
"a",
"if(custom_a.indexOf(p) != -1){\n System.out.println(\"Yes\"); \n } else {\n System.out.println(\"No\");\n }",
"custom_a.indexOf(p) != -1",
"custom_a.indexOf(p)",
"custom_a.indexOf",
"custom_a",
"p",
"-1",
"1",
"{\n System.out.println(\"Yes\"); \n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String a = scanner.nextLine();
String p = scanner.nextLine();
String custom_a = a + a;
if(custom_a.indexOf(p) != -1){
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
41,
13,
41,
13,
17,
41,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
2,
13,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
3,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
161,
5
],
[
161,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
8,
82
],
[
82,
83
],
[
8,
84
],
[
84,
85
],
[
84,
86
],
[
8,
87
],
[
87,
88
],
[
87,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
90,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
106,
114
],
[
114,
115
],
[
115,
116
],
[
106,
117
],
[
118,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
120,
128
],
[
128,
129
],
[
128,
130
],
[
119,
131
],
[
131,
132
],
[
132,
133
],
[
102,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
8,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
140,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
6,
158
],
[
158,
159
],
[
0,
160
],
[
160,
161
],
[
160,
162
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n String s=scan.next();\n String p=scan.next();\n\n int sl=s.length();\n int pl=p.length();\n char S[] = new char[sl];\n char P[] = new char[pl];\n\n for(int i=0;i<sl;i++){\n S[i]=s.charAt(i);\n }\n for(int i=0;i<pl;i++){\n P[i]=p.charAt(i);\n }\n int i,count=0;\n boolean t=false;\n for(i=0;i<sl;i++){\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }\n if(count==pl){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n String s=scan.next();\n String p=scan.next();\n\n int sl=s.length();\n int pl=p.length();\n char S[] = new char[sl];\n char P[] = new char[pl];\n\n for(int i=0;i<sl;i++){\n S[i]=s.charAt(i);\n }\n for(int i=0;i<pl;i++){\n P[i]=p.charAt(i);\n }\n int i,count=0;\n boolean t=false;\n for(i=0;i<sl;i++){\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }\n if(count==pl){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n String s=scan.next();\n String p=scan.next();\n\n int sl=s.length();\n int pl=p.length();\n char S[] = new char[sl];\n char P[] = new char[pl];\n\n for(int i=0;i<sl;i++){\n S[i]=s.charAt(i);\n }\n for(int i=0;i<pl;i++){\n P[i]=p.charAt(i);\n }\n int i,count=0;\n boolean t=false;\n for(i=0;i<sl;i++){\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }\n if(count==pl){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n String s=scan.next();\n String p=scan.next();\n\n int sl=s.length();\n int pl=p.length();\n char S[] = new char[sl];\n char P[] = new char[pl];\n\n for(int i=0;i<sl;i++){\n S[i]=s.charAt(i);\n }\n for(int i=0;i<pl;i++){\n P[i]=p.charAt(i);\n }\n int i,count=0;\n boolean t=false;\n for(i=0;i<sl;i++){\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }\n if(count==pl){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s=scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String p=scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"int sl=s.length();",
"sl",
"s.length()",
"s.length",
"s",
"int pl=p.length();",
"pl",
"p.length()",
"p.length",
"p",
"char S[] = new char[sl];",
"S",
"new char[sl]",
"sl",
"char P[] = new char[pl];",
"P",
"new char[pl]",
"pl",
"for(int i=0;i<sl;i++){\n S[i]=s.charAt(i);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<sl",
"i",
"sl",
"i++",
"i++",
"i",
"{\n S[i]=s.charAt(i);\n }",
"{\n S[i]=s.charAt(i);\n }",
"S[i]=s.charAt(i)",
"S[i]",
"S",
"i",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"for(int i=0;i<pl;i++){\n P[i]=p.charAt(i);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<pl",
"i",
"pl",
"i++",
"i++",
"i",
"{\n P[i]=p.charAt(i);\n }",
"{\n P[i]=p.charAt(i);\n }",
"P[i]=p.charAt(i)",
"P[i]",
"P",
"i",
"p.charAt(i)",
"p.charAt",
"p",
"i",
"int i",
"i",
"count=0;",
"count",
"0",
"boolean t=false;",
"t",
"false",
"for(i=0;i<sl;i++){\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }",
"i=0;",
"i=0",
"i",
"0",
"i<sl",
"i",
"sl",
"i++",
"i++",
"i",
"{\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }",
"{\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }",
"count=0",
"count",
"0",
"for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<pl",
"j",
"pl",
"j++",
"j++",
"j",
"{\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }",
"{\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }",
"if(S[(i+j)%sl]==P[j]){\n count++;\n }",
"S[(i+j)%sl]==P[j]",
"S[(i+j)%sl]",
"S",
"(i+j)%sl",
"(i+j)",
"i",
"j",
"sl",
"P[j]",
"P",
"j",
"{\n count++;\n }",
"count++",
"count",
"if(count==pl){\n break;\n }",
"count==pl",
"count",
"pl",
"{\n break;\n }",
"break;",
"if(count==pl){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"count==pl",
"count",
"pl",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"public class Main {\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n String s=scan.next();\n String p=scan.next();\n\n int sl=s.length();\n int pl=p.length();\n char S[] = new char[sl];\n char P[] = new char[pl];\n\n for(int i=0;i<sl;i++){\n S[i]=s.charAt(i);\n }\n for(int i=0;i<pl;i++){\n P[i]=p.charAt(i);\n }\n int i,count=0;\n boolean t=false;\n for(i=0;i<sl;i++){\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }\n if(count==pl){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String args[]){\n Scanner scan = new Scanner(System.in);\n String s=scan.next();\n String p=scan.next();\n\n int sl=s.length();\n int pl=p.length();\n char S[] = new char[sl];\n char P[] = new char[pl];\n\n for(int i=0;i<sl;i++){\n S[i]=s.charAt(i);\n }\n for(int i=0;i<pl;i++){\n P[i]=p.charAt(i);\n }\n int i,count=0;\n boolean t=false;\n for(i=0;i<sl;i++){\n count=0;\n for(int j=0;j<pl;j++){\n if(S[(i+j)%sl]==P[j]){\n count++;\n }\n }\n if(count==pl){\n break;\n }\n }\n if(count==pl){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
String s=scan.next();
String p=scan.next();
int sl=s.length();
int pl=p.length();
char S[] = new char[sl];
char P[] = new char[pl];
for(int i=0;i<sl;i++){
S[i]=s.charAt(i);
}
for(int i=0;i<pl;i++){
P[i]=p.charAt(i);
}
int i,count=0;
boolean t=false;
for(i=0;i<sl;i++){
count=0;
for(int j=0;j<pl;j++){
if(S[(i+j)%sl]==P[j]){
count++;
}
}
if(count==pl){
break;
}
}
if(count==pl){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
14,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
57,
5
],
[
57,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
16,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
33,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
6,
54
],
[
54,
55
],
[
0,
56
],
[
56,
57
],
[
56,
58
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile (scan.hasNextLine()) {\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tSystem.exit(0);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile (scan.hasNextLine()) {\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tSystem.exit(0);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile (scan.hasNextLine()) {\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tSystem.exit(0);\n\t}",
"main",
"{\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile (scan.hasNextLine()) {\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tSystem.exit(0);\n\t}",
"@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while (scan.hasNextLine()) {\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}",
"scan.hasNextLine()",
"scan.hasNextLine",
"scan",
"{\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}",
"String s = scan.nextLine();",
"s",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String p = scan.nextLine();",
"p",
"scan.nextLine()",
"scan.nextLine",
"scan",
"s = s.concat(s)",
"s",
"s.concat(s)",
"s.concat",
"s",
"s",
"if (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");",
"s.contains(p)",
"s.contains",
"s",
"p",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"System.exit(0)",
"System.exit",
"System",
"0",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile (scan.hasNextLine()) {\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tSystem.exit(0);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile (scan.hasNextLine()) {\n\t\t\tString s = scan.nextLine();\n\t\t\tString p = scan.nextLine();\n\n\t\t\ts = s.concat(s);\n\n\t\t\tif (s.contains(p))\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tSystem.exit(0);\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner scan = new Scanner(System.in);
while (scan.hasNextLine()) {
String s = scan.nextLine();
String p = scan.nextLine();
s = s.concat(s);
if (s.contains(p))
System.out.println("Yes");
else
System.out.println("No");
}
System.exit(0);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
17,
4,
18,
13,
13,
30,
41,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
2,
13,
13,
30,
0,
13,
2,
2,
13,
13,
13,
30,
0,
13,
2,
13,
13,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
3,
14,
2,
13,
13,
30,
3,
14,
2,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
16,
21
],
[
12,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
22,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
22,
43
],
[
43,
44
],
[
43,
45
],
[
22,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
60,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
59,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
86,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
85,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
107,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
106,
116
],
[
116,
117
],
[
58,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
22,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
124,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
6,
142
],
[
142,
143
]
]
| [
"import java.io.*;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t\ttry {\n\t String s = kb.readLine();\n\t String p = kb.readLine();\n\t \n\t int slen = s.length();\n\t int plen = p.length();\n\t int j = 0;\n\t\t\tfor( int i = 0; i<slen; i++ ) {\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}\n\t\t\t\n\t\t\tif( plen == j ) {\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}\n\t\t} catch( IOException e ) {\n\t\t\tSystem.err.println( e );\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t\ttry {\n\t String s = kb.readLine();\n\t String p = kb.readLine();\n\t \n\t int slen = s.length();\n\t int plen = p.length();\n\t int j = 0;\n\t\t\tfor( int i = 0; i<slen; i++ ) {\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}\n\t\t\t\n\t\t\tif( plen == j ) {\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}\n\t\t} catch( IOException e ) {\n\t\t\tSystem.err.println( e );\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tBufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t\ttry {\n\t String s = kb.readLine();\n\t String p = kb.readLine();\n\t \n\t int slen = s.length();\n\t int plen = p.length();\n\t int j = 0;\n\t\t\tfor( int i = 0; i<slen; i++ ) {\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}\n\t\t\t\n\t\t\tif( plen == j ) {\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}\n\t\t} catch( IOException e ) {\n\t\t\tSystem.err.println( e );\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );\n\t\ttry {\n\t String s = kb.readLine();\n\t String p = kb.readLine();\n\t \n\t int slen = s.length();\n\t int plen = p.length();\n\t int j = 0;\n\t\t\tfor( int i = 0; i<slen; i++ ) {\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}\n\t\t\t\n\t\t\tif( plen == j ) {\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}\n\t\t} catch( IOException e ) {\n\t\t\tSystem.err.println( e );\n\t\t}\n\t}",
"BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );",
"kb",
"new BufferedReader( new InputStreamReader( System.in ) )",
"try {\n\t String s = kb.readLine();\n\t String p = kb.readLine();\n\t \n\t int slen = s.length();\n\t int plen = p.length();\n\t int j = 0;\n\t\t\tfor( int i = 0; i<slen; i++ ) {\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}\n\t\t\t\n\t\t\tif( plen == j ) {\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}\n\t\t} catch( IOException e ) {\n\t\t\tSystem.err.println( e );\n\t\t}",
"catch( IOException e ) {\n\t\t\tSystem.err.println( e );\n\t\t}",
"IOException e",
"{\n\t\t\tSystem.err.println( e );\n\t\t}",
"System.err.println( e )",
"System.err.println",
"System.err",
"System",
"System.err",
"e",
"{\n\t String s = kb.readLine();\n\t String p = kb.readLine();\n\t \n\t int slen = s.length();\n\t int plen = p.length();\n\t int j = 0;\n\t\t\tfor( int i = 0; i<slen; i++ ) {\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}\n\t\t\t\n\t\t\tif( plen == j ) {\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}\n\t\t}",
"String s = kb.readLine();",
"s",
"kb.readLine()",
"kb.readLine",
"kb",
"String p = kb.readLine();",
"p",
"kb.readLine()",
"kb.readLine",
"kb",
"int slen = s.length();",
"slen",
"s.length()",
"s.length",
"s",
"int plen = p.length();",
"plen",
"p.length()",
"p.length",
"p",
"int j = 0;",
"j",
"0",
"for( int i = 0; i<slen; i++ ) {\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<slen",
"i",
"slen",
"i++",
"i++",
"i",
"{\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}",
"{\n\t\t\t\tif( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif( plen == j ) { break; }\n\t\t\t}",
"if( p.charAt( 0 ) == s.charAt( i ) ) {\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"p.charAt( 0 ) == s.charAt( i )",
"p.charAt( 0 )",
"p.charAt",
"p",
"0",
"s.charAt( i )",
"s.charAt",
"s",
"i",
"{\n\t\t\t\t\tint ij = i;\n\t\t\t\t\tfor( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"int ij = i;",
"ij",
"i",
"for( j = 0; j<plen; j++ ) {\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"j = 0;",
"j = 0",
"j",
"0",
"j<plen",
"j",
"plen",
"j++",
"j++",
"j",
"{\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tif( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"if( slen <= i+j ) {\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}",
"slen <= i+j",
"slen",
"i+j",
"i",
"j",
"{\n\t\t\t\t\t\t\tij = ( i+j ) - slen;\n\t\t\t\t\t\t}",
"ij = ( i+j ) - slen",
"ij",
"( i+j ) - slen",
"( i+j )",
"i",
"j",
"slen",
"{\n\t\t\t\t\t\t\tij = i + j;\n\t\t\t\t\t\t}",
"ij = i + j",
"ij",
"i + j",
"i",
"j",
"if( p.charAt( j ) != s.charAt( ij ) ) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"p.charAt( j ) != s.charAt( ij )",
"p.charAt( j )",
"p.charAt",
"p",
"j",
"s.charAt( ij )",
"s.charAt",
"s",
"ij",
"{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"break;",
"if( plen == j ) { break; }",
"plen == j",
"plen",
"j",
"{ break; }",
"break;",
"if( plen == j ) {\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}",
"plen == j",
"plen",
"j",
"{\n\t\t\t\tSystem.out.println( \"Yes\" );\t\t\t\n\t\t\t}",
"System.out.println( \"Yes\" )",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\t\tSystem.out.println( \"No\" );\n\t\t\t}",
"System.out.println( \"No\" )",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.io.*;
class Main {
public static void main(String[] args) {
BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
try {
String s = kb.readLine();
String p = kb.readLine();
int slen = s.length();
int plen = p.length();
int j = 0;
for( int i = 0; i<slen; i++ ) {
if( p.charAt( 0 ) == s.charAt( i ) ) {
int ij = i;
for( j = 0; j<plen; j++ ) {
if( slen <= i+j ) {
ij = ( i+j ) - slen;
} else {
ij = i + j;
}
if( p.charAt( j ) != s.charAt( ij ) ) {
break;
}
}
}
if( plen == j ) { break; }
}
if( plen == j ) {
System.out.println( "Yes" );
} else {
System.out.println( "No" );
}
} catch( IOException e ) {
System.err.println( e );
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
13,
4,
18,
18,
13,
13,
8,
2,
4,
18,
13,
13,
40,
17,
17,
17,
4,
18,
18,
13,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
11,
14
],
[
14,
15
],
[
11,
16
],
[
16,
17
],
[
16,
18
],
[
11,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
11,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
42,
47
],
[
47,
48
],
[
41,
49
],
[
41,
50
],
[
11,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
9,
56
],
[
56,
57
]
]
| [
"import java.io.*;\nimport java.util.Arrays;\nclass Main{\n public static void main(String[] args) throws IOException {\n String strS,strP;\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n strS = in.readLine();\n strP = in.readLine();\n StringBuffer sb = new StringBuffer(strS);\n sb.append(strS);\n System.out.println((sb.indexOf(strP)==-1 ? \"No\" : \"Yes\"));\n System.out.flush();\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Arrays;",
"Arrays",
"java.util",
"class Main{\n public static void main(String[] args) throws IOException {\n String strS,strP;\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n strS = in.readLine();\n strP = in.readLine();\n StringBuffer sb = new StringBuffer(strS);\n sb.append(strS);\n System.out.println((sb.indexOf(strP)==-1 ? \"No\" : \"Yes\"));\n System.out.flush();\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n String strS,strP;\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n strS = in.readLine();\n strP = in.readLine();\n StringBuffer sb = new StringBuffer(strS);\n sb.append(strS);\n System.out.println((sb.indexOf(strP)==-1 ? \"No\" : \"Yes\"));\n System.out.flush();\n }",
"main",
"{\n String strS,strP;\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n strS = in.readLine();\n strP = in.readLine();\n StringBuffer sb = new StringBuffer(strS);\n sb.append(strS);\n System.out.println((sb.indexOf(strP)==-1 ? \"No\" : \"Yes\"));\n System.out.flush();\n }",
"String strS",
"strS",
"strP;",
"strP",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"strS = in.readLine()",
"strS",
"in.readLine()",
"in.readLine",
"in",
"strP = in.readLine()",
"strP",
"in.readLine()",
"in.readLine",
"in",
"StringBuffer sb = new StringBuffer(strS);",
"sb",
"new StringBuffer(strS)",
"sb.append(strS)",
"sb.append",
"sb",
"strS",
"System.out.println((sb.indexOf(strP)==-1 ? \"No\" : \"Yes\"))",
"System.out.println",
"System.out",
"System",
"System.out",
"(sb.indexOf(strP)==-1 ? \"No\" : \"Yes\")",
"sb.indexOf(strP)==-1",
"sb.indexOf(strP)",
"sb.indexOf",
"sb",
"strP",
"-1",
"1",
"\"No\"",
"\"Yes\"",
"System.out.flush()",
"System.out.flush",
"System.out",
"System",
"System.out",
"String[] args",
"args"
]
| import java.io.*;
import java.util.Arrays;
class Main{
public static void main(String[] args) throws IOException {
String strS,strP;
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
strS = in.readLine();
strP = in.readLine();
StringBuffer sb = new StringBuffer(strS);
sb.append(strS);
System.out.println((sb.indexOf(strP)==-1 ? "No" : "Yes"));
System.out.flush();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
13,
13,
13,
30,
0,
13,
17,
3,
30,
0,
13,
4,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
2,
13,
18,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
14,
2,
18,
13,
13,
18,
13,
17,
30,
11,
1,
0,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
3,
14,
2,
13,
18,
13,
13,
30,
29,
17,
29,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
18,
13,
13,
0,
18,
13,
2,
18,
13,
13,
17,
13,
29,
13,
23,
13,
12,
13,
30,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
208,
5
],
[
208,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
29,
39
],
[
39,
40
],
[
40,
41
],
[
29,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
45,
48
],
[
44,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
6,
63
],
[
63,
64
],
[
208,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
68,
82
],
[
82,
83
],
[
83,
84
],
[
68,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
99,
109
],
[
109,
110
],
[
110,
111
],
[
99,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
121,
123
],
[
114,
124
],
[
124,
125
],
[
98,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
126,
132
],
[
132,
133
],
[
133,
134
],
[
67,
135
],
[
135,
136
],
[
65,
137
],
[
137,
138
],
[
65,
139
],
[
139,
140
],
[
208,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
143,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
156,
158
],
[
149,
159
],
[
159,
160
],
[
160,
161
],
[
149,
162
],
[
163,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
167,
169
],
[
164,
170
],
[
170,
171
],
[
170,
172
],
[
143,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
173,
181
],
[
143,
182
],
[
182,
183
],
[
141,
184
],
[
184,
185
],
[
208,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
192,
197
],
[
189,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
199,
204
],
[
186,
205
],
[
205,
206
],
[
0,
207
],
[
207,
208
],
[
207,
209
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] p = sc.nextLine().toCharArray();\n\n\t\tboolean flag = false;\n\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}\n\n\t\tPrint(flag);\n\n\t}\n\n\tstatic boolean seretch(char[] s, char[] p) {\n\t\tfor (int si = 0; si + p.length <= s.length; si++) {\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}\n\n\tstatic char[] MoveCharRing(char[] c) {\n\t\tchar work = c[0];\n\t\tfor (int i = 1; i < c.length; i++) {\n\t\t\tc[i - 1] = c[i];\n\t\t}\n\t\tc[c.length - 1] = work;\n\t\treturn c;\n\t}\n\n\tstatic void Print(boolean f) {\n\t\tif (f) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] p = sc.nextLine().toCharArray();\n\n\t\tboolean flag = false;\n\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}\n\n\t\tPrint(flag);\n\n\t}\n\n\tstatic boolean seretch(char[] s, char[] p) {\n\t\tfor (int si = 0; si + p.length <= s.length; si++) {\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}\n\n\tstatic char[] MoveCharRing(char[] c) {\n\t\tchar work = c[0];\n\t\tfor (int i = 1; i < c.length; i++) {\n\t\t\tc[i - 1] = c[i];\n\t\t}\n\t\tc[c.length - 1] = work;\n\t\treturn c;\n\t}\n\n\tstatic void Print(boolean f) {\n\t\tif (f) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] p = sc.nextLine().toCharArray();\n\n\t\tboolean flag = false;\n\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}\n\n\t\tPrint(flag);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] p = sc.nextLine().toCharArray();\n\n\t\tboolean flag = false;\n\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}\n\n\t\tPrint(flag);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"char[] s = sc.nextLine().toCharArray();",
"s",
"sc.nextLine().toCharArray()",
"sc.nextLine().toCharArray",
"sc.nextLine()",
"sc.nextLine",
"sc",
"char[] p = sc.nextLine().toCharArray();",
"p",
"sc.nextLine().toCharArray()",
"sc.nextLine().toCharArray",
"sc.nextLine()",
"sc.nextLine",
"sc",
"boolean flag = false;",
"flag",
"false",
"for (int i = 0; i < s.length; i++) {\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length",
"i",
"s.length",
"s",
"s.length",
"i++",
"i++",
"i",
"{\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}",
"if (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}",
"seretch(s, p)",
"seretch",
"s",
"p",
"{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}",
"flag = true",
"flag",
"true",
"break;",
"{\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}",
"s = MoveCharRing(s)",
"s",
"MoveCharRing(s)",
"MoveCharRing",
"s",
"Print(flag)",
"Print",
"flag",
"String[] args",
"args",
"static boolean seretch(char[] s, char[] p) {\n\t\tfor (int si = 0; si + p.length <= s.length; si++) {\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}",
"seretch",
"{\n\t\tfor (int si = 0; si + p.length <= s.length; si++) {\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}",
"for (int si = 0; si + p.length <= s.length; si++) {\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int si = 0;",
"int si = 0;",
"si",
"0",
"si + p.length <= s.length",
"si + p.length",
"si",
"p.length",
"p",
"p.length",
"s.length",
"s",
"s.length",
"si++",
"si++",
"si",
"{\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i = 0;",
"i",
"0",
"if (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}",
"s[si] == p[0]",
"s[si]",
"s",
"si",
"p[0]",
"p",
"0",
"{\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}",
"for (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"i = 1;",
"i = 1",
"i",
"1",
"i < p.length",
"i",
"p.length",
"p",
"p.length",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"s[si + i] != p[i]",
"s[si + i]",
"s",
"si + i",
"si",
"i",
"p[i]",
"p",
"i",
"{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"break;",
"if (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}",
"i == p.length",
"i",
"p.length",
"p",
"p.length",
"{\n\t\t\t\t\treturn true;\n\t\t\t\t}",
"return true;",
"true",
"return false;",
"false",
"char[] s",
"s",
"char[] p",
"p",
"static char[] MoveCharRing(char[] c) {\n\t\tchar work = c[0];\n\t\tfor (int i = 1; i < c.length; i++) {\n\t\t\tc[i - 1] = c[i];\n\t\t}\n\t\tc[c.length - 1] = work;\n\t\treturn c;\n\t}",
"MoveCharRing",
"{\n\t\tchar work = c[0];\n\t\tfor (int i = 1; i < c.length; i++) {\n\t\t\tc[i - 1] = c[i];\n\t\t}\n\t\tc[c.length - 1] = work;\n\t\treturn c;\n\t}",
"char work = c[0];",
"work",
"c[0]",
"c",
"0",
"for (int i = 1; i < c.length; i++) {\n\t\t\tc[i - 1] = c[i];\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < c.length",
"i",
"c.length",
"c",
"c.length",
"i++",
"i++",
"i",
"{\n\t\t\tc[i - 1] = c[i];\n\t\t}",
"{\n\t\t\tc[i - 1] = c[i];\n\t\t}",
"c[i - 1] = c[i]",
"c[i - 1]",
"c",
"i - 1",
"i",
"1",
"c[i]",
"c",
"i",
"c[c.length - 1] = work",
"c[c.length - 1]",
"c",
"c.length - 1",
"c.length",
"c",
"c.length",
"1",
"work",
"return c;",
"c",
"char[] c",
"c",
"static void Print(boolean f) {\n\t\tif (f) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Print",
"{\n\t\tif (f) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"if (f) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"f",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"boolean f",
"f",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] p = sc.nextLine().toCharArray();\n\n\t\tboolean flag = false;\n\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}\n\n\t\tPrint(flag);\n\n\t}\n\n\tstatic boolean seretch(char[] s, char[] p) {\n\t\tfor (int si = 0; si + p.length <= s.length; si++) {\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}\n\n\tstatic char[] MoveCharRing(char[] c) {\n\t\tchar work = c[0];\n\t\tfor (int i = 1; i < c.length; i++) {\n\t\t\tc[i - 1] = c[i];\n\t\t}\n\t\tc[c.length - 1] = work;\n\t\treturn c;\n\t}\n\n\tstatic void Print(boolean f) {\n\t\tif (f) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] p = sc.nextLine().toCharArray();\n\n\t\tboolean flag = false;\n\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (seretch(s, p)) {\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\ts = MoveCharRing(s);\n\t\t\t}\n\t\t}\n\n\t\tPrint(flag);\n\n\t}\n\n\tstatic boolean seretch(char[] s, char[] p) {\n\t\tfor (int si = 0; si + p.length <= s.length; si++) {\n\t\t\tint i = 0;\n\t\t\tif (s[si] == p[0]) {\n\t\t\t\tfor (i = 1; i < p.length; i++) {\n\t\t\t\t\tif (s[si + i] != p[i]) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// System.out.println(i);\n\t\t\t\tif (i == p.length) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\n\t}\n\n\tstatic char[] MoveCharRing(char[] c) {\n\t\tchar work = c[0];\n\t\tfor (int i = 1; i < c.length; i++) {\n\t\t\tc[i - 1] = c[i];\n\t\t}\n\t\tc[c.length - 1] = work;\n\t\treturn c;\n\t}\n\n\tstatic void Print(boolean f) {\n\t\tif (f) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] s = sc.nextLine().toCharArray();
char[] p = sc.nextLine().toCharArray();
boolean flag = false;
for (int i = 0; i < s.length; i++) {
if (seretch(s, p)) {
flag = true;
break;
} else {
s = MoveCharRing(s);
}
}
Print(flag);
}
static boolean seretch(char[] s, char[] p) {
for (int si = 0; si + p.length <= s.length; si++) {
int i = 0;
if (s[si] == p[0]) {
for (i = 1; i < p.length; i++) {
if (s[si + i] != p[i]) {
break;
}
}
// System.out.println(i);
if (i == p.length) {
return true;
}
}
}
return false;
}
static char[] MoveCharRing(char[] c) {
char work = c[0];
for (int i = 1; i < c.length; i++) {
c[i - 1] = c[i];
}
c[c.length - 1] = work;
return c;
}
static void Print(boolean f) {
if (f) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
51,
5
],
[
51,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
28,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
8,
45
],
[
45,
46
],
[
46,
47
],
[
6,
48
],
[
48,
49
],
[
0,
50
],
[
50,
51
],
[
50,
52
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n s = s.concat(s);\n String p = sc.next();\n if(s.contains(p))System.out.println(\"Yes\");\n else System.out.println(\"No\");\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n s = s.concat(s);\n String p = sc.next();\n if(s.contains(p))System.out.println(\"Yes\");\n else System.out.println(\"No\");\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n s = s.concat(s);\n String p = sc.next();\n if(s.contains(p))System.out.println(\"Yes\");\n else System.out.println(\"No\");\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n s = s.concat(s);\n String p = sc.next();\n if(s.contains(p))System.out.println(\"Yes\");\n else System.out.println(\"No\");\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"s = s.concat(s)",
"s",
"s.concat(s)",
"s.concat",
"s",
"s",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"if(s.contains(p))System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"s.contains(p)",
"s.contains",
"s",
"p",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n s = s.concat(s);\n String p = sc.next();\n if(s.contains(p))System.out.println(\"Yes\");\n else System.out.println(\"No\");\n sc.close();\n }\n}",
"public class Main {\n\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n s = s.concat(s);\n String p = sc.next();\n if(s.contains(p))System.out.println(\"Yes\");\n else System.out.println(\"No\");\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
s = s.concat(s);
String p = sc.next();
if(s.contains(p))System.out.println("Yes");
else System.out.println("No");
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
56,
11
],
[
56,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
14,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
39,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
33,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
12,
53
],
[
53,
54
],
[
0,
55
],
[
55,
56
],
[
55,
57
]
]
| [
"import java.io.InputStreamReader;\nimport java.io.BufferedReader;\nimport java.io.IOException;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tString ring = s + s;\n\t\tif (ring.indexOf(p) == -1) System.out.println(\"No\");\n\t\telse System.out.println(\"Yes\");\n\t}\n}",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tString ring = s + s;\n\t\tif (ring.indexOf(p) == -1) System.out.println(\"No\");\n\t\telse System.out.println(\"Yes\");\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tString ring = s + s;\n\t\tif (ring.indexOf(p) == -1) System.out.println(\"No\");\n\t\telse System.out.println(\"Yes\");\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tString ring = s + s;\n\t\tif (ring.indexOf(p) == -1) System.out.println(\"No\");\n\t\telse System.out.println(\"Yes\");\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"String p = br.readLine();",
"p",
"br.readLine()",
"br.readLine",
"br",
"String ring = s + s;",
"ring",
"s + s",
"s",
"s",
"if (ring.indexOf(p) == -1) System.out.println(\"No\");\n\t\telse System.out.println(\"Yes\");",
"ring.indexOf(p) == -1",
"ring.indexOf(p)",
"ring.indexOf",
"ring",
"p",
"-1",
"1",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tString ring = s + s;\n\t\tif (ring.indexOf(p) == -1) System.out.println(\"No\");\n\t\telse System.out.println(\"Yes\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = br.readLine();\n\t\tString p = br.readLine();\n\t\tString ring = s + s;\n\t\tif (ring.indexOf(p) == -1) System.out.println(\"No\");\n\t\telse System.out.println(\"Yes\");\n\t}\n}",
"Main"
]
| import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
String p = br.readLine();
String ring = s + s;
if (ring.indexOf(p) == -1) System.out.println("No");
else System.out.println("Yes");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
0,
13,
2,
13,
13,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
61,
11
],
[
61,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
14,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
37,
42
],
[
42,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
36,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
12,
58
],
[
58,
59
],
[
0,
60
],
[
60,
61
],
[
60,
62
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n word = word + word;\n String key = br.readLine();\n boolean result = false;\n\n if(word.indexOf(key) != -1){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n word = word + word;\n String key = br.readLine();\n boolean result = false;\n\n if(word.indexOf(key) != -1){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n word = word + word;\n String key = br.readLine();\n boolean result = false;\n\n if(word.indexOf(key) != -1){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n }",
"main",
"{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n word = word + word;\n String key = br.readLine();\n boolean result = false;\n\n if(word.indexOf(key) != -1){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String word = br.readLine();",
"word",
"br.readLine()",
"br.readLine",
"br",
"word = word + word",
"word",
"word + word",
"word",
"word",
"String key = br.readLine();",
"key",
"br.readLine()",
"br.readLine",
"br",
"boolean result = false;",
"result",
"false",
"if(word.indexOf(key) != -1){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }",
"word.indexOf(key) != -1",
"word.indexOf(key)",
"word.indexOf",
"word",
"key",
"-1",
"1",
"{\n \tSystem.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \tSystem.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n word = word + word;\n String key = br.readLine();\n boolean result = false;\n\n if(word.indexOf(key) != -1){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n word = word + word;\n String key = br.readLine();\n boolean result = false;\n\n if(word.indexOf(key) != -1){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String word = br.readLine();
word = word + word;
String key = br.readLine();
boolean result = false;
if(word.indexOf(key) != -1){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
14,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
33,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
12,
52
],
[
52,
53
]
]
| [
"/* package whatever; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString ring = s + s;\n\t\t\n\t\tif (ring.contains(p)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString ring = s + s;\n\t\t\n\t\tif (ring.contains(p)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString ring = s + s;\n\t\t\n\t\tif (ring.contains(p)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString p = scan.next();\n\t\t\n\t\tString ring = s + s;\n\t\t\n\t\tif (ring.contains(p)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String p = scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"String ring = s + s;",
"ring",
"s + s",
"s",
"s",
"if (ring.contains(p)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}",
"ring.contains(p)",
"ring.contains",
"ring",
"p",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\t\t\t\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner scan = new Scanner(System.in);
String s = scan.next();
String p = scan.next();
String ring = s + s;
if (ring.contains(p)) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
0,
13,
4,
18,
13,
14,
2,
2,
2,
13,
17,
2,
4,
18,
13,
17,
2,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
14,
2,
2,
2,
13,
17,
2,
4,
18,
13,
17,
2,
4,
18,
13,
4,
18,
13,
30,
0,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
4,
18,
18,
13,
13,
8,
2,
4,
18,
13,
13,
40,
17,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
91,
5
],
[
91,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
23,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
27,
31
],
[
23,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
32,
36
],
[
21,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
49,
53
],
[
45,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
43,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
68,
72
],
[
61,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
79,
84
],
[
84,
85
],
[
78,
86
],
[
78,
87
],
[
6,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
]
| [
"import java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n String s, p;\n s = input.readLine();\n if (s != null && s.length() > 0 && s.length() <= 100) {\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n String s, p;\n s = input.readLine();\n if (s != null && s.length() > 0 && s.length() <= 100) {\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n String s, p;\n s = input.readLine();\n if (s != null && s.length() > 0 && s.length() <= 100) {\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }\n }",
"main",
"{\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n String s, p;\n s = input.readLine();\n if (s != null && s.length() > 0 && s.length() <= 100) {\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }\n }",
"BufferedReader input = new BufferedReader(new InputStreamReader(System.in));",
"input",
"new BufferedReader(new InputStreamReader(System.in))",
"String s",
"s",
"p;",
"p",
"s = input.readLine()",
"s",
"input.readLine()",
"input.readLine",
"input",
"if (s != null && s.length() > 0 && s.length() <= 100) {\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }",
"s != null && s.length() > 0 && s.length() <= 100",
"s != null && s.length() > 0 && s.length() <= 100",
"s != null",
"s",
"null",
"s.length() > 0",
"s.length()",
"s.length",
"s",
"0",
"s.length() <= 100",
"s.length()",
"s.length",
"s",
"100",
"{\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }",
"p = input.readLine()",
"p",
"input.readLine()",
"input.readLine",
"input",
"if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }",
"p != null && p.length() > 0 && p.length() <= s.length()",
"p != null && p.length() > 0 && p.length() <= s.length()",
"p != null",
"p",
"null",
"p.length() > 0",
"p.length()",
"p.length",
"p",
"0",
"p.length() <= s.length()",
"p.length()",
"p.length",
"p",
"s.length()",
"s.length",
"s",
"{\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }",
"s += s.substring(0, s.length() - 1)",
"s",
"s.substring(0, s.length() - 1)",
"s.substring",
"s",
"0",
"s.length() - 1",
"s.length()",
"s.length",
"s",
"1",
"System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n )",
"System.out.println",
"System.out",
"System",
"System.out",
"s.indexOf(p) == -1? \"No\": \"Yes\"",
"s.indexOf(p) == -1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"\"No\"",
"\"Yes\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n String s, p;\n s = input.readLine();\n if (s != null && s.length() > 0 && s.length() <= 100) {\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n String s, p;\n s = input.readLine();\n if (s != null && s.length() > 0 && s.length() <= 100) {\n p = input.readLine();\n if (p != null && p.length() > 0 && p.length() <= s.length()) {\n s += s.substring(0, s.length() - 1);\n System.out.println(\n s.indexOf(p) == -1? \"No\": \"Yes\"\n );\n }\n }\n }\n}",
"Main"
]
| import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
String s, p;
s = input.readLine();
if (s != null && s.length() > 0 && s.length() <= 100) {
p = input.readLine();
if (p != null && p.length() > 0 && p.length() <= s.length()) {
s += s.substring(0, s.length() - 1);
System.out.println(
s.indexOf(p) == -1? "No": "Yes"
);
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
17,
0,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
2,
13,
17,
40,
13,
14,
2,
13,
4,
18,
13,
0,
13,
17,
14,
4,
18,
13,
13,
30,
0,
13,
17,
3,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
10,
27
],
[
27,
28
],
[
27,
29
],
[
10,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
30,
40
],
[
40,
41
],
[
41,
42
],
[
30,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
44,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
51,
61
],
[
61,
62
],
[
62,
63
],
[
51,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
75,
76
],
[
65,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
83,
85
],
[
44,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
86,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
10,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
6,
110
],
[
110,
111
]
]
| [
"import java.util.Scanner;\nclass Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner (System.in)){\n\t\t\tString clock = sc.nextLine();\n\t\t\tString target = sc.nextLine();\n\t\t\tint pointer = 0;\n\t\t\tboolean result = false;\n\n\t\t\tfor (int i=0; i<clock.length(); i++) {\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result) System.out.println(\"Yes\");\n\t\t\telse System.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner (System.in)){\n\t\t\tString clock = sc.nextLine();\n\t\t\tString target = sc.nextLine();\n\t\t\tint pointer = 0;\n\t\t\tboolean result = false;\n\n\t\t\tfor (int i=0; i<clock.length(); i++) {\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result) System.out.println(\"Yes\");\n\t\t\telse System.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner (System.in)){\n\t\t\tString clock = sc.nextLine();\n\t\t\tString target = sc.nextLine();\n\t\t\tint pointer = 0;\n\t\t\tboolean result = false;\n\n\t\t\tfor (int i=0; i<clock.length(); i++) {\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result) System.out.println(\"Yes\");\n\t\t\telse System.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\ttry (Scanner sc = new Scanner (System.in)){\n\t\t\tString clock = sc.nextLine();\n\t\t\tString target = sc.nextLine();\n\t\t\tint pointer = 0;\n\t\t\tboolean result = false;\n\n\t\t\tfor (int i=0; i<clock.length(); i++) {\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result) System.out.println(\"Yes\");\n\t\t\telse System.out.println(\"No\");\n\t\t}\n\t}",
"try (Scanner sc = new Scanner (System.in)){\n\t\t\tString clock = sc.nextLine();\n\t\t\tString target = sc.nextLine();\n\t\t\tint pointer = 0;\n\t\t\tboolean result = false;\n\n\t\t\tfor (int i=0; i<clock.length(); i++) {\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result) System.out.println(\"Yes\");\n\t\t\telse System.out.println(\"No\");\n\t\t}",
"{\n\t\t\tString clock = sc.nextLine();\n\t\t\tString target = sc.nextLine();\n\t\t\tint pointer = 0;\n\t\t\tboolean result = false;\n\n\t\t\tfor (int i=0; i<clock.length(); i++) {\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result) System.out.println(\"Yes\");\n\t\t\telse System.out.println(\"No\");\n\t\t}",
"Scanner sc = new Scanner (System.in)",
"Scanner sc = new Scanner (System.in)",
"new Scanner (System.in)",
"String clock = sc.nextLine();",
"clock",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String target = sc.nextLine();",
"target",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int pointer = 0;",
"pointer",
"0",
"boolean result = false;",
"result",
"false",
"for (int i=0; i<clock.length(); i++) {\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<clock.length()",
"i",
"clock.length()",
"clock.length",
"clock",
"i++",
"i++",
"i",
"{\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tString s = \"\";\n\t\t\t\tpointer = i;\n\t\t\t\tfor (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}\n\t\t\t//\tSystem.out.println(s);\n\t\t\t\tif (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"String s = \"\";",
"s",
"\"\"",
"pointer = i",
"pointer",
"i",
"for (int j=0; j<target.length(); j++) {\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<target.length()",
"j",
"target.length()",
"target.length",
"target",
"j++",
"j++",
"j",
"{\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}",
"{\n\t\t\t\t\ts += clock.substring(pointer,pointer+1);\n\t\t\t\t\tpointer++;\n\t\t\t\t\tif (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る\n\t\t\t\t}",
"s += clock.substring(pointer,pointer+1)",
"s",
"clock.substring(pointer,pointer+1)",
"clock.substring",
"clock",
"pointer",
"pointer+1",
"pointer",
"1",
"pointer++",
"pointer",
"if (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る",
"pointer==clock.length()",
"pointer",
"clock.length()",
"clock.length",
"clock",
"pointer = 0",
"pointer",
"0",
"if (s.equals(target)) { //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"s.equals(target)",
"s.equals",
"s",
"target",
"{ //作成したものがターゲットと一致したら\n\t\t\t\t\tresult = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"result = true",
"result",
"true",
"break;",
"if (result) System.out.println(\"Yes\");\n\t\t\telse System.out.println(\"No\");",
"result",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner (System.in)){
String clock = sc.nextLine();
String target = sc.nextLine();
int pointer = 0;
boolean result = false;
for (int i=0; i<clock.length(); i++) {
String s = "";
pointer = i;
for (int j=0; j<target.length(); j++) {
s += clock.substring(pointer,pointer+1);
pointer++;
if (pointer==clock.length()) pointer = 0; //最後になったら最初に戻る
}
// System.out.println(s);
if (s.equals(target)) { //作成したものがターゲットと一致したら
result = true;
break;
}
}
if (result) System.out.println("Yes");
else System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
82,
5
],
[
82,
6
],
[
6,
7
],
[
6,
8
],
[
82,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
82,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
82,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
82,
24
],
[
24,
25
],
[
24,
26
],
[
82,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
30,
40
],
[
40,
41
],
[
41,
42
],
[
30,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
44,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
56,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
29,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
27,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tprivate static String s=sc.nextLine();\n\tprivate static String p=sc.nextLine();\n\tprivate static String str=s+s;\n\tprivate static boolean possible=false;\n\tpublic static void main(String[] args){\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}\n\t\tif(possible) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tprivate static String s=sc.nextLine();\n\tprivate static String p=sc.nextLine();\n\tprivate static String str=s+s;\n\tprivate static boolean possible=false;\n\tpublic static void main(String[] args){\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}\n\t\tif(possible) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"Main",
"private static Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"private static String s=sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"private static String p=sc.nextLine();",
"p",
"sc.nextLine()",
"sc.nextLine",
"sc",
"private static String str=s+s;",
"str",
"s+s",
"s",
"s",
"private static boolean possible=false;",
"possible",
"false",
"public static void main(String[] args){\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}\n\t\tif(possible) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"main",
"{\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}\n\t\tif(possible) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"for(int i=0;i<s.length();i++){\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}",
"String word=str.substring(i,i+p.length());",
"word",
"str.substring(i,i+p.length())",
"str.substring",
"str",
"i",
"i+p.length()",
"i",
"p.length()",
"p.length",
"p",
"if(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}",
"word.equals(p)",
"word.equals",
"word",
"p",
"{\n\t\t\t\tpossible=true;\n\t\t\t}",
"possible=true",
"possible",
"true",
"if(possible) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"possible",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tprivate static String s=sc.nextLine();\n\tprivate static String p=sc.nextLine();\n\tprivate static String str=s+s;\n\tprivate static boolean possible=false;\n\tpublic static void main(String[] args){\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}\n\t\tif(possible) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"public class Main {\n\tprivate static Scanner sc=new Scanner(System.in);\n\tprivate static String s=sc.nextLine();\n\tprivate static String p=sc.nextLine();\n\tprivate static String str=s+s;\n\tprivate static boolean possible=false;\n\tpublic static void main(String[] args){\n\t\tfor(int i=0;i<s.length();i++){\n\t\t\tString word=str.substring(i,i+p.length());\n\t\t\tif(word.equals(p)){\n\t\t\t\tpossible=true;\n\t\t\t}\n\t\t}\n\t\tif(possible) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
private static Scanner sc=new Scanner(System.in);
private static String s=sc.nextLine();
private static String p=sc.nextLine();
private static String str=s+s;
private static boolean possible=false;
public static void main(String[] args){
for(int i=0;i<s.length();i++){
String word=str.substring(i,i+p.length());
if(word.equals(p)){
possible=true;
}
}
if(possible) System.out.println("Yes");
else System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
4,
18,
13,
13,
13,
17,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
28
],
[
24,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
30,
40
],
[
40,
41
],
[
41,
42
],
[
30,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
46,
50
],
[
46,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
45,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
55,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
6,
69
],
[
69,
70
],
[
0,
71
],
[
71,
72
],
[
71,
73
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n String p = scan.nextLine();\n\n String text = String.join(\"\", s, s);\n\n for (int i = 0; i < text.length(); i++) {\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }\n \n System.out.println(\"No\");\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n String p = scan.nextLine();\n\n String text = String.join(\"\", s, s);\n\n for (int i = 0; i < text.length(); i++) {\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }\n \n System.out.println(\"No\");\n }\n\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n String p = scan.nextLine();\n\n String text = String.join(\"\", s, s);\n\n for (int i = 0; i < text.length(); i++) {\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }\n \n System.out.println(\"No\");\n }",
"main",
"{\n\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n String p = scan.nextLine();\n\n String text = String.join(\"\", s, s);\n\n for (int i = 0; i < text.length(); i++) {\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }\n \n System.out.println(\"No\");\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.nextLine();",
"s",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String p = scan.nextLine();",
"p",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String text = String.join(\"\", s, s);",
"text",
"String.join(\"\", s, s)",
"String.join",
"String",
"\"\"",
"s",
"s",
"for (int i = 0; i < text.length(); i++) {\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < text.length()",
"i",
"text.length()",
"text.length",
"text",
"i++",
"i++",
"i",
"{\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }",
"text.regionMatches(i, p, 0, p.length())",
"text.regionMatches",
"text",
"i",
"p",
"0",
"p.length()",
"p.length",
"p",
"{\n System.out.println(\"Yes\");\n return;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n String p = scan.nextLine();\n\n String text = String.join(\"\", s, s);\n\n for (int i = 0; i < text.length(); i++) {\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }\n \n System.out.println(\"No\");\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n String s = scan.nextLine();\n String p = scan.nextLine();\n\n String text = String.join(\"\", s, s);\n\n for (int i = 0; i < text.length(); i++) {\n if(text.regionMatches(i, p, 0, p.length())) {\n System.out.println(\"Yes\");\n return;\n }\n }\n \n System.out.println(\"No\");\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.nextLine();
String p = scan.nextLine();
String text = String.join("", s, s);
for (int i = 0; i < text.length(); i++) {
if(text.regionMatches(i, p, 0, p.length())) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
2,
13,
13,
13,
4,
18,
13,
13,
30,
3,
14,
2,
13,
2,
13,
17,
0,
13,
17,
14,
13,
3,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
101,
5
],
[
101,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
61,
75
],
[
75,
76
],
[
60,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
77,
83
],
[
83,
84
],
[
83,
85
],
[
47,
86
],
[
86,
87
],
[
86,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
94,
97
],
[
6,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString s = sc.nextLine();\n\t\tString p = sc.nextLine();\n\n\t\tint sLen = s.length();\n\t\tint pLen = p.length();\n\t\tboolean ok = false;\n\t\tfor (int i = 0; i < sLen; i++) {\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}\n\n\t\tSystem.out.println(ok ? \"Yes\" : \"No\");\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString s = sc.nextLine();\n\t\tString p = sc.nextLine();\n\n\t\tint sLen = s.length();\n\t\tint pLen = p.length();\n\t\tboolean ok = false;\n\t\tfor (int i = 0; i < sLen; i++) {\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}\n\n\t\tSystem.out.println(ok ? \"Yes\" : \"No\");\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString s = sc.nextLine();\n\t\tString p = sc.nextLine();\n\n\t\tint sLen = s.length();\n\t\tint pLen = p.length();\n\t\tboolean ok = false;\n\t\tfor (int i = 0; i < sLen; i++) {\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}\n\n\t\tSystem.out.println(ok ? \"Yes\" : \"No\");\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString s = sc.nextLine();\n\t\tString p = sc.nextLine();\n\n\t\tint sLen = s.length();\n\t\tint pLen = p.length();\n\t\tboolean ok = false;\n\t\tfor (int i = 0; i < sLen; i++) {\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}\n\n\t\tSystem.out.println(ok ? \"Yes\" : \"No\");\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String p = sc.nextLine();",
"p",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int sLen = s.length();",
"sLen",
"s.length()",
"s.length",
"s",
"int pLen = p.length();",
"pLen",
"p.length()",
"p.length",
"p",
"boolean ok = false;",
"ok",
"false",
"for (int i = 0; i < sLen; i++) {\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sLen",
"i",
"sLen",
"i++",
"i++",
"i",
"{\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}",
"{\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}",
"for (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < pLen",
"j",
"pLen",
"j++",
"j++",
"j",
"{\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}",
"{\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}",
"if(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"s.charAt((i + j)%sLen) != p.charAt(j)",
"s.charAt((i + j)%sLen)",
"s.charAt",
"s",
"(i + j)%sLen",
"(i + j)",
"i",
"j",
"sLen",
"p.charAt(j)",
"p.charAt",
"p",
"j",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if(j == pLen-1) ok = true;",
"j == pLen-1",
"j",
"pLen-1",
"pLen",
"1",
"ok = true",
"ok",
"true",
"if(ok) break;",
"ok",
"break;",
"System.out.println(ok ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"ok ? \"Yes\" : \"No\"",
"ok",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString s = sc.nextLine();\n\t\tString p = sc.nextLine();\n\n\t\tint sLen = s.length();\n\t\tint pLen = p.length();\n\t\tboolean ok = false;\n\t\tfor (int i = 0; i < sLen; i++) {\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}\n\n\t\tSystem.out.println(ok ? \"Yes\" : \"No\");\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString s = sc.nextLine();\n\t\tString p = sc.nextLine();\n\n\t\tint sLen = s.length();\n\t\tint pLen = p.length();\n\t\tboolean ok = false;\n\t\tfor (int i = 0; i < sLen; i++) {\n\n\t\t\tfor (int j = 0; j < pLen; j++) {\n\n\t\t\t\tif(s.charAt((i + j)%sLen) != p.charAt(j)) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(j == pLen-1) ok = true;\n\n\t\t\t}\n\n\t\t\tif(ok) break;\n\n\t\t}\n\n\t\tSystem.out.println(ok ? \"Yes\" : \"No\");\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
String p = sc.nextLine();
int sLen = s.length();
int pLen = p.length();
boolean ok = false;
for (int i = 0; i < sLen; i++) {
for (int j = 0; j < pLen; j++) {
if(s.charAt((i + j)%sLen) != p.charAt(j)) {
break;
}
if(j == pLen-1) ok = true;
}
if(ok) break;
}
System.out.println(ok ? "Yes" : "No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
49,
5
],
[
49,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
27,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
27,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
6,
46
],
[
46,
47
],
[
0,
48
],
[
48,
49
],
[
48,
50
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tString inputData = scn.nextLine();\n\t\tString searchData = scn.nextLine();\n\t\tinputData =inputData + inputData;\n\t\tif (inputData.contains(searchData)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tString inputData = scn.nextLine();\n\t\tString searchData = scn.nextLine();\n\t\tinputData =inputData + inputData;\n\t\tif (inputData.contains(searchData)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tString inputData = scn.nextLine();\n\t\tString searchData = scn.nextLine();\n\t\tinputData =inputData + inputData;\n\t\tif (inputData.contains(searchData)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scn = new Scanner(System.in);\n\t\tString inputData = scn.nextLine();\n\t\tString searchData = scn.nextLine();\n\t\tinputData =inputData + inputData;\n\t\tif (inputData.contains(searchData)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"String inputData = scn.nextLine();",
"inputData",
"scn.nextLine()",
"scn.nextLine",
"scn",
"String searchData = scn.nextLine();",
"searchData",
"scn.nextLine()",
"scn.nextLine",
"scn",
"inputData =inputData + inputData",
"inputData",
"inputData + inputData",
"inputData",
"inputData",
"if (inputData.contains(searchData)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"inputData.contains(searchData)",
"inputData.contains",
"inputData",
"searchData",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tString inputData = scn.nextLine();\n\t\tString searchData = scn.nextLine();\n\t\tinputData =inputData + inputData;\n\t\tif (inputData.contains(searchData)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tString inputData = scn.nextLine();\n\t\tString searchData = scn.nextLine();\n\t\tinputData =inputData + inputData;\n\t\tif (inputData.contains(searchData)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
String inputData = scn.nextLine();
String searchData = scn.nextLine();
inputData =inputData + inputData;
if (inputData.contains(searchData)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
4,
18,
13,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
30,
0,
13,
2,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
68,
5
],
[
68,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
25,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
46,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
46,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
6,
65
],
[
65,
66
],
[
0,
67
],
[
67,
68
],
[
67,
69
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n\n String p = sc.next();\n sc.close();\n if(s.length()<p.length()){\n System.out.println(\"No\");\n }else{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n\n String p = sc.next();\n sc.close();\n if(s.length()<p.length()){\n System.out.println(\"No\");\n }else{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n\n String p = sc.next();\n sc.close();\n if(s.length()<p.length()){\n System.out.println(\"No\");\n }else{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n\n String p = sc.next();\n sc.close();\n if(s.length()<p.length()){\n System.out.println(\"No\");\n }else{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"sc.close()",
"sc.close",
"sc",
"if(s.length()<p.length()){\n System.out.println(\"No\");\n }else{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"s.length()<p.length()",
"s.length()",
"s.length",
"s",
"p.length()",
"p.length",
"p",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"s = s + s",
"s",
"s + s",
"s",
"s",
"if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"s.contains(p)",
"s.contains",
"s",
"p",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n\n String p = sc.next();\n sc.close();\n if(s.length()<p.length()){\n System.out.println(\"No\");\n }else{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n\n String p = sc.next();\n sc.close();\n if(s.length()<p.length()){\n System.out.println(\"No\");\n }else{\n s = s + s;\n if(s.contains(p)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n }\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
sc.close();
if(s.length()<p.length()){
System.out.println("No");
}else{
s = s + s;
if(s.contains(p)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
4,
18,
13,
13,
17,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
15,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
40,
45
],
[
40,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
6,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder stb = new StringBuilder();\n\t\tstb.append(sc.next());\n\t\tstb.append(stb);\n\t\tString str= stb.toString();\n\t\tString x = sc.next();\n\t\tSystem.out.println(str.contains(x) ? \"Yes\" : \"No\");\n\t\tsc.close();\n\t}\n\t\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder stb = new StringBuilder();\n\t\tstb.append(sc.next());\n\t\tstb.append(stb);\n\t\tString str= stb.toString();\n\t\tString x = sc.next();\n\t\tSystem.out.println(str.contains(x) ? \"Yes\" : \"No\");\n\t\tsc.close();\n\t}\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder stb = new StringBuilder();\n\t\tstb.append(sc.next());\n\t\tstb.append(stb);\n\t\tString str= stb.toString();\n\t\tString x = sc.next();\n\t\tSystem.out.println(str.contains(x) ? \"Yes\" : \"No\");\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder stb = new StringBuilder();\n\t\tstb.append(sc.next());\n\t\tstb.append(stb);\n\t\tString str= stb.toString();\n\t\tString x = sc.next();\n\t\tSystem.out.println(str.contains(x) ? \"Yes\" : \"No\");\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"StringBuilder stb = new StringBuilder();",
"stb",
"new StringBuilder()",
"stb.append(sc.next())",
"stb.append",
"stb",
"sc.next()",
"sc.next",
"sc",
"stb.append(stb)",
"stb.append",
"stb",
"stb",
"String str= stb.toString();",
"str",
"stb.toString()",
"stb.toString",
"stb",
"String x = sc.next();",
"x",
"sc.next()",
"sc.next",
"sc",
"System.out.println(str.contains(x) ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"str.contains(x) ? \"Yes\" : \"No\"",
"str.contains(x)",
"str.contains",
"str",
"x",
"\"Yes\"",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder stb = new StringBuilder();\n\t\tstb.append(sc.next());\n\t\tstb.append(stb);\n\t\tString str= stb.toString();\n\t\tString x = sc.next();\n\t\tSystem.out.println(str.contains(x) ? \"Yes\" : \"No\");\n\t\tsc.close();\n\t}\n\t\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tStringBuilder stb = new StringBuilder();\n\t\tstb.append(sc.next());\n\t\tstb.append(stb);\n\t\tString str= stb.toString();\n\t\tString x = sc.next();\n\t\tSystem.out.println(str.contains(x) ? \"Yes\" : \"No\");\n\t\tsc.close();\n\t}\n\t\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
StringBuilder stb = new StringBuilder();
stb.append(sc.next());
stb.append(stb);
String str= stb.toString();
String x = sc.next();
System.out.println(str.contains(x) ? "Yes" : "No");
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
39,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
8,
10
],
[
8,
11
],
[
8,
12
],
[
8,
13
],
[
8,
14
],
[
8,
15
],
[
8,
16
],
[
8,
17
],
[
8,
18
],
[
8,
19
],
[
8,
20
],
[
8,
21
],
[
8,
22
],
[
8,
23
],
[
8,
24
],
[
8,
25
],
[
8,
26
],
[
8,
27
],
[
8,
28
],
[
8,
29
],
[
8,
30
],
[
8,
31
],
[
8,
32
],
[
8,
33
],
[
8,
34
],
[
66,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
37,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
37,
51
],
[
51,
52
],
[
51,
53
],
[
37,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
59,
62
],
[
35,
63
],
[
63,
64
],
[
0,
65
],
[
65,
66
],
[
65,
67
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\t\n\tstatic char[] k = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString s = stdIn.next();\n\t\tString p = stdIn.next();\n\t\t\n\t\tboolean ans = false;\n\t\t\n\t\tIN:for(int i = 0; i < s.length(); i++) {\n\t\t\tfor(int j = 0; j < p.length(); j++) {\n\t\t\t\tif(s.charAt((i + j) % s.length()) != p.charAt(j)) {\n\t\t\t\t\tcontinue IN;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println((ans)?\"Yes\":\"No\");\n\t\t\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tstatic char[] k = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString s = stdIn.next();\n\t\tString p = stdIn.next();\n\t\t\n\t\tboolean ans = false;\n\t\t\n\t\tIN:for(int i = 0; i < s.length(); i++) {\n\t\t\tfor(int j = 0; j < p.length(); j++) {\n\t\t\t\tif(s.charAt((i + j) % s.length()) != p.charAt(j)) {\n\t\t\t\t\tcontinue IN;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println((ans)?\"Yes\":\"No\");\n\t\t\n\t}\n}",
"Main",
"static char[] k = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};",
"k",
"{'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}",
"'a'",
"'b'",
"'c'",
"'d'",
"'e'",
"'f'",
"'g'",
"'h'",
"'i'",
"'j'",
"'k'",
"'l'",
"'m'",
"'n'",
"'o'",
"'p'",
"'q'",
"'r'",
"'s'",
"'t'",
"'u'",
"'v'",
"'w'",
"'x'",
"'y'",
"'z'",
"public static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString s = stdIn.next();\n\t\tString p = stdIn.next();\n\t\t\n\t\tboolean ans = false;\n\t\t\n\t\tIN:for(int i = 0; i < s.length(); i++) {\n\t\t\tfor(int j = 0; j < p.length(); j++) {\n\t\t\t\tif(s.charAt((i + j) % s.length()) != p.charAt(j)) {\n\t\t\t\t\tcontinue IN;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println((ans)?\"Yes\":\"No\");\n\t\t\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString s = stdIn.next();\n\t\tString p = stdIn.next();\n\t\t\n\t\tboolean ans = false;\n\t\t\n\t\tIN:for(int i = 0; i < s.length(); i++) {\n\t\t\tfor(int j = 0; j < p.length(); j++) {\n\t\t\t\tif(s.charAt((i + j) % s.length()) != p.charAt(j)) {\n\t\t\t\t\tcontinue IN;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println((ans)?\"Yes\":\"No\");\n\t\t\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"String s = stdIn.next();",
"s",
"stdIn.next()",
"stdIn.next",
"stdIn",
"String p = stdIn.next();",
"p",
"stdIn.next()",
"stdIn.next",
"stdIn",
"boolean ans = false;",
"ans",
"false",
"System.out.println((ans)?\"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"(ans)?\"Yes\":\"No\"",
"(ans)",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\t\n\tstatic char[] k = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString s = stdIn.next();\n\t\tString p = stdIn.next();\n\t\t\n\t\tboolean ans = false;\n\t\t\n\t\tIN:for(int i = 0; i < s.length(); i++) {\n\t\t\tfor(int j = 0; j < p.length(); j++) {\n\t\t\t\tif(s.charAt((i + j) % s.length()) != p.charAt(j)) {\n\t\t\t\t\tcontinue IN;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println((ans)?\"Yes\":\"No\");\n\t\t\n\t}\n}",
"public class Main {\n\t\n\tstatic char[] k = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};\n\t\n\n\tpublic static void main(String[] args) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tString s = stdIn.next();\n\t\tString p = stdIn.next();\n\t\t\n\t\tboolean ans = false;\n\t\t\n\t\tIN:for(int i = 0; i < s.length(); i++) {\n\t\t\tfor(int j = 0; j < p.length(); j++) {\n\t\t\t\tif(s.charAt((i + j) % s.length()) != p.charAt(j)) {\n\t\t\t\t\tcontinue IN;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = true;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\tSystem.out.println((ans)?\"Yes\":\"No\");\n\t\t\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
static char[] k = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
public static void main(String[] args) {
Scanner stdIn = new Scanner(System.in);
String s = stdIn.next();
String p = stdIn.next();
boolean ans = false;
IN:for(int i = 0; i < s.length(); i++) {
for(int j = 0; j < p.length(); j++) {
if(s.charAt((i + j) % s.length()) != p.charAt(j)) {
continue IN;
}
}
ans = true;
break;
}
System.out.println((ans)?"Yes":"No");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
14,
4,
13,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
4,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
41,
13,
2,
4,
18,
13,
17,
42,
2,
13,
4,
18,
13,
30,
41,
13,
2,
4,
18,
13,
17,
42,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
14,
2,
13,
17,
30,
29,
17,
40,
13,
40,
13,
14,
2,
18,
13,
4,
18,
13,
13,
2,
4,
18,
13,
13,
30,
0,
13,
18,
13,
4,
18,
13,
13,
30,
0,
13,
2,
4,
18,
13,
13,
29,
17,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
200,
11
],
[
200,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
36,
40
],
[
14,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
41,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
12,
60
],
[
60,
61
],
[
200,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
69,
79
],
[
79,
80
],
[
80,
81
],
[
69,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
64,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
91,
101
],
[
101,
102
],
[
102,
103
],
[
91,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
106,
113
],
[
114,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
114,
118
],
[
114,
119
],
[
64,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
122,
126
],
[
64,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
127,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
136,
140
],
[
133,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
142,
147
],
[
147,
148
],
[
148,
149
],
[
147,
150
],
[
141,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
156,
157
],
[
157,
158
],
[
151,
159
],
[
159,
160
],
[
151,
161
],
[
161,
162
],
[
133,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
164,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
171,
175
],
[
163,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
181,
184
],
[
163,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
188,
192
],
[
64,
193
],
[
193,
194
],
[
62,
195
],
[
195,
196
],
[
62,
197
],
[
197,
198
],
[
0,
199
],
[
199,
200
],
[
199,
201
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\npublic class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n String key = br.readLine();\n word = word + word.substring(0, key.length() - 1);\n\n if(bmStringSearch(word,key)){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n\n }\n\n private static boolean bmStringSearch(String word, String key){\n \t int[] table = new int[256];\n\n for(int i=0;i<table.length;i++){\n \ttable[i] = key.length();\n }\n for(int i=0;i<key.length();i++){\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }\n\n int wordIndex = key.length() - 1;\n while(wordIndex < word.length()){\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }\n\n return false;\n }\n\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n String key = br.readLine();\n word = word + word.substring(0, key.length() - 1);\n\n if(bmStringSearch(word,key)){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n\n }\n\n private static boolean bmStringSearch(String word, String key){\n \t int[] table = new int[256];\n\n for(int i=0;i<table.length;i++){\n \ttable[i] = key.length();\n }\n for(int i=0;i<key.length();i++){\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }\n\n int wordIndex = key.length() - 1;\n while(wordIndex < word.length()){\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }\n\n return false;\n }\n\n\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n String key = br.readLine();\n word = word + word.substring(0, key.length() - 1);\n\n if(bmStringSearch(word,key)){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n\n }",
"main",
"{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n String key = br.readLine();\n word = word + word.substring(0, key.length() - 1);\n\n if(bmStringSearch(word,key)){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String word = br.readLine();",
"word",
"br.readLine()",
"br.readLine",
"br",
"String key = br.readLine();",
"key",
"br.readLine()",
"br.readLine",
"br",
"word = word + word.substring(0, key.length() - 1)",
"word",
"word + word.substring(0, key.length() - 1)",
"word",
"word.substring(0, key.length() - 1)",
"word.substring",
"word",
"0",
"key.length() - 1",
"key.length()",
"key.length",
"key",
"1",
"if(bmStringSearch(word,key)){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }",
"bmStringSearch(word,key)",
"bmStringSearch",
"word",
"key",
"{\n \tSystem.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \tSystem.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"private static boolean bmStringSearch(String word, String key){\n \t int[] table = new int[256];\n\n for(int i=0;i<table.length;i++){\n \ttable[i] = key.length();\n }\n for(int i=0;i<key.length();i++){\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }\n\n int wordIndex = key.length() - 1;\n while(wordIndex < word.length()){\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }\n\n return false;\n }",
"bmStringSearch",
"{\n \t int[] table = new int[256];\n\n for(int i=0;i<table.length;i++){\n \ttable[i] = key.length();\n }\n for(int i=0;i<key.length();i++){\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }\n\n int wordIndex = key.length() - 1;\n while(wordIndex < word.length()){\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }\n\n return false;\n }",
"int[] table = new int[256];",
"table",
"new int[256]",
"256",
"for(int i=0;i<table.length;i++){\n \ttable[i] = key.length();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<table.length",
"i",
"table.length",
"table",
"table.length",
"i++",
"i++",
"i",
"{\n \ttable[i] = key.length();\n }",
"{\n \ttable[i] = key.length();\n }",
"table[i] = key.length()",
"table[i]",
"table",
"i",
"key.length()",
"key.length",
"key",
"for(int i=0;i<key.length();i++){\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<key.length()",
"i",
"key.length()",
"key.length",
"key",
"i++",
"i++",
"i",
"{\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }",
"{\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }",
"table[key.charAt(i)] = key.length() - i - 1",
"table[key.charAt(i)]",
"table",
"key.charAt(i)",
"key.charAt",
"key",
"i",
"key.length() - i - 1",
"key.length() - i - 1",
"key.length()",
"key.length",
"key",
"i",
"1",
"int wordIndex = key.length() - 1;",
"wordIndex",
"key.length() - 1",
"key.length()",
"key.length",
"key",
"1",
"while(wordIndex < word.length()){\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }",
"wordIndex < word.length()",
"wordIndex",
"word.length()",
"word.length",
"word",
"{\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }",
"int keyIndex = key.length() -1;",
"keyIndex",
"key.length() -1",
"key.length()",
"key.length",
"key",
"1",
"while(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}",
"word.charAt(wordIndex) == key.charAt(keyIndex)",
"word.charAt(wordIndex)",
"word.charAt",
"word",
"wordIndex",
"key.charAt(keyIndex)",
"key.charAt",
"key",
"keyIndex",
"{\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}",
"if(keyIndex == 0){\n \t\t\treturn true;\n \t\t}",
"keyIndex == 0",
"keyIndex",
"0",
"{\n \t\t\treturn true;\n \t\t}",
"return true;",
"true",
"wordIndex--",
"wordIndex",
"keyIndex--",
"keyIndex",
"if(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}",
"table[word.charAt(wordIndex)] > key.length()-keyIndex",
"table[word.charAt(wordIndex)]",
"table",
"word.charAt(wordIndex)",
"word.charAt",
"word",
"wordIndex",
"key.length()-keyIndex",
"key.length()",
"key.length",
"key",
"keyIndex",
"{\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}",
"wordIndex += table[word.charAt(wordIndex)]",
"wordIndex",
"table[word.charAt(wordIndex)]",
"table",
"word.charAt(wordIndex)",
"word.charAt",
"word",
"wordIndex",
"{\n \t\twordIndex += key.length() - keyIndex;\n \t}",
"wordIndex += key.length() - keyIndex",
"wordIndex",
"key.length() - keyIndex",
"key.length()",
"key.length",
"key",
"keyIndex",
"return false;",
"false",
"String word",
"word",
"String key",
"key",
"public class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n String key = br.readLine();\n word = word + word.substring(0, key.length() - 1);\n\n if(bmStringSearch(word,key)){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n\n }\n\n private static boolean bmStringSearch(String word, String key){\n \t int[] table = new int[256];\n\n for(int i=0;i<table.length;i++){\n \ttable[i] = key.length();\n }\n for(int i=0;i<key.length();i++){\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }\n\n int wordIndex = key.length() - 1;\n while(wordIndex < word.length()){\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }\n\n return false;\n }\n\n\n}",
"public class Main {\n public static void main(String[] args) throws IOException{\n\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String word = br.readLine();\n String key = br.readLine();\n word = word + word.substring(0, key.length() - 1);\n\n if(bmStringSearch(word,key)){\n \tSystem.out.println(\"Yes\");\n }else{\n \tSystem.out.println(\"No\");\n }\n\n }\n\n private static boolean bmStringSearch(String word, String key){\n \t int[] table = new int[256];\n\n for(int i=0;i<table.length;i++){\n \ttable[i] = key.length();\n }\n for(int i=0;i<key.length();i++){\n \ttable[key.charAt(i)] = key.length() - i - 1;\n }\n\n int wordIndex = key.length() - 1;\n while(wordIndex < word.length()){\n \tint keyIndex = key.length() -1;\n\n \twhile(word.charAt(wordIndex) == key.charAt(keyIndex)){\n \t\tif(keyIndex == 0){\n \t\t\treturn true;\n \t\t}\n \t\twordIndex--;\n \t\tkeyIndex--;\n \t}\n\n \tif(table[word.charAt(wordIndex)] > key.length()-keyIndex){\n \t\twordIndex += table[word.charAt(wordIndex)];\n \t}else{\n \t\twordIndex += key.length() - keyIndex;\n \t}\n }\n\n return false;\n }\n\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String word = br.readLine();
String key = br.readLine();
word = word + word.substring(0, key.length() - 1);
if(bmStringSearch(word,key)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
private static boolean bmStringSearch(String word, String key){
int[] table = new int[256];
for(int i=0;i<table.length;i++){
table[i] = key.length();
}
for(int i=0;i<key.length();i++){
table[key.charAt(i)] = key.length() - i - 1;
}
int wordIndex = key.length() - 1;
while(wordIndex < word.length()){
int keyIndex = key.length() -1;
while(word.charAt(wordIndex) == key.charAt(keyIndex)){
if(keyIndex == 0){
return true;
}
wordIndex--;
keyIndex--;
}
if(table[word.charAt(wordIndex)] > key.length()-keyIndex){
wordIndex += table[word.charAt(wordIndex)];
}else{
wordIndex += key.length() - keyIndex;
}
}
return false;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
2,
13,
13,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
74,
11
],
[
74,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
24,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
45,
45
],
[
45,
46
],
[
45,
47
],
[
45,
48
],
[
14,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
50,
55
],
[
55,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
49,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
12,
71
],
[
71,
72
],
[
0,
73
],
[
73,
74
],
[
73,
75
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString s = null;\n\t\tString p = null;\n\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ts = s + s + s;\n\n\t\tif (s.indexOf(p) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString s = null;\n\t\tString p = null;\n\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ts = s + s + s;\n\n\t\tif (s.indexOf(p) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString s = null;\n\t\tString p = null;\n\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ts = s + s + s;\n\n\t\tif (s.indexOf(p) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString s = null;\n\t\tString p = null;\n\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ts = s + s + s;\n\n\t\tif (s.indexOf(p) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = null;",
"s",
"null",
"String p = null;",
"p",
"null",
"try {\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t}",
"s = br.readLine()",
"s",
"br.readLine()",
"br.readLine",
"br",
"p = br.readLine()",
"p",
"br.readLine()",
"br.readLine",
"br",
"s = s + s + s",
"s",
"s + s + s",
"s + s + s",
"s",
"s",
"s",
"if (s.indexOf(p) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"s.indexOf(p) != -1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString s = null;\n\t\tString p = null;\n\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ts = s + s + s;\n\n\t\tif (s.indexOf(p) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString s = null;\n\t\tString p = null;\n\n\t\ttry {\n\t\t\ts = br.readLine();\n\t\t\tp = br.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\ts = s + s + s;\n\n\t\tif (s.indexOf(p) != -1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = null;
String p = null;
try {
s = br.readLine();
p = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
s = s + s + s;
if (s.indexOf(p) != -1) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
27,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
27,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
6,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString p = scanner.nextLine();\t//vanceknowledgetoad\n\t\tString _p = p+p;\t\t\t\t//vanceknowledgetoadvanceknowledgetoad\n\t\tString s = scanner.nextLine();\t//advance\n\t\tif (_p.contains(s)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscanner.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString p = scanner.nextLine();\t//vanceknowledgetoad\n\t\tString _p = p+p;\t\t\t\t//vanceknowledgetoadvanceknowledgetoad\n\t\tString s = scanner.nextLine();\t//advance\n\t\tif (_p.contains(s)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscanner.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString p = scanner.nextLine();\t//vanceknowledgetoad\n\t\tString _p = p+p;\t\t\t\t//vanceknowledgetoadvanceknowledgetoad\n\t\tString s = scanner.nextLine();\t//advance\n\t\tif (_p.contains(s)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscanner.close();\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString p = scanner.nextLine();\t//vanceknowledgetoad\n\t\tString _p = p+p;\t\t\t\t//vanceknowledgetoadvanceknowledgetoad\n\t\tString s = scanner.nextLine();\t//advance\n\t\tif (_p.contains(s)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscanner.close();\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String p = scanner.nextLine();",
"p",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String _p = p+p;",
"_p",
"p+p",
"p",
"p",
"String s = scanner.nextLine();",
"s",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"if (_p.contains(s)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"_p.contains(s)",
"_p.contains",
"_p",
"s",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString p = scanner.nextLine();\t//vanceknowledgetoad\n\t\tString _p = p+p;\t\t\t\t//vanceknowledgetoadvanceknowledgetoad\n\t\tString s = scanner.nextLine();\t//advance\n\t\tif (_p.contains(s)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscanner.close();\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString p = scanner.nextLine();\t//vanceknowledgetoad\n\t\tString _p = p+p;\t\t\t\t//vanceknowledgetoadvanceknowledgetoad\n\t\tString s = scanner.nextLine();\t//advance\n\t\tif (_p.contains(s)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\tscanner.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String p = scanner.nextLine(); //vanceknowledgetoad
String _p = p+p; //vanceknowledgetoadvanceknowledgetoad
String s = scanner.nextLine(); //advance
if (_p.contains(s)) {
System.out.println("Yes");
}else {
System.out.println("No");
}
scanner.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
38,
5,
13,
30,
4,
18,
18,
13,
13,
17,
30,
0,
13,
4,
18,
4,
18,
13,
0,
13,
4,
18,
4,
18,
13,
0,
13,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
113,
11
],
[
113,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
24,
26
],
[
14,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
37,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
14,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
64,
68
],
[
57,
69
],
[
69,
70
],
[
70,
71
],
[
57,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
73,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
85,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
14,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
94,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
12,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
]
| [
"import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=null;\n\t\tString p=null;\n\t\tint flag=0;\n\t\ttry {\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}\n\t\ts=s+s;\n\t\tfor(int i=0;i<s.length()/2;i++){\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag==1) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=null;\n\t\tString p=null;\n\t\tint flag=0;\n\t\ttry {\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}\n\t\ts=s+s;\n\t\tfor(int i=0;i<s.length()/2;i++){\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag==1) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=null;\n\t\tString p=null;\n\t\tint flag=0;\n\t\ttry {\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}\n\t\ts=s+s;\n\t\tfor(int i=0;i<s.length()/2;i++){\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag==1) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"main",
"{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=null;\n\t\tString p=null;\n\t\tint flag=0;\n\t\ttry {\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}\n\t\ts=s+s;\n\t\tfor(int i=0;i<s.length()/2;i++){\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag==1) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s=null;",
"s",
"null",
"String p=null;",
"p",
"null",
"int flag=0;",
"flag",
"0",
"try {\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}",
"catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}",
"Exception e",
"{\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}",
"System.err.println(\"Error\")",
"System.err.println",
"System.err",
"System",
"System.err",
"\"Error\"",
"{\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t}",
"s=br.readLine().toLowerCase()",
"s",
"br.readLine().toLowerCase()",
"br.readLine().toLowerCase",
"br.readLine()",
"br.readLine",
"br",
"p=br.readLine().toLowerCase()",
"p",
"br.readLine().toLowerCase()",
"br.readLine().toLowerCase",
"br.readLine()",
"br.readLine",
"br",
"s=s+s",
"s",
"s+s",
"s",
"s",
"for(int i=0;i<s.length()/2;i++){\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()/2",
"i",
"s.length()/2",
"s.length()",
"s.length",
"s",
"2",
"i++",
"i++",
"i",
"{\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}",
"String str=s.substring(i, i+p.length());",
"str",
"s.substring(i, i+p.length())",
"s.substring",
"s",
"i",
"i+p.length()",
"i",
"p.length()",
"p.length",
"p",
"if(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}",
"str.equals(p)",
"str.equals",
"str",
"p",
"{\n\t\t\t\tflag=1;\n\t\t\t}",
"flag=1",
"flag",
"1",
"if(flag==1) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"flag==1",
"flag",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=null;\n\t\tString p=null;\n\t\tint flag=0;\n\t\ttry {\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}\n\t\ts=s+s;\n\t\tfor(int i=0;i<s.length()/2;i++){\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag==1) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s=null;\n\t\tString p=null;\n\t\tint flag=0;\n\t\ttry {\n\t\t\ts=br.readLine().toLowerCase();\n\t\t\tp=br.readLine().toLowerCase();\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error\");\n\t\t\t// TODO: handle exception\n\t\t}\n\t\ts=s+s;\n\t\tfor(int i=0;i<s.length()/2;i++){\n\t\t\tString str=s.substring(i, i+p.length());\n\t\t\tif(str.equals(p)) {\n\t\t\t\tflag=1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag==1) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String s=null;
String p=null;
int flag=0;
try {
s=br.readLine().toLowerCase();
p=br.readLine().toLowerCase();
} catch (Exception e) {
System.err.println("Error");
// TODO: handle exception
}
s=s+s;
for(int i=0;i<s.length()/2;i++){
String str=s.substring(i, i+p.length());
if(str.equals(p)) {
flag=1;
}
}
if(flag==1) System.out.println("Yes");
else System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
14,
2,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
30,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
]
]
| [
"import java.util.*;\n \nclass Main{\n public static void main(String[] args){\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuffer sb = new StringBuffer(scan.next());\n\t\tString str = scan.next();\n\n\t\tsb.append(sb);\n\t\tint a = sb.indexOf(str);\n\t\tif(a != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args){\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuffer sb = new StringBuffer(scan.next());\n\t\tString str = scan.next();\n\n\t\tsb.append(sb);\n\t\tint a = sb.indexOf(str);\n\t\tif(a != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n }\n}",
"Main",
"public static void main(String[] args){\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuffer sb = new StringBuffer(scan.next());\n\t\tString str = scan.next();\n\n\t\tsb.append(sb);\n\t\tint a = sb.indexOf(str);\n\t\tif(a != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n }",
"main",
"{\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tStringBuffer sb = new StringBuffer(scan.next());\n\t\tString str = scan.next();\n\n\t\tsb.append(sb);\n\t\tint a = sb.indexOf(str);\n\t\tif(a != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"StringBuffer sb = new StringBuffer(scan.next());",
"sb",
"new StringBuffer(scan.next())",
"String str = scan.next();",
"str",
"scan.next()",
"scan.next",
"scan",
"sb.append(sb)",
"sb.append",
"sb",
"sb",
"int a = sb.indexOf(str);",
"a",
"sb.indexOf(str)",
"sb.indexOf",
"sb",
"str",
"if(a != -1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"a != -1",
"a",
"-1",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.*;
class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
StringBuffer sb = new StringBuffer(scan.next());
String str = scan.next();
sb.append(sb);
int a = sb.indexOf(str);
if(a != -1){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
17,
30,
14,
2,
4,
18,
13,
17,
30,
41,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
0,
13,
17,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
0,
13,
17,
40,
13,
30,
0,
13,
17,
3,
30,
0,
13,
17,
14,
13,
3,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
52,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
63,
73
],
[
73,
74
],
[
74,
75
],
[
63,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
77,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
88,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
87,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
87,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
51,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
50,
112
],
[
112,
113
],
[
112,
114
],
[
8,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
115,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
6,
131
],
[
131,
132
]
]
| [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner in = new Scanner(System.in);\n String s=in.nextLine();\n String p=in.nextLine();\n \tboolean m=false;\n \tfor(int i=0;i<s.length();i++){\n \tif(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}\n \t}\n \tif(m){\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \tSystem.out.println(\"No\");\n \t} \n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner in = new Scanner(System.in);\n String s=in.nextLine();\n String p=in.nextLine();\n \tboolean m=false;\n \tfor(int i=0;i<s.length();i++){\n \tif(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}\n \t}\n \tif(m){\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \tSystem.out.println(\"No\");\n \t} \n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner in = new Scanner(System.in);\n String s=in.nextLine();\n String p=in.nextLine();\n \tboolean m=false;\n \tfor(int i=0;i<s.length();i++){\n \tif(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}\n \t}\n \tif(m){\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \tSystem.out.println(\"No\");\n \t} \n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n String s=in.nextLine();\n String p=in.nextLine();\n \tboolean m=false;\n \tfor(int i=0;i<s.length();i++){\n \tif(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}\n \t}\n \tif(m){\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \tSystem.out.println(\"No\");\n \t} \n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String s=in.nextLine();",
"s",
"in.nextLine()",
"in.nextLine",
"in",
"String p=in.nextLine();",
"p",
"in.nextLine()",
"in.nextLine",
"in",
"boolean m=false;",
"m",
"false",
"for(int i=0;i<s.length();i++){\n \tif(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n \tif(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}\n \t}",
"{\n \tif(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}\n \t}",
"if(s.charAt(i)==p.charAt(0)){\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}",
"s.charAt(i)==p.charAt(0)",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"p.charAt(0)",
"p.charAt",
"p",
"0",
"{\n \t\tif(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}\n \t\tif(m) break;\n \t}",
"if(p.length()>1){\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}else{\n \t\t\tm=true;\n \t\t}",
"p.length()>1",
"p.length()",
"p.length",
"p",
"1",
"{\n \t\tint k=i+1;\n \t\tfor(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\t}",
"int k=i+1;",
"k",
"i+1",
"i",
"1",
"for(int j=1;j<p.length();j++){\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}",
"int j=1;",
"int j=1;",
"j",
"1",
"j<p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}",
"{\n \t\t\t\tif(k>=s.length()) k=0;\n \t\t\tif(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}",
"if(k>=s.length()) k=0;",
"k>=s.length()",
"k",
"s.length()",
"s.length",
"s",
"k=0",
"k",
"0",
"if(s.charAt(k)==p.charAt(j)){\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}else{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}",
"s.charAt(k)==p.charAt(j)",
"s.charAt(k)",
"s.charAt",
"s",
"k",
"p.charAt(j)",
"p.charAt",
"p",
"j",
"{\n \t\t\t\tm=true;\n \t\t\t\tk++;\n \t\t\t}",
"m=true",
"m",
"true",
"k++",
"k",
"{\n \t\t\t\tm=false;\n \t\t\t\tbreak;\n \t\t\t}",
"m=false",
"m",
"false",
"break;",
"{\n \t\t\tm=true;\n \t\t}",
"m=true",
"m",
"true",
"if(m) break;",
"m",
"break;",
"if(m){\n \t\tSystem.out.println(\"Yes\");\n \t}else{\n \tSystem.out.println(\"No\");\n \t}",
"m",
"{\n \t\tSystem.out.println(\"Yes\");\n \t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \tSystem.out.println(\"No\");\n \t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) throws Exception {
Scanner in = new Scanner(System.in);
String s=in.nextLine();
String p=in.nextLine();
boolean m=false;
for(int i=0;i<s.length();i++){
if(s.charAt(i)==p.charAt(0)){
if(p.length()>1){
int k=i+1;
for(int j=1;j<p.length();j++){
if(k>=s.length()) k=0;
if(s.charAt(k)==p.charAt(j)){
m=true;
k++;
}else{
m=false;
break;
}
}
}else{
m=true;
}
if(m) break;
}
}
if(m){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
17,
30,
41,
13,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
2,
13,
13,
13,
4,
18,
13,
13,
3,
14,
2,
13,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
53,
63
],
[
63,
64
],
[
64,
65
],
[
53,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
69,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
68,
82
],
[
50,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
89,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
]
]
| [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\t\n\t\tint m=s.length();\n\t\t\n\t\tfor(int i=0;i<m;i++){\n\t\t\tif(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\t\n\t\tint m=s.length();\n\t\t\n\t\tfor(int i=0;i<m;i++){\n\t\t\tif(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\t\n\t\tint m=s.length();\n\t\t\n\t\tfor(int i=0;i<m;i++){\n\t\t\tif(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next();\n\t\tString p=scan.next();\n\t\t\n\t\tint m=s.length();\n\t\t\n\t\tfor(int i=0;i<m;i++){\n\t\t\tif(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s=scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String p=scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"int m=s.length();",
"m",
"s.length()",
"s.length",
"s",
"for(int i=0;i<m;i++){\n\t\t\tif(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\tif(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}",
"if(s.charAt(i)==p.charAt(0)){\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"s.charAt(i)==p.charAt(0)",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"p.charAt(0)",
"p.charAt",
"p",
"0",
"{\n\t\t\t\tint j;\n\t\t\t\tfor(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"int j;",
"j",
"for(j=0;j<p.length();j++){\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}",
"j=0;",
"j=0",
"j",
"0",
"j<p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}",
"{\n\t\t\t\t\tif(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;\n\t\t\t\t}",
"if(s.charAt((i+j)%m) != p.charAt(j))\n\t\t\t\t\t\tbreak;",
"s.charAt((i+j)%m) != p.charAt(j)",
"s.charAt((i+j)%m)",
"s.charAt",
"s",
"(i+j)%m",
"(i+j)",
"i",
"j",
"m",
"p.charAt(j)",
"p.charAt",
"p",
"j",
"break;",
"if(j==p.length()){\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"j==p.length()",
"j",
"p.length()",
"p.length",
"p",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
String s=scan.next();
String p=scan.next();
int m=s.length();
for(int i=0;i<m;i++){
if(s.charAt(i)==p.charAt(0)){
int j;
for(j=0;j<p.length();j++){
if(s.charAt((i+j)%m) != p.charAt(j))
break;
}
if(j==p.length()){
System.out.println("Yes");
return;
}
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
20,
17,
41,
13,
41,
13,
0,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
17,
4,
18,
18,
13,
13,
8,
4,
13,
13,
13,
17,
17,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
2,
17,
4,
18,
13,
4,
13,
13,
13,
4,
18,
13,
0,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
41,
13,
13,
42,
2,
13,
17,
30,
0,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
40,
13,
14,
2,
13,
4,
18,
13,
0,
13,
17,
29,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
17,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
29,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
41,
13,
20,
14,
2,
13,
17,
30,
41,
13,
42,
2,
17,
0,
13,
4,
18,
13,
30,
4,
18,
13,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
18,
13,
4,
18,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
13,
17,
30,
0,
13,
4,
18,
13,
14,
2,
4,
18,
13,
13,
17,
3,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
296,
14
],
[
296,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
17,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
17,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
17,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
46,
49
],
[
45,
50
],
[
45,
51
],
[
15,
52
],
[
52,
53
],
[
296,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
60,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
82,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
74,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
56,
94
],
[
94,
95
],
[
54,
96
],
[
96,
97
],
[
54,
98
],
[
98,
99
],
[
296,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
114,
125
],
[
125,
126
],
[
114,
127
],
[
127,
128
],
[
114,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
129,
135
],
[
135,
136
],
[
135,
137
],
[
102,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
100,
143
],
[
143,
144
],
[
100,
145
],
[
145,
146
],
[
100,
147
],
[
147,
148
],
[
0,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
153,
160
],
[
160,
161
],
[
160,
162
],
[
163,
164
],
[
163,
165
],
[
153,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
166,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
173,
175
],
[
166,
176
],
[
176,
177
],
[
177,
178
],
[
166,
179
],
[
180,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
188,
190
],
[
153,
191
],
[
191,
192
],
[
151,
193
],
[
193,
194
],
[
0,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
195,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
195,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
211,
215
],
[
215,
216
],
[
216,
217
],
[
215,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
218,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
227,
230
],
[
211,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
232,
237
],
[
237,
238
],
[
237,
239
],
[
232,
240
],
[
240,
241
],
[
241,
242
],
[
232,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
244,
247
],
[
247,
248
],
[
248,
249
],
[
207,
250
],
[
250,
251
],
[
205,
252
],
[
252,
253
],
[
195,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
256,
260
],
[
260,
261
],
[
256,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
262,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
270,
271
],
[
266,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
274,
277
],
[
273,
278
],
[
272,
279
],
[
266,
280
],
[
280,
281
],
[
281,
282
],
[
280,
283
],
[
256,
284
],
[
284,
285
],
[
254,
286
],
[
286,
287
],
[
195,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
0,
295
],
[
295,
296
],
[
295,
297
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\n/**\n * \n */\n\n/**\n * @author imkat\n *\n */\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) \n\tthrows IOException{\n\t\t// TODO Auto-generated method stub\n\t\tArrayList<String> al = (new StandardIn()).getlines(2);\n\t\tString p,s;\n\t\tp = al.get(0);\n\t\ts = al.get(1);\n\t\t\n\t\tSystem.out.println((compareLikeRing(p,s)?\"Yes\":\"No\"));\n\t\t\n\t}\n\t\n\tstatic boolean compareLikeRing(String p, String s){\n\t\tboolean flag = false;\n\t\tfor (int i=0; i<p.length();i++){\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}\n\t\treturn flag;\n\t}\n\n\tstatic String substringLikeRing(String p, int pos, int length){\n\t\tchar buf[] = new char[length];\n\t\tint count = length;\n\t\twhile(count > 0){\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}\n\t\treturn (String.valueOf(buf));\n\t\t\n\t}\n}\n\nclass TempReaderCall{\n\t\n\tstatic int[] splitIntArrayFromString(String st) {\n\t\tString[] sts = st.split(\" \");\n\t\tint[] data = new int[sts.length];\n\t\t\n\t\tfor (int i=0;i<sts.length;i++){\n\t\t\tdata[i] = Integer.parseInt(sts[i]);\n\t\t}\n\t\t\n\t\treturn data;\n\t}\n}\n\nclass StandardIn{\n\tprivate BufferedReader br;\n\t\n\tStandardIn(){\n\t\tbr = new BufferedReader (new InputStreamReader(System.in));\n\t}\n\t\n\tArrayList<String> getlines(int line) throws IOException {\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tif (line==0){\n\t\t\tString tmplinedata;\n\t\t\twhile(null != (tmplinedata = br.readLine())){\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < line; i++)\n\t\t\t\tlist.add(br.readLine());\n\t\t}\n\t\treturn list;\n\t}\n\t\n\tArrayList<String> getlines(String end) throws IOException {\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tString newdata;\n\t\tdo{\n\t\t\tnewdata =br.readLine();\n\t\t\tif (end.compareTo(newdata)==0)\n\t\t\t\tbreak;\n\t\t\tlist.add(newdata);\n\t\t}while(newdata!=null);\n\t\t\n\t\treturn list;\n\t}\n\t\n\tString getaline() throws IOException {\n\t\treturn (br.readLine());\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) \n\tthrows IOException{\n\t\t// TODO Auto-generated method stub\n\t\tArrayList<String> al = (new StandardIn()).getlines(2);\n\t\tString p,s;\n\t\tp = al.get(0);\n\t\ts = al.get(1);\n\t\t\n\t\tSystem.out.println((compareLikeRing(p,s)?\"Yes\":\"No\"));\n\t\t\n\t}\n\t\n\tstatic boolean compareLikeRing(String p, String s){\n\t\tboolean flag = false;\n\t\tfor (int i=0; i<p.length();i++){\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}\n\t\treturn flag;\n\t}\n\n\tstatic String substringLikeRing(String p, int pos, int length){\n\t\tchar buf[] = new char[length];\n\t\tint count = length;\n\t\twhile(count > 0){\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}\n\t\treturn (String.valueOf(buf));\n\t\t\n\t}\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) \n\tthrows IOException{\n\t\t// TODO Auto-generated method stub\n\t\tArrayList<String> al = (new StandardIn()).getlines(2);\n\t\tString p,s;\n\t\tp = al.get(0);\n\t\ts = al.get(1);\n\t\t\n\t\tSystem.out.println((compareLikeRing(p,s)?\"Yes\":\"No\"));\n\t\t\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tArrayList<String> al = (new StandardIn()).getlines(2);\n\t\tString p,s;\n\t\tp = al.get(0);\n\t\ts = al.get(1);\n\t\t\n\t\tSystem.out.println((compareLikeRing(p,s)?\"Yes\":\"No\"));\n\t\t\n\t}",
"ArrayList<String> al = (new StandardIn()).getlines(2);",
"al",
"(new StandardIn()).getlines(2)",
"(new StandardIn()).getlines",
"(new StandardIn())",
"2",
"String p",
"p",
"s;",
"s",
"p = al.get(0)",
"p",
"al.get(0)",
"al.get",
"al",
"0",
"s = al.get(1)",
"s",
"al.get(1)",
"al.get",
"al",
"1",
"System.out.println((compareLikeRing(p,s)?\"Yes\":\"No\"))",
"System.out.println",
"System.out",
"System",
"System.out",
"(compareLikeRing(p,s)?\"Yes\":\"No\")",
"compareLikeRing(p,s)",
"compareLikeRing",
"p",
"s",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"static boolean compareLikeRing(String p, String s){\n\t\tboolean flag = false;\n\t\tfor (int i=0; i<p.length();i++){\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}\n\t\treturn flag;\n\t}",
"compareLikeRing",
"{\n\t\tboolean flag = false;\n\t\tfor (int i=0; i<p.length();i++){\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}\n\t\treturn flag;\n\t}",
"boolean flag = false;",
"flag",
"false",
"for (int i=0; i<p.length();i++){\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<p.length()",
"i",
"p.length()",
"p.length",
"p",
"i++",
"i++",
"i",
"{\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}",
"{\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}",
"boolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));",
"check",
"(0==s.compareTo(substringLikeRing(p,i,s.length())))",
"0",
"s.compareTo(substringLikeRing(p,i,s.length()))",
"s.compareTo",
"s",
"substringLikeRing(p,i,s.length())",
"substringLikeRing",
"p",
"i",
"s.length()",
"s.length",
"s",
"flag = (check||flag)",
"flag",
"(check||flag)",
"check",
"flag",
"return flag;",
"flag",
"String p",
"p",
"String s",
"s",
"static String substringLikeRing(String p, int pos, int length){\n\t\tchar buf[] = new char[length];\n\t\tint count = length;\n\t\twhile(count > 0){\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}\n\t\treturn (String.valueOf(buf));\n\t\t\n\t}",
"substringLikeRing",
"{\n\t\tchar buf[] = new char[length];\n\t\tint count = length;\n\t\twhile(count > 0){\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}\n\t\treturn (String.valueOf(buf));\n\t\t\n\t}",
"char buf[] = new char[length];",
"buf",
"new char[length]",
"length",
"int count = length;",
"count",
"length",
"while(count > 0){\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}",
"count > 0",
"count",
"0",
"{\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}",
"buf[length-count]=p.charAt(pos)",
"buf[length-count]",
"buf",
"length-count",
"length",
"count",
"p.charAt(pos)",
"p.charAt",
"p",
"pos",
"pos++",
"pos",
"count--",
"count",
"if (pos>=p.length()) pos=0;",
"pos>=p.length()",
"pos",
"p.length()",
"p.length",
"p",
"pos=0",
"pos",
"0",
"return (String.valueOf(buf));",
"(String.valueOf(buf))",
"String.valueOf",
"String",
"buf",
"String p",
"p",
"int pos",
"pos",
"int length",
"length",
"class TempReaderCall{\n\t\n\tstatic int[] splitIntArrayFromString(String st) {\n\t\tString[] sts = st.split(\" \");\n\t\tint[] data = new int[sts.length];\n\t\t\n\t\tfor (int i=0;i<sts.length;i++){\n\t\t\tdata[i] = Integer.parseInt(sts[i]);\n\t\t}\n\t\t\n\t\treturn data;\n\t}\n}",
"TempReaderCall",
"static int[] splitIntArrayFromString(String st) {\n\t\tString[] sts = st.split(\" \");\n\t\tint[] data = new int[sts.length];\n\t\t\n\t\tfor (int i=0;i<sts.length;i++){\n\t\t\tdata[i] = Integer.parseInt(sts[i]);\n\t\t}\n\t\t\n\t\treturn data;\n\t}",
"splitIntArrayFromString",
"{\n\t\tString[] sts = st.split(\" \");\n\t\tint[] data = new int[sts.length];\n\t\t\n\t\tfor (int i=0;i<sts.length;i++){\n\t\t\tdata[i] = Integer.parseInt(sts[i]);\n\t\t}\n\t\t\n\t\treturn data;\n\t}",
"String[] sts = st.split(\" \");",
"sts",
"st.split(\" \")",
"st.split",
"st",
"\" \"",
"int[] data = new int[sts.length];",
"data",
"new int[sts.length]",
"sts.length",
"sts",
"sts.length",
"for (int i=0;i<sts.length;i++){\n\t\t\tdata[i] = Integer.parseInt(sts[i]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<sts.length",
"i",
"sts.length",
"sts",
"sts.length",
"i++",
"i++",
"i",
"{\n\t\t\tdata[i] = Integer.parseInt(sts[i]);\n\t\t}",
"{\n\t\t\tdata[i] = Integer.parseInt(sts[i]);\n\t\t}",
"data[i] = Integer.parseInt(sts[i])",
"data[i]",
"data",
"i",
"Integer.parseInt(sts[i])",
"Integer.parseInt",
"Integer",
"sts[i]",
"sts",
"i",
"return data;",
"data",
"String st",
"st",
"class StandardIn{\n\tprivate BufferedReader br;\n\t\n\tStandardIn(){\n\t\tbr = new BufferedReader (new InputStreamReader(System.in));\n\t}\n\t\n\tArrayList<String> getlines(int line) throws IOException {\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tif (line==0){\n\t\t\tString tmplinedata;\n\t\t\twhile(null != (tmplinedata = br.readLine())){\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < line; i++)\n\t\t\t\tlist.add(br.readLine());\n\t\t}\n\t\treturn list;\n\t}\n\t\n\tArrayList<String> getlines(String end) throws IOException {\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tString newdata;\n\t\tdo{\n\t\t\tnewdata =br.readLine();\n\t\t\tif (end.compareTo(newdata)==0)\n\t\t\t\tbreak;\n\t\t\tlist.add(newdata);\n\t\t}while(newdata!=null);\n\t\t\n\t\treturn list;\n\t}\n\t\n\tString getaline() throws IOException {\n\t\treturn (br.readLine());\n\t}\n}",
"StandardIn",
"private BufferedReader br;",
"br",
"StandardIn(){\n\t\tbr = new BufferedReader (new InputStreamReader(System.in));\n\t}",
"StandardIn",
"{\n\t\tbr = new BufferedReader (new InputStreamReader(System.in));\n\t}",
"br = new BufferedReader (new InputStreamReader(System.in))",
"br",
"new BufferedReader (new InputStreamReader(System.in))",
"ArrayList<String> getlines(int line) throws IOException {\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tif (line==0){\n\t\t\tString tmplinedata;\n\t\t\twhile(null != (tmplinedata = br.readLine())){\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < line; i++)\n\t\t\t\tlist.add(br.readLine());\n\t\t}\n\t\treturn list;\n\t}",
"getlines",
"{\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tif (line==0){\n\t\t\tString tmplinedata;\n\t\t\twhile(null != (tmplinedata = br.readLine())){\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < line; i++)\n\t\t\t\tlist.add(br.readLine());\n\t\t}\n\t\treturn list;\n\t}",
"ArrayList<String> list = new ArrayList<String>();",
"list",
"new ArrayList<String>()",
"if (line==0){\n\t\t\tString tmplinedata;\n\t\t\twhile(null != (tmplinedata = br.readLine())){\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < line; i++)\n\t\t\t\tlist.add(br.readLine());\n\t\t}",
"line==0",
"line",
"0",
"{\n\t\t\tString tmplinedata;\n\t\t\twhile(null != (tmplinedata = br.readLine())){\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}\n\t\t}",
"String tmplinedata;",
"tmplinedata",
"while(null != (tmplinedata = br.readLine())){\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}",
"null != (tmplinedata = br.readLine())",
"null",
"(tmplinedata = br.readLine())",
"tmplinedata",
"br.readLine()",
"br.readLine",
"br",
"{\n\t\t\t\tlist.add(tmplinedata);\n\t\t\t}",
"list.add(tmplinedata)",
"list.add",
"list",
"tmplinedata",
"{\n\t\t\tfor (int i = 0; i < line; i++)\n\t\t\t\tlist.add(br.readLine());\n\t\t}",
"for (int i = 0; i < line; i++)\n\t\t\t\tlist.add(br.readLine());",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < line",
"i",
"line",
"i++",
"i++",
"i",
"list.add(br.readLine());",
"list.add(br.readLine())",
"list.add",
"list",
"br.readLine()",
"br.readLine",
"br",
"return list;",
"list",
"int line",
"line",
"ArrayList<String> getlines(String end) throws IOException {\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tString newdata;\n\t\tdo{\n\t\t\tnewdata =br.readLine();\n\t\t\tif (end.compareTo(newdata)==0)\n\t\t\t\tbreak;\n\t\t\tlist.add(newdata);\n\t\t}while(newdata!=null);\n\t\t\n\t\treturn list;\n\t}",
"getlines",
"{\n\t\tArrayList<String> list = new ArrayList<String>();\n\t\tString newdata;\n\t\tdo{\n\t\t\tnewdata =br.readLine();\n\t\t\tif (end.compareTo(newdata)==0)\n\t\t\t\tbreak;\n\t\t\tlist.add(newdata);\n\t\t}while(newdata!=null);\n\t\t\n\t\treturn list;\n\t}",
"ArrayList<String> list = new ArrayList<String>();",
"list",
"new ArrayList<String>()",
"String newdata;",
"newdata",
"do{\n\t\t\tnewdata =br.readLine();\n\t\t\tif (end.compareTo(newdata)==0)\n\t\t\t\tbreak;\n\t\t\tlist.add(newdata);\n\t\t}while(newdata!=null);",
"newdata!=null",
"newdata",
"null",
"{\n\t\t\tnewdata =br.readLine();\n\t\t\tif (end.compareTo(newdata)==0)\n\t\t\t\tbreak;\n\t\t\tlist.add(newdata);\n\t\t}",
"newdata =br.readLine()",
"newdata",
"br.readLine()",
"br.readLine",
"br",
"if (end.compareTo(newdata)==0)\n\t\t\t\tbreak;",
"end.compareTo(newdata)==0",
"end.compareTo(newdata)",
"end.compareTo",
"end",
"newdata",
"0",
"break;",
"list.add(newdata)",
"list.add",
"list",
"newdata",
"return list;",
"list",
"String end",
"end",
"String getaline() throws IOException {\n\t\treturn (br.readLine());\n\t}",
"getaline",
"{\n\t\treturn (br.readLine());\n\t}",
"return (br.readLine());",
"(br.readLine())",
"br.readLine",
"br",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) \n\tthrows IOException{\n\t\t// TODO Auto-generated method stub\n\t\tArrayList<String> al = (new StandardIn()).getlines(2);\n\t\tString p,s;\n\t\tp = al.get(0);\n\t\ts = al.get(1);\n\t\t\n\t\tSystem.out.println((compareLikeRing(p,s)?\"Yes\":\"No\"));\n\t\t\n\t}\n\t\n\tstatic boolean compareLikeRing(String p, String s){\n\t\tboolean flag = false;\n\t\tfor (int i=0; i<p.length();i++){\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}\n\t\treturn flag;\n\t}\n\n\tstatic String substringLikeRing(String p, int pos, int length){\n\t\tchar buf[] = new char[length];\n\t\tint count = length;\n\t\twhile(count > 0){\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}\n\t\treturn (String.valueOf(buf));\n\t\t\n\t}\n}",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) \n\tthrows IOException{\n\t\t// TODO Auto-generated method stub\n\t\tArrayList<String> al = (new StandardIn()).getlines(2);\n\t\tString p,s;\n\t\tp = al.get(0);\n\t\ts = al.get(1);\n\t\t\n\t\tSystem.out.println((compareLikeRing(p,s)?\"Yes\":\"No\"));\n\t\t\n\t}\n\t\n\tstatic boolean compareLikeRing(String p, String s){\n\t\tboolean flag = false;\n\t\tfor (int i=0; i<p.length();i++){\n\t\t\tboolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));\n\t\t\tflag = (check||flag);\n\t\t}\n\t\treturn flag;\n\t}\n\n\tstatic String substringLikeRing(String p, int pos, int length){\n\t\tchar buf[] = new char[length];\n\t\tint count = length;\n\t\twhile(count > 0){\n\t\t\tbuf[length-count]=p.charAt(pos);\n\t\t\tpos++;\n\t\t\tcount--;\n\t\t\tif (pos>=p.length()) pos=0;\n\t\t}\n\t\treturn (String.valueOf(buf));\n\t\t\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
/**
*
*/
/**
* @author imkat
*
*/
public class Main {
/**
* @param args
*/
public static void main(String[] args)
throws IOException{
// TODO Auto-generated method stub
ArrayList<String> al = (new StandardIn()).getlines(2);
String p,s;
p = al.get(0);
s = al.get(1);
System.out.println((compareLikeRing(p,s)?"Yes":"No"));
}
static boolean compareLikeRing(String p, String s){
boolean flag = false;
for (int i=0; i<p.length();i++){
boolean check = (0==s.compareTo(substringLikeRing(p,i,s.length())));
flag = (check||flag);
}
return flag;
}
static String substringLikeRing(String p, int pos, int length){
char buf[] = new char[length];
int count = length;
while(count > 0){
buf[length-count]=p.charAt(pos);
pos++;
count--;
if (pos>=p.length()) pos=0;
}
return (String.valueOf(buf));
}
}
class TempReaderCall{
static int[] splitIntArrayFromString(String st) {
String[] sts = st.split(" ");
int[] data = new int[sts.length];
for (int i=0;i<sts.length;i++){
data[i] = Integer.parseInt(sts[i]);
}
return data;
}
}
class StandardIn{
private BufferedReader br;
StandardIn(){
br = new BufferedReader (new InputStreamReader(System.in));
}
ArrayList<String> getlines(int line) throws IOException {
ArrayList<String> list = new ArrayList<String>();
if (line==0){
String tmplinedata;
while(null != (tmplinedata = br.readLine())){
list.add(tmplinedata);
}
}
else {
for (int i = 0; i < line; i++)
list.add(br.readLine());
}
return list;
}
ArrayList<String> getlines(String end) throws IOException {
ArrayList<String> list = new ArrayList<String>();
String newdata;
do{
newdata =br.readLine();
if (end.compareTo(newdata)==0)
break;
list.add(newdata);
}while(newdata!=null);
return list;
}
String getaline() throws IOException {
return (br.readLine());
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
2,
13,
13,
4,
18,
13,
4,
18,
13,
13,
30,
40,
13,
30,
3,
14,
2,
13,
4,
18,
13,
30,
3,
14,
2,
13,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
43,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
58,
74
],
[
74,
75
],
[
75,
76
],
[
58,
77
],
[
77,
78
],
[
39,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
79,
85
],
[
85,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
87,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
6,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
]
| [
"import java.io.*;\n\npublic class Main{\n public static void main(String[]args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n int cnt = 0;\n\n for(int i = 0; i < s.length(); i++){\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }\n if(cnt == p.length()){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n public static void main(String[]args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n int cnt = 0;\n\n for(int i = 0; i < s.length(); i++){\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }\n if(cnt == p.length()){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[]args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n int cnt = 0;\n\n for(int i = 0; i < s.length(); i++){\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }\n if(cnt == p.length()){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n int cnt = 0;\n\n for(int i = 0; i < s.length(); i++){\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }\n if(cnt == p.length()){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = br.readLine();",
"s",
"br.readLine()",
"br.readLine",
"br",
"String p = br.readLine();",
"p",
"br.readLine()",
"br.readLine",
"br",
"int cnt = 0;",
"cnt",
"0",
"for(int i = 0; i < s.length(); i++){\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }",
"{\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }",
"cnt = 0",
"cnt",
"0",
"for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }",
"{\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }",
"if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }",
"s.charAt((i+j) % s.length()) == p.charAt(j)",
"s.charAt((i+j) % s.length())",
"s.charAt",
"s",
"(i+j) % s.length()",
"(i+j)",
"i",
"j",
"s.length()",
"s.length",
"s",
"p.charAt(j)",
"p.charAt",
"p",
"j",
"{\n cnt++;\n }",
"cnt++",
"cnt",
"{\n break;\n }",
"break;",
"if(cnt == p.length()){\n break;\n }",
"cnt == p.length()",
"cnt",
"p.length()",
"p.length",
"p",
"{\n break;\n }",
"break;",
"if(cnt == p.length()){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"cnt == p.length()",
"cnt",
"p.length()",
"p.length",
"p",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[]args",
"args",
"public class Main{\n public static void main(String[]args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n int cnt = 0;\n\n for(int i = 0; i < s.length(); i++){\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }\n if(cnt == p.length()){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String[]args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String p = br.readLine();\n int cnt = 0;\n\n for(int i = 0; i < s.length(); i++){\n cnt = 0;\n for(int j = 0; j < p.length(); j++){\n if(s.charAt((i+j) % s.length()) == p.charAt(j)){\n cnt++;\n }else{\n break;\n }\n }\n if(cnt == p.length()){\n break;\n }\n }\n if(cnt == p.length()){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.io.*;
public class Main{
public static void main(String[]args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s = br.readLine();
String p = br.readLine();
int cnt = 0;
for(int i = 0; i < s.length(); i++){
cnt = 0;
for(int j = 0; j < p.length(); j++){
if(s.charAt((i+j) % s.length()) == p.charAt(j)){
cnt++;
}else{
break;
}
}
if(cnt == p.length()){
break;
}
}
if(cnt == p.length()){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
29,
41,
13,
4,
18,
13,
2,
4,
18,
13,
17,
0,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
22,
32
],
[
32,
33
],
[
33,
34
],
[
22,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
38,
43
],
[
43,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
45,
52
],
[
36,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
58,
62
],
[
36,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
69,
73
],
[
36,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next(),p=scan.next();\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next(),p=scan.next();\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next(),p=scan.next();\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next(),p=scan.next();\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s=scan.next()",
"s",
"scan.next()",
"scan.next",
"scan",
"p=scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"for(int i=0;i<s.length();i++) {\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}",
"{\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}",
"if(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"s.indexOf(p)!=-1",
"s.indexOf(p)",
"s.indexOf",
"s",
"p",
"-1",
"1",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"char ch=s.charAt(s.length()-1);",
"ch",
"s.charAt(s.length()-1)",
"s.charAt",
"s",
"s.length()-1",
"s.length()",
"s.length",
"s",
"1",
"s=s.substring(0,s.length()-1)",
"s",
"s.substring(0,s.length()-1)",
"s.substring",
"s",
"0",
"s.length()-1",
"s.length()",
"s.length",
"s",
"1",
"s=ch+s",
"s",
"ch+s",
"ch",
"s",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next(),p=scan.next();\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n\t\tScanner scan=new Scanner(System.in);\n\t\tString s=scan.next(),p=scan.next();\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(s.indexOf(p)!=-1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tchar ch=s.charAt(s.length()-1);\n\t\t\ts=s.substring(0,s.length()-1);\n\t\t\ts=ch+s;\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scan=new Scanner(System.in);
String s=scan.next(),p=scan.next();
for(int i=0;i<s.length();i++) {
if(s.indexOf(p)!=-1) {
System.out.println("Yes");
return;
}
char ch=s.charAt(s.length()-1);
s=s.substring(0,s.length()-1);
s=ch+s;
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
13,
4,
18,
18,
13,
13,
8,
2,
4,
18,
13,
13,
40,
17,
17,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
14,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
41,
46
],
[
46,
47
],
[
40,
48
],
[
40,
49
],
[
12,
50
],
[
50,
51
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n\n\tpublic static void main(String[] args) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in) );\n\t\t\n\t\tString strS = br.readLine();\n\t\tString strP = br.readLine();\n\t\t\n\t\tStringBuffer sb = new StringBuffer(strS);\n\t\t\n\t\tsb.append(strS);\n\t\t\n\t\tSystem.out.println( (sb.indexOf(strP) == -1 ? \"No\" : \"Yes\") );\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main{\n\n\tpublic static void main(String[] args) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in) );\n\t\t\n\t\tString strS = br.readLine();\n\t\tString strP = br.readLine();\n\t\t\n\t\tStringBuffer sb = new StringBuffer(strS);\n\t\t\n\t\tsb.append(strS);\n\t\t\n\t\tSystem.out.println( (sb.indexOf(strP) == -1 ? \"No\" : \"Yes\") );\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in) );\n\t\t\n\t\tString strS = br.readLine();\n\t\tString strP = br.readLine();\n\t\t\n\t\tStringBuffer sb = new StringBuffer(strS);\n\t\t\n\t\tsb.append(strS);\n\t\t\n\t\tSystem.out.println( (sb.indexOf(strP) == -1 ? \"No\" : \"Yes\") );\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in) );\n\t\t\n\t\tString strS = br.readLine();\n\t\tString strP = br.readLine();\n\t\t\n\t\tStringBuffer sb = new StringBuffer(strS);\n\t\t\n\t\tsb.append(strS);\n\t\t\n\t\tSystem.out.println( (sb.indexOf(strP) == -1 ? \"No\" : \"Yes\") );\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in) );",
"br",
"new BufferedReader(new InputStreamReader(System.in) )",
"String strS = br.readLine();",
"strS",
"br.readLine()",
"br.readLine",
"br",
"String strP = br.readLine();",
"strP",
"br.readLine()",
"br.readLine",
"br",
"StringBuffer sb = new StringBuffer(strS);",
"sb",
"new StringBuffer(strS)",
"sb.append(strS)",
"sb.append",
"sb",
"strS",
"System.out.println( (sb.indexOf(strP) == -1 ? \"No\" : \"Yes\") )",
"System.out.println",
"System.out",
"System",
"System.out",
"(sb.indexOf(strP) == -1 ? \"No\" : \"Yes\")",
"sb.indexOf(strP) == -1",
"sb.indexOf(strP)",
"sb.indexOf",
"sb",
"strP",
"-1",
"1",
"\"No\"",
"\"Yes\"",
"String[] args",
"args"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String[] args) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in) );
String strS = br.readLine();
String strP = br.readLine();
StringBuffer sb = new StringBuffer(strS);
sb.append(strS);
System.out.println( (sb.indexOf(strP) == -1 ? "No" : "Yes") );
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
14,
4,
18,
4,
18,
13,
13,
13,
30,
0,
13,
17,
3,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
11,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
36,
52
],
[
52,
53
],
[
53,
54
],
[
36,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
58,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
11,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
70,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
11,
82
],
[
82,
83
],
[
83,
84
],
[
9,
85
],
[
85,
86
]
]
| [
"import java.util.*;\nimport java.io.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String S = sc.next();\n String p = sc.next();\n\n String S2 = S + S;\n boolean result = false;\n for (int i = 0; i < S2.length() - p.length() + 1; i++) {\n if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }\n }\n if (result) {\n out.printf(\"Yes\\n\");\n } else {\n out.printf(\"No\\n\");\n }\n out.flush();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String S = sc.next();\n String p = sc.next();\n\n String S2 = S + S;\n boolean result = false;\n for (int i = 0; i < S2.length() - p.length() + 1; i++) {\n if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }\n }\n if (result) {\n out.printf(\"Yes\\n\");\n } else {\n out.printf(\"No\\n\");\n }\n out.flush();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String S = sc.next();\n String p = sc.next();\n\n String S2 = S + S;\n boolean result = false;\n for (int i = 0; i < S2.length() - p.length() + 1; i++) {\n if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }\n }\n if (result) {\n out.printf(\"Yes\\n\");\n } else {\n out.printf(\"No\\n\");\n }\n out.flush();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String S = sc.next();\n String p = sc.next();\n\n String S2 = S + S;\n boolean result = false;\n for (int i = 0; i < S2.length() - p.length() + 1; i++) {\n if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }\n }\n if (result) {\n out.printf(\"Yes\\n\");\n } else {\n out.printf(\"No\\n\");\n }\n out.flush();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"String S2 = S + S;",
"S2",
"S + S",
"S",
"S",
"boolean result = false;",
"result",
"false",
"for (int i = 0; i < S2.length() - p.length() + 1; i++) {\n if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < S2.length() - p.length() + 1",
"i",
"S2.length() - p.length() + 1",
"S2.length() - p.length()",
"S2.length()",
"S2.length",
"S2",
"p.length()",
"p.length",
"p",
"1",
"i++",
"i++",
"i",
"{\n if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }\n }",
"{\n if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }\n }",
"if (S2.substring(i).startsWith(p)) {\n result = true;\n break;\n }",
"S2.substring(i).startsWith(p)",
"S2.substring(i).startsWith",
"S2.substring(i)",
"S2.substring",
"S2",
"i",
"p",
"{\n result = true;\n break;\n }",
"result = true",
"result",
"true",
"break;",
"if (result) {\n out.printf(\"Yes\\n\");\n } else {\n out.printf(\"No\\n\");\n }",
"result",
"{\n out.printf(\"Yes\\n\");\n }",
"out.printf(\"Yes\\n\")",
"out.printf",
"out",
"\"Yes\\n\"",
"{\n out.printf(\"No\\n\");\n }",
"out.printf(\"No\\n\")",
"out.printf",
"out",
"\"No\\n\"",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args"
]
| import java.util.*;
import java.io.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
String S = sc.next();
String p = sc.next();
String S2 = S + S;
boolean result = false;
for (int i = 0; i < S2.length() - p.length() + 1; i++) {
if (S2.substring(i).startsWith(p)) {
result = true;
break;
}
}
if (result) {
out.printf("Yes\n");
} else {
out.printf("No\n");
}
out.flush();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
0,
13,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
56,
14
],
[
56,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
17,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
34,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
15,
53
],
[
53,
54
],
[
0,
55
],
[
55,
56
],
[
55,
57
]
]
| [
"import java.awt.*;\nimport java.awt.geom.*;\nimport java.io.*;\nimport java.util.*;\n\npublic class Main{\n public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n //行の読み込み\n String ring = in.nextLine();\n ring += ring;\n String str = in.nextLine();\n if(ring.contains(str)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}\n",
"import java.awt.*;",
"awt.*",
"java",
"import java.awt.geom.*;",
"geom.*",
"java.awt",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n //行の読み込み\n String ring = in.nextLine();\n ring += ring;\n String str = in.nextLine();\n if(ring.contains(str)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n //行の読み込み\n String ring = in.nextLine();\n ring += ring;\n String str = in.nextLine();\n if(ring.contains(str)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner in = new Scanner(System.in);\n //行の読み込み\n String ring = in.nextLine();\n ring += ring;\n String str = in.nextLine();\n if(ring.contains(str)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String ring = in.nextLine();",
"ring",
"in.nextLine()",
"in.nextLine",
"in",
"ring += ring",
"ring",
"ring",
"String str = in.nextLine();",
"str",
"in.nextLine()",
"in.nextLine",
"in",
"if(ring.contains(str)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"ring.contains(str)",
"ring.contains",
"ring",
"str",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"public class Main{\n public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n //行の読み込み\n String ring = in.nextLine();\n ring += ring;\n String str = in.nextLine();\n if(ring.contains(str)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String args[]) {\n Scanner in = new Scanner(System.in);\n //行の読み込み\n String ring = in.nextLine();\n ring += ring;\n String str = in.nextLine();\n if(ring.contains(str)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.awt.*;
import java.awt.geom.*;
import java.io.*;
import java.util.*;
public class Main{
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
//行の読み込み
String ring = in.nextLine();
ring += ring;
String str = in.nextLine();
if(ring.contains(str)){
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
13,
41,
13,
4,
18,
13,
14,
40,
4,
18,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
15,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
26,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
24,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
6,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n StringBuilder s = new StringBuilder(scanner.nextLine());\n s.append(s);\n String p = scanner.nextLine();\n\n if(!s.toString().contains(p)){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n scanner.close();\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n StringBuilder s = new StringBuilder(scanner.nextLine());\n s.append(s);\n String p = scanner.nextLine();\n\n if(!s.toString().contains(p)){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n scanner.close();\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n StringBuilder s = new StringBuilder(scanner.nextLine());\n s.append(s);\n String p = scanner.nextLine();\n\n if(!s.toString().contains(p)){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n scanner.close();\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n StringBuilder s = new StringBuilder(scanner.nextLine());\n s.append(s);\n String p = scanner.nextLine();\n\n if(!s.toString().contains(p)){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n scanner.close();\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"StringBuilder s = new StringBuilder(scanner.nextLine());",
"s",
"new StringBuilder(scanner.nextLine())",
"s.append(s)",
"s.append",
"s",
"s",
"String p = scanner.nextLine();",
"p",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"if(!s.toString().contains(p)){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }",
"!s.toString().contains(p)",
"s.toString().contains(p)",
"s.toString().contains",
"s.toString()",
"s.toString",
"s",
"p",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n StringBuilder s = new StringBuilder(scanner.nextLine());\n s.append(s);\n String p = scanner.nextLine();\n\n if(!s.toString().contains(p)){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n scanner.close();\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n\n StringBuilder s = new StringBuilder(scanner.nextLine());\n s.append(s);\n String p = scanner.nextLine();\n\n if(!s.toString().contains(p)){\n System.out.println(\"No\");\n }else{\n System.out.println(\"Yes\");\n }\n\n scanner.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
StringBuilder s = new StringBuilder(scanner.nextLine());
s.append(s);
String p = scanner.nextLine();
if(!s.toString().contains(p)){
System.out.println("No");
}else{
System.out.println("Yes");
}
scanner.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
11,
1,
0,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
4,
18,
4,
18,
13,
13,
2,
13,
4,
18,
13,
13,
0,
13,
17,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
18,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
3,
14,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
17,
13,
14,
2,
13,
17,
0,
13,
17,
14,
4,
18,
13,
13,
0,
13,
17,
14,
2,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
151,
8
],
[
151,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
35,
49
],
[
49,
50
],
[
50,
51
],
[
35,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
54,
67
],
[
67,
68
],
[
67,
69
],
[
11,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
70,
80
],
[
80,
81
],
[
81,
82
],
[
70,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
87,
91
],
[
91,
92
],
[
92,
93
],
[
84,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
94,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
11,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
112,
116
],
[
106,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
121,
123
],
[
117,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
11,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
132,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
9,
148
],
[
148,
149
],
[
0,
150
],
[
150,
151
],
[
150,
152
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String p=sc.next();\n String s=sc.next();\n String t;\n boolean loopflag=false;\n boolean flag=false;\n int i;\n for(i=0;i<p.length()-s.length();i++){\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }\n for(i=0;i<s.length();i++){\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }\n if(loopflag){\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }\n if(flag || loopflag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String p=sc.next();\n String s=sc.next();\n String t;\n boolean loopflag=false;\n boolean flag=false;\n int i;\n for(i=0;i<p.length()-s.length();i++){\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }\n for(i=0;i<s.length();i++){\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }\n if(loopflag){\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }\n if(flag || loopflag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String p=sc.next();\n String s=sc.next();\n String t;\n boolean loopflag=false;\n boolean flag=false;\n int i;\n for(i=0;i<p.length()-s.length();i++){\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }\n for(i=0;i<s.length();i++){\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }\n if(loopflag){\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }\n if(flag || loopflag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n String p=sc.next();\n String s=sc.next();\n String t;\n boolean loopflag=false;\n boolean flag=false;\n int i;\n for(i=0;i<p.length()-s.length();i++){\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }\n for(i=0;i<s.length();i++){\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }\n if(loopflag){\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }\n if(flag || loopflag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String p=sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"String s=sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t;",
"t",
"boolean loopflag=false;",
"loopflag",
"false",
"boolean flag=false;",
"flag",
"false",
"int i;",
"i",
"for(i=0;i<p.length()-s.length();i++){\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }",
"i=0;",
"i=0",
"i",
"0",
"i<p.length()-s.length()",
"i",
"p.length()-s.length()",
"p.length()",
"p.length",
"p",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }",
"{\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }",
"if(p.substring(i,i+s.length()).equals(s)) flag=true;",
"p.substring(i,i+s.length()).equals(s)",
"p.substring(i,i+s.length()).equals",
"p.substring(i,i+s.length())",
"p.substring",
"p",
"i",
"i+s.length()",
"i",
"s.length()",
"s.length",
"s",
"s",
"flag=true",
"flag",
"true",
"for(i=0;i<s.length();i++){\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }",
"i=0;",
"i=0",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }",
"{\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }",
"t=s.substring(i,s.length())",
"t",
"s.substring(i,s.length())",
"s.substring",
"s",
"i",
"s.length()",
"s.length",
"s",
"if(p.startsWith(t)){\n loopflag=true;\n break;\n }",
"p.startsWith(t)",
"p.startsWith",
"p",
"t",
"{\n loopflag=true;\n break;\n }",
"loopflag=true",
"loopflag",
"true",
"break;",
"if(loopflag){\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }",
"loopflag",
"{\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }",
"loopflag=false",
"loopflag",
"false",
"t=s.substring(0,i)",
"t",
"s.substring(0,i)",
"s.substring",
"s",
"0",
"i",
"if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;",
"i==0",
"i",
"0",
"loopflag=true",
"loopflag",
"true",
"if(p.endsWith(t)) loopflag=true;",
"p.endsWith(t)",
"p.endsWith",
"p",
"t",
"loopflag=true",
"loopflag",
"true",
"if(flag || loopflag) System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"flag || loopflag",
"flag",
"loopflag",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String p=sc.next();\n String s=sc.next();\n String t;\n boolean loopflag=false;\n boolean flag=false;\n int i;\n for(i=0;i<p.length()-s.length();i++){\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }\n for(i=0;i<s.length();i++){\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }\n if(loopflag){\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }\n if(flag || loopflag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String p=sc.next();\n String s=sc.next();\n String t;\n boolean loopflag=false;\n boolean flag=false;\n int i;\n for(i=0;i<p.length()-s.length();i++){\n if(p.substring(i,i+s.length()).equals(s)) flag=true;\n }\n for(i=0;i<s.length();i++){\n t=s.substring(i,s.length());\n if(p.startsWith(t)){\n loopflag=true;\n break;\n }\n }\n if(loopflag){\n loopflag=false;\n t=s.substring(0,i);\n if(i==0) loopflag=true;\n else if(p.endsWith(t)) loopflag=true;\n }\n if(flag || loopflag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String p=sc.next();
String s=sc.next();
String t;
boolean loopflag=false;
boolean flag=false;
int i;
for(i=0;i<p.length()-s.length();i++){
if(p.substring(i,i+s.length()).equals(s)) flag=true;
}
for(i=0;i<s.length();i++){
t=s.substring(i,s.length());
if(p.startsWith(t)){
loopflag=true;
break;
}
}
if(loopflag){
loopflag=false;
t=s.substring(0,i);
if(i==0) loopflag=true;
else if(p.endsWith(t)) loopflag=true;
}
if(flag || loopflag) System.out.println("Yes");
else System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
3,
14,
2,
18,
13,
13,
18,
13,
17,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
18,
13,
0,
13,
17,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
13,
17,
3,
40,
13,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
35,
45
],
[
45,
46
],
[
46,
47
],
[
35,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
69,
79
],
[
79,
80
],
[
80,
81
],
[
69,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
84,
90
],
[
90,
91
],
[
90,
92
],
[
83,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
83,
106
],
[
106,
107
],
[
83,
108
],
[
108,
109
],
[
8,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
110,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
6,
127
],
[
127,
128
]
]
| [
"import java.util.*;\n\n\nclass Main{\n public static void main(String[] args){\n \tScanner sc= new Scanner(System.in);\n String s=sc.nextLine(),p=sc.nextLine();\n char[] l1 = s.toCharArray();\n char[] l2 = p.toCharArray();\n\n int flag=0;\n for(int i=0;i<s.length();i++){\n\t if(flag>=p.length()) break; \t\n\tif(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }\n\t }\n if(flag==0){System.out.println(\"No\");\n }\n else System.out.println(\"Yes\");\n\t }\n }\n ",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args){\n \tScanner sc= new Scanner(System.in);\n String s=sc.nextLine(),p=sc.nextLine();\n char[] l1 = s.toCharArray();\n char[] l2 = p.toCharArray();\n\n int flag=0;\n for(int i=0;i<s.length();i++){\n\t if(flag>=p.length()) break; \t\n\tif(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }\n\t }\n if(flag==0){System.out.println(\"No\");\n }\n else System.out.println(\"Yes\");\n\t }\n }",
"Main",
"public static void main(String[] args){\n \tScanner sc= new Scanner(System.in);\n String s=sc.nextLine(),p=sc.nextLine();\n char[] l1 = s.toCharArray();\n char[] l2 = p.toCharArray();\n\n int flag=0;\n for(int i=0;i<s.length();i++){\n\t if(flag>=p.length()) break; \t\n\tif(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }\n\t }\n if(flag==0){System.out.println(\"No\");\n }\n else System.out.println(\"Yes\");\n\t }",
"main",
"{\n \tScanner sc= new Scanner(System.in);\n String s=sc.nextLine(),p=sc.nextLine();\n char[] l1 = s.toCharArray();\n char[] l2 = p.toCharArray();\n\n int flag=0;\n for(int i=0;i<s.length();i++){\n\t if(flag>=p.length()) break; \t\n\tif(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }\n\t }\n if(flag==0){System.out.println(\"No\");\n }\n else System.out.println(\"Yes\");\n\t }",
"Scanner sc= new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s=sc.nextLine()",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"p=sc.nextLine();",
"p",
"sc.nextLine()",
"sc.nextLine",
"sc",
"char[] l1 = s.toCharArray();",
"l1",
"s.toCharArray()",
"s.toCharArray",
"s",
"char[] l2 = p.toCharArray();",
"l2",
"p.toCharArray()",
"p.toCharArray",
"p",
"int flag=0;",
"flag",
"0",
"for(int i=0;i<s.length();i++){\n\t if(flag>=p.length()) break; \t\n\tif(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t if(flag>=p.length()) break; \t\n\tif(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }\n\t }",
"{\n\t if(flag>=p.length()) break; \t\n\tif(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }\n\t }",
"if(flag>=p.length()) break;",
"flag>=p.length()",
"flag",
"p.length()",
"p.length",
"p",
"break;",
"if(l1[i]==l2[0]) {\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }",
"l1[i]==l2[0]",
"l1[i]",
"l1",
"i",
"l2[0]",
"l2",
"0",
"{\n\t\tint temp=i;\n\t for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}\n\t }",
"int temp=i;",
"temp",
"i",
"for(int j=0;j<p.length();j++){ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<p.length()",
"j",
"p.length()",
"p.length",
"p",
"j++",
"j++",
"j",
"{ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}",
"{ \n\t\t\tif(temp==s.length())temp=0;\n\t\t\tif(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}\n\t\t\ttemp++;flag++;\n\t\t\t}",
"if(temp==s.length())temp=0;",
"temp==s.length()",
"temp",
"s.length()",
"s.length",
"s",
"temp=0",
"temp",
"0",
"if(l2[j]!=l1[temp]){\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}",
"l2[j]!=l1[temp]",
"l2[j]",
"l2",
"j",
"l1[temp]",
"l1",
"temp",
"{\n\t\t\t\tflag=0;\n\t\t\t\tbreak; \n\t\t\t}",
"flag=0",
"flag",
"0",
"break;",
"temp++",
"temp",
"flag++",
"flag",
"if(flag==0){System.out.println(\"No\");\n }\n else System.out.println(\"Yes\");",
"flag==0",
"flag",
"0",
"{System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"String[] args",
"args"
]
| import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc= new Scanner(System.in);
String s=sc.nextLine(),p=sc.nextLine();
char[] l1 = s.toCharArray();
char[] l2 = p.toCharArray();
int flag=0;
for(int i=0;i<s.length();i++){
if(flag>=p.length()) break;
if(l1[i]==l2[0]) {
int temp=i;
for(int j=0;j<p.length();j++){
if(temp==s.length())temp=0;
if(l2[j]!=l1[temp]){
flag=0;
break;
}
temp++;flag++;
}
}
}
if(flag==0){System.out.println("No");
}
else System.out.println("Yes");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
41,
13,
4,
18,
13,
13,
14,
2,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
61,
5
],
[
61,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
39,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
39,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
6,
58
],
[
58,
59
],
[
0,
60
],
[
60,
61
],
[
60,
62
]
]
| [
"import java.util.*;\n \npublic class Main {\n \n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n \n String text=\"\";\n String target=\"\";\n text=scan.nextLine();\n target=scan.nextLine();\n \n text=text+text;\n int index=text.indexOf(target);\n if(index!=-1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n \n String text=\"\";\n String target=\"\";\n text=scan.nextLine();\n target=scan.nextLine();\n \n text=text+text;\n int index=text.indexOf(target);\n if(index!=-1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n \n String text=\"\";\n String target=\"\";\n text=scan.nextLine();\n target=scan.nextLine();\n \n text=text+text;\n int index=text.indexOf(target);\n if(index!=-1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scan=new Scanner(System.in);\n \n String text=\"\";\n String target=\"\";\n text=scan.nextLine();\n target=scan.nextLine();\n \n text=text+text;\n int index=text.indexOf(target);\n if(index!=-1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String text=\"\";",
"text",
"\"\"",
"String target=\"\";",
"target",
"\"\"",
"text=scan.nextLine()",
"text",
"scan.nextLine()",
"scan.nextLine",
"scan",
"target=scan.nextLine()",
"target",
"scan.nextLine()",
"scan.nextLine",
"scan",
"text=text+text",
"text",
"text+text",
"text",
"text",
"int index=text.indexOf(target);",
"index",
"text.indexOf(target)",
"text.indexOf",
"text",
"target",
"if(index!=-1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"index!=-1",
"index",
"-1",
"1",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n \n String text=\"\";\n String target=\"\";\n text=scan.nextLine();\n target=scan.nextLine();\n \n text=text+text;\n int index=text.indexOf(target);\n if(index!=-1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n \n public static void main(String[] args){\n Scanner scan=new Scanner(System.in);\n \n String text=\"\";\n String target=\"\";\n text=scan.nextLine();\n target=scan.nextLine();\n \n text=text+text;\n int index=text.indexOf(target);\n if(index!=-1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner scan=new Scanner(System.in);
String text="";
String target="";
text=scan.nextLine();
target=scan.nextLine();
text=text+text;
int index=text.indexOf(target);
if(index!=-1){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
17,
4,
18,
13,
13,
30,
4,
18,
13,
13,
41,
13,
4,
18,
13,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
13,
14,
2,
4,
18,
13,
2,
4,
18,
13,
13,
30,
0,
13,
2,
13,
13,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
14,
2,
13,
2,
4,
18,
13,
17,
30,
0,
13,
17,
3,
40,
13,
30,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
158,
14
],
[
158,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
34,
36
],
[
17,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
37,
47
],
[
47,
48
],
[
48,
49
],
[
37,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
53,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
17,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
17,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
76,
82
],
[
82,
83
],
[
82,
84
],
[
76,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
90,
94
],
[
85,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
76,
101
],
[
101,
102
],
[
101,
103
],
[
76,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
104,
116
],
[
116,
117
],
[
117,
118
],
[
104,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
122,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
121,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
135,
139
],
[
132,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
131,
145
],
[
145,
146
],
[
121,
147
],
[
147,
148
],
[
17,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
15,
155
],
[
155,
156
],
[
0,
157
],
[
157,
158
],
[
157,
159
]
]
| [
"import java.util.ArrayList;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main (String[] args){\n Scanner scan = new Scanner(System.in);\n String s = scan.next();\n String p = scan.next();\n String judge = \"No\";\n \n List<Integer> s_markList = new ArrayList<Integer>();\n\n\n for (int i = 0; i < s.length(); i++) {\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }\n \n \n Iterator<Integer> it = s_markList.iterator();\n while(it.hasNext()){\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }\n \n System.out.println(judge);\n \n }\n}\n",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Iterator;",
"Iterator",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main (String[] args){\n Scanner scan = new Scanner(System.in);\n String s = scan.next();\n String p = scan.next();\n String judge = \"No\";\n \n List<Integer> s_markList = new ArrayList<Integer>();\n\n\n for (int i = 0; i < s.length(); i++) {\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }\n \n \n Iterator<Integer> it = s_markList.iterator();\n while(it.hasNext()){\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }\n \n System.out.println(judge);\n \n }\n}",
"Main",
"public static void main (String[] args){\n Scanner scan = new Scanner(System.in);\n String s = scan.next();\n String p = scan.next();\n String judge = \"No\";\n \n List<Integer> s_markList = new ArrayList<Integer>();\n\n\n for (int i = 0; i < s.length(); i++) {\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }\n \n \n Iterator<Integer> it = s_markList.iterator();\n while(it.hasNext()){\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }\n \n System.out.println(judge);\n \n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n String s = scan.next();\n String p = scan.next();\n String judge = \"No\";\n \n List<Integer> s_markList = new ArrayList<Integer>();\n\n\n for (int i = 0; i < s.length(); i++) {\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }\n \n \n Iterator<Integer> it = s_markList.iterator();\n while(it.hasNext()){\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }\n \n System.out.println(judge);\n \n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String p = scan.next();",
"p",
"scan.next()",
"scan.next",
"scan",
"String judge = \"No\";",
"judge",
"\"No\"",
"List<Integer> s_markList = new ArrayList<Integer>();",
"s_markList",
"new ArrayList<Integer>()",
"for (int i = 0; i < s.length(); i++) {\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }",
"{\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }",
"if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }",
"p.charAt(0) == s.charAt(i)",
"p.charAt(0)",
"p.charAt",
"p",
"0",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"{\n s_markList.add(i);\n }",
"s_markList.add(i)",
"s_markList.add",
"s_markList",
"i",
"Iterator<Integer> it = s_markList.iterator();",
"it",
"s_markList.iterator()",
"s_markList.iterator",
"s_markList",
"while(it.hasNext()){\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }",
"it.hasNext()",
"it.hasNext",
"it",
"{\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }",
"Integer e =it.next();",
"e",
"it.next()",
"it.next",
"it",
"String ss = s;",
"ss",
"s",
"if(p.length() > s.length()-e){\n ss = s + s;\n \n }",
"p.length() > s.length()-e",
"p.length()",
"p.length",
"p",
"s.length()-e",
"s.length()",
"s.length",
"s",
"e",
"{\n ss = s + s;\n \n }",
"ss = s + s",
"ss",
"s + s",
"s",
"s",
"int f = 0;",
"f",
"0",
"for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }",
"int i = e;",
"int i = e;",
"i",
"e",
"i < e + p.length()",
"i",
"e + p.length()",
"e",
"p.length()",
"p.length",
"p",
"i++",
"i++",
"i",
"{\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }",
"{\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }",
"if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }",
"ss.charAt(i) == p.charAt(f)",
"ss.charAt(i)",
"ss.charAt",
"ss",
"i",
"p.charAt(f)",
"p.charAt",
"p",
"f",
"{\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }",
"if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }",
"f == p.length()-1",
"f",
"p.length()-1",
"p.length()",
"p.length",
"p",
"1",
"{\n \n judge = \"Yes\";\n break;\n }",
"judge = \"Yes\"",
"judge",
"\"Yes\"",
"break;",
"f++",
"f",
"{\n break;\n }",
"break;",
"System.out.println(judge)",
"System.out.println",
"System.out",
"System",
"System.out",
"judge",
"String[] args",
"args",
"public class Main {\n public static void main (String[] args){\n Scanner scan = new Scanner(System.in);\n String s = scan.next();\n String p = scan.next();\n String judge = \"No\";\n \n List<Integer> s_markList = new ArrayList<Integer>();\n\n\n for (int i = 0; i < s.length(); i++) {\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }\n \n \n Iterator<Integer> it = s_markList.iterator();\n while(it.hasNext()){\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }\n \n System.out.println(judge);\n \n }\n}",
"public class Main {\n public static void main (String[] args){\n Scanner scan = new Scanner(System.in);\n String s = scan.next();\n String p = scan.next();\n String judge = \"No\";\n \n List<Integer> s_markList = new ArrayList<Integer>();\n\n\n for (int i = 0; i < s.length(); i++) {\n if(p.charAt(0) == s.charAt(i)){\n s_markList.add(i);\n }\n }\n \n \n Iterator<Integer> it = s_markList.iterator();\n while(it.hasNext()){\n Integer e =it.next();\n String ss = s;\n if(p.length() > s.length()-e){\n ss = s + s;\n \n }\n int f = 0;\n \n for(int i = e; i < e + p.length(); i++){\n \n if(ss.charAt(i) == p.charAt(f)){\n\n if(f == p.length()-1){\n \n judge = \"Yes\";\n break;\n }\n\n f++;\n }else{\n break;\n }\n }\n }\n \n System.out.println(judge);\n \n }\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main (String[] args){
Scanner scan = new Scanner(System.in);
String s = scan.next();
String p = scan.next();
String judge = "No";
List<Integer> s_markList = new ArrayList<Integer>();
for (int i = 0; i < s.length(); i++) {
if(p.charAt(0) == s.charAt(i)){
s_markList.add(i);
}
}
Iterator<Integer> it = s_markList.iterator();
while(it.hasNext()){
Integer e =it.next();
String ss = s;
if(p.length() > s.length()-e){
ss = s + s;
}
int f = 0;
for(int i = e; i < e + p.length(); i++){
if(ss.charAt(i) == p.charAt(f)){
if(f == p.length()-1){
judge = "Yes";
break;
}
f++;
}else{
break;
}
}
}
System.out.println(judge);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
4,
18,
13,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
2,
4,
18,
13,
13,
30,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
17,
2,
4,
18,
13,
2,
4,
18,
13,
13,
14,
4,
18,
13,
13,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
119,
5
],
[
119,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
27,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
42,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
59,
63
],
[
42,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
83,
87
],
[
41,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
88,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
8,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
98,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
6,
116
],
[
116,
117
],
[
0,
118
],
[
118,
119
],
[
118,
120
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\tString c;\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\tString c;\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\tString c;\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\tString c;\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"String c;",
"c",
"int flag = 0;",
"flag",
"0",
"for(int i = 0; i < s.length(); i++) {\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}",
"i + p.length() <= s.length()",
"i + p.length()",
"i",
"p.length()",
"p.length",
"p",
"s.length()",
"s.length",
"s",
"{\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t}",
"c = s.substring(i, p.length() + i)",
"c",
"s.substring(i, p.length() + i)",
"s.substring",
"s",
"i",
"p.length() + i",
"p.length()",
"p.length",
"p",
"i",
"{\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}",
"c = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i))",
"c",
"s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i))",
"s.substring(i, s.length())",
"s.substring",
"s",
"i",
"s.length()",
"s.length",
"s",
"s.substring(0, p.length() - (s.length() - i))",
"s.substring",
"s",
"0",
"p.length() - (s.length() - i)",
"p.length()",
"p.length",
"p",
"(s.length() - i)",
"s.length()",
"s.length",
"s",
"i",
"if(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}",
"c.equals(p)",
"c.equals",
"c",
"p",
"{\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}",
"flag = 1",
"flag",
"1",
"break;",
"if(flag == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"flag == 1",
"flag",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\tString c;\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tString s = sc.next();\n\t\tString p = sc.next();\n\t\tString c;\n\t\tint flag = 0;\n\t\t\n\t\tfor(int i = 0; i < s.length(); i++) {\n\t\t\tif(i + p.length() <= s.length()){\n\t\t\t\tc = s.substring(i, p.length() + i);\n\t\t\t} else {\n\t\t\t\tc = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));\n\t\t\t}\n\t\t\t\n\t\t\tif(c.equals(p)) {\n\t\t\t\tflag = 1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String p = sc.next();
String c;
int flag = 0;
for(int i = 0; i < s.length(); i++) {
if(i + p.length() <= s.length()){
c = s.substring(i, p.length() + i);
} else {
c = s.substring(i, s.length()) + s.substring(0, p.length() - (s.length() - i));
}
if(c.equals(p)) {
flag = 1;
break;
}
}
if(flag == 1) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
4,
18,
13,
30,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
29,
0,
13,
2,
4,
18,
13,
17,
4,
18,
13,
17,
40,
13,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
66,
2
],
[
66,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
7,
8
],
[
8,
9
],
[
8,
10
],
[
7,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
7,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
7,
21
],
[
21,
22
],
[
21,
23
],
[
7,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
36,
43
],
[
30,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
46,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
30,
55
],
[
55,
56
],
[
7,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
3,
63
],
[
63,
64
],
[
0,
65
],
[
65,
66
],
[
65,
67
]
]
| [
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (java.util.Scanner sc = new java.util.Scanner(System.in)) {\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (java.util.Scanner sc = new java.util.Scanner(System.in)) {\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry (java.util.Scanner sc = new java.util.Scanner(System.in)) {\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\ttry (java.util.Scanner sc = new java.util.Scanner(System.in)) {\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"try (java.util.Scanner sc = new java.util.Scanner(System.in)) {\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"{\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"java.util.Scanner sc = new java.util.Scanner(System.in)",
"java.util.Scanner sc = new java.util.Scanner(System.in)",
"new java.util.Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String p = sc.next();",
"p",
"sc.next()",
"sc.next",
"sc",
"int cnt = 0;",
"cnt",
"0",
"while (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}",
"cnt != s.length()",
"cnt",
"s.length()",
"s.length",
"s",
"{\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}",
"if (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"s.contains(p)",
"s.contains",
"s",
"p",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"s = s.substring(1) + s.charAt(0)",
"s",
"s.substring(1) + s.charAt(0)",
"s.substring(1)",
"s.substring",
"s",
"1",
"s.charAt(0)",
"s.charAt",
"s",
"0",
"cnt++",
"cnt",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (java.util.Scanner sc = new java.util.Scanner(System.in)) {\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (java.util.Scanner sc = new java.util.Scanner(System.in)) {\n\t\t\tString s = sc.next();\n\t\t\tString p = sc.next();\n\t\t\tint cnt = 0;\n\n\t\t\twhile (cnt != s.length()) {\n\t\t\t\tif (s.contains(p)) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\ts = s.substring(1) + s.charAt(0);\n\t\t\t\tcnt++;\n\t\t\t}\n\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
| public class Main {
public static void main(String[] args) {
try (java.util.Scanner sc = new java.util.Scanner(System.in)) {
String s = sc.next();
String p = sc.next();
int cnt = 0;
while (cnt != s.length()) {
if (s.contains(p)) {
System.out.println("Yes");
return;
}
s = s.substring(1) + s.charAt(0);
cnt++;
}
System.out.println("No");
}
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.