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,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
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,
0,
13,
4,
18,
13,
13,
4,
13,
13,
13,
0,
13,
2,
4,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
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,
13,
40,
13,
29,
13,
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
],
[
169,
17
],
[
169,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
169,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
66,
67
],
[
66,
68
],
[
55,
69
],
[
69,
70
],
[
69,
71
],
[
55,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
72,
86
],
[
86,
87
],
[
87,
88
],
[
72,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
90,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
108,
111
],
[
55,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
114,
118
],
[
55,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
53,
123
],
[
123,
124
],
[
53,
125
],
[
125,
126
],
[
53,
127
],
[
127,
128
],
[
51,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
135,
145
],
[
145,
146
],
[
146,
147
],
[
135,
148
],
[
149,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
151,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
150,
160
],
[
160,
161
],
[
131,
162
],
[
162,
163
],
[
129,
164
],
[
164,
165
],
[
129,
166
],
[
166,
167
],
[
0,
168
],
[
168,
169
],
[
168,
170
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n String T = in.next();\n int match_cnt = 0;\n int ans = 0;\n for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }\n ans = T.length() - match_cnt;\n // 出力\n out.println(ans);\n\n }\n\n int cnt(String S, String T) {\n int res = 0;\n for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }\n return res;\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n String T = in.next();\n int match_cnt = 0;\n int ans = 0;\n for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }\n ans = T.length() - match_cnt;\n // 出力\n out.println(ans);\n\n }\n\n int cnt(String S, String T) {\n int res = 0;\n for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }\n return res;\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"BSubstring solver = new BSubstring();",
"solver",
"new BSubstring()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BSubstring {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n String T = in.next();\n int match_cnt = 0;\n int ans = 0;\n for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }\n ans = T.length() - match_cnt;\n // 出力\n out.println(ans);\n\n }\n\n int cnt(String S, String T) {\n int res = 0;\n for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }\n return res;\n }\n\n }",
"BSubstring",
"public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n String T = in.next();\n int match_cnt = 0;\n int ans = 0;\n for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }\n ans = T.length() - match_cnt;\n // 出力\n out.println(ans);\n\n }",
"solve",
"{\n // 入力\n String S = in.next();\n String T = in.next();\n int match_cnt = 0;\n int ans = 0;\n for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }\n ans = T.length() - match_cnt;\n // 出力\n out.println(ans);\n\n }",
"String S = in.next();",
"S",
"in.next()",
"in.next",
"in",
"String T = in.next();",
"T",
"in.next()",
"in.next",
"in",
"int match_cnt = 0;",
"match_cnt",
"0",
"int ans = 0;",
"ans",
"0",
"for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= S.length() - T.length()",
"i",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }",
"{\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }",
"String tmp = S.substring(i, i + T.length());",
"tmp",
"S.substring(i, i + T.length())",
"S.substring",
"S",
"i",
"i + T.length()",
"i",
"T.length()",
"T.length",
"T",
"match_cnt = Math.max(match_cnt, cnt(tmp, T))",
"match_cnt",
"Math.max(match_cnt, cnt(tmp, T))",
"Math.max",
"Math",
"match_cnt",
"cnt(tmp, T)",
"cnt",
"tmp",
"T",
"ans = T.length() - match_cnt",
"ans",
"T.length() - match_cnt",
"T.length()",
"T.length",
"T",
"match_cnt",
"out.println(ans)",
"out.println",
"out",
"ans",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"int cnt(String S, String T) {\n int res = 0;\n for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }\n return res;\n }",
"cnt",
"{\n int res = 0;\n for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }\n return res;\n }",
"int res = 0;",
"res",
"0",
"for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < T.length()",
"i",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n if (S.charAt(i) == T.charAt(i)) res++;\n }",
"{\n if (S.charAt(i) == T.charAt(i)) res++;\n }",
"if (S.charAt(i) == T.charAt(i)) res++;",
"S.charAt(i) == T.charAt(i)",
"S.charAt(i)",
"S.charAt",
"S",
"i",
"T.charAt(i)",
"T.charAt",
"T",
"i",
"res++",
"res",
"return res;",
"res",
"String S",
"S",
"String T",
"T",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n String T = in.next();\n int match_cnt = 0;\n int ans = 0;\n for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }\n ans = T.length() - match_cnt;\n // 出力\n out.println(ans);\n\n }\n\n int cnt(String S, String T) {\n int res = 0;\n for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }\n return res;\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n String S = in.next();\n String T = in.next();\n int match_cnt = 0;\n int ans = 0;\n for (int i = 0; i <= S.length() - T.length(); i++) {\n String tmp = S.substring(i, i + T.length());\n match_cnt = Math.max(match_cnt, cnt(tmp, T));\n }\n ans = T.length() - match_cnt;\n // 出力\n out.println(ans);\n\n }\n\n int cnt(String S, String T) {\n int res = 0;\n for (int i = 0; i < T.length(); i++) {\n if (S.charAt(i) == T.charAt(i)) res++;\n }\n return res;\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
BSubstring solver = new BSubstring();
solver.solve(1, in, out);
out.close();
}
static class BSubstring {
public void solve(int testNumber, Scanner in, PrintWriter out) {
// 入力
String S = in.next();
String T = in.next();
int match_cnt = 0;
int ans = 0;
for (int i = 0; i <= S.length() - T.length(); i++) {
String tmp = S.substring(i, i + T.length());
match_cnt = Math.max(match_cnt, cnt(tmp, T));
}
ans = T.length() - match_cnt;
// 出力
out.println(ans);
}
int cnt(String S, String T) {
int res = 0;
for (int i = 0; i < T.length(); i++) {
if (S.charAt(i) == T.charAt(i)) res++;
}
return res;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
4,
18,
17,
41,
13,
20,
12,
13,
30,
42,
2,
13,
13,
30,
14,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
29,
17,
29,
17,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
2,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
17,
42,
2,
2,
13,
17,
17,
30,
0,
13,
4,
18,
13,
13,
2,
13,
17,
0,
13,
17,
0,
13,
4,
18,
13,
13,
2,
13,
17,
29,
13,
23,
13,
12,
13,
30,
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,
13,
40,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
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,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
13,
4,
18,
13,
13,
2,
13,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
0,
13,
20,
23,
13,
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,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
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
],
[
641,
8
],
[
641,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
641,
14
],
[
14,
15
],
[
14,
16
],
[
641,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
29,
31
],
[
25,
32
],
[
32,
33
],
[
32,
34
],
[
19,
35
],
[
35,
36
],
[
17,
37
],
[
37,
38
],
[
17,
39
],
[
39,
40
],
[
641,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
57,
67
],
[
67,
68
],
[
43,
69
],
[
69,
70
],
[
41,
71
],
[
71,
72
],
[
41,
73
],
[
73,
74
],
[
641,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
77,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
92,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
92,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
77,
116
],
[
116,
117
],
[
75,
118
],
[
118,
119
],
[
641,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
123,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
129,
135
],
[
135,
136
],
[
122,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
137,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
137,
151
],
[
152,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
153,
159
],
[
159,
160
],
[
122,
161
],
[
161,
162
],
[
120,
163
],
[
163,
164
],
[
641,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
168,
171
],
[
172,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
173,
178
],
[
178,
179
],
[
178,
180
],
[
167,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
165,
186
],
[
186,
187
],
[
641,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
194,
199
],
[
199,
200
],
[
199,
201
],
[
194,
202
],
[
202,
203
],
[
203,
204
],
[
194,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
208,
210
],
[
190,
211
],
[
211,
212
],
[
188,
213
],
[
213,
214
],
[
641,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
220,
222
],
[
217,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
223,
228
],
[
228,
229
],
[
228,
230
],
[
223,
231
],
[
231,
232
],
[
232,
233
],
[
223,
234
],
[
235,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
239,
240
],
[
238,
241
],
[
235,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
244,
246
],
[
235,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
247,
251
],
[
251,
252
],
[
251,
253
],
[
235,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
254,
258
],
[
217,
259
],
[
259,
260
],
[
260,
261
],
[
259,
262
],
[
215,
263
],
[
263,
264
],
[
641,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
268,
269
],
[
268,
270
],
[
270,
271
],
[
270,
272
],
[
267,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
274,
278
],
[
273,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
282,
285
],
[
282,
286
],
[
286,
287
],
[
286,
288
],
[
279,
289
],
[
289,
290
],
[
289,
291
],
[
267,
292
],
[
292,
293
],
[
292,
294
],
[
294,
295
],
[
295,
296
],
[
294,
297
],
[
294,
298
],
[
298,
299
],
[
298,
300
],
[
267,
301
],
[
301,
302
],
[
265,
303
],
[
303,
304
],
[
641,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
311,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
319,
320
],
[
311,
321
],
[
321,
322
],
[
322,
323
],
[
311,
324
],
[
325,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
328,
331
],
[
327,
332
],
[
332,
333
],
[
333,
334
],
[
332,
335
],
[
326,
336
],
[
336,
337
],
[
307,
338
],
[
338,
339
],
[
305,
340
],
[
340,
341
],
[
305,
342
],
[
342,
343
],
[
641,
344
],
[
344,
345
],
[
344,
346
],
[
346,
347
],
[
347,
348
],
[
347,
349
],
[
346,
350
],
[
350,
351
],
[
350,
352
],
[
346,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
356,
357
],
[
346,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
361,
362
],
[
346,
363
],
[
363,
364
],
[
363,
365
],
[
365,
366
],
[
366,
367
],
[
346,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
371,
372
],
[
346,
373
],
[
373,
374
],
[
373,
375
],
[
346,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
378,
380
],
[
376,
381
],
[
381,
382
],
[
381,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
383,
387
],
[
376,
388
],
[
388,
389
],
[
389,
390
],
[
376,
391
],
[
392,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
396,
397
],
[
395,
398
],
[
395,
399
],
[
399,
400
],
[
399,
401
],
[
401,
402
],
[
402,
403
],
[
401,
404
],
[
401,
405
],
[
405,
406
],
[
405,
407
],
[
399,
408
],
[
346,
409
],
[
409,
410
],
[
410,
411
],
[
409,
412
],
[
346,
413
],
[
413,
414
],
[
414,
415
],
[
344,
416
],
[
416,
417
],
[
641,
418
],
[
418,
419
],
[
418,
420
],
[
420,
421
],
[
418,
422
],
[
422,
423
],
[
418,
424
],
[
424,
425
],
[
418,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
429,
431
],
[
418,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
435,
436
],
[
435,
437
],
[
432,
438
],
[
438,
439
],
[
418,
440
],
[
440,
441
],
[
440,
442
],
[
442,
443
],
[
443,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
444,
448
],
[
448,
449
],
[
449,
450
],
[
450,
451
],
[
443,
452
],
[
452,
453
],
[
453,
454
],
[
454,
455
],
[
454,
456
],
[
456,
457
],
[
457,
458
],
[
458,
459
],
[
453,
460
],
[
460,
461
],
[
461,
462
],
[
461,
463
],
[
442,
464
],
[
464,
465
],
[
465,
466
],
[
466,
467
],
[
418,
468
],
[
468,
469
],
[
468,
470
],
[
470,
471
],
[
471,
472
],
[
472,
473
],
[
473,
474
],
[
472,
475
],
[
475,
476
],
[
418,
477
],
[
477,
478
],
[
477,
479
],
[
479,
480
],
[
480,
481
],
[
481,
482
],
[
482,
483
],
[
481,
484
],
[
484,
485
],
[
418,
486
],
[
486,
487
],
[
486,
488
],
[
488,
489
],
[
489,
490
],
[
490,
491
],
[
491,
492
],
[
490,
493
],
[
493,
494
],
[
418,
495
],
[
495,
496
],
[
495,
497
],
[
497,
498
],
[
498,
499
],
[
497,
500
],
[
500,
501
],
[
500,
502
],
[
497,
505
],
[
505,
506
],
[
506,
507
],
[
507,
508
],
[
507,
509
],
[
505,
510
],
[
510,
511
],
[
510,
512
],
[
505,
513
],
[
513,
514
],
[
514,
515
],
[
505,
516
],
[
517,
517
],
[
517,
518
],
[
518,
519
],
[
518,
520
],
[
520,
521
],
[
517,
522
],
[
522,
523
],
[
523,
524
],
[
524,
525
],
[
524,
526
],
[
522,
527
],
[
527,
528
],
[
527,
529
],
[
522,
530
],
[
530,
531
],
[
531,
532
],
[
522,
533
],
[
534,
534
],
[
534,
535
],
[
535,
536
],
[
536,
537
],
[
537,
538
],
[
537,
539
],
[
536,
540
],
[
535,
541
],
[
541,
542
],
[
542,
543
],
[
541,
544
],
[
497,
545
],
[
545,
546
],
[
495,
547
],
[
547,
548
],
[
495,
549
],
[
549,
550
],
[
418,
551
],
[
551,
552
],
[
551,
553
],
[
553,
554
],
[
554,
555
],
[
555,
556
],
[
555,
557
],
[
555,
558
],
[
551,
559
],
[
559,
560
],
[
418,
561
],
[
561,
562
],
[
561,
563
],
[
563,
564
],
[
564,
565
],
[
564,
566
],
[
563,
568
],
[
568,
569
],
[
569,
570
],
[
570,
571
],
[
570,
572
],
[
568,
573
],
[
573,
574
],
[
573,
575
],
[
568,
576
],
[
576,
577
],
[
577,
578
],
[
568,
579
],
[
579,
580
],
[
580,
581
],
[
581,
582
],
[
581,
583
],
[
580,
584
],
[
584,
585
],
[
563,
586
],
[
586,
587
],
[
561,
588
],
[
588,
589
],
[
418,
590
],
[
590,
591
],
[
590,
592
],
[
592,
593
],
[
593,
594
],
[
593,
595
],
[
592,
597
],
[
597,
598
],
[
598,
599
],
[
599,
600
],
[
599,
601
],
[
597,
602
],
[
602,
603
],
[
602,
604
],
[
597,
605
],
[
605,
606
],
[
606,
607
],
[
597,
608
],
[
608,
609
],
[
609,
610
],
[
610,
611
],
[
610,
612
],
[
609,
613
],
[
613,
614
],
[
592,
615
],
[
615,
616
],
[
590,
617
],
[
617,
618
],
[
418,
619
],
[
619,
620
],
[
619,
621
],
[
621,
622
],
[
622,
623
],
[
622,
624
],
[
621,
625
],
[
625,
626
],
[
626,
627
],
[
626,
628
],
[
628,
629
],
[
629,
630
],
[
630,
631
],
[
625,
632
],
[
632,
633
],
[
633,
634
],
[
633,
635
],
[
635,
636
],
[
636,
637
],
[
621,
638
],
[
638,
639
],
[
0,
640
],
[
640,
641
],
[
640,
642
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main{\n final static String alpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase();//.toCharArray();\n static class FastReader{\n BufferedReader br,br1;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n \tString str;\n \tchar[][] arr = new char[n][m];\n \tfor(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}\n \treturn arr;\n }\n char[][] readCharArray(int n){\n \treturn readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static int getGcd(int n1,int n2){\n while(n1 != n2){\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }\n return n1;\n }\n static boolean isSorted(int[] arr, int n){\n for(int i=1;i<n;i++){\n if(arr[i]<arr[i-1]) return false;\n }\n return true;\n }\n static boolean isPrime(long n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static boolean isPrime(int n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static long Fact(int n){\n //int p=1000000007;\n long result = 1;\n for (int i = 1; i <= n; i++) result = (result*i);\n //for (int i = 1; i <= n; i++) result = (result*i)%p;\n return result;\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n static int maxDigit(int n) {\n \tint ret=n%10;\n \twhile(n/10!=0) {\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}ret = Math.max(ret, n%10);\n \treturn ret;\n }\n static int getDiff(String str,String sub) {\n \tint count=0;\n \tfor(int i=0;i<str.length();i++) {\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}\n \treturn count;\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n //long time = System.currentTimeMillis();\n \tFastReader s = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n String str = s.nextLine();\n String sub = s.nextLine();\n int strlen = str.length();\n int sublen = sub.length();\n int min = 1000;\n for(int i=0;i<(strlen-sublen+1);i++) {\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }\n out.println(min);\n out.close();\n //System.err.println(System.currentTimeMillis()-time);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n final static String alpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase();//.toCharArray();\n static class FastReader{\n BufferedReader br,br1;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n \tString str;\n \tchar[][] arr = new char[n][m];\n \tfor(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}\n \treturn arr;\n }\n char[][] readCharArray(int n){\n \treturn readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static int getGcd(int n1,int n2){\n while(n1 != n2){\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }\n return n1;\n }\n static boolean isSorted(int[] arr, int n){\n for(int i=1;i<n;i++){\n if(arr[i]<arr[i-1]) return false;\n }\n return true;\n }\n static boolean isPrime(long n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static boolean isPrime(int n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static long Fact(int n){\n //int p=1000000007;\n long result = 1;\n for (int i = 1; i <= n; i++) result = (result*i);\n //for (int i = 1; i <= n; i++) result = (result*i)%p;\n return result;\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n static int maxDigit(int n) {\n \tint ret=n%10;\n \twhile(n/10!=0) {\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}ret = Math.max(ret, n%10);\n \treturn ret;\n }\n static int getDiff(String str,String sub) {\n \tint count=0;\n \tfor(int i=0;i<str.length();i++) {\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}\n \treturn count;\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n //long time = System.currentTimeMillis();\n \tFastReader s = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n String str = s.nextLine();\n String sub = s.nextLine();\n int strlen = str.length();\n int sublen = sub.length();\n int min = 1000;\n for(int i=0;i<(strlen-sublen+1);i++) {\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }\n out.println(min);\n out.close();\n //System.err.println(System.currentTimeMillis()-time);\n }\n}",
"Main",
"final static String alpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase();//.toCharArray();",
"alpha",
"\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase()",
"\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase",
"\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"",
"static final Random random=new Random();",
"random",
"new Random()",
"static int getGcd(int n1,int n2){\n while(n1 != n2){\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }\n return n1;\n }",
"getGcd",
"{\n while(n1 != n2){\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }\n return n1;\n }",
"while(n1 != n2){\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }",
"n1 != n2",
"n1",
"n2",
"{\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }",
"if(n1 > n2) n1 -= n2;\n else n2 -= n1;",
"n1 > n2",
"n1",
"n2",
"n1 -= n2",
"n1",
"n2",
"n2 -= n1",
"n2",
"n1",
"return n1;",
"n1",
"int n1",
"n1",
"int n2",
"n2",
"static boolean isSorted(int[] arr, int n){\n for(int i=1;i<n;i++){\n if(arr[i]<arr[i-1]) return false;\n }\n return true;\n }",
"isSorted",
"{\n for(int i=1;i<n;i++){\n if(arr[i]<arr[i-1]) return false;\n }\n return true;\n }",
"for(int i=1;i<n;i++){\n if(arr[i]<arr[i-1]) return false;\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(arr[i]<arr[i-1]) return false;\n }",
"{\n if(arr[i]<arr[i-1]) return false;\n }",
"if(arr[i]<arr[i-1]) return false;",
"arr[i]<arr[i-1]",
"arr[i]",
"arr",
"i",
"arr[i-1]",
"arr",
"i-1",
"i",
"1",
"return false;",
"false",
"return true;",
"true",
"int[] arr",
"arr",
"int n",
"n",
"static boolean isPrime(long n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }",
"isPrime",
"{\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }",
"if(n==2) return true;\n else if(n%2==0) return false;",
"n==2",
"n",
"2",
"return true;",
"true",
"if(n%2==0) return false;",
"n%2==0",
"n%2",
"n",
"2",
"0",
"return false;",
"false",
"for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }",
"int i=3;",
"int i=3;",
"i",
"3",
"i<=n/2",
"i",
"n/2",
"n",
"2",
"i+=2",
"i+=2",
"i",
"2",
"{\n if(n%i==0) return false;\n }",
"{\n if(n%i==0) return false;\n }",
"if(n%i==0) return false;",
"n%i==0",
"n%i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"long n",
"n",
"static boolean isPrime(int n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }",
"isPrime",
"{\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }",
"if(n==2) return true;\n else if(n%2==0) return false;",
"n==2",
"n",
"2",
"return true;",
"true",
"if(n%2==0) return false;",
"n%2==0",
"n%2",
"n",
"2",
"0",
"return false;",
"false",
"for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }",
"int i=3;",
"int i=3;",
"i",
"3",
"i<=n/2",
"i",
"n/2",
"n",
"2",
"i+=2",
"i+=2",
"i",
"2",
"{\n if(n%i==0) return false;\n }",
"{\n if(n%i==0) return false;\n }",
"if(n%i==0) return false;",
"n%i==0",
"n%i",
"n",
"i",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }",
"printArray",
"{\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }",
"for(int x:arr){\n System.out.print(x+\" \");\n }",
"int x",
"arr",
"{\n System.out.print(x+\" \");\n }",
"{\n System.out.print(x+\" \");\n }",
"System.out.print(x+\" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"x+\" \"",
"x",
"\" \"",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"int[] arr",
"arr",
"static long Fact(int n){\n //int p=1000000007;\n long result = 1;\n for (int i = 1; i <= n; i++) result = (result*i);\n //for (int i = 1; i <= n; i++) result = (result*i)%p;\n return result;\n }",
"Fact",
"{\n //int p=1000000007;\n long result = 1;\n for (int i = 1; i <= n; i++) result = (result*i);\n //for (int i = 1; i <= n; i++) result = (result*i)%p;\n return result;\n }",
"long result = 1;",
"result",
"1",
"for (int i = 1; i <= n; i++) result = (result*i);",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"result = (result*i);",
"result = (result*i)",
"result",
"(result*i)",
"result",
"i",
"return result;",
"result",
"int n",
"n",
"static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }",
"ruffleSort",
"{\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }",
"int n=a.length;",
"n",
"a.length",
"a",
"a.length",
"for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }",
"{\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }",
"int oi=random.nextInt(n)",
"oi",
"random.nextInt(n)",
"random.nextInt",
"random",
"n",
"temp=a[oi];",
"temp",
"a[oi]",
"a",
"oi",
"a[oi]=a[i]",
"a[oi]",
"a",
"oi",
"a[i]",
"a",
"i",
"a[i]=temp",
"a[i]",
"a",
"i",
"temp",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int[] a",
"a",
"static int maxDigit(int n) {\n \tint ret=n%10;\n \twhile(n/10!=0) {\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}ret = Math.max(ret, n%10);\n \treturn ret;\n }",
"maxDigit",
"{\n \tint ret=n%10;\n \twhile(n/10!=0) {\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}ret = Math.max(ret, n%10);\n \treturn ret;\n }",
"int ret=n%10;",
"ret",
"n%10",
"n",
"10",
"while(n/10!=0) {\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}",
"n/10!=0",
"n/10",
"n",
"10",
"0",
"{\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}",
"ret = Math.max(ret, n%10)",
"ret",
"Math.max(ret, n%10)",
"Math.max",
"Math",
"ret",
"n%10",
"n",
"10",
"n/=10",
"n",
"10",
"ret = Math.max(ret, n%10)",
"ret",
"Math.max(ret, n%10)",
"Math.max",
"Math",
"ret",
"n%10",
"n",
"10",
"return ret;",
"ret",
"int n",
"n",
"static int getDiff(String str,String sub) {\n \tint count=0;\n \tfor(int i=0;i<str.length();i++) {\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}\n \treturn count;\n }",
"getDiff",
"{\n \tint count=0;\n \tfor(int i=0;i<str.length();i++) {\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}\n \treturn count;\n }",
"int count=0;",
"count",
"0",
"for(int i=0;i<str.length();i++) {\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<str.length()",
"i",
"str.length()",
"str.length",
"str",
"i++",
"i++",
"i",
"{\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}",
"{\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}",
"if(str.charAt(i)!=sub.charAt(i)) count++;",
"str.charAt(i)!=sub.charAt(i)",
"str.charAt(i)",
"str.charAt",
"str",
"i",
"sub.charAt(i)",
"sub.charAt",
"sub",
"i",
"count++",
"count",
"return count;",
"count",
"String str",
"str",
"String sub",
"sub",
"public static void main(String[] args) throws NumberFormatException, IOException {\n //long time = System.currentTimeMillis();\n \tFastReader s = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n String str = s.nextLine();\n String sub = s.nextLine();\n int strlen = str.length();\n int sublen = sub.length();\n int min = 1000;\n for(int i=0;i<(strlen-sublen+1);i++) {\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }\n out.println(min);\n out.close();\n //System.err.println(System.currentTimeMillis()-time);\n }",
"main",
"{\n //long time = System.currentTimeMillis();\n \tFastReader s = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n String str = s.nextLine();\n String sub = s.nextLine();\n int strlen = str.length();\n int sublen = sub.length();\n int min = 1000;\n for(int i=0;i<(strlen-sublen+1);i++) {\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }\n out.println(min);\n out.close();\n //System.err.println(System.currentTimeMillis()-time);\n }",
"FastReader s = new FastReader();",
"s",
"new FastReader()",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"String str = s.nextLine();",
"str",
"s.nextLine()",
"s.nextLine",
"s",
"String sub = s.nextLine();",
"sub",
"s.nextLine()",
"s.nextLine",
"s",
"int strlen = str.length();",
"strlen",
"str.length()",
"str.length",
"str",
"int sublen = sub.length();",
"sublen",
"sub.length()",
"sub.length",
"sub",
"int min = 1000;",
"min",
"1000",
"for(int i=0;i<(strlen-sublen+1);i++) {\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<(strlen-sublen+1)",
"i",
"(strlen-sublen+1)",
"strlen-sublen",
"strlen",
"sublen",
"1",
"i++",
"i++",
"i",
"{\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }",
"{\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }",
"min = Math.min(min,getDiff(str.substring(i,i+sublen),sub))",
"min",
"Math.min(min,getDiff(str.substring(i,i+sublen),sub))",
"Math.min",
"Math",
"min",
"getDiff(str.substring(i,i+sublen),sub)",
"getDiff",
"str.substring(i,i+sublen)",
"str.substring",
"str",
"i",
"i+sublen",
"i",
"sublen",
"sub",
"out.println(min)",
"out.println",
"out",
"min",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class FastReader{\n BufferedReader br,br1;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n \tString str;\n \tchar[][] arr = new char[n][m];\n \tfor(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}\n \treturn arr;\n }\n char[][] readCharArray(int n){\n \treturn readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }",
"FastReader",
"BufferedReader br",
"br",
"br1;",
"br1",
"StringTokenizer st;",
"st",
"public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}",
"FastReader",
"{br = new BufferedReader(new InputStreamReader(System.in));}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}",
"FastReader",
"{br = new BufferedReader(new FileReader(fileName));}",
"br = new BufferedReader(new FileReader(fileName))",
"br",
"new BufferedReader(new FileReader(fileName))",
"String fileName",
"fileName",
"String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}",
"next",
"{while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}",
"while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}",
"try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}",
"catch (IOException e){e.printStackTrace();}",
"IOException e",
"{e.printStackTrace();}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{st = new StringTokenizer(br.readLine());}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt(){return Integer.parseInt(next());}",
"nextInt",
"{return Integer.parseInt(next());}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong(){return Long.parseLong(next());}",
"nextLong",
"{return Long.parseLong(next());}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble(){return Double.parseDouble(next());}",
"nextDouble",
"{return Double.parseDouble(next());}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"char[][] readCharArray(int n,int m) {\n \tString str;\n \tchar[][] arr = new char[n][m];\n \tfor(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}\n \treturn arr;\n }",
"readCharArray",
"{\n \tString str;\n \tchar[][] arr = new char[n][m];\n \tfor(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}\n \treturn arr;\n }",
"String str;",
"str",
"char[][] arr = new char[n][m];",
"arr",
"new char[n][m]",
"n",
"m",
"for(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}",
"{\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}",
"str=nextLine()",
"str",
"nextLine()",
"nextLine",
"for(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<n",
"j",
"n",
"j++",
"j++",
"j",
"{\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}",
"{\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}",
"arr[i][j]=str.charAt(j)",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"str.charAt(j)",
"str.charAt",
"str",
"j",
"return arr;",
"arr",
"int n",
"n",
"int m",
"m",
"char[][] readCharArray(int n){\n \treturn readCharArray(n,n);\n }",
"readCharArray",
"{\n \treturn readCharArray(n,n);\n }",
"return readCharArray(n,n);",
"readCharArray(n,n)",
"readCharArray",
"n",
"n",
"int n",
"n",
"int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}",
"readArray",
"{int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}",
"readLongArray",
"{long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}",
"long[] a=new long[n];",
"a",
"new long[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextLong();",
"a[i]=nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}",
"nextLine",
"{String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}",
"String str = \"\";",
"str",
"\"\"",
"try{str = br.readLine();}catch (IOException e){e.printStackTrace();}",
"catch (IOException e){e.printStackTrace();}",
"IOException e",
"{e.printStackTrace();}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{str = br.readLine();}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main{\n final static String alpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase();//.toCharArray();\n static class FastReader{\n BufferedReader br,br1;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n \tString str;\n \tchar[][] arr = new char[n][m];\n \tfor(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}\n \treturn arr;\n }\n char[][] readCharArray(int n){\n \treturn readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static int getGcd(int n1,int n2){\n while(n1 != n2){\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }\n return n1;\n }\n static boolean isSorted(int[] arr, int n){\n for(int i=1;i<n;i++){\n if(arr[i]<arr[i-1]) return false;\n }\n return true;\n }\n static boolean isPrime(long n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static boolean isPrime(int n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static long Fact(int n){\n //int p=1000000007;\n long result = 1;\n for (int i = 1; i <= n; i++) result = (result*i);\n //for (int i = 1; i <= n; i++) result = (result*i)%p;\n return result;\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n static int maxDigit(int n) {\n \tint ret=n%10;\n \twhile(n/10!=0) {\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}ret = Math.max(ret, n%10);\n \treturn ret;\n }\n static int getDiff(String str,String sub) {\n \tint count=0;\n \tfor(int i=0;i<str.length();i++) {\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}\n \treturn count;\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n //long time = System.currentTimeMillis();\n \tFastReader s = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n String str = s.nextLine();\n String sub = s.nextLine();\n int strlen = str.length();\n int sublen = sub.length();\n int min = 1000;\n for(int i=0;i<(strlen-sublen+1);i++) {\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }\n out.println(min);\n out.close();\n //System.err.println(System.currentTimeMillis()-time);\n }\n}",
"public class Main{\n final static String alpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".toLowerCase();//.toCharArray();\n static class FastReader{\n BufferedReader br,br1;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n \tString str;\n \tchar[][] arr = new char[n][m];\n \tfor(int i=0;i<n;i++) {\n \t\tstr=nextLine();\n \t\tfor(int j=0;j<n;j++) {\n \t\t\tarr[i][j]=str.charAt(j);\n \t\t}\n \t}\n \treturn arr;\n }\n char[][] readCharArray(int n){\n \treturn readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static int getGcd(int n1,int n2){\n while(n1 != n2){\n if(n1 > n2) n1 -= n2;\n else n2 -= n1;\n }\n return n1;\n }\n static boolean isSorted(int[] arr, int n){\n for(int i=1;i<n;i++){\n if(arr[i]<arr[i-1]) return false;\n }\n return true;\n }\n static boolean isPrime(long n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static boolean isPrime(int n){\n if(n==2) return true;\n else if(n%2==0) return false;\n for(int i=3;i<=n/2;i+=2){\n if(n%i==0) return false;\n }\n return true;\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static long Fact(int n){\n //int p=1000000007;\n long result = 1;\n for (int i = 1; i <= n; i++) result = (result*i);\n //for (int i = 1; i <= n; i++) result = (result*i)%p;\n return result;\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n static int maxDigit(int n) {\n \tint ret=n%10;\n \twhile(n/10!=0) {\n \t\tret = Math.max(ret, n%10);\n \t\tn/=10;\n \t}ret = Math.max(ret, n%10);\n \treturn ret;\n }\n static int getDiff(String str,String sub) {\n \tint count=0;\n \tfor(int i=0;i<str.length();i++) {\n \t\tif(str.charAt(i)!=sub.charAt(i)) count++;\n \t}\n \treturn count;\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n //long time = System.currentTimeMillis();\n \tFastReader s = new FastReader();\n PrintWriter out = new PrintWriter(System.out);\n String str = s.nextLine();\n String sub = s.nextLine();\n int strlen = str.length();\n int sublen = sub.length();\n int min = 1000;\n for(int i=0;i<(strlen-sublen+1);i++) {\n \tmin = Math.min(min,getDiff(str.substring(i,i+sublen),sub));\n }\n out.println(min);\n out.close();\n //System.err.println(System.currentTimeMillis()-time);\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main{
final static String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toLowerCase();//.toCharArray();
static class FastReader{
BufferedReader br,br1;
StringTokenizer st;
public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}
public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}
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());}
char[][] readCharArray(int n,int m) {
String str;
char[][] arr = new char[n][m];
for(int i=0;i<n;i++) {
str=nextLine();
for(int j=0;j<n;j++) {
arr[i][j]=str.charAt(j);
}
}
return arr;
}
char[][] readCharArray(int n){
return readCharArray(n,n);
}
int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}
long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}
String nextLine(){String str = "";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}
}
static int getGcd(int n1,int n2){
while(n1 != n2){
if(n1 > n2) n1 -= n2;
else n2 -= n1;
}
return n1;
}
static boolean isSorted(int[] arr, int n){
for(int i=1;i<n;i++){
if(arr[i]<arr[i-1]) return false;
}
return true;
}
static boolean isPrime(long n){
if(n==2) return true;
else if(n%2==0) return false;
for(int i=3;i<=n/2;i+=2){
if(n%i==0) return false;
}
return true;
}
static boolean isPrime(int n){
if(n==2) return true;
else if(n%2==0) return false;
for(int i=3;i<=n/2;i+=2){
if(n%i==0) return false;
}
return true;
}
static void printArray(int[] arr){
for(int x:arr){
System.out.print(x+" ");
}
System.out.println();
}
static long Fact(int n){
//int p=1000000007;
long result = 1;
for (int i = 1; i <= n; i++) result = (result*i);
//for (int i = 1; i <= n; i++) result = (result*i)%p;
return result;
}
static final Random random=new Random();
static void ruffleSort(int[] a) {
int n=a.length;//shuffle, then sort
for (int i=0; i<n; i++) {
int oi=random.nextInt(n), temp=a[oi];
a[oi]=a[i]; a[i]=temp;
}
Arrays.sort(a);
}
static int maxDigit(int n) {
int ret=n%10;
while(n/10!=0) {
ret = Math.max(ret, n%10);
n/=10;
}ret = Math.max(ret, n%10);
return ret;
}
static int getDiff(String str,String sub) {
int count=0;
for(int i=0;i<str.length();i++) {
if(str.charAt(i)!=sub.charAt(i)) count++;
}
return count;
}
public static void main(String[] args) throws NumberFormatException, IOException {
//long time = System.currentTimeMillis();
FastReader s = new FastReader();
PrintWriter out = new PrintWriter(System.out);
String str = s.nextLine();
String sub = s.nextLine();
int strlen = str.length();
int sublen = sub.length();
int min = 1000;
for(int i=0;i<(strlen-sublen+1);i++) {
min = Math.min(min,getDiff(str.substring(i,i+sublen),sub));
}
out.println(min);
out.close();
//System.err.println(System.currentTimeMillis()-time);
}
} |
[
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,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
4,
18,
4,
18,
13,
2,
13,
13,
2,
2,
13,
13,
17,
4,
18,
13,
13,
2,
13,
17,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
109,
5
],
[
109,
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
],
[
34,
35
],
[
35,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
32,
40
],
[
25,
41
],
[
41,
42
],
[
42,
43
],
[
25,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
49,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
70,
72
],
[
67,
73
],
[
74,
74
],
[
74,
75
],
[
74,
76
],
[
74,
77
],
[
65,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
64,
85
],
[
85,
86
],
[
86,
87
],
[
45,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
8,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
101,
105
],
[
6,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint result = 0;\n\t\tfor (int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(t.length() - result);\n\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint result = 0;\n\t\tfor (int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(t.length() - result);\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint result = 0;\n\t\tfor (int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(t.length() - result);\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint result = 0;\n\t\tfor (int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(t.length() - result);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int result = 0;",
"result",
"0",
"for (int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length() - t.length() + 1",
"i",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}",
"int score = 0;",
"score",
"0",
"for (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}",
"{\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}",
"if (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}",
"s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))",
"s.substring(i + j, i + j + 1).equals",
"s.substring(i + j, i + j + 1)",
"s.substring",
"s",
"i + j",
"i",
"j",
"i + j + 1",
"i + j + 1",
"i",
"j",
"1",
"t.substring(j, j + 1)",
"t.substring",
"t",
"j",
"j + 1",
"j",
"1",
"{\n\t\t\t\t\tscore++;\n\t\t\t\t}",
"score++",
"score",
"if (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}",
"result < score",
"result",
"score",
"{\n\t\t\t\tresult = score;\n\t\t\t}",
"result = score",
"result",
"score",
"System.out.println(t.length() - result)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length() - result",
"t.length()",
"t.length",
"t",
"result",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint result = 0;\n\t\tfor (int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(t.length() - result);\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\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint result = 0;\n\t\tfor (int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tint score = 0;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\n\t\t\t\t//System.out.println(s.substring(i + j, i + j + 1) + \" \" + t.substring(j, j + 1));\n\t\t\t\tif (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {\n\t\t\t\t\tscore++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (result < score) {\n\t\t\t\tresult = score;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(t.length() - result);\n\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 t = sc.next();
int result = 0;
for (int i = 0; i < s.length() - t.length() + 1; i++) {
int score = 0;
for (int j = 0; j < t.length(); j++) {
//System.out.println(s.substring(i + j, i + j + 1) + " " + t.substring(j, j + 1));
if (s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))) {
score++;
}
}
if (result < score) {
result = score;
}
}
System.out.println(t.length() - 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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
13,
14,
2,
13,
18,
13,
13,
30,
4,
18,
18,
13,
13,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
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,
13,
30,
40,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
129,
5
],
[
129,
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
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
27,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
64,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
64,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
84,
85
],
[
6,
86
],
[
86,
87
],
[
129,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
94,
104
],
[
104,
105
],
[
105,
106
],
[
94,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
110,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
109,
119
],
[
119,
120
],
[
120,
121
],
[
90,
122
],
[
122,
123
],
[
88,
124
],
[
124,
125
],
[
88,
126
],
[
126,
127
],
[
0,
128
],
[
128,
129
],
[
128,
130
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.nextLine();\n String T = scanner.nextLine();\n int min = Integer.MAX_VALUE;\n for(int i = 0; i<=S.length()-T.length(); i++){\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }\n if(min!=Integer.MAX_VALUE){\n System.out.println(min);\n }else{\n System.out.println(T.length());\n }\n\n }\n\n public static int find(String a, String b){\n int calc = 0;\n for(int x = 0; x<a.length(); x++){\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }\n return calc;\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 String S = scanner.nextLine();\n String T = scanner.nextLine();\n int min = Integer.MAX_VALUE;\n for(int i = 0; i<=S.length()-T.length(); i++){\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }\n if(min!=Integer.MAX_VALUE){\n System.out.println(min);\n }else{\n System.out.println(T.length());\n }\n\n }\n\n public static int find(String a, String b){\n int calc = 0;\n for(int x = 0; x<a.length(); x++){\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }\n return calc;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.nextLine();\n String T = scanner.nextLine();\n int min = Integer.MAX_VALUE;\n for(int i = 0; i<=S.length()-T.length(); i++){\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }\n if(min!=Integer.MAX_VALUE){\n System.out.println(min);\n }else{\n System.out.println(T.length());\n }\n\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n String S = scanner.nextLine();\n String T = scanner.nextLine();\n int min = Integer.MAX_VALUE;\n for(int i = 0; i<=S.length()-T.length(); i++){\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }\n if(min!=Integer.MAX_VALUE){\n System.out.println(min);\n }else{\n System.out.println(T.length());\n }\n\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String S = scanner.nextLine();",
"S",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"String T = scanner.nextLine();",
"T",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"int min = Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i = 0; i<=S.length()-T.length(); i++){\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<=S.length()-T.length()",
"i",
"S.length()-T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }",
"{\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }",
"min = Math.min(min, find(S.substring(i, i+T.length()), T))",
"min",
"Math.min(min, find(S.substring(i, i+T.length()), T))",
"Math.min",
"Math",
"min",
"find(S.substring(i, i+T.length()), T)",
"find",
"S.substring(i, i+T.length())",
"S.substring",
"S",
"i",
"i+T.length()",
"i",
"T.length()",
"T.length",
"T",
"T",
"if(min!=Integer.MAX_VALUE){\n System.out.println(min);\n }else{\n System.out.println(T.length());\n }",
"min!=Integer.MAX_VALUE",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"{\n System.out.println(min);\n }",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"{\n System.out.println(T.length());\n }",
"System.out.println(T.length())",
"System.out.println",
"System.out",
"System",
"System.out",
"T.length()",
"T.length",
"T",
"String[] args",
"args",
"public static int find(String a, String b){\n int calc = 0;\n for(int x = 0; x<a.length(); x++){\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }\n return calc;\n }",
"find",
"{\n int calc = 0;\n for(int x = 0; x<a.length(); x++){\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }\n return calc;\n }",
"int calc = 0;",
"calc",
"0",
"for(int x = 0; x<a.length(); x++){\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }",
"int x = 0;",
"int x = 0;",
"x",
"0",
"x<a.length()",
"x",
"a.length()",
"a.length",
"a",
"x++",
"x++",
"x",
"{\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }",
"{\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }",
"if(a.charAt(x) != b.charAt(x)){\n calc++;\n }",
"a.charAt(x) != b.charAt(x)",
"a.charAt(x)",
"a.charAt",
"a",
"x",
"b.charAt(x)",
"b.charAt",
"b",
"x",
"{\n calc++;\n }",
"calc++",
"calc",
"return calc;",
"calc",
"String a",
"a",
"String b",
"b",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.nextLine();\n String T = scanner.nextLine();\n int min = Integer.MAX_VALUE;\n for(int i = 0; i<=S.length()-T.length(); i++){\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }\n if(min!=Integer.MAX_VALUE){\n System.out.println(min);\n }else{\n System.out.println(T.length());\n }\n\n }\n\n public static int find(String a, String b){\n int calc = 0;\n for(int x = 0; x<a.length(); x++){\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }\n return calc;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.nextLine();\n String T = scanner.nextLine();\n int min = Integer.MAX_VALUE;\n for(int i = 0; i<=S.length()-T.length(); i++){\n min = Math.min(min, find(S.substring(i, i+T.length()), T));\n }\n if(min!=Integer.MAX_VALUE){\n System.out.println(min);\n }else{\n System.out.println(T.length());\n }\n\n }\n\n public static int find(String a, String b){\n int calc = 0;\n for(int x = 0; x<a.length(); x++){\n if(a.charAt(x) != b.charAt(x)){\n calc++;\n }\n }\n return calc;\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String S = scanner.nextLine();
String T = scanner.nextLine();
int min = Integer.MAX_VALUE;
for(int i = 0; i<=S.length()-T.length(); i++){
min = Math.min(min, find(S.substring(i, i+T.length()), T));
}
if(min!=Integer.MAX_VALUE){
System.out.println(min);
}else{
System.out.println(T.length());
}
}
public static int find(String a, String b){
int calc = 0;
for(int x = 0; x<a.length(); x++){
if(a.charAt(x) != b.charAt(x)){
calc++;
}
}
return calc;
}
}
|
[
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,
4,
18,
18,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
4,
18,
13,
17,
2,
4,
18,
13,
17,
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,
13,
17,
30,
0,
18,
18,
13,
13,
13,
2,
18,
18,
13,
2,
13,
17,
13,
17,
30,
14,
2,
13,
13,
0,
18,
18,
13,
13,
13,
18,
13,
13,
30,
0,
18,
18,
13,
13,
13,
8,
2,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
18,
18,
13,
2,
13,
17,
2,
13,
17,
2,
18,
18,
13,
2,
13,
17,
2,
13,
17,
17,
41,
13,
18,
13,
13,
28,
13,
18,
13,
4,
18,
13,
30,
30,
0,
13,
4,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
185,
8
],
[
185,
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
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
30,
33
],
[
9,
34
],
[
34,
35
],
[
185,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
42,
46
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
47,
51
],
[
38,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
94,
100
],
[
93,
101
],
[
82,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
113,
115
],
[
103,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
128,
129
],
[
128,
130
],
[
124,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
134,
135
],
[
134,
136
],
[
123,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
137,
143
],
[
143,
144
],
[
143,
145
],
[
123,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
147,
153
],
[
153,
154
],
[
153,
155
],
[
146,
156
],
[
38,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
159,
161
],
[
38,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
162,
169
],
[
170,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
173,
177
],
[
38,
178
],
[
178,
179
],
[
36,
180
],
[
180,
181
],
[
36,
182
],
[
182,
183
],
[
0,
184
],
[
184,
185
],
[
184,
186
]
]
| [
"\n\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args)throws Exception {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s=br.readLine();\n\t\tString t=br.readLine();\n\t\t\n\t\tSystem.out.println(solve(s,t));\n\n\t}\n\n\tprivate static int solve(String s, String t) {\n\t\tint[][] dp=new int[t.length()+1][s.length()+1];\n\t\t\n\t\tfor(int i=1;i<=t.length();i++) {\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint ans=Integer.MAX_VALUE;\n\t\tfor(int val:dp[t.length()]) {\n\t\t\tans=Math.min(ans, val);\n\t\t}\n\t\treturn ans;\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args)throws Exception {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s=br.readLine();\n\t\tString t=br.readLine();\n\t\t\n\t\tSystem.out.println(solve(s,t));\n\n\t}\n\n\tprivate static int solve(String s, String t) {\n\t\tint[][] dp=new int[t.length()+1][s.length()+1];\n\t\t\n\t\tfor(int i=1;i<=t.length();i++) {\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint ans=Integer.MAX_VALUE;\n\t\tfor(int val:dp[t.length()]) {\n\t\t\tans=Math.min(ans, val);\n\t\t}\n\t\treturn ans;\n\t}\n\n}",
"Main",
"public static void main(String[] args)throws Exception {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s=br.readLine();\n\t\tString t=br.readLine();\n\t\t\n\t\tSystem.out.println(solve(s,t));\n\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s=br.readLine();\n\t\tString t=br.readLine();\n\t\t\n\t\tSystem.out.println(solve(s,t));\n\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 t=br.readLine();",
"t",
"br.readLine()",
"br.readLine",
"br",
"System.out.println(solve(s,t))",
"System.out.println",
"System.out",
"System",
"System.out",
"solve(s,t)",
"solve",
"s",
"t",
"String[] args",
"args",
"private static int solve(String s, String t) {\n\t\tint[][] dp=new int[t.length()+1][s.length()+1];\n\t\t\n\t\tfor(int i=1;i<=t.length();i++) {\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint ans=Integer.MAX_VALUE;\n\t\tfor(int val:dp[t.length()]) {\n\t\t\tans=Math.min(ans, val);\n\t\t}\n\t\treturn ans;\n\t}",
"solve",
"{\n\t\tint[][] dp=new int[t.length()+1][s.length()+1];\n\t\t\n\t\tfor(int i=1;i<=t.length();i++) {\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint ans=Integer.MAX_VALUE;\n\t\tfor(int val:dp[t.length()]) {\n\t\t\tans=Math.min(ans, val);\n\t\t}\n\t\treturn ans;\n\t}",
"int[][] dp=new int[t.length()+1][s.length()+1];",
"dp",
"new int[t.length()+1][s.length()+1]",
"t.length()+1",
"t.length()",
"t.length",
"t",
"1",
"s.length()+1",
"s.length()",
"s.length",
"s",
"1",
"for(int i=1;i<=t.length();i++) {\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=t.length()",
"i",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<=s.length()",
"j",
"s.length()",
"s.length",
"s",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"if(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}",
"j==0",
"j",
"0",
"{\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}",
"dp[i][j]=dp[i-1][j]+1",
"dp[i][j]",
"dp[i]",
"dp",
"i",
"j",
"dp[i-1][j]+1",
"dp[i-1][j]",
"dp[i-1]",
"dp",
"i-1",
"i",
"1",
"j",
"1",
"{\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}",
"if(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}",
"i>j",
"i",
"j",
"dp[i][j]=Integer.MAX_VALUE",
"dp[i][j]",
"dp[i]",
"dp",
"i",
"j",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"{\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}",
"dp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1",
"dp[i][j]",
"dp[i]",
"dp",
"i",
"j",
"t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1",
"t.charAt(i-1)==s.charAt(j-1)",
"t.charAt(i-1)",
"t.charAt",
"t",
"i-1",
"i",
"1",
"s.charAt(j-1)",
"s.charAt",
"s",
"j-1",
"j",
"1",
"dp[i-1][j-1]",
"dp[i-1]",
"dp",
"i-1",
"i",
"1",
"j-1",
"j",
"1",
"dp[i-1][j-1]+1",
"dp[i-1][j-1]",
"dp[i-1]",
"dp",
"i-1",
"i",
"1",
"j-1",
"j",
"1",
"1",
"int ans=Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int val:dp[t.length()]) {\n\t\t\tans=Math.min(ans, val);\n\t\t}",
"int val",
"dp[t.length()]",
"dp",
"t.length()",
"t.length",
"t",
"{\n\t\t\tans=Math.min(ans, val);\n\t\t}",
"{\n\t\t\tans=Math.min(ans, val);\n\t\t}",
"ans=Math.min(ans, val)",
"ans",
"Math.min(ans, val)",
"Math.min",
"Math",
"ans",
"val",
"return ans;",
"ans",
"String s",
"s",
"String t",
"t",
"public class Main {\n\n\tpublic static void main(String[] args)throws Exception {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s=br.readLine();\n\t\tString t=br.readLine();\n\t\t\n\t\tSystem.out.println(solve(s,t));\n\n\t}\n\n\tprivate static int solve(String s, String t) {\n\t\tint[][] dp=new int[t.length()+1][s.length()+1];\n\t\t\n\t\tfor(int i=1;i<=t.length();i++) {\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint ans=Integer.MAX_VALUE;\n\t\tfor(int val:dp[t.length()]) {\n\t\t\tans=Math.min(ans, val);\n\t\t}\n\t\treturn ans;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args)throws Exception {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s=br.readLine();\n\t\tString t=br.readLine();\n\t\t\n\t\tSystem.out.println(solve(s,t));\n\n\t}\n\n\tprivate static int solve(String s, String t) {\n\t\tint[][] dp=new int[t.length()+1][s.length()+1];\n\t\t\n\t\tfor(int i=1;i<=t.length();i++) {\n\t\t\tfor(int j=0;j<=s.length();j++) {\n\t\t\t\tif(j==0) {\n\t\t\t\t\tdp[i][j]=dp[i-1][j]+1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(i>j) dp[i][j]=Integer.MAX_VALUE;\n\t\t\t\t\telse {\n\t\t\t\t\t\tdp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint ans=Integer.MAX_VALUE;\n\t\tfor(int val:dp[t.length()]) {\n\t\t\tans=Math.min(ans, val);\n\t\t}\n\t\treturn ans;\n\t}\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 t=br.readLine();
System.out.println(solve(s,t));
}
private static int solve(String s, String t) {
int[][] dp=new int[t.length()+1][s.length()+1];
for(int i=1;i<=t.length();i++) {
for(int j=0;j<=s.length();j++) {
if(j==0) {
dp[i][j]=dp[i-1][j]+1;
}
else {
if(i>j) dp[i][j]=Integer.MAX_VALUE;
else {
dp[i][j]=t.charAt(i-1)==s.charAt(j-1)?dp[i-1][j-1]:dp[i-1][j-1]+1;
}
}
}
}
int ans=Integer.MAX_VALUE;
for(int val:dp[t.length()]) {
ans=Math.min(ans, val);
}
return ans;
}
}
|
[
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,
4,
18,
13,
17,
14,
2,
18,
13,
13,
18,
13,
13,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
18,
13,
13,
18,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
13,
29,
41,
13,
20,
2,
2,
18,
13,
13,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
18,
13,
13,
41,
13,
4,
18,
13,
17,
0,
18,
13,
2,
13,
17,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
18,
13,
13,
18,
13,
13,
30,
40,
18,
13,
2,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
13,
30,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
209,
5
],
[
209,
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
],
[
31,
32
],
[
30,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
42,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
63,
72
],
[
72,
73
],
[
73,
74
],
[
42,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
42,
81
],
[
8,
82
],
[
82,
83
],
[
82,
84
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
86,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
94,
108
],
[
108,
109
],
[
109,
110
],
[
94,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
115,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
112,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
112,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
130,
136
],
[
136,
137
],
[
136,
138
],
[
112,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
139,
149
],
[
149,
150
],
[
150,
151
],
[
139,
152
],
[
153,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
155,
160
],
[
160,
161
],
[
160,
162
],
[
154,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
167,
169
],
[
8,
170
],
[
170,
171
],
[
170,
172
],
[
8,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
173,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
180,
182
],
[
173,
183
],
[
183,
184
],
[
184,
185
],
[
173,
186
],
[
187,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
188,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
197,
199
],
[
8,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
200,
205
],
[
6,
206
],
[
206,
207
],
[
0,
208
],
[
208,
209
],
[
208,
210
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\t\n\t\tString[] s1 = s.split(\"\");\n\t\tString[] t1 = t.split(\"\");\n\t\t\n\t\tif(s1.length == t1.length) {\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] ans = new int[s1.length-t1.length-1];\n\t\t\n\t\tfor(int j = 1; j < s1.length-t1.length; j++) {\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint sm = 10000000;\n\t\t\n\t\tfor(int i = 0; i < ans.length; i++) {\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.print(sm);\n\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\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\t\n\t\tString[] s1 = s.split(\"\");\n\t\tString[] t1 = t.split(\"\");\n\t\t\n\t\tif(s1.length == t1.length) {\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] ans = new int[s1.length-t1.length-1];\n\t\t\n\t\tfor(int j = 1; j < s1.length-t1.length; j++) {\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint sm = 10000000;\n\t\t\n\t\tfor(int i = 0; i < ans.length; i++) {\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.print(sm);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\t\n\t\tString[] s1 = s.split(\"\");\n\t\tString[] t1 = t.split(\"\");\n\t\t\n\t\tif(s1.length == t1.length) {\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] ans = new int[s1.length-t1.length-1];\n\t\t\n\t\tfor(int j = 1; j < s1.length-t1.length; j++) {\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint sm = 10000000;\n\t\t\n\t\tfor(int i = 0; i < ans.length; i++) {\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.print(sm);\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\t\n\t\tString[] s1 = s.split(\"\");\n\t\tString[] t1 = t.split(\"\");\n\t\t\n\t\tif(s1.length == t1.length) {\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] ans = new int[s1.length-t1.length-1];\n\t\t\n\t\tfor(int j = 1; j < s1.length-t1.length; j++) {\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint sm = 10000000;\n\t\t\n\t\tfor(int i = 0; i < ans.length; i++) {\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.print(sm);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String t = scan.next();",
"t",
"scan.next()",
"scan.next",
"scan",
"String[] s1 = s.split(\"\");",
"s1",
"s.split(\"\")",
"s.split",
"s",
"\"\"",
"String[] t1 = t.split(\"\");",
"t1",
"t.split(\"\")",
"t.split",
"t",
"\"\"",
"if(s1.length == t1.length) {\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}",
"s1.length == t1.length",
"s1.length",
"s1",
"s1.length",
"t1.length",
"t1",
"t1.length",
"{\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}",
"int ans1 = s1.length;",
"ans1",
"s1.length",
"s1",
"s1.length",
"for(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < t1.length",
"i",
"t1.length",
"t1",
"t1.length",
"i++",
"i++",
"i",
"{\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}",
"if(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}",
"s1[i].equals(t1[i])",
"s1[i].equals",
"s1[i]",
"s1",
"i",
"t1[i]",
"t1",
"i",
"{\n\t\t\t\t\tans1--;\n\t\t\t\t}",
"ans1--",
"ans1",
"System.out.print(ans1)",
"System.out.print",
"System.out",
"System",
"System.out",
"ans1",
"return;",
"int[] ans = new int[s1.length-t1.length-1];",
"ans",
"new int[s1.length-t1.length-1]",
"s1.length-t1.length-1",
"s1.length-t1.length-1",
"s1.length",
"s1",
"s1.length",
"t1.length",
"t1",
"t1.length",
"1",
"for(int j = 1; j < s1.length-t1.length; j++) {\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int j = 1;",
"int j = 1;",
"j",
"1",
"j < s1.length-t1.length",
"j",
"s1.length-t1.length",
"s1.length",
"s1",
"s1.length",
"t1.length",
"t1",
"t1.length",
"j++",
"j++",
"j",
"{\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"String str = s.substring(j, j+t1.length);",
"str",
"s.substring(j, j+t1.length)",
"s.substring",
"s",
"j",
"j+t1.length",
"j",
"t1.length",
"t1",
"t1.length",
"String[] str1 = str.split(\"\");",
"str1",
"str.split(\"\")",
"str.split",
"str",
"\"\"",
"ans[j-1] = t1.length",
"ans[j-1]",
"ans",
"j-1",
"j",
"1",
"t1.length",
"t1",
"t1.length",
"for(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < t1.length",
"i",
"t1.length",
"t1",
"t1.length",
"i++",
"i++",
"i",
"{\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}",
"if(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}",
"str1[i].equals(t1[i])",
"str1[i].equals",
"str1[i]",
"str1",
"i",
"t1[i]",
"t1",
"i",
"{\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}",
"ans[j-1]--",
"ans[j-1]",
"ans",
"j-1",
"j",
"1",
"int sm = 10000000;",
"sm",
"10000000",
"for(int i = 0; i < ans.length; i++) {\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ans.length",
"i",
"ans.length",
"ans",
"ans.length",
"i++",
"i++",
"i",
"{\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}",
"{\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}",
"if(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}",
"ans[i] < sm",
"ans[i]",
"ans",
"i",
"sm",
"{\n\t\t\t\tsm = ans[i];\n\t\t\t}",
"sm = ans[i]",
"sm",
"ans[i]",
"ans",
"i",
"System.out.print(sm)",
"System.out.print",
"System.out",
"System",
"System.out",
"sm",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\t\n\t\tString[] s1 = s.split(\"\");\n\t\tString[] t1 = t.split(\"\");\n\t\t\n\t\tif(s1.length == t1.length) {\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] ans = new int[s1.length-t1.length-1];\n\t\t\n\t\tfor(int j = 1; j < s1.length-t1.length; j++) {\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint sm = 10000000;\n\t\t\n\t\tfor(int i = 0; i < ans.length; i++) {\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.print(sm);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\t\n\t\tString[] s1 = s.split(\"\");\n\t\tString[] t1 = t.split(\"\");\n\t\t\n\t\tif(s1.length == t1.length) {\n\t\t\tint ans1 = s1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(s1[i].equals(t1[i])) {\n\t\t\t\t\tans1--;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.print(ans1);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint[] ans = new int[s1.length-t1.length-1];\n\t\t\n\t\tfor(int j = 1; j < s1.length-t1.length; j++) {\n\t\t\t\n\t\t\tString str = s.substring(j, j+t1.length);\n\t\t\t//System.out.println(str);\n\t\t\tString[] str1 = str.split(\"\");\n\t\t\t\n\t\t\tans[j-1] = t1.length;\n\t\t\t\n\t\t\tfor(int i = 0; i < t1.length; i++) {\n\t\t\t\t\n\t\t\t\tif(str1[i].equals(t1[i])) {\n\t\t\t\t\tans[j-1]--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint sm = 10000000;\n\t\t\n\t\tfor(int i = 0; i < ans.length; i++) {\n\t\t\t//System.out.println(ans[i]);\n\t\t\tif(ans[i] < sm) {\n\t\t\t\tsm = ans[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.print(sm);\n\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 t = scan.next();
String[] s1 = s.split("");
String[] t1 = t.split("");
if(s1.length == t1.length) {
int ans1 = s1.length;
for(int i = 0; i < t1.length; i++) {
if(s1[i].equals(t1[i])) {
ans1--;
}
}
System.out.print(ans1);
return;
}
int[] ans = new int[s1.length-t1.length-1];
for(int j = 1; j < s1.length-t1.length; j++) {
String str = s.substring(j, j+t1.length);
//System.out.println(str);
String[] str1 = str.split("");
ans[j-1] = t1.length;
for(int i = 0; i < t1.length; i++) {
if(str1[i].equals(t1[i])) {
ans[j-1]--;
}
}
}
int sm = 10000000;
for(int i = 0; i < ans.length; i++) {
//System.out.println(ans[i]);
if(ans[i] < sm) {
sm = ans[i];
}
}
System.out.print(sm);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
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,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
2,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
2,
17,
17,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
17,
41,
13,
17,
41,
13,
42,
2,
0,
13,
4,
13,
40,
17,
30,
14,
2,
13,
17,
3,
0,
18,
13,
40,
13,
13,
29,
20,
12,
13,
30,
41,
13,
4,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
4,
18,
13,
13,
0,
13,
4,
13,
42,
40,
4,
18,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
13,
29,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
2,
13,
17,
30,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
0,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
0,
13,
4,
18,
13,
13,
0,
13,
17,
13,
14,
2,
13,
40,
17,
0,
18,
13,
17,
40,
17,
12,
13,
30,
14,
2,
13,
13,
4,
13,
29,
18,
13,
40,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
594,
8
],
[
594,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
594,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
16,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
16,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
42,
50
],
[
35,
51
],
[
51,
52
],
[
52,
53
],
[
35,
54
],
[
55,
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
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
75,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
74,
86
],
[
86,
87
],
[
55,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
94,
98
],
[
16,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
14,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
107,
114
],
[
114,
115
],
[
107,
116
],
[
116,
117
],
[
107,
118
],
[
118,
119
],
[
107,
120
],
[
120,
121
],
[
107,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
128,
130
],
[
124,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
107,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
143,
145
],
[
139,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
137,
152
],
[
152,
153
],
[
107,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
161
],
[
161,
162
],
[
161,
163
],
[
156,
164
],
[
164,
165
],
[
156,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
167,
172
],
[
172,
173
],
[
166,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
174,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
180,
185
],
[
156,
186
],
[
186,
187
],
[
107,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
190,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
196,
199
],
[
195,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
190,
205
],
[
205,
206
],
[
205,
207
],
[
190,
208
],
[
208,
209
],
[
209,
210
],
[
208,
211
],
[
190,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
190,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
218,
221
],
[
216,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
223,
226
],
[
222,
227
],
[
227,
228
],
[
227,
229
],
[
229,
230
],
[
190,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
107,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
237,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
245,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
237,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
255,
257
],
[
237,
258
],
[
258,
259
],
[
258,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
237,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
266,
271
],
[
265,
272
],
[
272,
273
],
[
272,
274
],
[
264,
275
],
[
275,
276
],
[
276,
277
],
[
276,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
278,
284
],
[
237,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
288,
289
],
[
237,
290
],
[
290,
291
],
[
107,
292
],
[
292,
293
],
[
292,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
294,
299
],
[
299,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
299,
304
],
[
304,
305
],
[
304,
306
],
[
299,
307
],
[
307,
308
],
[
308,
309
],
[
299,
310
],
[
311,
311
],
[
311,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
312,
316
],
[
316,
317
],
[
294,
318
],
[
318,
319
],
[
292,
320
],
[
320,
321
],
[
107,
322
],
[
322,
323
],
[
322,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
324,
328
],
[
328,
329
],
[
328,
330
],
[
330,
331
],
[
324,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
324,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
342,
344
],
[
324,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
347,
349
],
[
349,
350
],
[
324,
351
],
[
351,
352
],
[
352,
353
],
[
353,
354
],
[
354,
355
],
[
354,
356
],
[
356,
357
],
[
353,
358
],
[
352,
359
],
[
359,
360
],
[
359,
361
],
[
351,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
365,
366
],
[
366,
367
],
[
367,
368
],
[
367,
369
],
[
366,
370
],
[
365,
371
],
[
324,
372
],
[
372,
373
],
[
372,
374
],
[
374,
375
],
[
375,
376
],
[
324,
377
],
[
377,
378
],
[
107,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
382,
383
],
[
382,
384
],
[
381,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
386,
391
],
[
391,
392
],
[
391,
393
],
[
386,
394
],
[
394,
395
],
[
395,
396
],
[
386,
397
],
[
398,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
399,
403
],
[
403,
404
],
[
381,
405
],
[
405,
406
],
[
379,
407
],
[
407,
408
],
[
107,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
412,
413
],
[
412,
414
],
[
414,
415
],
[
411,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
417,
420
],
[
416,
421
],
[
421,
422
],
[
422,
423
],
[
422,
424
],
[
424,
425
],
[
411,
426
],
[
426,
427
],
[
107,
428
],
[
428,
429
],
[
428,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
430,
434
],
[
434,
435
],
[
434,
436
],
[
430,
437
],
[
437,
438
],
[
437,
439
],
[
439,
440
],
[
430,
441
],
[
441,
442
],
[
442,
443
],
[
442,
444
],
[
441,
445
],
[
445,
446
],
[
445,
447
],
[
447,
448
],
[
430,
449
],
[
449,
450
],
[
449,
451
],
[
451,
452
],
[
451,
453
],
[
430,
454
],
[
454,
455
],
[
454,
456
],
[
456,
457
],
[
456,
458
],
[
458,
459
],
[
430,
460
],
[
460,
461
],
[
461,
462
],
[
462,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
462,
467
],
[
461,
468
],
[
468,
469
],
[
468,
470
],
[
460,
471
],
[
471,
472
],
[
472,
473
],
[
472,
474
],
[
474,
475
],
[
475,
476
],
[
476,
477
],
[
476,
478
],
[
475,
479
],
[
474,
480
],
[
430,
481
],
[
481,
482
],
[
482,
483
],
[
482,
484
],
[
481,
485
],
[
485,
486
],
[
486,
487
],
[
487,
488
],
[
488,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
488,
493
],
[
487,
494
],
[
494,
495
],
[
494,
496
],
[
486,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
500,
504
],
[
504,
505
],
[
504,
506
],
[
430,
507
],
[
507,
508
],
[
507,
509
],
[
509,
510
],
[
510,
511
],
[
430,
512
],
[
512,
513
],
[
107,
514
],
[
514,
515
],
[
514,
516
],
[
516,
517
],
[
517,
518
],
[
517,
519
],
[
516,
521
],
[
521,
522
],
[
522,
523
],
[
523,
524
],
[
523,
525
],
[
521,
526
],
[
526,
527
],
[
526,
528
],
[
521,
529
],
[
529,
530
],
[
530,
531
],
[
521,
532
],
[
533,
533
],
[
533,
534
],
[
534,
535
],
[
535,
536
],
[
535,
537
],
[
534,
538
],
[
538,
539
],
[
516,
540
],
[
540,
541
],
[
514,
542
],
[
542,
543
],
[
107,
544
],
[
544,
545
],
[
544,
546
],
[
546,
547
],
[
547,
548
],
[
547,
549
],
[
549,
550
],
[
550,
551
],
[
549,
552
],
[
549,
553
],
[
553,
554
],
[
553,
555
],
[
549,
556
],
[
546,
557
],
[
557,
558
],
[
558,
559
],
[
558,
560
],
[
560,
561
],
[
557,
562
],
[
562,
563
],
[
563,
564
],
[
563,
565
],
[
562,
566
],
[
566,
567
],
[
107,
568
],
[
568,
569
],
[
568,
570
],
[
570,
571
],
[
571,
572
],
[
572,
573
],
[
572,
574
],
[
571,
575
],
[
575,
576
],
[
570,
577
],
[
577,
578
],
[
578,
579
],
[
578,
580
],
[
580,
581
],
[
107,
582
],
[
582,
583
],
[
582,
584
],
[
584,
585
],
[
585,
586
],
[
586,
587
],
[
586,
588
],
[
585,
589
],
[
584,
590
],
[
590,
591
],
[
591,
592
],
[
0,
593
],
[
593,
594
],
[
593,
595
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main{\n static long mod=(long)(1e9+7);\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n String s=sc.next();\n String t=sc.next();\n int min=t.length();\n\n for(int i=0;i<s.length()-t.length()+1;i++){\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }\n\n System.out.println(min);\n }\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass FastScanner{\t\n private int BUFFER_SIZE = 1 << 16;\n \n private DataInputStream din;\n \n private byte[] buffer;\n \n private int bufferPointer, bytesRead;\n \n public FastScanner() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner( String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n \n public String readLine() throws IOException {\n byte[] buf = new byte[64];\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n \n public String next() throws IOException{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public int[] nextIntArray( int n) throws IOException {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n \n public long[] nextLongArray( int n) throws IOException {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public char nextChar() throws IOException{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }\n \n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public double[] nextDoubleArray( int n) throws IOException {\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n}\n",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n static long mod=(long)(1e9+7);\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n String s=sc.next();\n String t=sc.next();\n int min=t.length();\n\n for(int i=0;i<s.length()-t.length()+1;i++){\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }\n\n System.out.println(min);\n }\n}",
"Main",
"static long mod=(long)(1e9+7);",
"mod",
"(long)(1e9+7)",
"1e9",
"7",
"public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n String s=sc.next();\n String t=sc.next();\n int min=t.length();\n\n for(int i=0;i<s.length()-t.length()+1;i++){\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }\n\n System.out.println(min);\n }",
"main",
"{\n FastScanner sc=new FastScanner();\n String s=sc.next();\n String t=sc.next();\n int min=t.length();\n\n for(int i=0;i<s.length()-t.length()+1;i++){\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }\n\n System.out.println(min);\n }",
"FastScanner sc=new FastScanner();",
"sc",
"new FastScanner()",
"String s=sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t=sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int min=t.length();",
"min",
"t.length()",
"t.length",
"t",
"for(int i=0;i<s.length()-t.length()+1;i++){\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()-t.length()+1",
"i",
"s.length()-t.length()+1",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }",
"{\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }",
"int cnt=0;",
"cnt",
"0",
"for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }",
"{\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }",
"if(s.charAt(j+i)==t.charAt(j))cnt++;",
"s.charAt(j+i)==t.charAt(j)",
"s.charAt(j+i)",
"s.charAt",
"s",
"j+i",
"j",
"i",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"cnt++",
"cnt",
"min=Math.min(min,t.length()-cnt)",
"min",
"Math.min(min,t.length()-cnt)",
"Math.min",
"Math",
"min",
"t.length()-cnt",
"t.length()",
"t.length",
"t",
"cnt",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String [] args",
"args",
"class FastScanner{\t\n private int BUFFER_SIZE = 1 << 16;\n \n private DataInputStream din;\n \n private byte[] buffer;\n \n private int bufferPointer, bytesRead;\n \n public FastScanner() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public FastScanner( String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n \n public String readLine() throws IOException {\n byte[] buf = new byte[64];\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n \n public String next() throws IOException{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public int[] nextIntArray( int n) throws IOException {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }\n\n public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }\n \n public long[] nextLongArray( int n) throws IOException {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }\n\n public char nextChar() throws IOException{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }\n \n public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }\n \n public double[] nextDoubleArray( int n) throws IOException {\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n}",
"FastScanner",
"private int BUFFER_SIZE = 1 << 16;",
"BUFFER_SIZE",
"1 << 16",
"1",
"16",
"private DataInputStream din;",
"din",
"private byte[] buffer;",
"buffer",
"private int bufferPointer",
"bufferPointer",
"bytesRead;",
"bytesRead",
"public FastScanner() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"FastScanner",
"{\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"din = new DataInputStream(System.in)",
"din",
"new DataInputStream(System.in)",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"public FastScanner( String file_name) throws IOException {\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"FastScanner",
"{\n din = new DataInputStream(new FileInputStream(file_name));\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"din = new DataInputStream(new FileInputStream(file_name))",
"din",
"new DataInputStream(new FileInputStream(file_name))",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"String file_name",
"file_name",
"public String readLine() throws IOException {\n byte[] buf = new byte[64];\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }",
"readLine",
"{\n byte[] buf = new byte[64];\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }",
"byte[] buf = new byte[64];",
"buf",
"new byte[64]",
"64",
"int cnt = 0",
"cnt",
"0",
"c;",
"c",
"while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }",
"(c = read()) != -1",
"(c = read())",
"c",
"read()",
"read",
"-1",
"1",
"{\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }",
"if (c == '\\n')\n break;",
"c == '\\n'",
"c",
"'\\n'",
"break;",
"buf[cnt++] = (byte) c",
"buf[cnt++]",
"buf",
"cnt++",
"cnt",
"(byte) c",
"return new String(buf, 0, cnt);",
"new String(buf, 0, cnt)",
"public String next() throws IOException{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }",
"next",
"{\n\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n \n StringBuilder builder = new StringBuilder();\n builder.append((char)c);\n c = read();\n while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }\n \n return builder.toString();\n }",
"byte c = read();",
"c",
"read()",
"read",
"while(Character.isWhitespace(c)){\n c = read();\n }",
"Character.isWhitespace(c)",
"Character.isWhitespace",
"Character",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"StringBuilder builder = new StringBuilder();",
"builder",
"new StringBuilder()",
"builder.append((char)c)",
"builder.append",
"builder",
"(char)c",
"c = read()",
"c",
"read()",
"read",
"while(!Character.isWhitespace(c)){\n builder.append((char)c);\n c = read();\n }",
"!Character.isWhitespace(c)",
"Character.isWhitespace(c)",
"Character.isWhitespace",
"Character",
"c",
"{\n builder.append((char)c);\n c = read();\n }",
"builder.append((char)c)",
"builder.append",
"builder",
"(char)c",
"c = read()",
"c",
"read()",
"read",
"return builder.toString();",
"builder.toString()",
"builder.toString",
"builder",
"public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }",
"nextInt",
"{\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }",
"int ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n c = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n c = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret = ret * 10 + c - '0';\n }",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n return -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public int[] nextIntArray( int n) throws IOException {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }",
"nextIntArray",
"{\n int arr[] = new int[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }\n return arr;\n }",
"int arr[] = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i = 0; i < n; i++){\n arr[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextInt();\n }",
"{\n arr[i] = nextInt();\n }",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"public long nextLong() throws IOException {\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }",
"nextLong",
"{\n long ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n if (neg)\n return -ret;\n return ret;\n }",
"long ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n c = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n c = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret = ret * 10 + c - '0';\n }",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n return -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public long[] nextLongArray( int n) throws IOException {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }",
"nextLongArray",
"{\n long arr[] = new long[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }\n return arr;\n }",
"long arr[] = new long[n];",
"arr",
"new long[n]",
"n",
"for(int i = 0; i < n; i++){\n arr[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextLong();\n }",
"{\n arr[i] = nextLong();\n }",
"arr[i] = nextLong()",
"arr[i]",
"arr",
"i",
"nextLong()",
"nextLong",
"return arr;",
"arr",
"int n",
"n",
"public char nextChar() throws IOException{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }",
"nextChar",
"{\n byte c = read();\n while(Character.isWhitespace(c)){\n c = read();\n }\n return (char) c;\t\n }",
"byte c = read();",
"c",
"read()",
"read",
"while(Character.isWhitespace(c)){\n c = read();\n }",
"Character.isWhitespace(c)",
"Character.isWhitespace",
"Character",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"return (char) c;",
"(char) c",
"public double nextDouble() throws IOException {\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }",
"nextDouble",
"{\n double ret = 0, div = 1;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }\n\n if (neg)\n return -ret;\n return ret;\n }",
"double ret = 0",
"ret",
"0",
"div = 1;",
"div",
"1",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n c = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n c = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret = ret * 10 + c - '0';\n }",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (c == '.') {\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }",
"c == '.'",
"c",
"'.'",
"{\n while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }\n }",
"while ((c = read()) >= '0' && c <= '9') {\n ret += (c - '0') / (div *= 10);\n }",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n ret += (c - '0') / (div *= 10);\n }",
"ret += (c - '0') / (div *= 10)",
"ret",
"(c - '0') / (div *= 10)",
"(c - '0')",
"c",
"'0'",
"(div *= 10)",
"div",
"10",
"if (neg)\n return -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public double[] nextDoubleArray( int n) throws IOException {\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }",
"nextDoubleArray",
"{\n double arr[] = new double[n];\n for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }\n return arr;\n }",
"double arr[] = new double[n];",
"arr",
"new double[n]",
"n",
"for(int i = 0; i < n; i++){\n arr[i] = nextDouble();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextDouble();\n }",
"{\n arr[i] = nextDouble();\n }",
"arr[i] = nextDouble()",
"arr[i]",
"arr",
"i",
"nextDouble()",
"nextDouble",
"return arr;",
"arr",
"int n",
"n",
"private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }",
"fillBuffer",
"{\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }",
"bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"bytesRead",
"din.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"din.read",
"din",
"buffer",
"bufferPointer = 0",
"bufferPointer",
"0",
"BUFFER_SIZE",
"if (bytesRead == -1)\n buffer[0] = -1;",
"bytesRead == -1",
"bytesRead",
"-1",
"1",
"buffer[0] = -1",
"buffer[0]",
"buffer",
"0",
"-1",
"1",
"private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }",
"read",
"{\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }",
"if (bufferPointer == bytesRead)\n fillBuffer();",
"bufferPointer == bytesRead",
"bufferPointer",
"bytesRead",
"fillBuffer()",
"fillBuffer",
"return buffer[bufferPointer++];",
"buffer[bufferPointer++]",
"buffer",
"bufferPointer++",
"bufferPointer",
"public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }",
"close",
"{\n if (din == null)\n return;\n din.close();\n }",
"if (din == null)\n return;",
"din == null",
"din",
"null",
"return;",
"din.close()",
"din.close",
"din",
"public class Main{\n static long mod=(long)(1e9+7);\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n String s=sc.next();\n String t=sc.next();\n int min=t.length();\n\n for(int i=0;i<s.length()-t.length()+1;i++){\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }\n\n System.out.println(min);\n }\n}",
"public class Main{\n static long mod=(long)(1e9+7);\n\n public static void main(String [] args) throws IOException{\n FastScanner sc=new FastScanner();\n String s=sc.next();\n String t=sc.next();\n int min=t.length();\n\n for(int i=0;i<s.length()-t.length()+1;i++){\n int cnt=0;\n for(int j=0;j<t.length();j++){\n if(s.charAt(j+i)==t.charAt(j))cnt++;\n }\n min=Math.min(min,t.length()-cnt);\n }\n\n System.out.println(min);\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main{
static long mod=(long)(1e9+7);
public static void main(String [] args) throws IOException{
FastScanner sc=new FastScanner();
String s=sc.next();
String t=sc.next();
int min=t.length();
for(int i=0;i<s.length()-t.length()+1;i++){
int cnt=0;
for(int j=0;j<t.length();j++){
if(s.charAt(j+i)==t.charAt(j))cnt++;
}
min=Math.min(min,t.length()-cnt);
}
System.out.println(min);
}
}
class FastScanner{
private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public FastScanner() {
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public FastScanner( String file_name) throws IOException {
din = new DataInputStream(new FileInputStream(file_name));
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public String readLine() throws IOException {
byte[] buf = new byte[64];
int cnt = 0, c;
while ((c = read()) != -1) {
if (c == '\n')
break;
buf[cnt++] = (byte) c;
}
return new String(buf, 0, cnt);
}
public String next() throws IOException{
byte c = read();
while(Character.isWhitespace(c)){
c = read();
}
StringBuilder builder = new StringBuilder();
builder.append((char)c);
c = read();
while(!Character.isWhitespace(c)){
builder.append((char)c);
c = read();
}
return builder.toString();
}
public int nextInt() throws IOException {
int ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public int[] nextIntArray( int n) throws IOException {
int arr[] = new int[n];
for(int i = 0; i < n; i++){
arr[i] = nextInt();
}
return arr;
}
public long nextLong() throws IOException {
long ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public long[] nextLongArray( int n) throws IOException {
long arr[] = new long[n];
for(int i = 0; i < n; i++){
arr[i] = nextLong();
}
return arr;
}
public char nextChar() throws IOException{
byte c = read();
while(Character.isWhitespace(c)){
c = read();
}
return (char) c;
}
public double nextDouble() throws IOException {
double ret = 0, div = 1;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (c == '.') {
while ((c = read()) >= '0' && c <= '9') {
ret += (c - '0') / (div *= 10);
}
}
if (neg)
return -ret;
return ret;
}
public double[] nextDoubleArray( int n) throws IOException {
double arr[] = new double[n];
for(int i = 0; i < n; i++){
arr[i] = nextDouble();
}
return arr;
}
private void fillBuffer() throws IOException {
bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
if (bytesRead == -1)
buffer[0] = -1;
}
private byte read() throws IOException {
if (bufferPointer == bytesRead)
fillBuffer();
return buffer[bufferPointer++];
}
public void close() throws IOException {
if (din == null)
return;
din.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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
4,
18,
13,
2,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
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,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
114,
8
],
[
114,
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
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
11,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
46,
50
],
[
11,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
83,
89
],
[
89,
90
],
[
89,
91
],
[
82,
92
],
[
92,
93
],
[
93,
94
],
[
63,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
97,
101
],
[
11,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
11,
108
],
[
108,
109
],
[
109,
110
],
[
9,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String t = sc.nextLine();\n char[] sChar = s.toCharArray();\n char[] tChar = t.toCharArray();\n int ans = t.length();\n int searchN = s.length() - (t.length() - 1);\n for (int cnt = 0; cnt < searchN; cnt++) {\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"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 String t = sc.nextLine();\n char[] sChar = s.toCharArray();\n char[] tChar = t.toCharArray();\n int ans = t.length();\n int searchN = s.length() - (t.length() - 1);\n for (int cnt = 0; cnt < searchN; cnt++) {\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String t = sc.nextLine();\n char[] sChar = s.toCharArray();\n char[] tChar = t.toCharArray();\n int ans = t.length();\n int searchN = s.length() - (t.length() - 1);\n for (int cnt = 0; cnt < searchN; cnt++) {\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }\n System.out.println(ans);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.nextLine();\n String t = sc.nextLine();\n char[] sChar = s.toCharArray();\n char[] tChar = t.toCharArray();\n int ans = t.length();\n int searchN = s.length() - (t.length() - 1);\n for (int cnt = 0; cnt < searchN; cnt++) {\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }\n System.out.println(ans);\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String t = sc.nextLine();",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"char[] sChar = s.toCharArray();",
"sChar",
"s.toCharArray()",
"s.toCharArray",
"s",
"char[] tChar = t.toCharArray();",
"tChar",
"t.toCharArray()",
"t.toCharArray",
"t",
"int ans = t.length();",
"ans",
"t.length()",
"t.length",
"t",
"int searchN = s.length() - (t.length() - 1);",
"searchN",
"s.length() - (t.length() - 1)",
"s.length()",
"s.length",
"s",
"(t.length() - 1)",
"t.length()",
"t.length",
"t",
"1",
"for (int cnt = 0; cnt < searchN; cnt++) {\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }",
"int cnt = 0;",
"int cnt = 0;",
"cnt",
"0",
"cnt < searchN",
"cnt",
"searchN",
"cnt++",
"cnt++",
"cnt",
"{\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }",
"{\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }",
"int diffC = 0;",
"diffC",
"0",
"for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }",
"int cnt2 = 0;",
"int cnt2 = 0;",
"cnt2",
"0",
"cnt2 < t.length()",
"cnt2",
"t.length()",
"t.length",
"t",
"cnt2++",
"cnt2++",
"cnt2",
"{\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }",
"{\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }",
"if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }",
"sChar[cnt2 + cnt] != tChar[cnt2]",
"sChar[cnt2 + cnt]",
"sChar",
"cnt2 + cnt",
"cnt2",
"cnt",
"tChar[cnt2]",
"tChar",
"cnt2",
"{\n diffC++;\n }",
"diffC++",
"diffC",
"ans = Math.min(diffC, ans)",
"ans",
"Math.min(diffC, ans)",
"Math.min",
"Math",
"diffC",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"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 String t = sc.nextLine();\n char[] sChar = s.toCharArray();\n char[] tChar = t.toCharArray();\n int ans = t.length();\n int searchN = s.length() - (t.length() - 1);\n for (int cnt = 0; cnt < searchN; cnt++) {\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }\n System.out.println(ans);\n sc.close();\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 String t = sc.nextLine();\n char[] sChar = s.toCharArray();\n char[] tChar = t.toCharArray();\n int ans = t.length();\n int searchN = s.length() - (t.length() - 1);\n for (int cnt = 0; cnt < searchN; cnt++) {\n int diffC = 0;\n for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {\n if (sChar[cnt2 + cnt] != tChar[cnt2]) {\n diffC++;\n }\n }\n ans = Math.min(diffC, ans);\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
String t = sc.nextLine();
char[] sChar = s.toCharArray();
char[] tChar = t.toCharArray();
int ans = t.length();
int searchN = s.length() - (t.length() - 1);
for (int cnt = 0; cnt < searchN; cnt++) {
int diffC = 0;
for (int cnt2 = 0; cnt2 < t.length(); cnt2++) {
if (sChar[cnt2 + cnt] != tChar[cnt2]) {
diffC++;
}
}
ans = Math.min(diffC, ans);
}
System.out.println(ans);
sc.close();
}
} |
[
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,
18,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
29,
41,
13,
17,
42,
17,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
14,
2,
13,
2,
4,
18,
13,
4,
18,
13,
30,
3,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
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
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
35,
42
],
[
8,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
68,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
67,
79
],
[
79,
80
],
[
80,
81
],
[
48,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
48,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
90,
100
],
[
100,
101
],
[
90,
102
],
[
102,
103
],
[
103,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
6,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.next();\n String T = scanner.next();\n\n scanner.close();\n\n int ans = Integer.MAX_VALUE;\n if (S.contains(T)) {\n System.out.println(0);\n return;\n }\n\n int i = 0;\n while (true) {\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }\n\n System.out.println(ans);\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 String S = scanner.next();\n String T = scanner.next();\n\n scanner.close();\n\n int ans = Integer.MAX_VALUE;\n if (S.contains(T)) {\n System.out.println(0);\n return;\n }\n\n int i = 0;\n while (true) {\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }\n\n System.out.println(ans);\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.next();\n String T = scanner.next();\n\n scanner.close();\n\n int ans = Integer.MAX_VALUE;\n if (S.contains(T)) {\n System.out.println(0);\n return;\n }\n\n int i = 0;\n while (true) {\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }\n\n System.out.println(ans);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n String S = scanner.next();\n String T = scanner.next();\n\n scanner.close();\n\n int ans = Integer.MAX_VALUE;\n if (S.contains(T)) {\n System.out.println(0);\n return;\n }\n\n int i = 0;\n while (true) {\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }\n\n System.out.println(ans);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String S = scanner.next();",
"S",
"scanner.next()",
"scanner.next",
"scanner",
"String T = scanner.next();",
"T",
"scanner.next()",
"scanner.next",
"scanner",
"scanner.close()",
"scanner.close",
"scanner",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"if (S.contains(T)) {\n System.out.println(0);\n return;\n }",
"S.contains(T)",
"S.contains",
"S",
"T",
"{\n System.out.println(0);\n return;\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"return;",
"int i = 0;",
"i",
"0",
"while (true) {\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }",
"true",
"{\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }",
"int temp = 0;",
"temp",
"0",
"for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }",
"{\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }",
"if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }",
"S.charAt(i + j) != T.charAt(j)",
"S.charAt(i + j)",
"S.charAt",
"S",
"i + j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"{\n temp++;\n }",
"temp++",
"temp",
"if (temp < ans) {\n ans = temp;\n }",
"temp < ans",
"temp",
"ans",
"{\n ans = temp;\n }",
"ans = temp",
"ans",
"temp",
"if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }",
"i >= S.length() - T.length()",
"i",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"{\n break;\n }",
"break;",
"{\n i++;\n }",
"i++",
"i",
"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) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.next();\n String T = scanner.next();\n\n scanner.close();\n\n int ans = Integer.MAX_VALUE;\n if (S.contains(T)) {\n System.out.println(0);\n return;\n }\n\n int i = 0;\n while (true) {\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }\n\n System.out.println(ans);\n }\n\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String S = scanner.next();\n String T = scanner.next();\n\n scanner.close();\n\n int ans = Integer.MAX_VALUE;\n if (S.contains(T)) {\n System.out.println(0);\n return;\n }\n\n int i = 0;\n while (true) {\n int temp = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n temp++;\n }\n }\n if (temp < ans) {\n ans = temp;\n }\n\n if (i >= S.length() - T.length()) {\n break;\n } else {\n i++;\n }\n }\n\n System.out.println(ans);\n }\n\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 T = scanner.next();
scanner.close();
int ans = Integer.MAX_VALUE;
if (S.contains(T)) {
System.out.println(0);
return;
}
int i = 0;
while (true) {
int temp = 0;
for (int j = 0; j < T.length(); j++) {
if (S.charAt(i + j) != T.charAt(j)) {
temp++;
}
}
if (temp < ans) {
ans = temp;
}
if (i >= S.length() - T.length()) {
break;
} else {
i++;
}
}
System.out.println(ans);
}
}
|
[
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,
4,
18,
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,
17,
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,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
112,
8
],
[
112,
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
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
11,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
38,
52
],
[
52,
53
],
[
53,
54
],
[
38,
55
],
[
56,
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
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
56,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
11,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
101,
105
],
[
11,
106
],
[
106,
107
],
[
107,
108
],
[
9,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
]
| [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\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\tString s = sc.nextLine();\n\t\tchar[] sChars = s.toCharArray();\n\t\tString t = sc.nextLine();\n\t\tchar[] tChars = t.toCharArray();\n\t\tint max = 0;\n\t\t\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(t.length() - max);\n\t\tsc.close();\n\t}\n}\n\n",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"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\tString s = sc.nextLine();\n\t\tchar[] sChars = s.toCharArray();\n\t\tString t = sc.nextLine();\n\t\tchar[] tChars = t.toCharArray();\n\t\tint max = 0;\n\t\t\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(t.length() - max);\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.nextLine();\n\t\tchar[] sChars = s.toCharArray();\n\t\tString t = sc.nextLine();\n\t\tchar[] tChars = t.toCharArray();\n\t\tint max = 0;\n\t\t\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(t.length() - max);\n\t\tsc.close();\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.nextLine();\n\t\tchar[] sChars = s.toCharArray();\n\t\tString t = sc.nextLine();\n\t\tchar[] tChars = t.toCharArray();\n\t\tint max = 0;\n\t\t\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(t.length() - max);\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"char[] sChars = s.toCharArray();",
"sChars",
"s.toCharArray()",
"s.toCharArray",
"s",
"String t = sc.nextLine();",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"char[] tChars = t.toCharArray();",
"tChars",
"t.toCharArray()",
"t.toCharArray",
"t",
"int max = 0;",
"max",
"0",
"for(int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}",
"int matchChar = 0;",
"matchChar",
"0",
"for(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}",
"if(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}",
"tChars[j] == sChars[i+j]",
"tChars[j]",
"tChars",
"j",
"sChars[i+j]",
"sChars",
"i+j",
"i",
"j",
"{\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}",
"matchChar++",
"matchChar",
"if(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}",
"max < matchChar",
"max",
"matchChar",
"{\n\t\t\t\tmax = matchChar;\n\t\t\t}",
"max = matchChar",
"max",
"matchChar",
"System.out.println(t.length() - max)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length() - max",
"t.length()",
"t.length",
"t",
"max",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n \n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.nextLine();\n\t\tchar[] sChars = s.toCharArray();\n\t\tString t = sc.nextLine();\n\t\tchar[] tChars = t.toCharArray();\n\t\tint max = 0;\n\t\t\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(t.length() - max);\n\t\tsc.close();\n\t}\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\tString s = sc.nextLine();\n\t\tchar[] sChars = s.toCharArray();\n\t\tString t = sc.nextLine();\n\t\tchar[] tChars = t.toCharArray();\n\t\tint max = 0;\n\t\t\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\t\n\t\t\tint matchChar = 0;\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(tChars[j] == sChars[i+j]) {\n\t\t\t\t\t\tmatchChar++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(max < matchChar) {\n\t\t\t\tmax = matchChar;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\n\t\tSystem.out.println(t.length() - max);\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.nextLine();
char[] sChars = s.toCharArray();
String t = sc.nextLine();
char[] tChars = t.toCharArray();
int max = 0;
for(int i = 0; i <= s.length() - t.length(); i++) {
int matchChar = 0;
for(int j = 0; j < t.length(); j++) {
if(tChars[j] == sChars[i+j]) {
matchChar++;
}
}
if(max < matchChar) {
max = matchChar;
}
}
System.out.println(t.length() - max);
sc.close();
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
2,
13,
4,
18,
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,
14,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
2,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
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
],
[
201,
17
],
[
201,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
20,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
42,
56
],
[
56,
57
],
[
57,
58
],
[
42,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
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
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
79,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
78,
90
],
[
90,
91
],
[
60,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
98,
102
],
[
20,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
20,
107
],
[
107,
108
],
[
108,
109
],
[
18,
110
],
[
110,
111
],
[
201,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
112,
116
],
[
116,
117
],
[
112,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
112,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
127,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
137,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
126,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
112,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
159,
160
],
[
112,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
165,
168
],
[
168,
169
],
[
112,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
174,
177
],
[
177,
178
],
[
112,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
185,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
181,
198
],
[
198,
199
],
[
0,
200
],
[
200,
201
],
[
200,
202
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n public static void main(String[] args) {\n FastInput in = new FastInput();\n PrintWriter out = new PrintWriter(System.out);\n\n String s = in.next(), t = in.next();\n int res = t.length();\n\n for (int i = 0; i + t.length() <= s.length(); i++) {\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }\n out.println(res);\n out.close();\n }\n\n static class FastInput {\n BufferedReader br;\n StringTokenizer st;\n\n public FastInput() {\n br = new BufferedReader(new 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}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n public static void main(String[] args) {\n FastInput in = new FastInput();\n PrintWriter out = new PrintWriter(System.out);\n\n String s = in.next(), t = in.next();\n int res = t.length();\n\n for (int i = 0; i + t.length() <= s.length(); i++) {\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }\n out.println(res);\n out.close();\n }\n\n static class FastInput {\n BufferedReader br;\n StringTokenizer st;\n\n public FastInput() {\n br = new BufferedReader(new 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 FastInput in = new FastInput();\n PrintWriter out = new PrintWriter(System.out);\n\n String s = in.next(), t = in.next();\n int res = t.length();\n\n for (int i = 0; i + t.length() <= s.length(); i++) {\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }\n out.println(res);\n out.close();\n }",
"main",
"{\n FastInput in = new FastInput();\n PrintWriter out = new PrintWriter(System.out);\n\n String s = in.next(), t = in.next();\n int res = t.length();\n\n for (int i = 0; i + t.length() <= s.length(); i++) {\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }\n out.println(res);\n out.close();\n }",
"FastInput in = new FastInput();",
"in",
"new FastInput()",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"String s = in.next()",
"s",
"in.next()",
"in.next",
"in",
"t = in.next();",
"t",
"in.next()",
"in.next",
"in",
"int res = t.length();",
"res",
"t.length()",
"t.length",
"t",
"for (int i = 0; i + t.length() <= s.length(); i++) {\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + t.length() <= s.length()",
"i + t.length()",
"i",
"t.length()",
"t.length",
"t",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }",
"{\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }",
"int same = 0;",
"same",
"0",
"for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"if (t.charAt(j) == s.charAt(i + j))\n same++;",
"if (t.charAt(j) == s.charAt(i + j))\n same++;",
"t.charAt(j) == s.charAt(i + j)",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"s.charAt(i + j)",
"s.charAt",
"s",
"i + j",
"i",
"j",
"same++",
"same",
"res = Math.min(res, t.length() - same)",
"res",
"Math.min(res, t.length() - same)",
"Math.min",
"Math",
"res",
"t.length() - same",
"t.length()",
"t.length",
"t",
"same",
"out.println(res)",
"out.println",
"out",
"res",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class FastInput {\n BufferedReader br;\n StringTokenizer st;\n\n public FastInput() {\n br = new BufferedReader(new 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 }",
"FastInput",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastInput() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastInput",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new 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 FastInput in = new FastInput();\n PrintWriter out = new PrintWriter(System.out);\n\n String s = in.next(), t = in.next();\n int res = t.length();\n\n for (int i = 0; i + t.length() <= s.length(); i++) {\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }\n out.println(res);\n out.close();\n }\n\n static class FastInput {\n BufferedReader br;\n StringTokenizer st;\n\n public FastInput() {\n br = new BufferedReader(new 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 FastInput in = new FastInput();\n PrintWriter out = new PrintWriter(System.out);\n\n String s = in.next(), t = in.next();\n int res = t.length();\n\n for (int i = 0; i + t.length() <= s.length(); i++) {\n int same = 0;\n for (int j = 0; j < t.length(); j++)\n if (t.charAt(j) == s.charAt(i + j))\n same++;\n res = Math.min(res, t.length() - same);\n }\n out.println(res);\n out.close();\n }\n\n static class FastInput {\n BufferedReader br;\n StringTokenizer st;\n\n public FastInput() {\n br = new BufferedReader(new 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.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
FastInput in = new FastInput();
PrintWriter out = new PrintWriter(System.out);
String s = in.next(), t = in.next();
int res = t.length();
for (int i = 0; i + t.length() <= s.length(); i++) {
int same = 0;
for (int j = 0; j < t.length(); j++)
if (t.charAt(j) == s.charAt(i + j))
same++;
res = Math.min(res, t.length() - same);
}
out.println(res);
out.close();
}
static class FastInput {
BufferedReader br;
StringTokenizer st;
public FastInput() {
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,
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,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
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
],
[
104,
8
],
[
104,
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
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
11,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
43,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
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
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
75,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
74,
86
],
[
86,
87
],
[
57,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
90,
94
],
[
11,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
9,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
]
| [
"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 t = br.readLine();\n br.close();\n int s_len = s.length();\n int t_len = t.length();\n int answer = t.length();\n for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }\n System.out.println(answer);\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 t = br.readLine();\n br.close();\n int s_len = s.length();\n int t_len = t.length();\n int answer = t.length();\n for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }\n System.out.println(answer);\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 t = br.readLine();\n br.close();\n int s_len = s.length();\n int t_len = t.length();\n int answer = t.length();\n for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }\n System.out.println(answer);\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String s = br.readLine();\n String t = br.readLine();\n br.close();\n int s_len = s.length();\n int t_len = t.length();\n int answer = t.length();\n for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }\n System.out.println(answer);\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 t = br.readLine();",
"t",
"br.readLine()",
"br.readLine",
"br",
"br.close()",
"br.close",
"br",
"int s_len = s.length();",
"s_len",
"s.length()",
"s.length",
"s",
"int t_len = t.length();",
"t_len",
"t.length()",
"t.length",
"t",
"int answer = t.length();",
"answer",
"t.length()",
"t.length",
"t",
"for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }",
"int s_idx = 0;",
"int s_idx = 0;",
"s_idx",
"0",
"s_idx <= s_len - t_len",
"s_idx",
"s_len - t_len",
"s_len",
"t_len",
"s_idx++",
"s_idx++",
"s_idx",
"{\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }",
"{\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }",
"int diff_cnt = 0;",
"diff_cnt",
"0",
"for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }",
"int t_idx = 0;",
"int t_idx = 0;",
"t_idx",
"0",
"t_idx < t_len",
"t_idx",
"t_len",
"t_idx++",
"t_idx++",
"t_idx",
"{\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }",
"{\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }",
"if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;",
"s.charAt(s_idx + t_idx) != t.charAt(t_idx)",
"s.charAt(s_idx + t_idx)",
"s.charAt",
"s",
"s_idx + t_idx",
"s_idx",
"t_idx",
"t.charAt(t_idx)",
"t.charAt",
"t",
"t_idx",
"diff_cnt++",
"diff_cnt",
"answer = Math.min(answer, diff_cnt)",
"answer",
"Math.min(answer, diff_cnt)",
"Math.min",
"Math",
"answer",
"diff_cnt",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"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 t = br.readLine();\n br.close();\n int s_len = s.length();\n int t_len = t.length();\n int answer = t.length();\n for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }\n System.out.println(answer);\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 t = br.readLine();\n br.close();\n int s_len = s.length();\n int t_len = t.length();\n int answer = t.length();\n for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){\n int diff_cnt = 0;\n for(int t_idx = 0; t_idx < t_len; t_idx++){\n if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;\n }\n answer = Math.min(answer, diff_cnt);\n }\n System.out.println(answer);\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 t = br.readLine();
br.close();
int s_len = s.length();
int t_len = t.length();
int answer = t.length();
for(int s_idx = 0; s_idx <= s_len - t_len; s_idx++){
int diff_cnt = 0;
for(int t_idx = 0; t_idx < t_len; t_idx++){
if(s.charAt(s_idx + t_idx) != t.charAt(t_idx)) diff_cnt++;
}
answer = Math.min(answer, diff_cnt);
}
System.out.println(answer);
}
} |
[
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,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
30,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
14,
4,
18,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
4,
18,
13,
13,
29,
4,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
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
],
[
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
],
[
368,
35
],
[
368,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
38,
49
],
[
49,
50
],
[
49,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
38,
55
],
[
55,
56
],
[
55,
57
],
[
38,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
58,
63
],
[
38,
64
],
[
64,
65
],
[
65,
66
],
[
36,
67
],
[
67,
68
],
[
368,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
82,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
98,
112
],
[
112,
113
],
[
113,
114
],
[
98,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
120,
130
],
[
130,
131
],
[
131,
132
],
[
120,
133
],
[
134,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
140,
142
],
[
136,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
135,
147
],
[
147,
148
],
[
148,
149
],
[
116,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
152,
156
],
[
82,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
71,
161
],
[
161,
162
],
[
71,
163
],
[
163,
164
],
[
71,
165
],
[
165,
166
],
[
368,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
167,
171
],
[
171,
172
],
[
171,
173
],
[
167,
175
],
[
175,
176
],
[
167,
177
],
[
177,
178
],
[
167,
179
],
[
179,
180
],
[
167,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
181,
189
],
[
189,
190
],
[
167,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
194,
199
],
[
199,
200
],
[
200,
201
],
[
193,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
202,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
206,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
210,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
219,
222
],
[
206,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
223,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
193,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
167,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
238,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
238,
252
],
[
252,
253
],
[
252,
254
],
[
238,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
255,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
263,
264
],
[
262,
265
],
[
261,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
267,
270
],
[
260,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
238,
275
],
[
275,
276
],
[
276,
277
],
[
277,
278
],
[
167,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
288,
291
],
[
281,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
279,
296
],
[
296,
297
],
[
167,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
301,
302
],
[
305,
303
],
[
315,
304
],
[
312,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
309,
310
],
[
309,
311
],
[
312,
312
],
[
312,
313
],
[
312,
314
],
[
315,
315
],
[
315,
316
],
[
315,
317
],
[
305,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
298,
322
],
[
322,
323
],
[
167,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
368,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
330,
334
],
[
334,
335
],
[
334,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
334,
340
],
[
340,
341
],
[
330,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
345,
346
],
[
346,
347
],
[
346,
348
],
[
345,
349
],
[
342,
350
],
[
350,
351
],
[
330,
352
],
[
352,
353
],
[
352,
354
],
[
354,
355
],
[
355,
356
],
[
356,
357
],
[
330,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
361,
362
],
[
362,
363
],
[
361,
364
],
[
358,
365
],
[
365,
366
],
[
0,
367
],
[
367,
368
],
[
367,
369
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.io.BufferedWriter;\nimport java.io.Writer;\nimport java.io.OutputStreamWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public String nextString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"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.io.BufferedWriter;",
"BufferedWriter",
"java.io",
"import java.io.Writer;",
"Writer",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public String nextString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"OutputWriter out = new OutputWriter(outputStream);",
"out",
"new OutputWriter(outputStream)",
"BSubstring solver = new BSubstring();",
"solver",
"new BSubstring()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BSubstring {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }\n }\n\n }",
"BSubstring",
"public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }\n }",
"solve",
"{\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }\n }",
"int ntc = 1;",
"ntc",
"1",
"while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }",
"(ntc--) > 0",
"(ntc--)",
"ntc",
"0",
"{\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }",
"String s = in.nextString();",
"s",
"in.nextString()",
"in.nextString",
"in",
"String t = in.nextString();",
"t",
"in.nextString()",
"in.nextString",
"in",
"int min = t.length();",
"min",
"t.length()",
"t.length",
"t",
"for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }",
"{\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }",
"{\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }",
"if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }",
"s.charAt(i + j) != t.charAt(j)",
"s.charAt(i + j)",
"s.charAt",
"s",
"i + j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n count++;\n }",
"count++",
"count",
"min = Math.min(min, count)",
"min",
"Math.min(min, count)",
"Math.min",
"Math",
"min",
"count",
"out.println(min)",
"out.println",
"out",
"min",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"OutputWriter out",
"out",
"static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public String nextString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private InputReader.SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"read",
"{\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"if (numChars == -1) {\n throw new InputMismatchException();\n }",
"numChars == -1",
"numChars",
"-1",
"1",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0) {\n return -1;\n }",
"numChars <= 0",
"numChars",
"0",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public String nextString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"nextString",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n }",
"if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }",
"Character.isValidCodePoint(c)",
"Character.isValidCodePoint",
"Character",
"c",
"{\n res.appendCodePoint(c);\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"isSpaceChar",
"{\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"if (filter != null) {\n return filter.isSpaceChar(c);\n }",
"filter != null",
"filter",
"null",
"{\n return filter.isSpaceChar(c);\n }",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return isWhitespace(c);",
"isWhitespace(c)",
"isWhitespace",
"c",
"int c",
"c",
"public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isWhitespace",
"{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"OutputWriter",
"{\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }",
"OutputWriter",
"{\n this.writer = new PrintWriter(writer);\n }",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void close() {\n writer.close();\n }",
"close",
"{\n writer.close();\n }",
"writer.close()",
"writer.close",
"writer",
"public void println(long i) {\n writer.println(i);\n }",
"println",
"{\n writer.println(i);\n }",
"writer.println(i)",
"writer.println",
"writer",
"i",
"long i",
"i",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public String nextString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n OutputWriter out = new OutputWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n String s = in.nextString();\n String t = in.nextString();\n int min = t.length();\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n out.println(min);\n }\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public String nextString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n if (Character.isValidCodePoint(c)) {\n res.appendCodePoint(c);\n }\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void close() {\n writer.close();\n }\n\n public void println(long i) {\n writer.println(i);\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
OutputWriter out = new OutputWriter(outputStream);
BSubstring solver = new BSubstring();
solver.solve(1, in, out);
out.close();
}
static class BSubstring {
public void solve(int testNumber, InputReader in, OutputWriter out) {
int ntc = 1;
// ntc = in.nextInt();
while ((ntc--) > 0) {
String s = in.nextString();
String t = in.nextString();
int min = t.length();
for (int i = 0; i <= s.length() - t.length(); i++) {
int count = 0;
for (int j = 0; j < t.length(); j++) {
if (s.charAt(i + j) != t.charAt(j)) {
count++;
}
}
min = Math.min(min, count);
}
out.println(min);
}
}
}
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private InputReader.SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (numChars == -1) {
throw new InputMismatchException();
}
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0) {
return -1;
}
}
return buf[curChar++];
}
public String nextString() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
StringBuilder res = new StringBuilder();
do {
if (Character.isValidCodePoint(c)) {
res.appendCodePoint(c);
}
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
public static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
static class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void close() {
writer.close();
}
public void println(long i) {
writer.println(i);
}
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
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
],
[
109,
8
],
[
109,
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
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
11,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
11,
45
],
[
45,
46
],
[
45,
47
],
[
11,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
79,
89
],
[
89,
90
],
[
90,
91
],
[
62,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
11,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
9,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
]
| [
"import java.io.FileNotFoundException;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\n\t\t// \tFile file = new File(\"src/in.txt\");\n\t\t// \tScanner sc = new Scanner(file);\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tchar[] s = S.toCharArray();\n\t\tchar[] t = T.toCharArray();\n\n\t\tint ls = S.length();\n\t\tint lt = T.length();\n\n\t\tint ans = lt;\n\n\t\tfor(int i=0;i<=ls-lt;i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.io.FileNotFoundException;",
"FileNotFoundException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\n\t\t// \tFile file = new File(\"src/in.txt\");\n\t\t// \tScanner sc = new Scanner(file);\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tchar[] s = S.toCharArray();\n\t\tchar[] t = T.toCharArray();\n\n\t\tint ls = S.length();\n\t\tint lt = T.length();\n\n\t\tint ans = lt;\n\n\t\tfor(int i=0;i<=ls-lt;i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) throws FileNotFoundException {\n\n\t\t// \tFile file = new File(\"src/in.txt\");\n\t\t// \tScanner sc = new Scanner(file);\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tchar[] s = S.toCharArray();\n\t\tchar[] t = T.toCharArray();\n\n\t\tint ls = S.length();\n\t\tint lt = T.length();\n\n\t\tint ans = lt;\n\n\t\tfor(int i=0;i<=ls-lt;i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\n\t\t// \tFile file = new File(\"src/in.txt\");\n\t\t// \tScanner sc = new Scanner(file);\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tchar[] s = S.toCharArray();\n\t\tchar[] t = T.toCharArray();\n\n\t\tint ls = S.length();\n\t\tint lt = T.length();\n\n\t\tint ans = lt;\n\n\t\tfor(int i=0;i<=ls-lt;i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"char[] s = S.toCharArray();",
"s",
"S.toCharArray()",
"S.toCharArray",
"S",
"char[] t = T.toCharArray();",
"t",
"T.toCharArray()",
"T.toCharArray",
"T",
"int ls = S.length();",
"ls",
"S.length()",
"S.length",
"S",
"int lt = T.length();",
"lt",
"T.length()",
"T.length",
"T",
"int ans = lt;",
"ans",
"lt",
"for(int i=0;i<=ls-lt;i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=ls-lt",
"i",
"ls-lt",
"ls",
"lt",
"i++",
"i++",
"i",
"{\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}",
"int cnt = 0;",
"cnt",
"0",
"for(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<lt",
"j",
"lt",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}",
"if(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}",
"t[j]!=s[i+j]",
"t[j]",
"t",
"j",
"s[i+j]",
"s",
"i+j",
"i",
"j",
"{\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}",
"cnt++",
"cnt",
"if(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}",
"cnt<ans",
"cnt",
"ans",
"{\n\t\t\t\tans = cnt;\n\t\t\t}",
"ans = cnt",
"ans",
"cnt",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\n\t\t// \tFile file = new File(\"src/in.txt\");\n\t\t// \tScanner sc = new Scanner(file);\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tchar[] s = S.toCharArray();\n\t\tchar[] t = T.toCharArray();\n\n\t\tint ls = S.length();\n\t\tint lt = T.length();\n\n\t\tint ans = lt;\n\n\t\tfor(int i=0;i<=ls-lt;i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\n\t\t// \tFile file = new File(\"src/in.txt\");\n\t\t// \tScanner sc = new Scanner(file);\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tchar[] s = S.toCharArray();\n\t\tchar[] t = T.toCharArray();\n\n\t\tint ls = S.length();\n\t\tint lt = T.length();\n\n\t\tint ans = lt;\n\n\t\tfor(int i=0;i<=ls-lt;i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor(int j=0;j<lt;j++) {\n\t\t\t\t\tif(t[j]!=s[i+j]) {\n\t\t\t\t\t\tcnt++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(cnt<ans) {\n\t\t\t\tans = cnt;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
]
| import java.io.FileNotFoundException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws FileNotFoundException {
// File file = new File("src/in.txt");
// Scanner sc = new Scanner(file);
Scanner sc = new Scanner(System.in);
String S = sc.next();
String T = sc.next();
char[] s = S.toCharArray();
char[] t = T.toCharArray();
int ls = S.length();
int lt = T.length();
int ans = lt;
for(int i=0;i<=ls-lt;i++) {
int cnt = 0;
for(int j=0;j<lt;j++) {
if(t[j]!=s[i+j]) {
cnt++;
}
}
if(cnt<ans) {
ans = cnt;
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
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,
29,
4,
13,
4,
13,
17,
12,
13,
30,
29,
4,
13,
4,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
29,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
29,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
29,
4,
18,
13,
13,
13,
14,
2,
13,
13,
30,
29,
4,
18,
13,
13,
13,
30,
37,
20,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
29,
20,
23,
13,
23,
13,
12,
13,
30,
4,
18,
13,
17,
17,
4,
18,
13,
17,
17,
4,
18,
13,
17,
17,
4,
13,
4,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
13,
13,
6,
13,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
12,
13,
30,
29,
2,
13,
13,
12,
13,
30,
14,
4,
13,
30,
29,
4,
18,
13,
40,
13,
30,
37,
20,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
408,
11
],
[
408,
12
],
[
12,
13
],
[
12,
14
],
[
408,
15
],
[
15,
16
],
[
15,
17
],
[
408,
18
],
[
18,
19
],
[
18,
20
],
[
408,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
408,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
27,
34
],
[
34,
35
],
[
408,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
38,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
36,
51
],
[
51,
52
],
[
408,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
408,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
408,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
408,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
408,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
408,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
98,
102
],
[
408,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
107,
111
],
[
408,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
114,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
122,
132
],
[
132,
133
],
[
133,
134
],
[
122,
135
],
[
136,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
114,
147
],
[
147,
148
],
[
408,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
151,
156
],
[
156,
157
],
[
156,
158
],
[
151,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
159,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
159,
169
],
[
169,
170
],
[
170,
171
],
[
159,
172
],
[
173,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
174,
177
],
[
177,
178
],
[
178,
179
],
[
177,
180
],
[
180,
181
],
[
181,
182
],
[
180,
183
],
[
151,
184
],
[
184,
185
],
[
408,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
191,
194
],
[
188,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
201,
205
],
[
195,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
206,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
212,
215
],
[
212,
216
],
[
206,
217
],
[
217,
218
],
[
218,
219
],
[
186,
220
],
[
220,
221
],
[
186,
222
],
[
222,
223
],
[
408,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
229,
230
],
[
230,
231
],
[
229,
232
],
[
226,
233
],
[
233,
234
],
[
224,
235
],
[
235,
236
],
[
224,
237
],
[
237,
238
],
[
408,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
242,
245
],
[
242,
246
],
[
241,
247
],
[
247,
248
],
[
248,
249
],
[
247,
250
],
[
247,
251
],
[
241,
252
],
[
252,
253
],
[
253,
254
],
[
252,
255
],
[
252,
256
],
[
241,
257
],
[
257,
258
],
[
241,
259
],
[
259,
260
],
[
239,
261
],
[
261,
262
],
[
408,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
265,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
265,
274
],
[
274,
275
],
[
274,
276
],
[
265,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
277,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
285,
289
],
[
289,
290
],
[
290,
291
],
[
284,
292
],
[
277,
293
],
[
293,
294
],
[
294,
295
],
[
277,
296
],
[
297,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
297,
301
],
[
301,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
301,
306
],
[
306,
307
],
[
306,
308
],
[
308,
309
],
[
309,
310
],
[
301,
311
],
[
311,
312
],
[
312,
313
],
[
301,
314
],
[
315,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
320,
323
],
[
323,
324
],
[
323,
325
],
[
318,
326
],
[
326,
327
],
[
327,
328
],
[
326,
329
],
[
316,
330
],
[
330,
331
],
[
331,
332
],
[
297,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
335,
338
],
[
335,
339
],
[
265,
340
],
[
340,
341
],
[
340,
342
],
[
408,
343
],
[
343,
344
],
[
343,
345
],
[
345,
346
],
[
345,
347
],
[
343,
348
],
[
348,
349
],
[
348,
350
],
[
343,
351
],
[
351,
352
],
[
343,
353
],
[
353,
354
],
[
343,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
358,
359
],
[
358,
360
],
[
357,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
361,
365
],
[
365,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
371,
372
],
[
367,
373
],
[
366,
374
],
[
374,
375
],
[
375,
376
],
[
376,
377
],
[
375,
378
],
[
357,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
382,
383
],
[
343,
384
],
[
384,
385
],
[
384,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
343,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
394,
395
],
[
395,
396
],
[
394,
397
],
[
397,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
399,
402
],
[
402,
403
],
[
394,
404
],
[
404,
405
],
[
405,
406
],
[
0,
407
],
[
407,
408
],
[
407,
409
]
]
| [
"import java.util.*; import java.io.*; import java.math.*;\npublic class Main{\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n\tstatic void solve(){//Here is the main function\n\t\tArrayList<String> s = nextCharArray();\n\t\tArrayList<String> t = nextCharArray();\n\t\tint output = 100000;\n\t\tfor(int i = 0; i < s.size() - t.size() + 1; i++){\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}\n\t\tmyout(output);\n\t}\n\t//Method addition frame start\n\n\n\n\n\t//Method addition frame end\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n\tstatic void solve(){//Here is the main function\n\t\tArrayList<String> s = nextCharArray();\n\t\tArrayList<String> t = nextCharArray();\n\t\tint output = 100000;\n\t\tfor(int i = 0; i < s.size() - t.size() + 1; i++){\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}\n\t\tmyout(output);\n\t}\n\t//Method addition frame start\n\n\n\n\n\t//Method addition frame end\n}",
"Main",
"static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();",
"CONVSTR",
"new HashMap<Integer, String>()",
"static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.",
"ii",
"new InputIterator()",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static void flush(){out.flush();}",
"flush",
"{out.flush();}",
"out.flush()",
"out.flush",
"out",
"static void myout(Object t){out.println(t);}",
"myout",
"{out.println(t);}",
"out.println(t)",
"out.println",
"out",
"t",
"Object t",
"t",
"static void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}",
"myerr",
"{System.err.print(\"debug:\");System.err.println(t);}",
"System.err.print(\"debug:\")",
"System.err.print",
"System.err",
"System",
"System.err",
"\"debug:\"",
"System.err.println(t)",
"System.err.println",
"System.err",
"System",
"System.err",
"t",
"Object t",
"t",
"static String next(){return ii.next();}",
"next",
"{return ii.next();}",
"return ii.next();",
"ii.next()",
"ii.next",
"ii",
"static boolean hasNext(){return ii.hasNext();}",
"hasNext",
"{return ii.hasNext();}",
"return ii.hasNext();",
"ii.hasNext()",
"ii.hasNext",
"ii",
"static int nextInt(){return Integer.parseInt(next());}",
"nextInt",
"{return Integer.parseInt(next());}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"static long nextLong(){return Long.parseLong(next());}",
"nextLong",
"{return Long.parseLong(next());}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"static double nextDouble(){return Double.parseDouble(next());}",
"nextDouble",
"{return Double.parseDouble(next());}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"static ArrayList<String> nextStrArray(){return myconv(next(), 8);}",
"nextStrArray",
"{return myconv(next(), 8);}",
"return myconv(next(), 8);",
"myconv(next(), 8)",
"myconv",
"next()",
"next",
"8",
"static ArrayList<String> nextCharArray(){return myconv(next(), 0);}",
"nextCharArray",
"{return myconv(next(), 0);}",
"return myconv(next(), 0);",
"myconv(next(), 0)",
"myconv",
"next()",
"next",
"0",
"static ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"nextIntArray",
"{\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"ArrayList<String> input = nextStrArray();",
"input",
"nextStrArray()",
"nextStrArray",
"ArrayList<Integer> ret = new ArrayList<Integer>(input.size());",
"ret",
"new ArrayList<Integer>(input.size())",
"for(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < input.size()",
"i",
"input.size()",
"input.size",
"input",
"i++",
"i++",
"i",
"{\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}",
"{\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}",
"ret.add(Integer.parseInt(input.get(i)))",
"ret.add",
"ret",
"Integer.parseInt(input.get(i))",
"Integer.parseInt",
"Integer",
"input.get(i)",
"input.get",
"input",
"i",
"return ret;",
"ret",
"static ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"nextLongArray",
"{\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"ArrayList<String> input = nextStrArray();",
"input",
"nextStrArray()",
"nextStrArray",
"ArrayList<Long> ret = new ArrayList<Long>(input.size());",
"ret",
"new ArrayList<Long>(input.size())",
"for(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < input.size()",
"i",
"input.size()",
"input.size",
"input",
"i++",
"i++",
"i",
"{\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}",
"{\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}",
"ret.add(Long.parseLong(input.get(i)))",
"ret.add",
"ret",
"Long.parseLong(input.get(i))",
"Long.parseLong",
"Long",
"input.get(i)",
"input.get",
"input",
"i",
"return ret;",
"ret",
"static String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}",
"myconv",
"{//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}",
"String joinString = CONVSTR.get(no);",
"joinString",
"CONVSTR.get(no)",
"CONVSTR.get",
"CONVSTR",
"no",
"if(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}",
"list instanceof String[]",
"list",
"String[]",
"{\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}",
"return String.join(joinString, (String[])list);",
"String.join(joinString, (String[])list)",
"String.join",
"String",
"joinString",
"(String[])list",
"if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}",
"list instanceof ArrayList",
"list",
"ArrayList",
"{\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}",
"return String.join(joinString, (ArrayList)list);",
"String.join(joinString, (ArrayList)list)",
"String.join",
"String",
"joinString",
"(ArrayList)list",
"{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}",
"throw new ClassCastException(\"Don't join\");",
"new ClassCastException(\"Don't join\")",
"Object list",
"list",
"int no",
"no",
"static ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}",
"myconv",
"{//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}",
"String splitString = CONVSTR.get(no);",
"splitString",
"CONVSTR.get(no)",
"CONVSTR.get",
"CONVSTR",
"no",
"return new ArrayList<String>(Arrays.asList(str.split(splitString)));",
"new ArrayList<String>(Arrays.asList(str.split(splitString)))",
"String str",
"str",
"int no",
"no",
"public static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}",
"main",
"{\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}",
"CONVSTR.put(8, \" \")",
"CONVSTR.put",
"CONVSTR",
"8",
"\" \"",
"CONVSTR.put(9, \"\\n\")",
"CONVSTR.put",
"CONVSTR",
"9",
"\"\\n\"",
"CONVSTR.put(0, \"\")",
"CONVSTR.put",
"CONVSTR",
"0",
"\"\"",
"solve()",
"solve",
"flush()",
"flush",
"String[] args",
"args",
"//Don't have to see. end------------------------------------------\n\tstatic void solve(){//Here is the main function\n\t\tArrayList<String> s = nextCharArray();\n\t\tArrayList<String> t = nextCharArray();\n\t\tint output = 100000;\n\t\tfor(int i = 0; i < s.size() - t.size() + 1; i++){\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}\n\t\tmyout(output);\n\t}",
"solve",
"{//Here is the main function\n\t\tArrayList<String> s = nextCharArray();\n\t\tArrayList<String> t = nextCharArray();\n\t\tint output = 100000;\n\t\tfor(int i = 0; i < s.size() - t.size() + 1; i++){\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}\n\t\tmyout(output);\n\t}",
"ArrayList<String> s = nextCharArray();",
"s",
"nextCharArray()",
"nextCharArray",
"ArrayList<String> t = nextCharArray();",
"t",
"nextCharArray()",
"nextCharArray",
"int output = 100000;",
"output",
"100000",
"for(int i = 0; i < s.size() - t.size() + 1; i++){\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.size() - t.size() + 1",
"i",
"s.size() - t.size() + 1",
"s.size() - t.size()",
"s.size()",
"s.size",
"s",
"t.size()",
"t.size",
"t",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}",
"{\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}",
"int count = 0;",
"count",
"0",
"for(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.size()",
"j",
"t.size()",
"t.size",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"if(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"!s.get(i + j).equals(t.get(j))",
"s.get(i + j).equals(t.get(j))",
"s.get(i + j).equals",
"s.get(i + j)",
"s.get",
"s",
"i + j",
"i",
"j",
"t.get(j)",
"t.get",
"t",
"j",
"{\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"count++",
"count",
"output = Math.min(output, count)",
"output",
"Math.min(output, count)",
"Math.min",
"Math",
"output",
"count",
"myout(output)",
"myout",
"output",
"static class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}",
"InputIterator",
"ArrayList<String> inputLine = new ArrayList<String>(1024);",
"inputLine",
"new ArrayList<String>(1024)",
"int index = 0;",
"index",
"0",
"int max;",
"max",
"String read;",
"read",
"InputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}",
"InputIterator",
"{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"try{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}",
"catch(IOException e){}",
"IOException e",
"{}",
"{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}",
"while((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}",
"(read = br.readLine()) != null",
"(read = br.readLine())",
"read",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}",
"inputLine.add(read)",
"inputLine.add",
"inputLine",
"read",
"max = inputLine.size()",
"max",
"inputLine.size()",
"inputLine.size",
"inputLine",
"boolean hasNext(){return (index < max);}",
"hasNext",
"{return (index < max);}",
"return (index < max);",
"(index < max)",
"index",
"max",
"String next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}",
"next",
"{\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}",
"if(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}",
"hasNext()",
"hasNext",
"{\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}",
"return inputLine.get(index++);",
"inputLine.get(index++)",
"inputLine.get",
"inputLine",
"index++",
"index",
"{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}",
"throw new IndexOutOfBoundsException(\"There is no more input\");",
"new IndexOutOfBoundsException(\"There is no more input\")",
"public class Main{\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n\tstatic void solve(){//Here is the main function\n\t\tArrayList<String> s = nextCharArray();\n\t\tArrayList<String> t = nextCharArray();\n\t\tint output = 100000;\n\t\tfor(int i = 0; i < s.size() - t.size() + 1; i++){\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}\n\t\tmyout(output);\n\t}\n\t//Method addition frame start\n\n\n\n\n\t//Method addition frame end\n}",
"public class Main{\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n\tstatic void solve(){//Here is the main function\n\t\tArrayList<String> s = nextCharArray();\n\t\tArrayList<String> t = nextCharArray();\n\t\tint output = 100000;\n\t\tfor(int i = 0; i < s.size() - t.size() + 1; i++){\n\t\t\tint count = 0;\n\t\t\tfor(int j = 0; j < t.size(); j++){\n\t\t\t\tif(!s.get(i + j).equals(t.get(j))){\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput = Math.min(output, count);\n\t\t}\n\t\tmyout(output);\n\t}\n\t//Method addition frame start\n\n\n\n\n\t//Method addition frame end\n}",
"Main"
]
| import java.util.*; import java.io.*; import java.math.*;
public class Main{
//Don't have to see. start------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<String>(1024);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try{
while((read = br.readLine()) != null){
inputLine.add(read);
}
}catch(IOException e){}
max = inputLine.size();
}
boolean hasNext(){return (index < max);}
String next(){
if(hasNext()){
return inputLine.get(index++);
}else{
throw new IndexOutOfBoundsException("There is no more input");
}
}
}
static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
static PrintWriter out = new PrintWriter(System.out);
static void flush(){out.flush();}
static void myout(Object t){out.println(t);}
static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
static String next(){return ii.next();}
static boolean hasNext(){return ii.hasNext();}
static int nextInt(){return Integer.parseInt(next());}
static long nextLong(){return Long.parseLong(next());}
static double nextDouble(){return Double.parseDouble(next());}
static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
static ArrayList<Integer> nextIntArray(){
ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
for(int i = 0; i < input.size(); i++){
ret.add(Integer.parseInt(input.get(i)));
}
return ret;
}
static ArrayList<Long> nextLongArray(){
ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
for(int i = 0; i < input.size(); i++){
ret.add(Long.parseLong(input.get(i)));
}
return ret;
}
static String myconv(Object list, int no){//only join
String joinString = CONVSTR.get(no);
if(list instanceof String[]){
return String.join(joinString, (String[])list);
}else if(list instanceof ArrayList){
return String.join(joinString, (ArrayList)list);
}else{
throw new ClassCastException("Don't join");
}
}
static ArrayList<String> myconv(String str, int no){//only split
String splitString = CONVSTR.get(no);
return new ArrayList<String>(Arrays.asList(str.split(splitString)));
}
public static void main(String[] args){
CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
solve();flush();
}
//Don't have to see. end------------------------------------------
static void solve(){//Here is the main function
ArrayList<String> s = nextCharArray();
ArrayList<String> t = nextCharArray();
int output = 100000;
for(int i = 0; i < s.size() - t.size() + 1; i++){
int count = 0;
for(int j = 0; j < t.size(); j++){
if(!s.get(i + j).equals(t.get(j))){
count++;
}
}
output = Math.min(output, count);
}
myout(output);
}
//Method addition frame start
//Method addition frame end
}
|
[
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,
2,
2,
4,
18,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
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,
2,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
99,
5
],
[
99,
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
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
27,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
67,
79
],
[
79,
80
],
[
80,
81
],
[
48,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
6,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
]
| [
"import java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n \n int res = (int)1e9;\n int legth = (T.length() - S.length()) + 1;\n for (int index = 0; index < legth; index++) {\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }\n System.out.println(res);\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 String T = sc.next();\n String S = sc.next();\n \n int res = (int)1e9;\n int legth = (T.length() - S.length()) + 1;\n for (int index = 0; index < legth; index++) {\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }\n System.out.println(res);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n \n int res = (int)1e9;\n int legth = (T.length() - S.length()) + 1;\n for (int index = 0; index < legth; index++) {\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }\n System.out.println(res);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n \n int res = (int)1e9;\n int legth = (T.length() - S.length()) + 1;\n for (int index = 0; index < legth; index++) {\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }\n System.out.println(res);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"int res = (int)1e9;",
"res",
"(int)1e9",
"int legth = (T.length() - S.length()) + 1;",
"legth",
"(T.length() - S.length()) + 1",
"(T.length() - S.length())",
"T.length()",
"T.length",
"T",
"S.length()",
"S.length",
"S",
"1",
"for (int index = 0; index < legth; index++) {\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }",
"int index = 0;",
"int index = 0;",
"index",
"0",
"index < legth",
"index",
"legth",
"index++",
"index++",
"index",
"{\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }",
"{\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < S.length()",
"j",
"S.length()",
"S.length",
"S",
"j++",
"j++",
"j",
"{\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }",
"{\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }",
"if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }",
"S.charAt(j) != T.charAt(index + j)",
"S.charAt(j)",
"S.charAt",
"S",
"j",
"T.charAt(index + j)",
"T.charAt",
"T",
"index + j",
"index",
"j",
"{\n count++;\n }",
"count++",
"count",
"if(count < res) {\n res = count;\n }",
"count < res",
"count",
"res",
"{\n res = count;\n }",
"res = count",
"res",
"count",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n \n int res = (int)1e9;\n int legth = (T.length() - S.length()) + 1;\n for (int index = 0; index < legth; index++) {\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }\n System.out.println(res);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n \n int res = (int)1e9;\n int legth = (T.length() - S.length()) + 1;\n for (int index = 0; index < legth; index++) {\n int count = 0;\n for (int j = 0; j < S.length(); j++) {\n if (S.charAt(j) != T.charAt(index + j)) {\n count++;\n }\n }\n if(count < res) {\n res = count;\n }\n }\n System.out.println(res);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String T = sc.next();
String S = sc.next();
int res = (int)1e9;
int legth = (T.length() - S.length()) + 1;
for (int index = 0; index < legth; index++) {
int count = 0;
for (int j = 0; j < S.length(); j++) {
if (S.charAt(j) != T.charAt(index + j)) {
count++;
}
}
if(count < res) {
res = count;
}
}
System.out.println(res);
}
} |
[
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,
4,
18,
18,
13,
13,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
13,
13,
13,
13,
29,
2,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
29,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
130,
8
],
[
130,
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
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
30,
33
],
[
11,
34
],
[
34,
35
],
[
35,
36
],
[
9,
37
],
[
37,
38
],
[
130,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
45,
59
],
[
59,
60
],
[
60,
61
],
[
45,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
70,
74
],
[
41,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
76,
80
],
[
39,
81
],
[
81,
82
],
[
39,
83
],
[
83,
84
],
[
130,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
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
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
111,
112
],
[
111,
113
],
[
107,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
106,
118
],
[
118,
119
],
[
119,
120
],
[
87,
121
],
[
121,
122
],
[
85,
123
],
[
123,
124
],
[
85,
125
],
[
125,
126
],
[
85,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n String S = in.readLine();\n String T = in.readLine();\n\n System.out.println(solve(S, T));\n\n in.close();\n }\n\n private static int solve(String S, String T) {\n int maxNumCommonChars = 0;\n\n for (int i = 0; i + T.length() <= S.length(); ++i) {\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }\n\n return T.length() - maxNumCommonChars;\n }\n\n private static int getNumCommonChars(String S, String T, int start) {\n int numCommonChars = 0;\n\n for (int i = 0; i < T.length(); ++i) {\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }\n\n return numCommonChars;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n String S = in.readLine();\n String T = in.readLine();\n\n System.out.println(solve(S, T));\n\n in.close();\n }\n\n private static int solve(String S, String T) {\n int maxNumCommonChars = 0;\n\n for (int i = 0; i + T.length() <= S.length(); ++i) {\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }\n\n return T.length() - maxNumCommonChars;\n }\n\n private static int getNumCommonChars(String S, String T, int start) {\n int numCommonChars = 0;\n\n for (int i = 0; i < T.length(); ++i) {\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }\n\n return numCommonChars;\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n String S = in.readLine();\n String T = in.readLine();\n\n System.out.println(solve(S, T));\n\n in.close();\n }",
"main",
"{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n String S = in.readLine();\n String T = in.readLine();\n\n System.out.println(solve(S, T));\n\n in.close();\n }",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String S = in.readLine();",
"S",
"in.readLine()",
"in.readLine",
"in",
"String T = in.readLine();",
"T",
"in.readLine()",
"in.readLine",
"in",
"System.out.println(solve(S, T))",
"System.out.println",
"System.out",
"System",
"System.out",
"solve(S, T)",
"solve",
"S",
"T",
"in.close()",
"in.close",
"in",
"String[] args",
"args",
"private static int solve(String S, String T) {\n int maxNumCommonChars = 0;\n\n for (int i = 0; i + T.length() <= S.length(); ++i) {\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }\n\n return T.length() - maxNumCommonChars;\n }",
"solve",
"{\n int maxNumCommonChars = 0;\n\n for (int i = 0; i + T.length() <= S.length(); ++i) {\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }\n\n return T.length() - maxNumCommonChars;\n }",
"int maxNumCommonChars = 0;",
"maxNumCommonChars",
"0",
"for (int i = 0; i + T.length() <= S.length(); ++i) {\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + T.length() <= S.length()",
"i + T.length()",
"i",
"T.length()",
"T.length",
"T",
"S.length()",
"S.length",
"S",
"++i",
"++i",
"i",
"{\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }",
"{\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }",
"maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i))",
"maxNumCommonChars",
"Math.max(maxNumCommonChars, getNumCommonChars(S, T, i))",
"Math.max",
"Math",
"maxNumCommonChars",
"getNumCommonChars(S, T, i)",
"getNumCommonChars",
"S",
"T",
"i",
"return T.length() - maxNumCommonChars;",
"T.length() - maxNumCommonChars",
"T.length()",
"T.length",
"T",
"maxNumCommonChars",
"String S",
"S",
"String T",
"T",
"private static int getNumCommonChars(String S, String T, int start) {\n int numCommonChars = 0;\n\n for (int i = 0; i < T.length(); ++i) {\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }\n\n return numCommonChars;\n }",
"getNumCommonChars",
"{\n int numCommonChars = 0;\n\n for (int i = 0; i < T.length(); ++i) {\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }\n\n return numCommonChars;\n }",
"int numCommonChars = 0;",
"numCommonChars",
"0",
"for (int i = 0; i < T.length(); ++i) {\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < T.length()",
"i",
"T.length()",
"T.length",
"T",
"++i",
"++i",
"i",
"{\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }",
"{\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }",
"if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }",
"S.charAt(start + i) == T.charAt(i)",
"S.charAt(start + i)",
"S.charAt",
"S",
"start + i",
"start",
"i",
"T.charAt(i)",
"T.charAt",
"T",
"i",
"{\n numCommonChars++;\n }",
"numCommonChars++",
"numCommonChars",
"return numCommonChars;",
"numCommonChars",
"String S",
"S",
"String T",
"T",
"int start",
"start",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n String S = in.readLine();\n String T = in.readLine();\n\n System.out.println(solve(S, T));\n\n in.close();\n }\n\n private static int solve(String S, String T) {\n int maxNumCommonChars = 0;\n\n for (int i = 0; i + T.length() <= S.length(); ++i) {\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }\n\n return T.length() - maxNumCommonChars;\n }\n\n private static int getNumCommonChars(String S, String T, int start) {\n int numCommonChars = 0;\n\n for (int i = 0; i < T.length(); ++i) {\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }\n\n return numCommonChars;\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n String S = in.readLine();\n String T = in.readLine();\n\n System.out.println(solve(S, T));\n\n in.close();\n }\n\n private static int solve(String S, String T) {\n int maxNumCommonChars = 0;\n\n for (int i = 0; i + T.length() <= S.length(); ++i) {\n maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));\n }\n\n return T.length() - maxNumCommonChars;\n }\n\n private static int getNumCommonChars(String S, String T, int start) {\n int numCommonChars = 0;\n\n for (int i = 0; i < T.length(); ++i) {\n if (S.charAt(start + i) == T.charAt(i)) {\n numCommonChars++;\n }\n }\n\n return numCommonChars;\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String S = in.readLine();
String T = in.readLine();
System.out.println(solve(S, T));
in.close();
}
private static int solve(String S, String T) {
int maxNumCommonChars = 0;
for (int i = 0; i + T.length() <= S.length(); ++i) {
maxNumCommonChars = Math.max(maxNumCommonChars, getNumCommonChars(S, T, i));
}
return T.length() - maxNumCommonChars;
}
private static int getNumCommonChars(String S, String T, int start) {
int numCommonChars = 0;
for (int i = 0; i < T.length(); ++i) {
if (S.charAt(start + i) == T.charAt(i)) {
numCommonChars++;
}
}
return numCommonChars;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
17,
0,
13,
17,
11,
1,
0,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
0,
13,
13,
2,
13,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
40,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
13,
19
],
[
19,
20
],
[
13,
21
],
[
21,
22
],
[
13,
23
],
[
23,
24
],
[
13,
25
],
[
25,
26
],
[
13,
27
],
[
27,
28
],
[
13,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
13,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
13,
39
],
[
39,
40
],
[
39,
41
],
[
13,
42
],
[
42,
43
],
[
42,
44
],
[
13,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
45,
59
],
[
59,
60
],
[
60,
61
],
[
45,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
67,
79
],
[
79,
80
],
[
80,
81
],
[
67,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
85,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
93,
95
],
[
84,
96
],
[
96,
97
],
[
63,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
13,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
6,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
]
| [
"import java.util.Scanner;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t} catch(Exception e) {\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t} catch(Exception e) {\n\t\t}\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t} catch(Exception e) {\n\t\t}\n\t}",
"main",
"{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t} catch(Exception e) {\n\t\t}\n\t}",
"try {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t} catch(Exception e) {\n\t\t}",
"catch(Exception e) {\n\t\t}",
"Exception e",
"{\n\t\t}",
"{\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s",
"s",
"t;",
"t",
"int c",
"c",
"m",
"m",
"i",
"i",
"j;",
"j",
"s=sc.nextLine()",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"t=sc.nextLine()",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"m=2147483647",
"m",
"2147483647",
"c=0",
"c",
"0",
"for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }",
"i=0;",
"i=0",
"i",
"0",
"i<=(s.length()-t.length())",
"i",
"(s.length()-t.length())",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }",
"{\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }",
"c=0",
"c",
"0",
"for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }",
"j=i;",
"j=i",
"j",
"i",
"j<(i+t.length())",
"j",
"(i+t.length())",
"i",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }",
"{\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }",
"if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;",
"s.charAt(j)!=t.charAt(j-i)",
"s.charAt(j)",
"s.charAt",
"s",
"j",
"t.charAt(j-i)",
"t.charAt",
"t",
"j-i",
"j",
"i",
"c++",
"c",
"if(c<m)\n\t\t m=c;",
"c<m",
"c",
"m",
"m=c",
"m",
"c",
"System.out.println(m)",
"System.out.println",
"System.out",
"System",
"System.out",
"m",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t} catch(Exception e) {\n\t\t}\n\t}\n}",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t String s,t;\n\t\t int c,m,i,j;\n\t\t s=sc.nextLine();\n\t\t t=sc.nextLine();\n\t\t m=2147483647;\n\t\t c=0;\n\t\t for(i=0;i<=(s.length()-t.length());i++)\n\t\t {\n\t\t c=0;\n\t\t for(j=i;j<(i+t.length());j++)\n\t\t {\n\t\t if(s.charAt(j)!=t.charAt(j-i))\n\t\t c++;\n\t\t }\n\t\t \n\t\t if(c<m)\n\t\t m=c;\n\t\t }\n\t\t System.out.println(m);\n\t\t \n\t\t} catch(Exception e) {\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
try {
Scanner sc = new Scanner(System.in);
String s,t;
int c,m,i,j;
s=sc.nextLine();
t=sc.nextLine();
m=2147483647;
c=0;
for(i=0;i<=(s.length()-t.length());i++)
{
c=0;
for(j=i;j<(i+t.length());j++)
{
if(s.charAt(j)!=t.charAt(j-i))
c++;
}
if(c<m)
m=c;
}
System.out.println(m);
} catch(Exception e) {
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
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
],
[
141,
17
],
[
141,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
141,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
66,
67
],
[
66,
68
],
[
55,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
76,
84
],
[
69,
85
],
[
85,
86
],
[
86,
87
],
[
69,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
93,
103
],
[
103,
104
],
[
104,
105
],
[
93,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
113,
114
],
[
113,
115
],
[
109,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
108,
120
],
[
120,
121
],
[
121,
122
],
[
89,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
125,
129
],
[
55,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
53,
134
],
[
134,
135
],
[
53,
136
],
[
136,
137
],
[
53,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author test\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc177_b solver = new abc177_b();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc177_b {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n String S = in.next();\n String T = in.next();\n\n int mincnt = 1001;\n for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }\n out.println(mincnt);\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc177_b solver = new abc177_b();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc177_b {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n String S = in.next();\n String T = in.next();\n\n int mincnt = 1001;\n for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }\n out.println(mincnt);\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc177_b solver = new abc177_b();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc177_b solver = new abc177_b();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"abc177_b solver = new abc177_b();",
"solver",
"new abc177_b()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class abc177_b {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n String S = in.next();\n String T = in.next();\n\n int mincnt = 1001;\n for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }\n out.println(mincnt);\n }\n\n }",
"abc177_b",
"public void solve(int testNumber, Scanner in, PrintWriter out) {\n String S = in.next();\n String T = in.next();\n\n int mincnt = 1001;\n for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }\n out.println(mincnt);\n }",
"solve",
"{\n String S = in.next();\n String T = in.next();\n\n int mincnt = 1001;\n for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }\n out.println(mincnt);\n }",
"String S = in.next();",
"S",
"in.next()",
"in.next",
"in",
"String T = in.next();",
"T",
"in.next()",
"in.next",
"in",
"int mincnt = 1001;",
"mincnt",
"1001",
"for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < (S.length() - T.length()) + 1",
"i",
"(S.length() - T.length()) + 1",
"(S.length() - T.length())",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"1",
"i++",
"i++",
"i",
"{\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }",
"{\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }",
"int umcnt = 0;",
"umcnt",
"0",
"for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }",
"{\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }",
"if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }",
"S.charAt(i + j) != T.charAt(j)",
"S.charAt(i + j)",
"S.charAt",
"S",
"i + j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"{\n umcnt++;\n }",
"umcnt++",
"umcnt",
"mincnt = Integer.min(mincnt, umcnt)",
"mincnt",
"Integer.min(mincnt, umcnt)",
"Integer.min",
"Integer",
"mincnt",
"umcnt",
"out.println(mincnt)",
"out.println",
"out",
"mincnt",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc177_b solver = new abc177_b();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc177_b {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n String S = in.next();\n String T = in.next();\n\n int mincnt = 1001;\n for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }\n out.println(mincnt);\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc177_b solver = new abc177_b();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc177_b {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n String S = in.next();\n String T = in.next();\n\n int mincnt = 1001;\n for (int i = 0; i < (S.length() - T.length()) + 1; i++) {\n int umcnt = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n umcnt++;\n }\n }\n mincnt = Integer.min(mincnt, umcnt);\n }\n out.println(mincnt);\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author test
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
abc177_b solver = new abc177_b();
solver.solve(1, in, out);
out.close();
}
static class abc177_b {
public void solve(int testNumber, Scanner in, PrintWriter out) {
String S = in.next();
String T = in.next();
int mincnt = 1001;
for (int i = 0; i < (S.length() - T.length()) + 1; i++) {
int umcnt = 0;
for (int j = 0; j < T.length(); j++) {
if (S.charAt(i + j) != T.charAt(j)) {
umcnt++;
}
}
mincnt = Integer.min(mincnt, umcnt);
}
out.println(mincnt);
}
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
18,
13,
13,
18,
13,
13,
17,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
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
],
[
30,
31
],
[
31,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
38,
54
],
[
54,
55
],
[
55,
56
],
[
38,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
62,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
77,
87
],
[
87,
88
],
[
88,
89
],
[
58,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
8,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
6,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
]
| [
"import java.util.*;\n \npublic class Main{\n public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String S=sc.nextLine();\n String T=sc.nextLine();\n int shortest=1001;\n\tint data=0;\n char[] Schar=S.toCharArray();\n char[] Tchar=T.toCharArray();\n for(int i=0;i<Schar.length-Tchar.length+1;i++){\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }\n \n System.out.println(shortest); \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 String S=sc.nextLine();\n String T=sc.nextLine();\n int shortest=1001;\n\tint data=0;\n char[] Schar=S.toCharArray();\n char[] Tchar=T.toCharArray();\n for(int i=0;i<Schar.length-Tchar.length+1;i++){\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }\n \n System.out.println(shortest); \n \n }\n}",
"Main",
"public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String S=sc.nextLine();\n String T=sc.nextLine();\n int shortest=1001;\n\tint data=0;\n char[] Schar=S.toCharArray();\n char[] Tchar=T.toCharArray();\n for(int i=0;i<Schar.length-Tchar.length+1;i++){\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }\n \n System.out.println(shortest); \n \n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n String S=sc.nextLine();\n String T=sc.nextLine();\n int shortest=1001;\n\tint data=0;\n char[] Schar=S.toCharArray();\n char[] Tchar=T.toCharArray();\n for(int i=0;i<Schar.length-Tchar.length+1;i++){\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }\n \n System.out.println(shortest); \n \n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S=sc.nextLine();",
"S",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String T=sc.nextLine();",
"T",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int shortest=1001;",
"shortest",
"1001",
"int data=0;",
"data",
"0",
"char[] Schar=S.toCharArray();",
"Schar",
"S.toCharArray()",
"S.toCharArray",
"S",
"char[] Tchar=T.toCharArray();",
"Tchar",
"T.toCharArray()",
"T.toCharArray",
"T",
"for(int i=0;i<Schar.length-Tchar.length+1;i++){\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<Schar.length-Tchar.length+1",
"i",
"Schar.length-Tchar.length+1",
"Schar.length-Tchar.length",
"Schar.length",
"Schar",
"Schar.length",
"Tchar.length",
"Tchar",
"Tchar.length",
"1",
"i++",
"i++",
"i",
"{\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }",
"{\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }",
"data=0",
"data",
"0",
"for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<Tchar.length",
"j",
"Tchar.length",
"Tchar",
"Tchar.length",
"j++",
"j++",
"j",
"{\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }",
"{\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }",
"if(Schar[i+j]!=Tchar[j]){\n data++;\n }",
"Schar[i+j]!=Tchar[j]",
"Schar[i+j]",
"Schar",
"i+j",
"i",
"j",
"Tchar[j]",
"Tchar",
"j",
"{\n data++;\n }",
"data++",
"data",
"if(data<shortest){\n shortest=data;\n }",
"data<shortest",
"data",
"shortest",
"{\n shortest=data;\n }",
"shortest=data",
"shortest",
"data",
"System.out.println(shortest)",
"System.out.println",
"System.out",
"System",
"System.out",
"shortest",
"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 String T=sc.nextLine();\n int shortest=1001;\n\tint data=0;\n char[] Schar=S.toCharArray();\n char[] Tchar=T.toCharArray();\n for(int i=0;i<Schar.length-Tchar.length+1;i++){\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }\n \n System.out.println(shortest); \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 String T=sc.nextLine();\n int shortest=1001;\n\tint data=0;\n char[] Schar=S.toCharArray();\n char[] Tchar=T.toCharArray();\n for(int i=0;i<Schar.length-Tchar.length+1;i++){\n data=0;\n for(int j=0;j<Tchar.length;j++){\n \tif(Schar[i+j]!=Tchar[j]){\n data++;\n }\n }\n\t if(data<shortest){\n shortest=data;\n }\n \n }\n \n System.out.println(shortest); \n \n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
String S=sc.nextLine();
String T=sc.nextLine();
int shortest=1001;
int data=0;
char[] Schar=S.toCharArray();
char[] Tchar=T.toCharArray();
for(int i=0;i<Schar.length-Tchar.length+1;i++){
data=0;
for(int j=0;j<Tchar.length;j++){
if(Schar[i+j]!=Tchar[j]){
data++;
}
}
if(data<shortest){
shortest=data;
}
}
System.out.println(shortest);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
13,
40,
17,
30,
4,
18,
18,
13,
13,
17,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
13,
4,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
13,
30,
0,
13,
4,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
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,
13,
30,
40,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
141,
5
],
[
141,
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
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
22,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
43,
57
],
[
57,
58
],
[
58,
59
],
[
43,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
62,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
80,
91
],
[
37,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
6,
98
],
[
98,
99
],
[
141,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
106,
116
],
[
116,
117
],
[
117,
118
],
[
106,
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
],
[
102,
134
],
[
134,
135
],
[
100,
136
],
[
136,
137
],
[
100,
138
],
[
138,
139
],
[
0,
140
],
[
140,
141
],
[
140,
142
]
]
| [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n if(s.indexOf(t)!=-1){\n System.out.println(0);\n }\n else{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }\n }\n public static int helper(String s1, String s2){\n int count=0;\n for(int i=0;i<s1.length();i++){\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }\n return count;\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 String s = sc.next();\n String t = sc.next();\n if(s.indexOf(t)!=-1){\n System.out.println(0);\n }\n else{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }\n }\n public static int helper(String s1, String s2){\n int count=0;\n for(int i=0;i<s1.length();i++){\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }\n return count;\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n if(s.indexOf(t)!=-1){\n System.out.println(0);\n }\n else{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n if(s.indexOf(t)!=-1){\n System.out.println(0);\n }\n else{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"if(s.indexOf(t)!=-1){\n System.out.println(0);\n }\n else{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }",
"s.indexOf(t)!=-1",
"s.indexOf(t)",
"s.indexOf",
"s",
"t",
"-1",
"1",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }",
"int min=Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=s.length()-t.length()",
"i",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }",
"{\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }",
"if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }",
"min>helper(s.substring(i,i+t.length()),t)",
"min",
"helper(s.substring(i,i+t.length()),t)",
"helper",
"s.substring(i,i+t.length())",
"s.substring",
"s",
"i",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"t",
"{\n min=helper(s.substring(i,i+t.length()),t);\n }",
"min=helper(s.substring(i,i+t.length()),t)",
"min",
"helper(s.substring(i,i+t.length()),t)",
"helper",
"s.substring(i,i+t.length())",
"s.substring",
"s",
"i",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"t",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public static int helper(String s1, String s2){\n int count=0;\n for(int i=0;i<s1.length();i++){\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }\n return count;\n }",
"helper",
"{\n int count=0;\n for(int i=0;i<s1.length();i++){\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }\n return count;\n }",
"int count=0;",
"count",
"0",
"for(int i=0;i<s1.length();i++){\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s1.length()",
"i",
"s1.length()",
"s1.length",
"s1",
"i++",
"i++",
"i",
"{\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }",
"{\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }",
"if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }",
"s1.charAt(i)!=s2.charAt(i)",
"s1.charAt(i)",
"s1.charAt",
"s1",
"i",
"s2.charAt(i)",
"s2.charAt",
"s2",
"i",
"{\n count++;\n }",
"count++",
"count",
"return count;",
"count",
"String s1",
"s1",
"String s2",
"s2",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n if(s.indexOf(t)!=-1){\n System.out.println(0);\n }\n else{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }\n }\n public static int helper(String s1, String s2){\n int count=0;\n for(int i=0;i<s1.length();i++){\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }\n return count;\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 String t = sc.next();\n if(s.indexOf(t)!=-1){\n System.out.println(0);\n }\n else{\n int min=Integer.MAX_VALUE;\n for(int i=0;i<=s.length()-t.length();i++){\n //System.out.println(s.substring(i,i+t.length()));\n if(min>helper(s.substring(i,i+t.length()),t)){\n min=helper(s.substring(i,i+t.length()),t);\n }\n }\n System.out.println(min);\n }\n }\n public static int helper(String s1, String s2){\n int count=0;\n for(int i=0;i<s1.length();i++){\n if(s1.charAt(i)!=s2.charAt(i)){\n count++;\n }\n }\n return count;\n }\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 t = sc.next();
if(s.indexOf(t)!=-1){
System.out.println(0);
}
else{
int min=Integer.MAX_VALUE;
for(int i=0;i<=s.length()-t.length();i++){
//System.out.println(s.substring(i,i+t.length()));
if(min>helper(s.substring(i,i+t.length()),t)){
min=helper(s.substring(i,i+t.length()),t);
}
}
System.out.println(min);
}
}
public static int helper(String s1, String s2){
int count=0;
for(int i=0;i<s1.length();i++){
if(s1.charAt(i)!=s2.charAt(i)){
count++;
}
}
return count;
}
} |
[
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,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
2,
4,
18,
13,
17,
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,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
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
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
28,
44
],
[
44,
45
],
[
45,
46
],
[
28,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
68,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
67,
79
],
[
79,
80
],
[
48,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
83,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
6,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
]
| [
"\nimport java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString s=sc.next();\n\t\tString t=sc.next();\n\t\tint min=1000000000;\n\t\tint sum=0;\n\t\tfor(int i=0;i<s.length()-(t.length()-1);i++)\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString s=sc.next();\n\t\tString t=sc.next();\n\t\tint min=1000000000;\n\t\tint sum=0;\n\t\tfor(int i=0;i<s.length()-(t.length()-1);i++)\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n}",
"Main",
"public static void main(String args[])\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString s=sc.next();\n\t\tString t=sc.next();\n\t\tint min=1000000000;\n\t\tint sum=0;\n\t\tfor(int i=0;i<s.length()-(t.length()-1);i++)\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString s=sc.next();\n\t\tString t=sc.next();\n\t\tint min=1000000000;\n\t\tint sum=0;\n\t\tfor(int i=0;i<s.length()-(t.length()-1);i++)\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s=sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t=sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int min=1000000000;",
"min",
"1000000000",
"int sum=0;",
"sum",
"0",
"for(int i=0;i<s.length()-(t.length()-1);i++)\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()-(t.length()-1)",
"i",
"s.length()-(t.length()-1)",
"s.length()",
"s.length",
"s",
"(t.length()-1)",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}",
"{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}",
"sum=0",
"sum",
"0",
"for(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}",
"{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}",
"if(s.charAt(i+j)!=t.charAt(j)) sum++;",
"s.charAt(i+j)!=t.charAt(j)",
"s.charAt(i+j)",
"s.charAt",
"s",
"i+j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"sum++",
"sum",
"min=Math.min(min, sum)",
"min",
"Math.min(min, sum)",
"Math.min",
"Math",
"min",
"sum",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String args[]",
"args",
"public class Main {\n\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString s=sc.next();\n\t\tString t=sc.next();\n\t\tint min=1000000000;\n\t\tint sum=0;\n\t\tfor(int i=0;i<s.length()-(t.length()-1);i++)\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String args[])\n\t{\n\t\tScanner sc=new Scanner(System.in);\n\t\tString s=sc.next();\n\t\tString t=sc.next();\n\t\tint min=1000000000;\n\t\tint sum=0;\n\t\tfor(int i=0;i<s.length()-(t.length()-1);i++)\n\t\t{\n\t\t\tsum=0;\n\t\t\tfor(int j=0;j<t.length();j++)\n\t\t\t{\n\t\t\t\tif(s.charAt(i+j)!=t.charAt(j)) sum++;\n\t\t\t}\n\t\t\t//System.out.println(sum);\n\t\t\tmin=Math.min(min, sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(min);\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 t=sc.next();
int min=1000000000;
int sum=0;
for(int i=0;i<s.length()-(t.length()-1);i++)
{
sum=0;
for(int j=0;j<t.length();j++)
{
if(s.charAt(i+j)!=t.charAt(j)) sum++;
}
//System.out.println(sum);
min=Math.min(min, sum);
}
System.out.println(min);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
18,
13,
13,
18,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
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,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
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
],
[
238,
8
],
[
238,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
18,
21
],
[
11,
22
],
[
22,
23
],
[
23,
24
],
[
9,
25
],
[
25,
26
],
[
238,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
29,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
29,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
29,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
49,
65
],
[
65,
66
],
[
66,
67
],
[
49,
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
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
73,
85
],
[
85,
86
],
[
86,
87
],
[
73,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
90,
100
],
[
100,
101
],
[
69,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
104,
108
],
[
29,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
27,
113
],
[
113,
114
],
[
27,
115
],
[
115,
116
],
[
238,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
123,
124
],
[
123,
125
],
[
123,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
119,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
119,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
135,
145
],
[
145,
146
],
[
146,
147
],
[
135,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
117,
157
],
[
157,
158
],
[
238,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
161,
163
],
[
159,
164
],
[
164,
165
],
[
164,
166
],
[
159,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
170,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
175,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
169,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
159,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
194,
197
],
[
197,
198
],
[
159,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
206,
211
],
[
211,
212
],
[
211,
213
],
[
206,
214
],
[
214,
215
],
[
215,
216
],
[
206,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
218,
222
],
[
222,
223
],
[
201,
224
],
[
224,
225
],
[
199,
226
],
[
226,
227
],
[
159,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
232,
235
],
[
235,
236
],
[
0,
237
],
[
237,
238
],
[
237,
239
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner in=new FastScanner();\n\t\tPrintWriter out=new PrintWriter(System.out);\n\t//\tint t=in.nextInt();\n\t//\twhile(t-->0)\n\t\tsolve(in,out);\n\t\tout.close();\n\t}\n\n static void solve(FastScanner in,PrintWriter out){\n char s[]=in.next().toCharArray();\n char t[]=in.next().toCharArray();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<s.length-t.length+1;i++){\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }\n out.println(min);\n } \n\t\n\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l=new ArrayList<>();\n\t\tfor (int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor (int i=0; i<a.length; i++) a[i]=l.get(i);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner in=new FastScanner();\n\t\tPrintWriter out=new PrintWriter(System.out);\n\t//\tint t=in.nextInt();\n\t//\twhile(t-->0)\n\t\tsolve(in,out);\n\t\tout.close();\n\t}\n\n static void solve(FastScanner in,PrintWriter out){\n char s[]=in.next().toCharArray();\n char t[]=in.next().toCharArray();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<s.length-t.length+1;i++){\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }\n out.println(min);\n } \n\t\n\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l=new ArrayList<>();\n\t\tfor (int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor (int i=0; i<a.length; i++) a[i]=l.get(i);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tFastScanner in=new FastScanner();\n\t\tPrintWriter out=new PrintWriter(System.out);\n\t//\tint t=in.nextInt();\n\t//\twhile(t-->0)\n\t\tsolve(in,out);\n\t\tout.close();\n\t}",
"main",
"{\n\t\tFastScanner in=new FastScanner();\n\t\tPrintWriter out=new PrintWriter(System.out);\n\t//\tint t=in.nextInt();\n\t//\twhile(t-->0)\n\t\tsolve(in,out);\n\t\tout.close();\n\t}",
"FastScanner in=new FastScanner();",
"in",
"new FastScanner()",
"PrintWriter out=new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"solve(in,out)",
"solve",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static void solve(FastScanner in,PrintWriter out){\n char s[]=in.next().toCharArray();\n char t[]=in.next().toCharArray();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<s.length-t.length+1;i++){\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }\n out.println(min);\n }",
"solve",
"{\n char s[]=in.next().toCharArray();\n char t[]=in.next().toCharArray();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<s.length-t.length+1;i++){\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }\n out.println(min);\n }",
"char s[]=in.next().toCharArray();",
"s",
"in.next().toCharArray()",
"in.next().toCharArray",
"in.next()",
"in.next",
"in",
"char t[]=in.next().toCharArray();",
"t",
"in.next().toCharArray()",
"in.next().toCharArray",
"in.next()",
"in.next",
"in",
"int min=Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i=0;i<s.length-t.length+1;i++){\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length-t.length+1",
"i",
"s.length-t.length+1",
"s.length-t.length",
"s.length",
"s",
"s.length",
"t.length",
"t",
"t.length",
"1",
"i++",
"i++",
"i",
"{\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }",
"{\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }",
"int c=0;",
"c",
"0",
"for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }",
"int j=i;",
"int j=i;",
"j",
"i",
"j<i+t.length",
"j",
"i+t.length",
"i",
"t.length",
"t",
"t.length",
"j++",
"j++",
"j",
"{\n if(s[j]!=t[j-i]) c++;\n }",
"{\n if(s[j]!=t[j-i]) c++;\n }",
"if(s[j]!=t[j-i]) c++;",
"s[j]!=t[j-i]",
"s[j]",
"s",
"j",
"t[j-i]",
"t",
"j-i",
"j",
"i",
"c++",
"c",
"min=Math.min(min,c)",
"min",
"Math.min(min,c)",
"Math.min",
"Math",
"min",
"c",
"out.println(min)",
"out.println",
"out",
"min",
"FastScanner in",
"in",
"PrintWriter out",
"out",
"static void sort(int[] a) {\n\t\tArrayList<Integer> l=new ArrayList<>();\n\t\tfor (int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor (int i=0; i<a.length; i++) a[i]=l.get(i);\n\t}",
"sort",
"{\n\t\tArrayList<Integer> l=new ArrayList<>();\n\t\tfor (int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor (int i=0; i<a.length; i++) a[i]=l.get(i);\n\t}",
"ArrayList<Integer> l=new ArrayList<>();",
"l",
"new ArrayList<>()",
"for (int i:a) l.add(i);",
"int i",
"a",
"l.add(i);",
"l.add(i)",
"l.add",
"l",
"i",
"Collections.sort(l)",
"Collections.sort",
"Collections",
"l",
"for (int i=0; i<a.length; i++) a[i]=l.get(i);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i]=l.get(i);",
"a[i]=l.get(i)",
"a[i]",
"a",
"i",
"l.get(i)",
"l.get",
"l",
"i",
"int[] a",
"a",
"static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public class Main {\n\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner in=new FastScanner();\n\t\tPrintWriter out=new PrintWriter(System.out);\n\t//\tint t=in.nextInt();\n\t//\twhile(t-->0)\n\t\tsolve(in,out);\n\t\tout.close();\n\t}\n\n static void solve(FastScanner in,PrintWriter out){\n char s[]=in.next().toCharArray();\n char t[]=in.next().toCharArray();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<s.length-t.length+1;i++){\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }\n out.println(min);\n } \n\t\n\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l=new ArrayList<>();\n\t\tfor (int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor (int i=0; i<a.length; i++) a[i]=l.get(i);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}",
"public class Main {\n\n\t\n\tpublic static void main(String[] args) {\n\t\tFastScanner in=new FastScanner();\n\t\tPrintWriter out=new PrintWriter(System.out);\n\t//\tint t=in.nextInt();\n\t//\twhile(t-->0)\n\t\tsolve(in,out);\n\t\tout.close();\n\t}\n\n static void solve(FastScanner in,PrintWriter out){\n char s[]=in.next().toCharArray();\n char t[]=in.next().toCharArray();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<s.length-t.length+1;i++){\n int c=0;\n for(int j=i;j<i+t.length;j++){\n if(s[j]!=t[j-i]) c++;\n }\n min=Math.min(min,c);\n }\n out.println(min);\n } \n\t\n\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l=new ArrayList<>();\n\t\tfor (int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor (int i=0; i<a.length; i++) a[i]=l.get(i);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner in=new FastScanner();
PrintWriter out=new PrintWriter(System.out);
// int t=in.nextInt();
// while(t-->0)
solve(in,out);
out.close();
}
static void solve(FastScanner in,PrintWriter out){
char s[]=in.next().toCharArray();
char t[]=in.next().toCharArray();
int min=Integer.MAX_VALUE;
for(int i=0;i<s.length-t.length+1;i++){
int c=0;
for(int j=i;j<i+t.length;j++){
if(s[j]!=t[j-i]) c++;
}
min=Math.min(min,c);
}
out.println(min);
}
static void sort(int[] a) {
ArrayList<Integer> l=new ArrayList<>();
for (int i:a) l.add(i);
Collections.sort(l);
for (int i=0; i<a.length; i++) a[i]=l.get(i);
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String next() {
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
long nextLong() {
return Long.parseLong(next());
}
}
}
|
[
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,
2,
2,
4,
18,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
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,
18,
13,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
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
],
[
22,
24
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
25,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
34,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
8,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
65,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
83,
93
],
[
93,
94
],
[
94,
95
],
[
83,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
99,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
98,
110
],
[
110,
111
],
[
111,
112
],
[
79,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
8,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
126,
130
],
[
6,
131
],
[
131,
132
]
]
| [
"import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n String[] oT = new String[T.length()-S.length()+1];\n for(int i = 0;i<oT.length;i++){\n oT[i] = T.substring(i,i+S.length());\n }\n int max = 0;\n for(int i = 0;i<oT.length;i++){\n int SM=0;\n for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }\n if(SM>max){\n max = SM;\n }\n }\n System.out.println(S.length()-max);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n String[] oT = new String[T.length()-S.length()+1];\n for(int i = 0;i<oT.length;i++){\n oT[i] = T.substring(i,i+S.length());\n }\n int max = 0;\n for(int i = 0;i<oT.length;i++){\n int SM=0;\n for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }\n if(SM>max){\n max = SM;\n }\n }\n System.out.println(S.length()-max);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n String[] oT = new String[T.length()-S.length()+1];\n for(int i = 0;i<oT.length;i++){\n oT[i] = T.substring(i,i+S.length());\n }\n int max = 0;\n for(int i = 0;i<oT.length;i++){\n int SM=0;\n for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }\n if(SM>max){\n max = SM;\n }\n }\n System.out.println(S.length()-max);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String T = sc.next();\n String S = sc.next();\n String[] oT = new String[T.length()-S.length()+1];\n for(int i = 0;i<oT.length;i++){\n oT[i] = T.substring(i,i+S.length());\n }\n int max = 0;\n for(int i = 0;i<oT.length;i++){\n int SM=0;\n for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }\n if(SM>max){\n max = SM;\n }\n }\n System.out.println(S.length()-max);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String[] oT = new String[T.length()-S.length()+1];",
"oT",
"new String[T.length()-S.length()+1]",
"T.length()-S.length()+1",
"T.length()-S.length()",
"T.length()",
"T.length",
"T",
"S.length()",
"S.length",
"S",
"1",
"for(int i = 0;i<oT.length;i++){\n oT[i] = T.substring(i,i+S.length());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<oT.length",
"i",
"oT.length",
"oT",
"oT.length",
"i++",
"i++",
"i",
"{\n oT[i] = T.substring(i,i+S.length());\n }",
"{\n oT[i] = T.substring(i,i+S.length());\n }",
"oT[i] = T.substring(i,i+S.length())",
"oT[i]",
"oT",
"i",
"T.substring(i,i+S.length())",
"T.substring",
"T",
"i",
"i+S.length()",
"i",
"S.length()",
"S.length",
"S",
"int max = 0;",
"max",
"0",
"for(int i = 0;i<oT.length;i++){\n int SM=0;\n for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }\n if(SM>max){\n max = SM;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<oT.length",
"i",
"oT.length",
"oT",
"oT.length",
"i++",
"i++",
"i",
"{\n int SM=0;\n for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }\n if(SM>max){\n max = SM;\n }\n }",
"{\n int SM=0;\n for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }\n if(SM>max){\n max = SM;\n }\n }",
"int SM=0;",
"SM",
"0",
"for(int j = 0;j<S.length();j++){\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<S.length()",
"j",
"S.length()",
"S.length",
"S",
"j++",
"j++",
"j",
"{\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }",
"{\n if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }\n }",
"if(S.charAt(j)==oT[i].charAt(j)){\n SM++;\n }",
"S.charAt(j)==oT[i].charAt(j)",
"S.charAt(j)",
"S.charAt",
"S",
"j",
"oT[i].charAt(j)",
"oT[i].charAt",
"oT[i]",
"oT",
"i",
"j",
"{\n SM++;\n }",
"SM++",
"SM",
"if(SM>max){\n max = SM;\n }",
"SM>max",
"SM",
"max",
"{\n max = SM;\n }",
"max = SM",
"max",
"SM",
"System.out.println(S.length()-max)",
"System.out.println",
"System.out",
"System",
"System.out",
"S.length()-max",
"S.length()",
"S.length",
"S",
"max",
"String[] args",
"args"
]
| import java.util.*;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String T = sc.next();
String S = sc.next();
String[] oT = new String[T.length()-S.length()+1];
for(int i = 0;i<oT.length;i++){
oT[i] = T.substring(i,i+S.length());
}
int max = 0;
for(int i = 0;i<oT.length;i++){
int SM=0;
for(int j = 0;j<S.length();j++){
if(S.charAt(j)==oT[i].charAt(j)){
SM++;
}
}
if(SM>max){
max = SM;
}
}
System.out.println(S.length()-max);
}
} |
[
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,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
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
],
[
23,
26
],
[
22,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
22,
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
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
47,
55
],
[
34,
56
],
[
56,
57
],
[
56,
58
],
[
34,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
75,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
91,
97
],
[
97,
98
],
[
97,
99
],
[
90,
100
],
[
100,
101
],
[
71,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
34,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
115,
119
],
[
6,
120
],
[
120,
121
],
[
0,
122
],
[
122,
123
],
[
122,
124
]
]
| [
"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\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tif(S.contains(T))\n\t\t{\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\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\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tif(S.contains(T))\n\t\t{\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\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 T = sc.next();\n\n\t\tif(S.contains(T))\n\t\t{\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tif(S.contains(T))\n\t\t{\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\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 T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"if(S.contains(T))\n\t\t{\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\n\t\t}",
"S.contains(T)",
"S.contains",
"S",
"T",
"{\n\t\t\tSystem.out.println(0);\n\t\t}",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\n\t\t}",
"char[] sArray = S.toCharArray();",
"sArray",
"S.toCharArray()",
"S.toCharArray",
"S",
"char[] tArray = T.toCharArray();",
"tArray",
"T.toCharArray()",
"T.toCharArray",
"T",
"int lengthDiff = S.length()-T.length() + 1;",
"lengthDiff",
"S.length()-T.length() + 1",
"S.length()-T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"1",
"int maxSameCharCount = 0;",
"maxSameCharCount",
"0",
"for(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<lengthDiff",
"i",
"lengthDiff",
"i++",
"i++",
"i",
"{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}",
"{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}",
"int sameCharCounter=0;",
"sameCharCounter",
"0",
"for(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<tArray.length",
"j",
"tArray.length",
"tArray",
"tArray.length",
"j++",
"j++",
"j",
"{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}",
"{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}",
"if(sArray[i+j] == tArray[j]) sameCharCounter++;",
"sArray[i+j] == tArray[j]",
"sArray[i+j]",
"sArray",
"i+j",
"i",
"j",
"tArray[j]",
"tArray",
"j",
"sameCharCounter++",
"sameCharCounter",
"if(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}",
"maxSameCharCount < sameCharCounter",
"maxSameCharCount",
"sameCharCounter",
"{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}",
"maxSameCharCount = sameCharCounter",
"maxSameCharCount",
"sameCharCounter",
"System.out.println(T.length()-maxSameCharCount)",
"System.out.println",
"System.out",
"System",
"System.out",
"T.length()-maxSameCharCount",
"T.length()",
"T.length",
"T",
"maxSameCharCount",
"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\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tif(S.contains(T))\n\t\t{\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\n\t\t}\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\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tif(S.contains(T))\n\t\t{\n\t\t\tSystem.out.println(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tchar[] sArray = S.toCharArray();\n\t\t\tchar[] tArray = T.toCharArray();\n\n\t\t\tint lengthDiff = S.length()-T.length() + 1;\n\t\t\t//System.out.println(String.format(\"lengthDiff = {0}\", S.length()-T.length()));\n\n\t\t\tint maxSameCharCount = 0;\n\n\t\t\tfor(int i=0; i<lengthDiff;i++)\n\t\t\t{\n\t\t\t\tint sameCharCounter=0;\n\t\t\t\tfor(int j=0; j<tArray.length;j++)\n\t\t\t\t{\n\t\t\t\t\t//System.out.println(\"sArray[i+j]\" + sArray[i+j]);\n\t\t\t\t\t//System.out.println(\"tArray[j]\" + tArray[j]);\n\n\t\t\t\t\tif(sArray[i+j] == tArray[j]) sameCharCounter++;\n\t\t\t\t}\n\n\t\t\t\tif(maxSameCharCount < sameCharCounter)\n\t\t\t\t{\n\t\t\t\t\tmaxSameCharCount = sameCharCounter;\n\t\t\t\t}\n\t\t\t\t//System.out.println();\n\t\t\t}\n\n\t\t\tSystem.out.println(T.length()-maxSameCharCount);\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 T = sc.next();
if(S.contains(T))
{
System.out.println(0);
}
else
{
char[] sArray = S.toCharArray();
char[] tArray = T.toCharArray();
int lengthDiff = S.length()-T.length() + 1;
//System.out.println(String.format("lengthDiff = {0}", S.length()-T.length()));
int maxSameCharCount = 0;
for(int i=0; i<lengthDiff;i++)
{
int sameCharCounter=0;
for(int j=0; j<tArray.length;j++)
{
//System.out.println("sArray[i+j]" + sArray[i+j]);
//System.out.println("tArray[j]" + tArray[j]);
if(sArray[i+j] == tArray[j]) sameCharCounter++;
}
if(maxSameCharCount < sameCharCounter)
{
maxSameCharCount = sameCharCounter;
}
//System.out.println();
}
System.out.println(T.length()-maxSameCharCount);
}
}
}
|
[
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,
4,
18,
13,
17,
41,
13,
2,
2,
18,
13,
13,
18,
13,
13,
17,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
11,
1,
41,
13,
13,
2,
13,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
18,
13,
13,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
18,
13,
13,
18,
13,
13,
30,
40,
13,
0,
13,
8,
2,
13,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
152,
5
],
[
152,
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
],
[
31,
32
],
[
30,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
67,
79
],
[
79,
80
],
[
80,
81
],
[
67,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
63,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
63,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
63,
101
],
[
101,
102
],
[
101,
103
],
[
63,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
104,
114
],
[
114,
115
],
[
115,
116
],
[
104,
117
],
[
118,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
119,
129
],
[
129,
130
],
[
130,
131
],
[
63,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
134,
139
],
[
8,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
8,
146
],
[
146,
147
],
[
147,
148
],
[
6,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
]
| [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.nextLine();\n\t\tString t = sc.nextLine();\n\n\t\tString[] sArray = s.split(\"\");\n\t\tString[] tArray = t.split(\"\");\n\n\t\tint num_times = sArray.length - tArray.length + 1;\n\n\t\tString part = new String();\n\n\t\tint count = 9999;\n\n\t\tfor (int i = 0; i < num_times;i++){\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\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\tString s = sc.nextLine();\n\t\tString t = sc.nextLine();\n\n\t\tString[] sArray = s.split(\"\");\n\t\tString[] tArray = t.split(\"\");\n\n\t\tint num_times = sArray.length - tArray.length + 1;\n\n\t\tString part = new String();\n\n\t\tint count = 9999;\n\n\t\tfor (int i = 0; i < num_times;i++){\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\t\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.nextLine();\n\t\tString t = sc.nextLine();\n\n\t\tString[] sArray = s.split(\"\");\n\t\tString[] tArray = t.split(\"\");\n\n\t\tint num_times = sArray.length - tArray.length + 1;\n\n\t\tString part = new String();\n\n\t\tint count = 9999;\n\n\t\tfor (int i = 0; i < num_times;i++){\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.nextLine();\n\t\tString t = sc.nextLine();\n\n\t\tString[] sArray = s.split(\"\");\n\t\tString[] tArray = t.split(\"\");\n\n\t\tint num_times = sArray.length - tArray.length + 1;\n\n\t\tString part = new String();\n\n\t\tint count = 9999;\n\n\t\tfor (int i = 0; i < num_times;i++){\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String t = sc.nextLine();",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] sArray = s.split(\"\");",
"sArray",
"s.split(\"\")",
"s.split",
"s",
"\"\"",
"String[] tArray = t.split(\"\");",
"tArray",
"t.split(\"\")",
"t.split",
"t",
"\"\"",
"int num_times = sArray.length - tArray.length + 1;",
"num_times",
"sArray.length - tArray.length + 1",
"sArray.length - tArray.length",
"sArray.length",
"sArray",
"sArray.length",
"tArray.length",
"tArray",
"tArray.length",
"1",
"String part = new String();",
"part",
"new String()",
"int count = 9999;",
"count",
"9999",
"for (int i = 0; i < num_times;i++){\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num_times",
"i",
"num_times",
"i++",
"i++",
"i",
"{\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}",
"{\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}",
"int j=i;",
"int j=i;",
"j",
"i",
"j < i + tArray.length",
"j",
"i + tArray.length",
"i",
"tArray.length",
"tArray",
"tArray.length",
"j++",
"j++",
"j",
"{\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}",
"{\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}",
"sb.append(sArray[j])",
"sb.append",
"sb",
"sArray[j]",
"sArray",
"j",
"part = sb.toString()",
"part",
"sb.toString()",
"sb.toString",
"sb",
"String[] partArray = part.split(\"\");",
"partArray",
"part.split(\"\")",
"part.split",
"part",
"\"\"",
"int currentCount = 0;",
"currentCount",
"0",
"for(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < tArray.length",
"k",
"tArray.length",
"tArray",
"tArray.length",
"k++",
"k++",
"k",
"{\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}",
"{\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}",
"if(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}",
"!partArray[k].equals(tArray[k])",
"partArray[k].equals(tArray[k])",
"partArray[k].equals",
"partArray[k]",
"partArray",
"k",
"tArray[k]",
"tArray",
"k",
"{\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}",
"currentCount ++",
"currentCount",
"count = currentCount < count ? currentCount : count",
"count",
"currentCount < count ? currentCount : count",
"currentCount < count",
"currentCount",
"count",
"currentCount",
"count",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"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\tString s = sc.nextLine();\n\t\tString t = sc.nextLine();\n\n\t\tString[] sArray = s.split(\"\");\n\t\tString[] tArray = t.split(\"\");\n\n\t\tint num_times = sArray.length - tArray.length + 1;\n\n\t\tString part = new String();\n\n\t\tint count = 9999;\n\n\t\tfor (int i = 0; i < num_times;i++){\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\t\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.nextLine();\n\t\tString t = sc.nextLine();\n\n\t\tString[] sArray = s.split(\"\");\n\t\tString[] tArray = t.split(\"\");\n\n\t\tint num_times = sArray.length - tArray.length + 1;\n\n\t\tString part = new String();\n\n\t\tint count = 9999;\n\n\t\tfor (int i = 0; i < num_times;i++){\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tfor(int j=i; j < i + tArray.length; j++){\n\t\t\t\tsb.append(sArray[j]);\n\t\t\t}\n\t\t\tpart = sb.toString();\n\n\t\t\t//System.out.println(part);\n\n\t\t\tString[] partArray = part.split(\"\");\n\t\t\tint currentCount = 0; \n\n\t\t\tfor(int k = 0; k < tArray.length; k++){\n\n\t\t\t\tif(!partArray[k].equals(tArray[k])){\n\t\t\t\t\t//System.out.println(\"P:\"+ partArray[k] +\" \" + \"T:\" + tArray[k]);\n\t\t\t\t\tcurrentCount ++;\n\t\t\t\t\t//System.out.println(currentCount);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcount = currentCount < count ? currentCount : count; \n\t\t\t// if(currentCount < count){\n\t\t\t// \tcount = currentCount;\n\t\t\t// }\n\t\t\t//System.out.println(count);\t\t\n\t\t}\n\t\tSystem.out.println(count);\n\t\tsc.close();\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.nextLine();
String t = sc.nextLine();
String[] sArray = s.split("");
String[] tArray = t.split("");
int num_times = sArray.length - tArray.length + 1;
String part = new String();
int count = 9999;
for (int i = 0; i < num_times;i++){
StringBuilder sb = new StringBuilder();
for(int j=i; j < i + tArray.length; j++){
sb.append(sArray[j]);
}
part = sb.toString();
//System.out.println(part);
String[] partArray = part.split("");
int currentCount = 0;
for(int k = 0; k < tArray.length; k++){
if(!partArray[k].equals(tArray[k])){
//System.out.println("P:"+ partArray[k] +" " + "T:" + tArray[k]);
currentCount ++;
//System.out.println(currentCount);
}
}
count = currentCount < count ? currentCount : count;
// if(currentCount < count){
// count = currentCount;
// }
//System.out.println(count);
}
System.out.println(count);
sc.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,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
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
],
[
96,
8
],
[
96,
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
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
40,
44
],
[
33,
45
],
[
45,
46
],
[
46,
47
],
[
33,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
49,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
64,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
63,
75
],
[
75,
76
],
[
76,
77
],
[
62,
78
],
[
78,
79
],
[
49,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
82,
86
],
[
11,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
9,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
]
| [
"import java.util.*; \nimport java.lang.*; \n\n\npublic class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n String S = scan.next();\n String T = scan.next();\n \n int nagasa = T.length();\n \n int ans = 10000;\n \n for(int i=0; i<=S.length()-nagasa; i++){\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }\n \n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n String S = scan.next();\n String T = scan.next();\n \n int nagasa = T.length();\n \n int ans = 10000;\n \n for(int i=0; i<=S.length()-nagasa; i++){\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }\n \n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n String S = scan.next();\n String T = scan.next();\n \n int nagasa = T.length();\n \n int ans = 10000;\n \n for(int i=0; i<=S.length()-nagasa; i++){\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }\n \n System.out.println(ans);\n }",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n \n String S = scan.next();\n String T = scan.next();\n \n int nagasa = T.length();\n \n int ans = 10000;\n \n for(int i=0; i<=S.length()-nagasa; i++){\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }\n \n System.out.println(ans);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String S = scan.next();",
"S",
"scan.next()",
"scan.next",
"scan",
"String T = scan.next();",
"T",
"scan.next()",
"scan.next",
"scan",
"int nagasa = T.length();",
"nagasa",
"T.length()",
"T.length",
"T",
"int ans = 10000;",
"ans",
"10000",
"for(int i=0; i<=S.length()-nagasa; i++){\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=S.length()-nagasa",
"i",
"S.length()-nagasa",
"S.length()",
"S.length",
"S",
"nagasa",
"i++",
"i++",
"i",
"{\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }",
"{\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }",
"int kotonaru = 0;",
"kotonaru",
"0",
"int cnt=0;",
"cnt",
"0",
"while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }",
"cnt<T.length()",
"cnt",
"T.length()",
"T.length",
"T",
"{\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }",
"if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }",
"S.charAt(i+cnt)!=T.charAt(cnt)",
"S.charAt(i+cnt)",
"S.charAt",
"S",
"i+cnt",
"i",
"cnt",
"T.charAt(cnt)",
"T.charAt",
"T",
"cnt",
"{\n kotonaru++;\n }",
"kotonaru++",
"kotonaru",
"cnt++",
"cnt",
"ans = Math.min(kotonaru, ans)",
"ans",
"Math.min(kotonaru, ans)",
"Math.min",
"Math",
"kotonaru",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n String S = scan.next();\n String T = scan.next();\n \n int nagasa = T.length();\n \n int ans = 10000;\n \n for(int i=0; i<=S.length()-nagasa; i++){\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }\n \n System.out.println(ans);\n }\n}",
"public class Main{\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n String S = scan.next();\n String T = scan.next();\n \n int nagasa = T.length();\n \n int ans = 10000;\n \n for(int i=0; i<=S.length()-nagasa; i++){\n int kotonaru = 0;\n int cnt=0;\n while(cnt<T.length()){\n if(S.charAt(i+cnt)!=T.charAt(cnt)){\n kotonaru++;\n }\n cnt++;\n }\n \n ans = Math.min(kotonaru, ans);\n }\n \n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.*;
import java.lang.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
String S = scan.next();
String T = scan.next();
int nagasa = T.length();
int ans = 10000;
for(int i=0; i<=S.length()-nagasa; i++){
int kotonaru = 0;
int cnt=0;
while(cnt<T.length()){
if(S.charAt(i+cnt)!=T.charAt(cnt)){
kotonaru++;
}
cnt++;
}
ans = Math.min(kotonaru, ans);
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
2,
13,
4,
18,
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,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
2,
17,
17,
41,
13,
40,
17,
41,
13,
20,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
18,
36,
13,
13,
30,
37,
20,
30,
14,
2,
18,
36,
13,
18,
36,
13,
30,
0,
18,
36,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
18,
36,
13,
4,
18,
18,
36,
13,
18,
36,
13,
14,
2,
18,
36,
13,
17,
30,
29,
13,
29,
18,
18,
36,
13,
40,
18,
36,
13,
12,
13,
30,
41,
13,
42,
4,
13,
0,
13,
4,
18,
36,
30,
41,
13,
20,
4,
18,
13,
13,
42,
40,
4,
13,
0,
13,
4,
18,
36,
30,
4,
18,
13,
13,
29,
4,
18,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
306,
23
],
[
306,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
26,
37
],
[
37,
38
],
[
37,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
26,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
46,
50
],
[
46,
51
],
[
26,
52
],
[
52,
53
],
[
53,
54
],
[
24,
55
],
[
55,
56
],
[
306,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
61,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
77,
91
],
[
91,
92
],
[
92,
93
],
[
77,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
99,
109
],
[
109,
110
],
[
110,
111
],
[
99,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
119,
120
],
[
119,
121
],
[
115,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
114,
126
],
[
126,
127
],
[
127,
128
],
[
95,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
131,
135
],
[
61,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
59,
140
],
[
140,
141
],
[
59,
142
],
[
142,
143
],
[
59,
144
],
[
144,
145
],
[
306,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
146,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
152,
154
],
[
146,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
146,
159
],
[
159,
160
],
[
159,
161
],
[
146,
163
],
[
163,
164
],
[
146,
165
],
[
165,
166
],
[
146,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
170,
174
],
[
167,
175
],
[
175,
176
],
[
146,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
180,
186
],
[
186,
187
],
[
187,
188
],
[
180,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
195
],
[
195,
196
],
[
195,
197
],
[
190,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
199,
203
],
[
198,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
204,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
211,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
215,
220
],
[
220,
221
],
[
220,
222
],
[
198,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
224,
228
],
[
223,
229
],
[
229,
230
],
[
230,
231
],
[
189,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
233,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
146,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
244,
245
],
[
243,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
252,
253
],
[
246,
254
],
[
243,
255
],
[
255,
256
],
[
255,
257
],
[
243,
258
],
[
258,
259
],
[
259,
260
],
[
258,
261
],
[
243,
262
],
[
262,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
269,
270
],
[
262,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
272,
275
],
[
243,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
146,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
287,
285
],
[
297,
286
],
[
294,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
291,
292
],
[
291,
293
],
[
294,
294
],
[
294,
295
],
[
294,
296
],
[
297,
297
],
[
297,
298
],
[
297,
299
],
[
287,
300
],
[
300,
301
],
[
300,
302
],
[
280,
303
],
[
303,
304
],
[
0,
305
],
[
305,
306
],
[
305,
307
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.io.IOException;\nimport java.util.InputMismatchException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in Actual solution is at the top\n *\n * @author MaxHeap\n */\npublic class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next();\n String t = in.next();\n int ans = Integer.MAX_VALUE;\n for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }\n out.println(ans);\n }\n\n }\n\n static class InputReader {\n\n private InputStream stream;\n private static final int DEFAULT_BUFFER_SIZE = 1 << 16;\n private static final int EOF = -1;\n private byte[] buf = new byte[DEFAULT_BUFFER_SIZE];\n private int curChar;\n private int numChars;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }\n }\n\n public String next() {\n int c;\n while (isSpaceChar(c = this.read())) {\n }\n\n StringBuilder result = new StringBuilder();\n result.appendCodePoint(c);\n\n while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }\n\n return result.toString();\n }\n\n public static boolean isSpaceChar(int c) {\n return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next();\n String t = in.next();\n int ans = Integer.MAX_VALUE;\n for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }\n out.println(ans);\n }\n\n }\n\n static class InputReader {\n\n private InputStream stream;\n private static final int DEFAULT_BUFFER_SIZE = 1 << 16;\n private static final int EOF = -1;\n private byte[] buf = new byte[DEFAULT_BUFFER_SIZE];\n private int curChar;\n private int numChars;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }\n }\n\n public String next() {\n int c;\n while (isSpaceChar(c = this.read())) {\n }\n\n StringBuilder result = new StringBuilder();\n result.appendCodePoint(c);\n\n while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }\n\n return result.toString();\n }\n\n public static boolean isSpaceChar(int c) {\n return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"BSubstring solver = new BSubstring();",
"solver",
"new BSubstring()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BSubstring {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next();\n String t = in.next();\n int ans = Integer.MAX_VALUE;\n for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }\n out.println(ans);\n }\n\n }",
"BSubstring",
"public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next();\n String t = in.next();\n int ans = Integer.MAX_VALUE;\n for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }\n out.println(ans);\n }",
"solve",
"{\n String s = in.next();\n String t = in.next();\n int ans = Integer.MAX_VALUE;\n for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }\n out.println(ans);\n }",
"String s = in.next();",
"s",
"in.next()",
"in.next",
"in",
"String t = in.next();",
"t",
"in.next()",
"in.next",
"in",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }",
"int start = 0;",
"int start = 0;",
"start",
"0",
"start + t.length() <= s.length()",
"start + t.length()",
"start",
"t.length()",
"t.length",
"t",
"s.length()",
"s.length",
"s",
"++start",
"++start",
"start",
"{\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }",
"{\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }",
"int diff = 0;",
"diff",
"0",
"for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < t.length()",
"i",
"t.length()",
"t.length",
"t",
"++i",
"++i",
"i",
"{\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }",
"{\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }",
"if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }",
"s.charAt(i + start) != t.charAt(i)",
"s.charAt(i + start)",
"s.charAt",
"s",
"i + start",
"i",
"start",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"{\n ++diff;\n }",
"++diff",
"diff",
"ans = Math.min(diff, ans)",
"ans",
"Math.min(diff, ans)",
"Math.min",
"Math",
"diff",
"ans",
"out.println(ans)",
"out.println",
"out",
"ans",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"PrintWriter out",
"out",
"static class InputReader {\n\n private InputStream stream;\n private static final int DEFAULT_BUFFER_SIZE = 1 << 16;\n private static final int EOF = -1;\n private byte[] buf = new byte[DEFAULT_BUFFER_SIZE];\n private int curChar;\n private int numChars;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }\n }\n\n public String next() {\n int c;\n while (isSpaceChar(c = this.read())) {\n }\n\n StringBuilder result = new StringBuilder();\n result.appendCodePoint(c);\n\n while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }\n\n return result.toString();\n }\n\n public static boolean isSpaceChar(int c) {\n return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;\n }\n\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private static final int DEFAULT_BUFFER_SIZE = 1 << 16;",
"DEFAULT_BUFFER_SIZE",
"1 << 16",
"1",
"16",
"private static final int EOF = -1;",
"EOF",
"-1",
"1",
"private byte[] buf = new byte[DEFAULT_BUFFER_SIZE];",
"buf",
"new byte[DEFAULT_BUFFER_SIZE]",
"DEFAULT_BUFFER_SIZE",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\n if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }\n }",
"read",
"{\n if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }\n }",
"if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }",
"this.numChars == EOF",
"this.numChars",
"this",
"this.numChars",
"EOF",
"{\n throw new UnknownError();\n }",
"throw new UnknownError();",
"new UnknownError()",
"{\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }",
"if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }",
"this.curChar >= this.numChars",
"this.curChar",
"this",
"this.curChar",
"this.numChars",
"this",
"this.numChars",
"{\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }",
"this.curChar = 0",
"this.curChar",
"this",
"this.curChar",
"0",
"try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }",
"catch (IOException ex) {\n throw new InputMismatchException();\n }",
"IOException ex",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n this.numChars = this.stream.read(this.buf);\n }",
"this.numChars = this.stream.read(this.buf)",
"this.numChars",
"this",
"this.numChars",
"this.stream.read(this.buf)",
"this.stream.read",
"this.stream",
"this",
"this.stream",
"this.buf",
"this",
"this.buf",
"if (this.numChars <= 0) {\n return EOF;\n }",
"this.numChars <= 0",
"this.numChars",
"this",
"this.numChars",
"0",
"{\n return EOF;\n }",
"return EOF;",
"EOF",
"return this.buf[this.curChar++];",
"this.buf[this.curChar++]",
"this.buf",
"this",
"this.buf",
"this.curChar++",
"this.curChar",
"this",
"this.curChar",
"public String next() {\n int c;\n while (isSpaceChar(c = this.read())) {\n }\n\n StringBuilder result = new StringBuilder();\n result.appendCodePoint(c);\n\n while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }\n\n return result.toString();\n }",
"next",
"{\n int c;\n while (isSpaceChar(c = this.read())) {\n }\n\n StringBuilder result = new StringBuilder();\n result.appendCodePoint(c);\n\n while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }\n\n return result.toString();\n }",
"int c;",
"c",
"while (isSpaceChar(c = this.read())) {\n }",
"isSpaceChar(c = this.read())",
"isSpaceChar",
"c = this.read()",
"c",
"this.read()",
"this.read",
"this",
"{\n }",
"StringBuilder result = new StringBuilder();",
"result",
"new StringBuilder()",
"result.appendCodePoint(c)",
"result.appendCodePoint",
"result",
"c",
"while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }",
"!isSpaceChar(c = this.read())",
"isSpaceChar(c = this.read())",
"isSpaceChar",
"c = this.read()",
"c",
"this.read()",
"this.read",
"this",
"{\n result.appendCodePoint(c);\n }",
"result.appendCodePoint(c)",
"result.appendCodePoint",
"result",
"c",
"return result.toString();",
"result.toString()",
"result.toString",
"result",
"public static boolean isSpaceChar(int c) {\n return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;\n }",
"isSpaceChar",
"{\n return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;\n }",
"return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;",
"c == 32 || c == 10 || c == 13 || c == 9 || c == EOF",
"c == 9",
"c == 13",
"c == 32 || c == 10 || c == 13 || c == 9 || c == EOF",
"c == 32",
"c",
"32",
"c == 10",
"c",
"10",
"c == 13",
"c",
"13",
"c == 9",
"c",
"9",
"c == EOF",
"c",
"EOF",
"int c",
"c",
"public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next();\n String t = in.next();\n int ans = Integer.MAX_VALUE;\n for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }\n out.println(ans);\n }\n\n }\n\n static class InputReader {\n\n private InputStream stream;\n private static final int DEFAULT_BUFFER_SIZE = 1 << 16;\n private static final int EOF = -1;\n private byte[] buf = new byte[DEFAULT_BUFFER_SIZE];\n private int curChar;\n private int numChars;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }\n }\n\n public String next() {\n int c;\n while (isSpaceChar(c = this.read())) {\n }\n\n StringBuilder result = new StringBuilder();\n result.appendCodePoint(c);\n\n while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }\n\n return result.toString();\n }\n\n public static boolean isSpaceChar(int c) {\n return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;\n }\n\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BSubstring solver = new BSubstring();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BSubstring {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next();\n String t = in.next();\n int ans = Integer.MAX_VALUE;\n for (int start = 0; start + t.length() <= s.length(); ++start) {\n int diff = 0;\n for (int i = 0; i < t.length(); ++i) {\n if (s.charAt(i + start) != t.charAt(i)) {\n ++diff;\n }\n }\n ans = Math.min(diff, ans);\n }\n out.println(ans);\n }\n\n }\n\n static class InputReader {\n\n private InputStream stream;\n private static final int DEFAULT_BUFFER_SIZE = 1 << 16;\n private static final int EOF = -1;\n private byte[] buf = new byte[DEFAULT_BUFFER_SIZE];\n private int curChar;\n private int numChars;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (this.numChars == EOF) {\n throw new UnknownError();\n } else {\n if (this.curChar >= this.numChars) {\n this.curChar = 0;\n\n try {\n this.numChars = this.stream.read(this.buf);\n } catch (IOException ex) {\n throw new InputMismatchException();\n }\n\n if (this.numChars <= 0) {\n return EOF;\n }\n }\n\n return this.buf[this.curChar++];\n }\n }\n\n public String next() {\n int c;\n while (isSpaceChar(c = this.read())) {\n }\n\n StringBuilder result = new StringBuilder();\n result.appendCodePoint(c);\n\n while (!isSpaceChar(c = this.read())) {\n result.appendCodePoint(c);\n }\n\n return result.toString();\n }\n\n public static boolean isSpaceChar(int c) {\n return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.InputStream;
/**
* Built using CHelper plug-in Actual solution is at the top
*
* @author MaxHeap
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
BSubstring solver = new BSubstring();
solver.solve(1, in, out);
out.close();
}
static class BSubstring {
public void solve(int testNumber, InputReader in, PrintWriter out) {
String s = in.next();
String t = in.next();
int ans = Integer.MAX_VALUE;
for (int start = 0; start + t.length() <= s.length(); ++start) {
int diff = 0;
for (int i = 0; i < t.length(); ++i) {
if (s.charAt(i + start) != t.charAt(i)) {
++diff;
}
}
ans = Math.min(diff, ans);
}
out.println(ans);
}
}
static class InputReader {
private InputStream stream;
private static final int DEFAULT_BUFFER_SIZE = 1 << 16;
private static final int EOF = -1;
private byte[] buf = new byte[DEFAULT_BUFFER_SIZE];
private int curChar;
private int numChars;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (this.numChars == EOF) {
throw new UnknownError();
} else {
if (this.curChar >= this.numChars) {
this.curChar = 0;
try {
this.numChars = this.stream.read(this.buf);
} catch (IOException ex) {
throw new InputMismatchException();
}
if (this.numChars <= 0) {
return EOF;
}
}
return this.buf[this.curChar++];
}
}
public String next() {
int c;
while (isSpaceChar(c = this.read())) {
}
StringBuilder result = new StringBuilder();
result.appendCodePoint(c);
while (!isSpaceChar(c = this.read())) {
result.appendCodePoint(c);
}
return result.toString();
}
public static boolean isSpaceChar(int c) {
return c == 32 || c == 10 || c == 13 || c == 9 || c == EOF;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
0,
13,
13,
14,
2,
13,
17,
29,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
30,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
13,
17,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
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,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
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
],
[
301,
14
],
[
301,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
17,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
34,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
34,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
17,
61
],
[
61,
62
],
[
15,
63
],
[
63,
64
],
[
15,
65
],
[
65,
66
],
[
15,
67
],
[
67,
68
],
[
301,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
71,
98
],
[
98,
99
],
[
69,
100
],
[
100,
101
],
[
301,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
104,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
104,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
104,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
130,
134
],
[
134,
135
],
[
135,
136
],
[
123,
137
],
[
137,
138
],
[
138,
139
],
[
123,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
145,
155
],
[
155,
156
],
[
156,
157
],
[
145,
158
],
[
159,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
162,
165
],
[
165,
166
],
[
165,
167
],
[
161,
168
],
[
168,
169
],
[
169,
170
],
[
168,
171
],
[
160,
172
],
[
172,
173
],
[
141,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
176,
180
],
[
104,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
181,
186
],
[
102,
187
],
[
187,
188
],
[
301,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
189,
193
],
[
193,
194
],
[
189,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
189,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
205,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
204,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
214,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
203,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
189,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
233,
236
],
[
236,
237
],
[
189,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
242,
245
],
[
245,
246
],
[
189,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
251,
254
],
[
254,
255
],
[
189,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
259,
260
],
[
259,
261
],
[
258,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
262,
269
],
[
269,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
258,
275
],
[
275,
276
],
[
301,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
277,
281
],
[
281,
282
],
[
277,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
285,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
291,
295
],
[
283,
296
],
[
296,
297
],
[
283,
298
],
[
298,
299
],
[
0,
300
],
[
300,
301
],
[
300,
302
]
]
| [
"// dont fuck with my love\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\nimport java.util.stream.*;\n\npublic class Main\n{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\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 int nextInt(){\n return Integer.parseInt(next());\n }\n long nextLong(){\n return Long.parseLong(next());\n }\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str = \"\";\n try{\n str = br.readLine();\n } catch (Exception e){\n e.printStackTrace();\n }\n return str;\n }\n }\n static int modPower(int x, int y, int mod){\n int res = 1;\n x %= mod;\n if(x==0) return 0;\n while(y>0){\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }\n return res;\n }\n public static int[] readArray(int n){\n FastReader in = new FastReader();\n int[] a = new int[n];\n for(int i = 0; i < n; i++) a[i] = in.nextInt();\n return a;\n }\n static class pair{\n int first, second;\n pair(int first, int second){\n this.first = first;\n this.second = second;\n }\n }\n public static void main (String[] args) throws java.lang.Exception\n {\n // your code goes here\n FastReader in = new FastReader();\n String s = in.nextLine(), t = in.nextLine();\n int ans = Integer.MAX_VALUE;\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.util.stream.*;",
"stream.*",
"java.util",
"public class Main\n{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\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 int nextInt(){\n return Integer.parseInt(next());\n }\n long nextLong(){\n return Long.parseLong(next());\n }\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str = \"\";\n try{\n str = br.readLine();\n } catch (Exception e){\n e.printStackTrace();\n }\n return str;\n }\n }\n static int modPower(int x, int y, int mod){\n int res = 1;\n x %= mod;\n if(x==0) return 0;\n while(y>0){\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }\n return res;\n }\n public static int[] readArray(int n){\n FastReader in = new FastReader();\n int[] a = new int[n];\n for(int i = 0; i < n; i++) a[i] = in.nextInt();\n return a;\n }\n static class pair{\n int first, second;\n pair(int first, int second){\n this.first = first;\n this.second = second;\n }\n }\n public static void main (String[] args) throws java.lang.Exception\n {\n // your code goes here\n FastReader in = new FastReader();\n String s = in.nextLine(), t = in.nextLine();\n int ans = Integer.MAX_VALUE;\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }\n System.out.println(ans);\n }\n}",
"Main",
"static int modPower(int x, int y, int mod){\n int res = 1;\n x %= mod;\n if(x==0) return 0;\n while(y>0){\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }\n return res;\n }",
"modPower",
"{\n int res = 1;\n x %= mod;\n if(x==0) return 0;\n while(y>0){\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }\n return res;\n }",
"int res = 1;",
"res",
"1",
"x %= mod",
"x",
"mod",
"if(x==0) return 0;",
"x==0",
"x",
"0",
"return 0;",
"0",
"while(y>0){\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }",
"y>0",
"y",
"0",
"{\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }",
"if(y%2==1){\n res = (res*x)%mod;\n }",
"y%2==1",
"y%2",
"y",
"2",
"1",
"{\n res = (res*x)%mod;\n }",
"res = (res*x)%mod",
"res",
"(res*x)%mod",
"(res*x)",
"res",
"x",
"mod",
"y = y>>1",
"y",
"y>>1",
"y",
"1",
"x = (x*x)%mod",
"x",
"(x*x)%mod",
"(x*x)",
"x",
"x",
"mod",
"return res;",
"res",
"int x",
"x",
"int y",
"y",
"int mod",
"mod",
"public static int[] readArray(int n){\n FastReader in = new FastReader();\n int[] a = new int[n];\n for(int i = 0; i < n; i++) a[i] = in.nextInt();\n return a;\n }",
"readArray",
"{\n FastReader in = new FastReader();\n int[] a = new int[n];\n for(int i = 0; i < n; i++) a[i] = in.nextInt();\n return a;\n }",
"FastReader in = new FastReader();",
"in",
"new FastReader()",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i = 0; i < n; i++) a[i] = in.nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = in.nextInt();",
"a[i] = in.nextInt()",
"a[i]",
"a",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"return a;",
"a",
"int n",
"n",
"public static void main (String[] args) throws java.lang.Exception\n {\n // your code goes here\n FastReader in = new FastReader();\n String s = in.nextLine(), t = in.nextLine();\n int ans = Integer.MAX_VALUE;\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }\n System.out.println(ans);\n }",
"main",
"{\n // your code goes here\n FastReader in = new FastReader();\n String s = in.nextLine(), t = in.nextLine();\n int ans = Integer.MAX_VALUE;\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }\n System.out.println(ans);\n }",
"FastReader in = new FastReader();",
"in",
"new FastReader()",
"String s = in.nextLine()",
"s",
"in.nextLine()",
"in.nextLine",
"in",
"t = in.nextLine();",
"t",
"in.nextLine()",
"in.nextLine",
"in",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i = 0; i <= s.length() - t.length(); i++) {\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }",
"{\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }",
"int c = 0;",
"c",
"0",
"for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }",
"{\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }",
"if(s.charAt(j+i) != t.charAt(j)) c++;",
"s.charAt(j+i) != t.charAt(j)",
"s.charAt(j+i)",
"s.charAt",
"s",
"j+i",
"j",
"i",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"c++",
"c",
"ans = Math.min(c, ans)",
"ans",
"Math.min(c, ans)",
"Math.min",
"Math",
"c",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\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 int nextInt(){\n return Integer.parseInt(next());\n }\n long nextLong(){\n return Long.parseLong(next());\n }\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str = \"\";\n try{\n str = br.readLine();\n } catch (Exception e){\n e.printStackTrace();\n }\n return str;\n }\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new 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 (Exception e){\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try{\n str = br.readLine();\n } catch (Exception e){\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try{\n str = br.readLine();\n } catch (Exception e){\n e.printStackTrace();\n }",
"catch (Exception e){\n e.printStackTrace();\n }",
"Exception 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",
"static class pair{\n int first, second;\n pair(int first, int second){\n this.first = first;\n this.second = second;\n }\n }",
"pair",
"int first",
"first",
"second;",
"second",
"pair(int first, int second){\n this.first = first;\n this.second = second;\n }",
"pair",
"{\n this.first = first;\n this.second = second;\n }",
"this.first = first",
"this.first",
"this",
"this.first",
"first",
"this.second = second",
"this.second",
"this",
"this.second",
"second",
"int first",
"first",
"int second",
"second",
"public class Main\n{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\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 int nextInt(){\n return Integer.parseInt(next());\n }\n long nextLong(){\n return Long.parseLong(next());\n }\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str = \"\";\n try{\n str = br.readLine();\n } catch (Exception e){\n e.printStackTrace();\n }\n return str;\n }\n }\n static int modPower(int x, int y, int mod){\n int res = 1;\n x %= mod;\n if(x==0) return 0;\n while(y>0){\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }\n return res;\n }\n public static int[] readArray(int n){\n FastReader in = new FastReader();\n int[] a = new int[n];\n for(int i = 0; i < n; i++) a[i] = in.nextInt();\n return a;\n }\n static class pair{\n int first, second;\n pair(int first, int second){\n this.first = first;\n this.second = second;\n }\n }\n public static void main (String[] args) throws java.lang.Exception\n {\n // your code goes here\n FastReader in = new FastReader();\n String s = in.nextLine(), t = in.nextLine();\n int ans = Integer.MAX_VALUE;\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }\n System.out.println(ans);\n }\n}",
"public class Main\n{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){\n br = new BufferedReader(new InputStreamReader(System.in));\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 int nextInt(){\n return Integer.parseInt(next());\n }\n long nextLong(){\n return Long.parseLong(next());\n }\n double nextDouble(){\n return Double.parseDouble(next());\n }\n String nextLine(){\n String str = \"\";\n try{\n str = br.readLine();\n } catch (Exception e){\n e.printStackTrace();\n }\n return str;\n }\n }\n static int modPower(int x, int y, int mod){\n int res = 1;\n x %= mod;\n if(x==0) return 0;\n while(y>0){\n if(y%2==1){\n res = (res*x)%mod;\n }\n y = y>>1;\n x = (x*x)%mod;\n }\n return res;\n }\n public static int[] readArray(int n){\n FastReader in = new FastReader();\n int[] a = new int[n];\n for(int i = 0; i < n; i++) a[i] = in.nextInt();\n return a;\n }\n static class pair{\n int first, second;\n pair(int first, int second){\n this.first = first;\n this.second = second;\n }\n }\n public static void main (String[] args) throws java.lang.Exception\n {\n // your code goes here\n FastReader in = new FastReader();\n String s = in.nextLine(), t = in.nextLine();\n int ans = Integer.MAX_VALUE;\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int c = 0;\n for(int j = 0; j < t.length(); j++) {\n if(s.charAt(j+i) != t.charAt(j)) c++;\n }\n ans = Math.min(c, ans);\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| // dont fuck with my love
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.stream.*;
public class Main
{
static class FastReader{
BufferedReader br;
StringTokenizer st;
public 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 (Exception e){
e.printStackTrace();
}
return str;
}
}
static int modPower(int x, int y, int mod){
int res = 1;
x %= mod;
if(x==0) return 0;
while(y>0){
if(y%2==1){
res = (res*x)%mod;
}
y = y>>1;
x = (x*x)%mod;
}
return res;
}
public static int[] readArray(int n){
FastReader in = new FastReader();
int[] a = new int[n];
for(int i = 0; i < n; i++) a[i] = in.nextInt();
return a;
}
static class pair{
int first, second;
pair(int first, int second){
this.first = first;
this.second = second;
}
}
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
FastReader in = new FastReader();
String s = in.nextLine(), t = in.nextLine();
int ans = Integer.MAX_VALUE;
for(int i = 0; i <= s.length() - t.length(); i++) {
int c = 0;
for(int j = 0; j < t.length(); j++) {
if(s.charAt(j+i) != t.charAt(j)) c++;
}
ans = Math.min(c, ans);
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
29,
13,
23,
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
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
27,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
6,
34
],
[
34,
35
],
[
4,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
44,
58
],
[
58,
59
],
[
59,
60
],
[
44,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
81,
93
],
[
93,
94
],
[
94,
95
],
[
62,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
98,
102
],
[
38,
103
],
[
103,
104
],
[
36,
105
],
[
105,
106
],
[
36,
107
],
[
107,
108
]
]
| [
"import java.util.Scanner;\n\nclass Main {\n\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String S = s.next();\n String T = s.next();\n System.out.println(changesRequired(S, T));\n s.close();\n }\n\n private static Integer changesRequired(String S, String T) {\n int answer = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int changesRequired = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }\n answer = Math.min(answer, changesRequired);\n }\n return answer;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String S = s.next();\n String T = s.next();\n System.out.println(changesRequired(S, T));\n s.close();\n }\n\n private static Integer changesRequired(String S, String T) {\n int answer = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int changesRequired = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }\n answer = Math.min(answer, changesRequired);\n }\n return answer;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n String S = s.next();\n String T = s.next();\n System.out.println(changesRequired(S, T));\n s.close();\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n String S = s.next();\n String T = s.next();\n System.out.println(changesRequired(S, T));\n s.close();\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"String S = s.next();",
"S",
"s.next()",
"s.next",
"s",
"String T = s.next();",
"T",
"s.next()",
"s.next",
"s",
"System.out.println(changesRequired(S, T))",
"System.out.println",
"System.out",
"System",
"System.out",
"changesRequired(S, T)",
"changesRequired",
"S",
"T",
"s.close()",
"s.close",
"s",
"String[] args",
"args",
"private static Integer changesRequired(String S, String T) {\n int answer = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int changesRequired = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }\n answer = Math.min(answer, changesRequired);\n }\n return answer;\n }",
"changesRequired",
"{\n int answer = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int changesRequired = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }\n answer = Math.min(answer, changesRequired);\n }\n return answer;\n }",
"int answer = T.length();",
"answer",
"T.length()",
"T.length",
"T",
"for (int i = 0; i <= S.length() - T.length(); i++) {\n int changesRequired = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }\n answer = Math.min(answer, changesRequired);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= S.length() - T.length()",
"i",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n int changesRequired = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }\n answer = Math.min(answer, changesRequired);\n }",
"{\n int changesRequired = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }\n answer = Math.min(answer, changesRequired);\n }",
"int changesRequired = 0;",
"changesRequired",
"0",
"for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }",
"{\n if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }\n }",
"if (S.charAt(i + j) != T.charAt(j)) {\n changesRequired++;\n }",
"S.charAt(i + j) != T.charAt(j)",
"S.charAt(i + j)",
"S.charAt",
"S",
"i + j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"{\n changesRequired++;\n }",
"changesRequired++",
"changesRequired",
"answer = Math.min(answer, changesRequired)",
"answer",
"Math.min(answer, changesRequired)",
"Math.min",
"Math",
"answer",
"changesRequired",
"return answer;",
"answer",
"String S",
"S",
"String T",
"T"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
String S = s.next();
String T = s.next();
System.out.println(changesRequired(S, T));
s.close();
}
private static Integer changesRequired(String S, String T) {
int answer = T.length();
for (int i = 0; i <= S.length() - T.length(); i++) {
int changesRequired = 0;
for (int j = 0; j < T.length(); j++) {
if (S.charAt(i + j) != T.charAt(j)) {
changesRequired++;
}
}
answer = Math.min(answer, changesRequired);
}
return answer;
}
}
|
[
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,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
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,
40,
4,
18,
4,
18,
13,
2,
13,
13,
2,
2,
13,
13,
17,
4,
18,
13,
13,
2,
13,
17,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
111,
5
],
[
111,
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
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
37,
45
],
[
30,
46
],
[
46,
47
],
[
47,
48
],
[
30,
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
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
70,
76
],
[
77,
77
],
[
77,
78
],
[
77,
79
],
[
77,
80
],
[
68,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
66,
88
],
[
88,
89
],
[
89,
90
],
[
50,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
50,
99
],
[
99,
100
],
[
99,
101
],
[
8,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
6,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
]
| [
"import java.util.*;\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.nextLine();\n\t\tString t = sc.nextLine();\n\t\tint a = 0;\n\t\t// スペース区切りの整数の入力\n\t\tint b = t.length();\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++){\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t} \n\t\tSystem.out.println(b);\n\t\t\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.nextLine();\n\t\tString t = sc.nextLine();\n\t\tint a = 0;\n\t\t// スペース区切りの整数の入力\n\t\tint b = t.length();\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++){\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t} \n\t\tSystem.out.println(b);\n\t\t\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.nextLine();\n\t\tString t = sc.nextLine();\n\t\tint a = 0;\n\t\t// スペース区切りの整数の入力\n\t\tint b = t.length();\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++){\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t} \n\t\tSystem.out.println(b);\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tString s = sc.nextLine();\n\t\tString t = sc.nextLine();\n\t\tint a = 0;\n\t\t// スペース区切りの整数の入力\n\t\tint b = t.length();\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++){\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t} \n\t\tSystem.out.println(b);\n\t\t\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String t = sc.nextLine();",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int a = 0;",
"a",
"0",
"int b = t.length();",
"b",
"t.length()",
"t.length",
"t",
"for(int i = 0; i < s.length() - t.length() + 1; i++){\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length() - t.length() + 1",
"i",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}",
"{\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}",
"for(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}",
"if(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}",
"!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))",
"s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))",
"s.substring(i + j, i + j + 1).equals",
"s.substring(i + j, i + j + 1)",
"s.substring",
"s",
"i + j",
"i",
"j",
"i + j + 1",
"i + j + 1",
"i",
"j",
"1",
"t.substring(j, j + 1)",
"t.substring",
"t",
"j",
"j + 1",
"j",
"1",
"{\n\t\t\t\t\ta ++;\n\t\t\t\t}",
"a ++",
"a",
"if(b > a){\n\t\t\t\tb = a;\n\t\t\t}",
"b > a",
"b",
"a",
"{\n\t\t\t\tb = a;\n\t\t\t}",
"b = a",
"b",
"a",
"a = 0",
"a",
"0",
"System.out.println(b)",
"System.out.println",
"System.out",
"System",
"System.out",
"b",
"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.nextLine();\n\t\tString t = sc.nextLine();\n\t\tint a = 0;\n\t\t// スペース区切りの整数の入力\n\t\tint b = t.length();\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++){\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t} \n\t\tSystem.out.println(b);\n\t\t\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.nextLine();\n\t\tString t = sc.nextLine();\n\t\tint a = 0;\n\t\t// スペース区切りの整数の入力\n\t\tint b = t.length();\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++){\n\t\t\tfor(int j = 0;j < t.length();j++){\n\t\t\t\tif(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){\n\t\t\t\t\ta ++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(b > a){\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t} \n\t\tSystem.out.println(b);\n\t\t\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.nextLine();
String t = sc.nextLine();
int a = 0;
// スペース区切りの整数の入力
int b = t.length();
for(int i = 0; i < s.length() - t.length() + 1; i++){
for(int j = 0;j < t.length();j++){
if(!s.substring(i + j, i + j + 1).equals(t.substring(j, j + 1))){
a ++;
}
}
if(b > a){
b = a;
}
a = 0;
}
System.out.println(b);
}
} |
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
4,
18,
13,
13,
0,
13,
17,
4,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
4,
18,
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
],
[
121,
11
],
[
121,
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
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
14,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
41,
55
],
[
55,
56
],
[
56,
57
],
[
41,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
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
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
78,
88
],
[
88,
89
],
[
89,
90
],
[
59,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
59,
95
],
[
95,
96
],
[
95,
97
],
[
14,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
14,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
110,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
12,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
]
| [
"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Scanner;\npublic class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n char[]ss = S.toCharArray();\n char[]t = T.toCharArray();\n ArrayList<Integer>ans = new ArrayList<>();\n\n for(int i=0; i<=S.length() - T.length(); i++) {\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }\n Collections.sort(ans,Collections.reverseOrder());\n \tSystem.out.println(T.length() - ans.get(0));\n \t\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n char[]ss = S.toCharArray();\n char[]t = T.toCharArray();\n ArrayList<Integer>ans = new ArrayList<>();\n\n for(int i=0; i<=S.length() - T.length(); i++) {\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }\n Collections.sort(ans,Collections.reverseOrder());\n \tSystem.out.println(T.length() - ans.get(0));\n \t\n }\n}",
"Main",
"public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n char[]ss = S.toCharArray();\n char[]t = T.toCharArray();\n ArrayList<Integer>ans = new ArrayList<>();\n\n for(int i=0; i<=S.length() - T.length(); i++) {\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }\n Collections.sort(ans,Collections.reverseOrder());\n \tSystem.out.println(T.length() - ans.get(0));\n \t\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n char[]ss = S.toCharArray();\n char[]t = T.toCharArray();\n ArrayList<Integer>ans = new ArrayList<>();\n\n for(int i=0; i<=S.length() - T.length(); i++) {\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }\n Collections.sort(ans,Collections.reverseOrder());\n \tSystem.out.println(T.length() - ans.get(0));\n \t\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"char[]ss = S.toCharArray();",
"ss",
"S.toCharArray()",
"S.toCharArray",
"S",
"char[]t = T.toCharArray();",
"t",
"T.toCharArray()",
"T.toCharArray",
"T",
"ArrayList<Integer>ans = new ArrayList<>();",
"ans",
"new ArrayList<>()",
"for(int i=0; i<=S.length() - T.length(); i++) {\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=S.length() - T.length()",
"i",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }",
"{\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }",
"int cou = 0;",
"cou",
"0",
"for(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j< T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}",
"{\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}",
"if(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}",
"ss[i+j] == t[j]",
"ss[i+j]",
"ss",
"i+j",
"i",
"j",
"t[j]",
"t",
"j",
"{\n \t\tcou++;\n \t\t}",
"cou++",
"cou",
"ans.add(cou)",
"ans.add",
"ans",
"cou",
"cou = 0",
"cou",
"0",
"Collections.sort(ans,Collections.reverseOrder())",
"Collections.sort",
"Collections",
"ans",
"Collections.reverseOrder()",
"Collections.reverseOrder",
"Collections",
"System.out.println(T.length() - ans.get(0))",
"System.out.println",
"System.out",
"System",
"System.out",
"T.length() - ans.get(0)",
"T.length()",
"T.length",
"T",
"ans.get(0)",
"ans.get",
"ans",
"0",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n char[]ss = S.toCharArray();\n char[]t = T.toCharArray();\n ArrayList<Integer>ans = new ArrayList<>();\n\n for(int i=0; i<=S.length() - T.length(); i++) {\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }\n Collections.sort(ans,Collections.reverseOrder());\n \tSystem.out.println(T.length() - ans.get(0));\n \t\n }\n}",
"public class Main {\n public static void main(String[] args){\n \n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n char[]ss = S.toCharArray();\n char[]t = T.toCharArray();\n ArrayList<Integer>ans = new ArrayList<>();\n\n for(int i=0; i<=S.length() - T.length(); i++) {\n \tint cou = 0;\n \tfor(int j=0; j< T.length(); j++) {\n \t\tif(ss[i+j] == t[j]) {\n \t\tcou++;\n \t\t}\n \t}\n \tans.add(cou);\n \tcou = 0;\n }\n Collections.sort(ans,Collections.reverseOrder());\n \tSystem.out.println(T.length() - ans.get(0));\n \t\n }\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String S = sc.next();
String T = sc.next();
char[]ss = S.toCharArray();
char[]t = T.toCharArray();
ArrayList<Integer>ans = new ArrayList<>();
for(int i=0; i<=S.length() - T.length(); i++) {
int cou = 0;
for(int j=0; j< T.length(); j++) {
if(ss[i+j] == t[j]) {
cou++;
}
}
ans.add(cou);
cou = 0;
}
Collections.sort(ans,Collections.reverseOrder());
System.out.println(T.length() - ans.get(0));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
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,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
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
],
[
108,
11
],
[
108,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
14,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
14,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
14,
42
],
[
42,
43
],
[
42,
44
],
[
14,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
45,
57
],
[
57,
58
],
[
58,
59
],
[
45,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
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
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
78,
88
],
[
88,
89
],
[
61,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
92,
96
],
[
14,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
12,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
]
| [
"import java.util.ArrayList;\nimport java.util.List;\nimport 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\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] t = sc.nextLine().toCharArray();\n\t\tint sl = s.length;\n\t\tint tl = t.length;\n\n\t\tint max = 0;\n\n\t\tfor(int i = 0; i < sl - tl + 1; i ++) {\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}\n\n\n\t\tSystem.out.println(tl - max);\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"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\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] t = sc.nextLine().toCharArray();\n\t\tint sl = s.length;\n\t\tint tl = t.length;\n\n\t\tint max = 0;\n\n\t\tfor(int i = 0; i < sl - tl + 1; i ++) {\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}\n\n\n\t\tSystem.out.println(tl - max);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] t = sc.nextLine().toCharArray();\n\t\tint sl = s.length;\n\t\tint tl = t.length;\n\n\t\tint max = 0;\n\n\t\tfor(int i = 0; i < sl - tl + 1; i ++) {\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}\n\n\n\t\tSystem.out.println(tl - max);\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] t = sc.nextLine().toCharArray();\n\t\tint sl = s.length;\n\t\tint tl = t.length;\n\n\t\tint max = 0;\n\n\t\tfor(int i = 0; i < sl - tl + 1; i ++) {\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}\n\n\n\t\tSystem.out.println(tl - max);\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[] t = sc.nextLine().toCharArray();",
"t",
"sc.nextLine().toCharArray()",
"sc.nextLine().toCharArray",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int sl = s.length;",
"sl",
"s.length",
"s",
"s.length",
"int tl = t.length;",
"tl",
"t.length",
"t",
"t.length",
"int max = 0;",
"max",
"0",
"for(int i = 0; i < sl - tl + 1; i ++) {\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sl - tl + 1",
"i",
"sl - tl + 1",
"sl - tl",
"sl",
"tl",
"1",
"i ++",
"i ++",
"i",
"{\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}",
"{\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}",
"int cnt = 0;",
"cnt",
"0",
"for(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < tl",
"j",
"tl",
"j++",
"j++",
"j",
"{\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}",
"{\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}",
"if(s[i + j] == t[j])cnt++;",
"s[i + j] == t[j]",
"s[i + j]",
"s",
"i + j",
"i",
"j",
"t[j]",
"t",
"j",
"cnt++",
"cnt",
"max = Math.max(max, cnt)",
"max",
"Math.max(max, cnt)",
"Math.max",
"Math",
"max",
"cnt",
"System.out.println(tl - max)",
"System.out.println",
"System.out",
"System",
"System.out",
"tl - max",
"tl",
"max",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] t = sc.nextLine().toCharArray();\n\t\tint sl = s.length;\n\t\tint tl = t.length;\n\n\t\tint max = 0;\n\n\t\tfor(int i = 0; i < sl - tl + 1; i ++) {\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}\n\n\n\t\tSystem.out.println(tl - max);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.nextLine().toCharArray();\n\t\tchar[] t = sc.nextLine().toCharArray();\n\t\tint sl = s.length;\n\t\tint tl = t.length;\n\n\t\tint max = 0;\n\n\t\tfor(int i = 0; i < sl - tl + 1; i ++) {\n\n\t\t\tint cnt = 0;\n\n\t\t\tfor(int j = 0; j < tl; j++) {\n\n\t\t\t\tif(s[i + j] == t[j])cnt++;\n\t\t\t}\n\n\t\t\tmax = Math.max(max, cnt);\n\t\t}\n\n\n\t\tSystem.out.println(tl - max);\n\t}\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.List;
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[] t = sc.nextLine().toCharArray();
int sl = s.length;
int tl = t.length;
int max = 0;
for(int i = 0; i < sl - tl + 1; i ++) {
int cnt = 0;
for(int j = 0; j < tl; j++) {
if(s[i + j] == t[j])cnt++;
}
max = Math.max(max, cnt);
}
System.out.println(tl - max);
}
}
|
[
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,
41,
13,
20,
4,
18,
13,
41,
13,
20,
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,
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,
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,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
0,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
162,
5
],
[
162,
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
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
31,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
8,
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
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
41,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
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
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
8,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
87,
101
],
[
101,
102
],
[
102,
103
],
[
87,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
109,
119
],
[
119,
120
],
[
120,
121
],
[
109,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
125,
131
],
[
131,
132
],
[
131,
133
],
[
124,
134
],
[
134,
135
],
[
135,
136
],
[
105,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
139,
143
],
[
105,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
8,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
154,
158
],
[
6,
159
],
[
159,
160
],
[
0,
161
],
[
161,
162
],
[
161,
163
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\tchar[] cs = new char[s.length()];\n\t\tchar[] ct = new char[t.length()];\n\t\tboolean[] count = new boolean[1001];\n\t\tint max = 0;\n\t\t\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tcs[i] = s.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tct[i] = t.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=s.length()-t.length();i++) {\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}\n\t\t\n\t\tSystem.out.println(t.length()-max);\n\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 scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\tchar[] cs = new char[s.length()];\n\t\tchar[] ct = new char[t.length()];\n\t\tboolean[] count = new boolean[1001];\n\t\tint max = 0;\n\t\t\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tcs[i] = s.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tct[i] = t.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=s.length()-t.length();i++) {\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}\n\t\t\n\t\tSystem.out.println(t.length()-max);\n\n\t}\n\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 t = scan.next();\n\t\tchar[] cs = new char[s.length()];\n\t\tchar[] ct = new char[t.length()];\n\t\tboolean[] count = new boolean[1001];\n\t\tint max = 0;\n\t\t\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tcs[i] = s.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tct[i] = t.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=s.length()-t.length();i++) {\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}\n\t\t\n\t\tSystem.out.println(t.length()-max);\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s = scan.next();\n\t\tString t = scan.next();\n\t\tchar[] cs = new char[s.length()];\n\t\tchar[] ct = new char[t.length()];\n\t\tboolean[] count = new boolean[1001];\n\t\tint max = 0;\n\t\t\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tcs[i] = s.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tct[i] = t.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=s.length()-t.length();i++) {\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}\n\t\t\n\t\tSystem.out.println(t.length()-max);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.next();",
"s",
"scan.next()",
"scan.next",
"scan",
"String t = scan.next();",
"t",
"scan.next()",
"scan.next",
"scan",
"char[] cs = new char[s.length()];",
"cs",
"new char[s.length()]",
"s.length()",
"s.length",
"s",
"char[] ct = new char[t.length()];",
"ct",
"new char[t.length()]",
"t.length()",
"t.length",
"t",
"boolean[] count = new boolean[1001];",
"count",
"new boolean[1001]",
"1001",
"int max = 0;",
"max",
"0",
"for(int i=0;i<s.length();i++) {\n\t\t\tcs[i] = s.charAt(i);\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\tcs[i] = s.charAt(i);\n\t\t}",
"{\n\t\t\tcs[i] = s.charAt(i);\n\t\t}",
"cs[i] = s.charAt(i)",
"cs[i]",
"cs",
"i",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"for(int i=0;i<t.length();i++) {\n\t\t\tct[i] = t.charAt(i);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<t.length()",
"i",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tct[i] = t.charAt(i);\n\t\t}",
"{\n\t\t\tct[i] = t.charAt(i);\n\t\t}",
"ct[i] = t.charAt(i)",
"ct[i]",
"ct",
"i",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"for(int i=0;i<=s.length()-t.length();i++) {\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=s.length()-t.length()",
"i",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}",
"{\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}",
"int n = 0;",
"n",
"0",
"for(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}",
"if(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}",
"cs[i+j] == ct[j]",
"cs[i+j]",
"cs",
"i+j",
"i",
"j",
"ct[j]",
"ct",
"j",
"{\n\t\t\t\t\tn++;\n\t\t\t\t}",
"n++",
"n",
"max = Math.max(max, n)",
"max",
"Math.max(max, n)",
"Math.max",
"Math",
"max",
"n",
"count[n] = true",
"count[n]",
"count",
"n",
"true",
"System.out.println(t.length()-max)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length()-max",
"t.length()",
"t.length",
"t",
"max",
"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.next();\n\t\tString t = scan.next();\n\t\tchar[] cs = new char[s.length()];\n\t\tchar[] ct = new char[t.length()];\n\t\tboolean[] count = new boolean[1001];\n\t\tint max = 0;\n\t\t\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tcs[i] = s.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tct[i] = t.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=s.length()-t.length();i++) {\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}\n\t\t\n\t\tSystem.out.println(t.length()-max);\n\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.next();\n\t\tString t = scan.next();\n\t\tchar[] cs = new char[s.length()];\n\t\tchar[] ct = new char[t.length()];\n\t\tboolean[] count = new boolean[1001];\n\t\tint max = 0;\n\t\t\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tcs[i] = s.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<t.length();i++) {\n\t\t\tct[i] = t.charAt(i);\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=s.length()-t.length();i++) {\n\t\t\tint n = 0;\n\t\t\tfor(int j=0;j<t.length();j++) {\n\t\t\t\tif(cs[i+j] == ct[j]) {\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmax = Math.max(max, n);\n\t\t\tcount[n] = true;\n\t\t}\n\t\t\n\t\tSystem.out.println(t.length()-max);\n\n\t}\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 t = scan.next();
char[] cs = new char[s.length()];
char[] ct = new char[t.length()];
boolean[] count = new boolean[1001];
int max = 0;
for(int i=0;i<s.length();i++) {
cs[i] = s.charAt(i);
}
for(int i=0;i<t.length();i++) {
ct[i] = t.charAt(i);
}
for(int i=0;i<=s.length()-t.length();i++) {
int n = 0;
for(int j=0;j<t.length();j++) {
if(cs[i+j] == ct[j]) {
n++;
}
}
max = Math.max(max, n);
count[n] = true;
}
System.out.println(t.length()-max);
}
} |
[
7,
6,
12,
13,
30,
29,
4,
18,
20,
18,
13,
13,
23,
13,
23,
13,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
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,
2,
4,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
13,
41,
13,
2,
13,
4,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
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,
13,
30,
40,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
18,
13,
2,
2,
18,
13,
13,
13,
17,
13,
30,
0,
13,
2,
18,
13,
13,
2,
13,
18,
13,
2,
2,
18,
13,
13,
13,
17,
14,
2,
13,
13,
29,
17,
29,
17,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
13,
42,
2,
13,
13,
30,
41,
13,
2,
2,
13,
13,
17,
14,
2,
13,
4,
18,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
17,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
20,
23,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
42,
2,
13,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
40,
13,
18,
13,
13,
0,
18,
13,
40,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
18,
13,
13,
17,
29,
17,
41,
13,
2,
18,
13,
13,
17,
42,
2,
13,
17,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
3,
40,
13,
14,
2,
13,
17,
29,
17,
41,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
2,
18,
13,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
13,
13,
3,
0,
13,
4,
13,
13,
13,
13,
0,
13,
4,
13,
13,
2,
13,
17,
2,
18,
13,
13,
17,
29,
17,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
17,
29,
2,
4,
13,
13,
2,
4,
13,
13,
4,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
2,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
0,
13,
2,
13,
13,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
13,
13,
2,
13,
17,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
0,
13,
2,
13,
17,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
2,
13,
17,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
29,
13,
23,
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,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
2,
3
],
[
2,
4
],
[
4,
5
],
[
5,
6
],
[
6,
7
],
[
7,
8
],
[
6,
9
],
[
9,
10
],
[
9,
11
],
[
2,
12
],
[
12,
13
],
[
2,
14
],
[
14,
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
],
[
817,
29
],
[
817,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
817,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
817,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
42,
49
],
[
49,
50
],
[
49,
51
],
[
42,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
42,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
42,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
42,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
42,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
79,
83
],
[
72,
84
],
[
84,
85
],
[
85,
86
],
[
72,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
91,
95
],
[
95,
96
],
[
95,
97
],
[
88,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
102,
105
],
[
88,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
108,
112
],
[
42,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
42,
117
],
[
117,
118
],
[
118,
119
],
[
42,
120
],
[
120,
121
],
[
121,
122
],
[
40,
123
],
[
123,
124
],
[
817,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
131,
141
],
[
141,
142
],
[
142,
143
],
[
131,
144
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
147,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
146,
156
],
[
156,
157
],
[
157,
158
],
[
127,
159
],
[
159,
160
],
[
125,
161
],
[
161,
162
],
[
125,
163
],
[
163,
164
],
[
817,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
171,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
178,
180
],
[
171,
181
],
[
181,
182
],
[
182,
183
],
[
171,
184
],
[
185,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
192,
193
],
[
192,
194
],
[
195,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
195,
200
],
[
187,
201
],
[
186,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
205,
209
],
[
209,
210
],
[
209,
211
],
[
211,
212
],
[
211,
213
],
[
214,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
214,
218
],
[
214,
219
],
[
167,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
224,
225
],
[
167,
226
],
[
226,
227
],
[
165,
228
],
[
228,
229
],
[
165,
230
],
[
230,
231
],
[
165,
232
],
[
232,
233
],
[
165,
234
],
[
234,
235
],
[
817,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
238,
242
],
[
242,
243
],
[
242,
244
],
[
238,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
245,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
249,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
260,
261
],
[
261,
262
],
[
260,
263
],
[
257,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
257,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
271,
273
],
[
238,
274
],
[
274,
275
],
[
236,
276
],
[
276,
277
],
[
236,
278
],
[
278,
279
],
[
236,
280
],
[
280,
281
],
[
817,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
286,
288
],
[
285,
289
],
[
289,
290
],
[
284,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
294,
295
],
[
294,
296
],
[
292,
297
],
[
282,
298
],
[
298,
299
],
[
282,
300
],
[
300,
301
],
[
817,
302
],
[
302,
303
],
[
302,
304
],
[
304,
305
],
[
305,
306
],
[
306,
307
],
[
307,
308
],
[
307,
309
],
[
306,
310
],
[
310,
311
],
[
310,
312
],
[
310,
313
],
[
302,
314
],
[
314,
315
],
[
302,
316
],
[
316,
317
],
[
817,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
321,
322
],
[
322,
323
],
[
321,
324
],
[
321,
325
],
[
318,
326
],
[
326,
327
],
[
318,
328
],
[
328,
329
],
[
817,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
335,
337
],
[
332,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
338,
342
],
[
342,
343
],
[
342,
344
],
[
332,
345
],
[
345,
346
],
[
346,
347
],
[
346,
348
],
[
345,
349
],
[
332,
350
],
[
350,
351
],
[
330,
352
],
[
352,
353
],
[
330,
354
],
[
354,
355
],
[
330,
356
],
[
356,
357
],
[
817,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
361,
365
],
[
365,
366
],
[
366,
367
],
[
366,
368
],
[
368,
369
],
[
368,
370
],
[
365,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
374,
375
],
[
371,
376
],
[
376,
377
],
[
376,
378
],
[
365,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
382,
383
],
[
379,
384
],
[
360,
385
],
[
385,
386
],
[
358,
387
],
[
387,
388
],
[
358,
389
],
[
389,
390
],
[
358,
391
],
[
391,
392
],
[
817,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
397,
401
],
[
396,
402
],
[
402,
403
],
[
395,
404
],
[
404,
405
],
[
404,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
406,
410
],
[
395,
411
],
[
411,
412
],
[
412,
413
],
[
412,
414
],
[
411,
415
],
[
415,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
418,
420
],
[
417,
421
],
[
421,
422
],
[
421,
423
],
[
423,
424
],
[
423,
425
],
[
416,
426
],
[
426,
427
],
[
415,
428
],
[
428,
429
],
[
395,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
430,
434
],
[
434,
435
],
[
395,
436
],
[
436,
437
],
[
436,
438
],
[
438,
439
],
[
439,
440
],
[
439,
441
],
[
438,
442
],
[
395,
443
],
[
443,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
447,
448
],
[
448,
449
],
[
448,
450
],
[
447,
451
],
[
443,
452
],
[
452,
453
],
[
452,
454
],
[
443,
455
],
[
455,
456
],
[
456,
457
],
[
443,
458
],
[
459,
459
],
[
459,
460
],
[
460,
461
],
[
461,
462
],
[
462,
463
],
[
462,
464
],
[
461,
465
],
[
465,
466
],
[
465,
467
],
[
460,
468
],
[
468,
469
],
[
469,
470
],
[
469,
471
],
[
468,
472
],
[
395,
473
],
[
473,
474
],
[
473,
475
],
[
475,
476
],
[
475,
477
],
[
475,
478
],
[
475,
479
],
[
395,
480
],
[
480,
481
],
[
480,
482
],
[
482,
483
],
[
482,
484
],
[
482,
485
],
[
485,
486
],
[
485,
487
],
[
482,
488
],
[
488,
489
],
[
489,
490
],
[
489,
491
],
[
488,
492
],
[
395,
493
],
[
493,
494
],
[
393,
495
],
[
495,
496
],
[
817,
497
],
[
497,
498
],
[
497,
499
],
[
499,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
500,
504
],
[
504,
505
],
[
499,
506
],
[
506,
507
],
[
507,
508
],
[
508,
509
],
[
508,
510
],
[
507,
511
],
[
511,
512
],
[
512,
513
],
[
512,
514
],
[
511,
515
],
[
515,
516
],
[
515,
517
],
[
517,
518
],
[
517,
519
],
[
497,
520
],
[
520,
521
],
[
497,
522
],
[
522,
523
],
[
817,
524
],
[
524,
525
],
[
524,
526
],
[
526,
527
],
[
527,
528
],
[
527,
529
],
[
526,
530
],
[
530,
531
],
[
531,
532
],
[
532,
533
],
[
532,
534
],
[
530,
535
],
[
535,
536
],
[
535,
537
],
[
530,
538
],
[
538,
539
],
[
539,
540
],
[
530,
541
],
[
541,
542
],
[
542,
543
],
[
542,
544
],
[
544,
545
],
[
544,
546
],
[
526,
547
],
[
547,
548
],
[
524,
549
],
[
549,
550
],
[
817,
551
],
[
551,
552
],
[
551,
553
],
[
553,
554
],
[
554,
555
],
[
554,
556
],
[
553,
557
],
[
557,
558
],
[
557,
559
],
[
559,
560
],
[
559,
561
],
[
553,
562
],
[
562,
563
],
[
563,
564
],
[
563,
565
],
[
562,
566
],
[
566,
567
],
[
567,
568
],
[
568,
569
],
[
569,
570
],
[
569,
571
],
[
568,
572
],
[
567,
573
],
[
573,
574
],
[
573,
575
],
[
575,
576
],
[
576,
577
],
[
576,
578
],
[
575,
579
],
[
566,
580
],
[
580,
581
],
[
580,
582
],
[
582,
583
],
[
583,
584
],
[
583,
585
],
[
582,
586
],
[
553,
587
],
[
587,
588
],
[
551,
589
],
[
589,
590
],
[
551,
591
],
[
591,
592
],
[
551,
593
],
[
593,
594
],
[
817,
595
],
[
595,
596
],
[
595,
597
],
[
597,
598
],
[
598,
599
],
[
599,
600
],
[
599,
601
],
[
599,
602
],
[
602,
603
],
[
602,
604
],
[
599,
605
],
[
595,
606
],
[
606,
607
],
[
595,
608
],
[
608,
609
],
[
817,
610
],
[
610,
611
],
[
610,
612
],
[
612,
613
],
[
613,
614
],
[
614,
615
],
[
614,
616
],
[
613,
617
],
[
617,
618
],
[
612,
619
],
[
619,
620
],
[
620,
621
],
[
620,
622
],
[
619,
623
],
[
623,
624
],
[
612,
625
],
[
625,
626
],
[
626,
627
],
[
627,
628
],
[
628,
629
],
[
628,
630
],
[
627,
631
],
[
626,
632
],
[
632,
633
],
[
633,
634
],
[
633,
635
],
[
632,
636
],
[
625,
637
],
[
637,
638
],
[
612,
639
],
[
639,
640
],
[
640,
641
],
[
641,
642
],
[
641,
643
],
[
639,
644
],
[
644,
645
],
[
645,
646
],
[
645,
647
],
[
644,
648
],
[
639,
649
],
[
649,
650
],
[
650,
651
],
[
650,
652
],
[
652,
653
],
[
652,
654
],
[
639,
655
],
[
655,
656
],
[
656,
657
],
[
657,
658
],
[
658,
659
],
[
659,
660
],
[
659,
661
],
[
658,
662
],
[
657,
663
],
[
663,
664
],
[
664,
665
],
[
664,
666
],
[
666,
667
],
[
666,
668
],
[
663,
669
],
[
656,
670
],
[
670,
671
],
[
612,
672
],
[
672,
673
],
[
610,
674
],
[
674,
675
],
[
817,
676
],
[
676,
677
],
[
676,
678
],
[
678,
679
],
[
679,
680
],
[
679,
681
],
[
678,
682
],
[
682,
683
],
[
682,
684
],
[
678,
685
],
[
685,
686
],
[
685,
687
],
[
687,
688
],
[
688,
689
],
[
687,
690
],
[
678,
691
],
[
691,
692
],
[
691,
693
],
[
693,
694
],
[
694,
695
],
[
693,
696
],
[
678,
697
],
[
697,
698
],
[
697,
699
],
[
699,
700
],
[
700,
701
],
[
699,
702
],
[
678,
703
],
[
703,
704
],
[
676,
705
],
[
705,
706
],
[
676,
707
],
[
707,
708
],
[
817,
709
],
[
709,
710
],
[
709,
711
],
[
711,
712
],
[
709,
713
],
[
713,
714
],
[
709,
715
],
[
715,
716
],
[
715,
717
],
[
717,
718
],
[
718,
719
],
[
718,
720
],
[
709,
721
],
[
721,
722
],
[
721,
723
],
[
723,
724
],
[
724,
725
],
[
725,
726
],
[
726,
727
],
[
726,
728
],
[
725,
729
],
[
729,
730
],
[
730,
731
],
[
731,
732
],
[
724,
733
],
[
733,
734
],
[
734,
735
],
[
735,
736
],
[
735,
737
],
[
737,
738
],
[
738,
739
],
[
739,
740
],
[
734,
741
],
[
741,
742
],
[
742,
743
],
[
742,
744
],
[
723,
745
],
[
745,
746
],
[
746,
747
],
[
747,
748
],
[
709,
749
],
[
749,
750
],
[
749,
751
],
[
751,
752
],
[
752,
753
],
[
753,
754
],
[
754,
755
],
[
753,
756
],
[
756,
757
],
[
709,
758
],
[
758,
759
],
[
758,
760
],
[
760,
761
],
[
761,
762
],
[
762,
763
],
[
763,
764
],
[
762,
765
],
[
765,
766
],
[
709,
767
],
[
767,
768
],
[
767,
769
],
[
769,
770
],
[
770,
771
],
[
771,
772
],
[
772,
773
],
[
771,
774
],
[
774,
775
],
[
709,
776
],
[
776,
777
],
[
776,
778
],
[
778,
779
],
[
779,
780
],
[
779,
781
],
[
778,
782
],
[
782,
783
],
[
783,
784
],
[
783,
785
],
[
785,
786
],
[
786,
787
],
[
787,
788
],
[
782,
789
],
[
789,
790
],
[
790,
791
],
[
790,
792
],
[
792,
793
],
[
793,
794
],
[
778,
795
],
[
795,
796
],
[
817,
797
],
[
797,
798
],
[
797,
799
],
[
799,
800
],
[
797,
801
],
[
801,
802
],
[
797,
803
],
[
803,
804
],
[
803,
805
],
[
805,
806
],
[
806,
807
],
[
806,
808
],
[
805,
809
],
[
809,
810
],
[
809,
811
],
[
803,
812
],
[
812,
813
],
[
803,
814
],
[
814,
815
],
[
0,
816
],
[
816,
817
],
[
816,
818
]
]
| [
"import java.io.*;\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\nimport java.util.*;\n \npublic class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n// \t\tint t = sc.nextInt();\n// \t\twhile (t-- > 0) {\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\tint min = s.length();\n\t\t\tint n = t.length();\n\t\t\tfor(int i = 0 ; i <= s.length()-n ; i++){\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}\n// \t\t\t\n\t pr.println(min);\n \n// \t\t}\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n\tstatic int match(String a , String b){\n\t int m = 0;\n\t for(int i = 0 ; i < a.length() ; i++){\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }\n\t // m++;\n\t return m;\n\t}\n \n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}",
"Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}",
"@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}",
"compare",
"{\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}",
"return new Integer(entry1[col]).compareTo(entry2[col]);",
"new Integer(entry1[col]).compareTo(entry2[col])",
"new Integer(entry1[col]).compareTo",
"new Integer(entry1[col])",
"entry2[col]",
"entry2",
"col",
"final int[] entry1",
"entry1",
"final int[] entry2",
"entry2",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n// \t\tint t = sc.nextInt();\n// \t\twhile (t-- > 0) {\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\tint min = s.length();\n\t\t\tint n = t.length();\n\t\t\tfor(int i = 0 ; i <= s.length()-n ; i++){\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}\n// \t\t\t\n\t pr.println(min);\n \n// \t\t}\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n\tstatic int match(String a , String b){\n\t int m = 0;\n\t for(int i = 0 ; i < a.length() ; i++){\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }\n\t // m++;\n\t return m;\n\t}\n \n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}",
"Main",
"static final int INF = (int) (1e9 + 10);",
"INF",
"(int) (1e9 + 10)",
"1e9",
"10",
"static final int MOD = (int) (1e9 + 7);",
"MOD",
"(int) (1e9 + 7)",
"1e9",
"7",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n// \t\tint t = sc.nextInt();\n// \t\twhile (t-- > 0) {\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\tint min = s.length();\n\t\t\tint n = t.length();\n\t\t\tfor(int i = 0 ; i <= s.length()-n ; i++){\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}\n// \t\t\t\n\t pr.println(min);\n \n// \t\t}\n\t\tpr.flush();\n\t\tpr.close();\n\t}",
"main",
"{\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n// \t\tint t = sc.nextInt();\n// \t\twhile (t-- > 0) {\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\tint min = s.length();\n\t\t\tint n = t.length();\n\t\t\tfor(int i = 0 ; i <= s.length()-n ; i++){\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}\n// \t\t\t\n\t pr.println(min);\n \n// \t\t}\n\t\tpr.flush();\n\t\tpr.close();\n\t}",
"FastReader sc = new FastReader();",
"sc",
"new FastReader()",
"PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));",
"pr",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int min = s.length();",
"min",
"s.length()",
"s.length",
"s",
"int n = t.length();",
"n",
"t.length()",
"t.length",
"t",
"for(int i = 0 ; i <= s.length()-n ; i++){\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i <= s.length()-n",
"i",
"s.length()-n",
"s.length()",
"s.length",
"s",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}",
"{\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}",
"String ref = s.substring(i , i+n);",
"ref",
"s.substring(i , i+n)",
"s.substring",
"s",
"i",
"i+n",
"i",
"n",
"int tc = n - match(ref , t);",
"tc",
"n - match(ref , t)",
"n",
"match(ref , t)",
"match",
"ref",
"t",
"min = Math.min(min , tc)",
"min",
"Math.min(min , tc)",
"Math.min",
"Math",
"min",
"tc",
"pr.println(min)",
"pr.println",
"pr",
"min",
"pr.flush()",
"pr.flush",
"pr",
"pr.close()",
"pr.close",
"pr",
"String[] args",
"args",
"static int match(String a , String b){\n\t int m = 0;\n\t for(int i = 0 ; i < a.length() ; i++){\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }\n\t // m++;\n\t return m;\n\t}",
"match",
"{\n\t int m = 0;\n\t for(int i = 0 ; i < a.length() ; i++){\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }\n\t // m++;\n\t return m;\n\t}",
"int m = 0;",
"m",
"0",
"for(int i = 0 ; i < a.length() ; i++){\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < a.length()",
"i",
"a.length()",
"a.length",
"a",
"i++",
"i++",
"i",
"{\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }",
"{\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }",
"if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }",
"a.charAt(i) == b.charAt(i)",
"a.charAt(i)",
"a.charAt",
"a",
"i",
"b.charAt(i)",
"b.charAt",
"b",
"i",
"{\n\t m++;\n\t }",
"m++",
"m",
"return m;",
"m",
"String a",
"a",
"String b",
"b",
"/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"possible",
"{\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"long c = 0;",
"c",
"0",
"for (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}",
"{\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}",
"if ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}",
"(arr[i] * f[f.length - i - 1]) > mid",
"(arr[i] * f[f.length - i - 1])",
"arr[i]",
"arr",
"i",
"f[f.length - i - 1]",
"f",
"f.length - i - 1",
"f.length - i - 1",
"f.length",
"f",
"f.length",
"i",
"1",
"mid",
"{\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}",
"c += (arr[i] - (mid / f[f.length - i - 1]))",
"c",
"(arr[i] - (mid / f[f.length - i - 1]))",
"arr[i]",
"arr",
"i",
"(mid / f[f.length - i - 1])",
"mid",
"f[f.length - i - 1]",
"f",
"f.length - i - 1",
"f.length - i - 1",
"f.length",
"f",
"f.length",
"i",
"1",
"if (c <= k)\n\t\t\treturn true;",
"c <= k",
"c",
"k",
"return true;",
"true",
"return false;",
"false",
"long[] arr",
"arr",
"int[] f",
"f",
"long mid",
"mid",
"long k",
"k",
"public static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}",
"lowerBound",
"{\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}",
"int low = 0;",
"low",
"0",
"int high = length;",
"high",
"length",
"while (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}",
"low < high",
"low",
"high",
"{\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}",
"final int mid = (low + high) / 2;",
"mid",
"(low + high) / 2",
"(low + high)",
"low",
"high",
"2",
"if (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}",
"value <= array.get(mid)",
"value",
"array.get(mid)",
"array.get",
"array",
"mid",
"{\n\t\t\t\thigh = mid;\n\t\t\t}",
"high = mid",
"high",
"mid",
"{\n\t\t\t\tlow = mid + 1;\n\t\t\t}",
"low = mid + 1",
"low",
"mid + 1",
"mid",
"1",
"return low;",
"low",
"ArrayList<Integer> array",
"array",
"int length",
"length",
"long value",
"value",
"static long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}",
"gcd",
"{\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}",
"if (a == 0)\n\t\t\treturn b;",
"a == 0",
"a",
"0",
"return b;",
"b",
"return gcd(b % a, a);",
"gcd(b % a, a)",
"gcd",
"b % a",
"b",
"a",
"a",
"long a",
"a",
"long b",
"b",
"static long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}",
"lcm",
"{\n\t\treturn (a * b) / gcd(a, b);\n\t}",
"return (a * b) / gcd(a, b);",
"(a * b) / gcd(a, b)",
"(a * b)",
"a",
"b",
"gcd(a, b)",
"gcd",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}",
"sortbyColumn",
"{\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}",
"Arrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t})",
"Arrays.sort",
"Arrays",
"att",
"new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}",
"int[][] att",
"att",
"int col",
"col",
"public static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}",
"swap",
"{\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}",
"int temp = data[left];",
"temp",
"data[left]",
"data",
"left",
"data[left] = data[right]",
"data[left]",
"data",
"left",
"data[right]",
"data",
"right",
"data[right] = temp",
"data[right]",
"data",
"right",
"temp",
"return data;",
"data",
"int data[]",
"data",
"int left",
"left",
"int right",
"right",
"public static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}",
"reverse",
"{\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}",
"while (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}",
"left < right",
"left",
"right",
"{\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}",
"int temp = data[left];",
"temp",
"data[left]",
"data",
"left",
"data[left++] = data[right]",
"data[left++]",
"data",
"left++",
"left",
"data[right]",
"data",
"right",
"data[right--] = temp",
"data[right--]",
"data",
"right--",
"right",
"temp",
"return data;",
"data",
"int data[]",
"data",
"int left",
"left",
"int right",
"right",
"public static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}",
"findNextPermutation",
"{\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}",
"if (data.length <= 1)\n\t\t\treturn false;",
"data.length <= 1",
"data.length",
"data",
"data.length",
"1",
"return false;",
"false",
"int last = data.length - 2;",
"last",
"data.length - 2",
"data.length",
"data",
"data.length",
"2",
"while (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}",
"last >= 0",
"last",
"0",
"{\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}",
"if (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}",
"data[last] < data[last + 1]",
"data[last]",
"data",
"last",
"data[last + 1]",
"data",
"last + 1",
"last",
"1",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"last--",
"last",
"if (last < 0)\n\t\t\treturn false;",
"last < 0",
"last",
"0",
"return false;",
"false",
"int nextGreater = data.length - 1;",
"nextGreater",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"for (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = data.length - 1;",
"int i = data.length - 1;",
"i",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"i > last",
"i",
"last",
"i--",
"i--",
"i",
"{\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}",
"data[i] > data[last]",
"data[i]",
"data",
"i",
"data[last]",
"data",
"last",
"{\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}",
"nextGreater = i",
"nextGreater",
"i",
"break;",
"data = swap(data, nextGreater, last)",
"data",
"swap(data, nextGreater, last)",
"swap",
"data",
"nextGreater",
"last",
"data = reverse(data, last + 1, data.length - 1)",
"data",
"reverse(data, last + 1, data.length - 1)",
"reverse",
"data",
"last + 1",
"last",
"1",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"return true;",
"true",
"int data[]",
"data",
"static long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}",
"nCr",
"{\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}",
"if (n == r)\n\t\t\treturn 1;",
"n == r",
"n",
"r",
"return 1;",
"1",
"return fact(n) / (fact(r) * fact(n - r));",
"fact(n) / (fact(r) * fact(n - r))",
"fact(n)",
"fact",
"n",
"(fact(r) * fact(n - r))",
"fact(r)",
"fact",
"r",
"fact(n - r)",
"fact",
"n - r",
"n",
"r",
"long n",
"n",
"long r",
"r",
"static long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}",
"fact",
"{\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}",
"long res = 1;",
"res",
"1",
"for (long i = 2; i <= n; i++)\n\t\t\tres = res * i;",
"long i = 2;",
"long i = 2;",
"i",
"2",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"res = res * i;",
"res = res * i",
"res",
"res * i",
"res",
"i",
"return res;",
"res",
"long n",
"n",
"static long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}",
"power",
"{\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}",
"long res = 1;",
"res",
"1",
"fac2 = fac2 % p",
"fac2",
"fac2 % p",
"fac2",
"p",
"while (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}",
"y > 0",
"y",
"0",
"{\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}",
"if (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;",
"y % 2 == 1",
"y % 2",
"y",
"2",
"1",
"res = (res * fac2) % p",
"res",
"(res * fac2) % p",
"(res * fac2)",
"res",
"fac2",
"p",
"fac2 = (fac2 * fac2) % p",
"fac2",
"(fac2 * fac2) % p",
"(fac2 * fac2)",
"fac2",
"fac2",
"p",
"return res;",
"res",
"long fac2",
"fac2",
"int y",
"y",
"int p",
"p",
"static long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}",
"modInverse",
"{\n\t\treturn power(fac2, p - 2, p);\n\t}",
"return power(fac2, p - 2, p);",
"power(fac2, p - 2, p)",
"power",
"fac2",
"p - 2",
"p",
"2",
"p",
"long fac2",
"fac2",
"int p",
"p",
"static boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}",
"if (n <= 1)\n\t\t\treturn false;",
"n <= 1",
"n",
"1",
"return false;",
"false",
"if (n <= 3)\n\t\t\treturn true;",
"n <= 3",
"n",
"3",
"return true;",
"true",
"if (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;",
"n % 2 == 0 || n % 3 == 0",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"n % 3 == 0",
"n % 3",
"n",
"3",
"0",
"return false;",
"false",
"for (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;",
"int i = 5;",
"int i = 5;",
"i",
"5",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"i = i + 6",
"i = i + 6",
"i",
"i + 6",
"i",
"6",
"if (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;",
"if (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;",
"n % i == 0 || n % (i + 2) == 0",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"n % (i + 2) == 0",
"n % (i + 2)",
"n",
"(i + 2)",
"i",
"2",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}",
"lcmm",
"{\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}",
"BigInteger s = new BigInteger(a);",
"s",
"new BigInteger(a)",
"BigInteger s1 = new BigInteger(b);",
"s1",
"new BigInteger(b)",
"BigInteger mul = s.multiply(s1);",
"mul",
"s.multiply(s1)",
"s.multiply",
"s",
"s1",
"BigInteger gcd = s.gcd(s1);",
"gcd",
"s.gcd(s1)",
"s.gcd",
"s",
"s1",
"BigInteger lcm = mul.divide(gcd);",
"lcm",
"mul.divide(gcd)",
"mul.divide",
"mul",
"gcd",
"return lcm;",
"lcm",
"String a",
"a",
"String b",
"b",
"static class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"FastReader",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"try {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"nextLine",
"{\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"String str = \"\";",
"str",
"\"\"",
"try {\n\t\t\t\tstr = 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\tstr = br.readLine();\n\t\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"static class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}",
"pair",
"int V",
"V",
"I;",
"I",
"pair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}",
"pair",
"{\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}",
"V = v",
"V",
"v",
"I = i",
"I",
"i",
"int v",
"v",
"int i",
"i",
"public class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n// \t\tint t = sc.nextInt();\n// \t\twhile (t-- > 0) {\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\tint min = s.length();\n\t\t\tint n = t.length();\n\t\t\tfor(int i = 0 ; i <= s.length()-n ; i++){\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}\n// \t\t\t\n\t pr.println(min);\n \n// \t\t}\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n\tstatic int match(String a , String b){\n\t int m = 0;\n\t for(int i = 0 ; i < a.length() ; i++){\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }\n\t // m++;\n\t return m;\n\t}\n \n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}",
"public class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n// \t\tint t = sc.nextInt();\n// \t\twhile (t-- > 0) {\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\tint min = s.length();\n\t\t\tint n = t.length();\n\t\t\tfor(int i = 0 ; i <= s.length()-n ; i++){\n\t\t\t String ref = s.substring(i , i+n);\n\t\t\t int tc = n - match(ref , t);\n\t\t\t min = Math.min(min , tc);\n\t\t\t}\n// \t\t\t\n\t pr.println(min);\n \n// \t\t}\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n\tstatic int match(String a , String b){\n\t int m = 0;\n\t for(int i = 0 ; i < a.length() ; i++){\n\t if(a.charAt(i) == b.charAt(i)){\n\t m++;\n\t }\n\t }\n\t // m++;\n\t return m;\n\t}\n \n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}",
"Main"
]
| import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
public class Main {
static final int INF = (int) (1e9 + 10);
static final int MOD = (int) (1e9 + 7);
// static final int N = (int) (4e5 + 5);
// static ArrayList<Integer>[] graph;
// static boolean visited[];
// static long size[];
public static void main(String[] args) throws NumberFormatException, IOException {
FastReader sc = new FastReader();
PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// int t = sc.nextInt();
// while (t-- > 0) {
String s = sc.next();
String t = sc.next();
int min = s.length();
int n = t.length();
for(int i = 0 ; i <= s.length()-n ; i++){
String ref = s.substring(i , i+n);
int tc = n - match(ref , t);
min = Math.min(min , tc);
}
//
pr.println(min);
// }
pr.flush();
pr.close();
}
static int match(String a , String b){
int m = 0;
for(int i = 0 ; i < a.length() ; i++){
if(a.charAt(i) == b.charAt(i)){
m++;
}
}
// m++;
return m;
}
/*
* Template From Here
*/
private static boolean possible(long[] arr, int[] f, long mid, long k) {
long c = 0;
for (int i = 0; i < arr.length; i++) {
if ((arr[i] * f[f.length - i - 1]) > mid) {
c += (arr[i] - (mid / f[f.length - i - 1]));
}
}
// System.out.println(mid+" "+c);
if (c <= k)
return true;
return false;
}
public static int lowerBound(ArrayList<Integer> array, int length, long value) {
int low = 0;
int high = length;
while (low < high) {
final int mid = (low + high) / 2;
if (value <= array.get(mid)) {
high = mid;
} else {
low = mid + 1;
}
}
return low;
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public 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;
}
}
static long gcd(long a, long b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
static long lcm(long a, long b) {
return (a * b) / gcd(a, b);
}
public static void sortbyColumn(int[][] att, int col) {
// Using built-in sort function Arrays.sort
Arrays.sort(att, new Comparator<int[]>() {
@Override
// Compare values according to columns
public int compare(final int[] entry1, final int[] entry2) {
// To sort in descending order revert
// the '>' Operator
// if (entry1[col] > entry2[col])
// return 1;
// else //(entry1[col] >= entry2[col])
// return -1;
return new Integer(entry1[col]).compareTo(entry2[col]);
// return entry1[col].
}
}); // End of function call sort().
}
static class pair {
int V, I;
pair(int v, int i) {
V = v;
I = i;
}
}
public static int[] swap(int data[], int left, int right) {
int temp = data[left];
data[left] = data[right];
data[right] = temp;
return data;
}
public static int[] reverse(int data[], int left, int right) {
while (left < right) {
int temp = data[left];
data[left++] = data[right];
data[right--] = temp;
}
return data;
}
public static boolean findNextPermutation(int data[]) {
if (data.length <= 1)
return false;
int last = data.length - 2;
while (last >= 0) {
if (data[last] < data[last + 1]) {
break;
}
last--;
}
if (last < 0)
return false;
int nextGreater = data.length - 1;
for (int i = data.length - 1; i > last; i--) {
if (data[i] > data[last]) {
nextGreater = i;
break;
}
}
data = swap(data, nextGreater, last);
data = reverse(data, last + 1, data.length - 1);
return true;
}
static long nCr(long n, long r) {
if (n == r)
return 1;
return fact(n) / (fact(r) * fact(n - r));
}
static long fact(long n) {
long res = 1;
for (long i = 2; i <= n; i++)
res = res * i;
return res;
}
/*
* static boolean prime[] = new boolean[1000007];
*
* public static void sieveOfEratosthenes(int n) {
*
* for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
* n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
* == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
* p) prime[i] = false; } }
*
* // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
* if(prime[i] == true) // System.out.print(i + " "); // } }
*/
static long power(long fac2, int y, int p) {
long res = 1;
fac2 = fac2 % p;
while (y > 0) {
if (y % 2 == 1)
res = (res * fac2) % p;
fac2 = (fac2 * fac2) % p;
}
return res;
}
static long modInverse(long fac2, int p) {
return power(fac2, p - 2, p);
}
static boolean isPrime(int n) {
// Corner cases
if (n <= 1)
return false;
if (n <= 3)
return true;
// This is checked so that we can skip
// middle five numbers in below loop
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return false;
return true;
}
public static BigInteger lcmm(String a, String b) {
BigInteger s = new BigInteger(a);
BigInteger s1 = new BigInteger(b);
BigInteger mul = s.multiply(s1);
BigInteger gcd = s.gcd(s1);
BigInteger lcm = mul.divide(gcd);
return lcm;
}
} |
[
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,
2,
4,
18,
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,
14,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
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
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
27,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
49,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
65,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
64,
76
],
[
76,
77
],
[
77,
78
],
[
45,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
81,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
6,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tint ans = T.length();\n\n\t\tfor (int start = 0; start <= S.length() - T.length(); start ++) {\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tint ans = T.length();\n\n\t\tfor (int start = 0; start <= S.length() - T.length(); start ++) {\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n\n}",
"Main",
"public static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tint ans = T.length();\n\n\t\tfor (int start = 0; start <= S.length() - T.length(); start ++) {\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tint ans = T.length();\n\n\t\tfor (int start = 0; start <= S.length() - T.length(); start ++) {\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"int ans = T.length();",
"ans",
"T.length()",
"T.length",
"T",
"for (int start = 0; start <= S.length() - T.length(); start ++) {\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}",
"int start = 0;",
"int start = 0;",
"start",
"0",
"start <= S.length() - T.length()",
"start",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"start ++",
"start ++",
"start",
"{\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}",
"{\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}",
"int diff = 0;",
"diff",
"0",
"for (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < T.length()",
"i",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"if (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}",
"T.charAt(i) != S.charAt(start + i)",
"T.charAt(i)",
"T.charAt",
"T",
"i",
"S.charAt(start + i)",
"S.charAt",
"S",
"start + i",
"start",
"i",
"{\n\t\t\t\t\tdiff++;\n\t\t\t\t}",
"diff++",
"diff",
"ans = Math.min(ans, diff)",
"ans",
"Math.min(ans, diff)",
"Math.min",
"Math",
"ans",
"diff",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tint ans = T.length();\n\n\t\tfor (int start = 0; start <= S.length() - T.length(); start ++) {\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}\n\n\t\tSystem.out.println(ans);\n\t}\n\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\n\t\tint ans = T.length();\n\n\t\tfor (int start = 0; start <= S.length() - T.length(); start ++) {\n\n\t\t\tint diff = 0;\n\n\t\t\tfor (int i = 0; i < T.length(); i++) {\n\t\t\t\tif (T.charAt(i) != S.charAt(start + i)){\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = Math.min(ans, diff);\n\t\t}\n\n\t\tSystem.out.println(ans);\n\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 S = sc.next();
String T = sc.next();
int ans = T.length();
for (int start = 0; start <= S.length() - T.length(); start ++) {
int diff = 0;
for (int i = 0; i < T.length(); i++) {
if (T.charAt(i) != S.charAt(start + i)){
diff++;
}
}
ans = Math.min(ans, diff);
}
System.out.println(ans);
}
} |
[
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,
2,
13,
13,
41,
13,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
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
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
71,
83
],
[
83,
84
],
[
54,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
87,
91
],
[
8,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
6,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
]
| [
"import java.util.*;\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 t = sc.next();\n\n\t\tint ls = s.length();\n\t\tint lt = t.length();\n\t\tint ld = ls-lt;\n\n\t\tint chg = lt+1;\n\t\tfor ( int i=0; i<=ld; i++ ) {\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}\n\t\tSystem.out.println(chg);\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\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint ls = s.length();\n\t\tint lt = t.length();\n\t\tint ld = ls-lt;\n\n\t\tint chg = lt+1;\n\t\tfor ( int i=0; i<=ld; i++ ) {\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}\n\t\tSystem.out.println(chg);\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 t = sc.next();\n\n\t\tint ls = s.length();\n\t\tint lt = t.length();\n\t\tint ld = ls-lt;\n\n\t\tint chg = lt+1;\n\t\tfor ( int i=0; i<=ld; i++ ) {\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}\n\t\tSystem.out.println(chg);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\n\t\tint ls = s.length();\n\t\tint lt = t.length();\n\t\tint ld = ls-lt;\n\n\t\tint chg = lt+1;\n\t\tfor ( int i=0; i<=ld; i++ ) {\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}\n\t\tSystem.out.println(chg);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int ls = s.length();",
"ls",
"s.length()",
"s.length",
"s",
"int lt = t.length();",
"lt",
"t.length()",
"t.length",
"t",
"int ld = ls-lt;",
"ld",
"ls-lt",
"ls",
"lt",
"int chg = lt+1;",
"chg",
"lt+1",
"lt",
"1",
"for ( int i=0; i<=ld; i++ ) {\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=ld",
"i",
"ld",
"i++",
"i++",
"i",
"{\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}",
"{\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}",
"int chg1 = lt;",
"chg1",
"lt",
"for ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<lt",
"j",
"lt",
"j++",
"j++",
"j",
"{\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}",
"{\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}",
"if ( s.charAt(i+j)==t.charAt(j) ) chg1--;",
"s.charAt(i+j)==t.charAt(j)",
"s.charAt(i+j)",
"s.charAt",
"s",
"i+j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"chg1--",
"chg1",
"chg = Math.min(chg, chg1)",
"chg",
"Math.min(chg, chg1)",
"Math.min",
"Math",
"chg",
"chg1",
"System.out.println(chg)",
"System.out.println",
"System.out",
"System",
"System.out",
"chg",
"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 t = sc.next();\n\n\t\tint ls = s.length();\n\t\tint lt = t.length();\n\t\tint ld = ls-lt;\n\n\t\tint chg = lt+1;\n\t\tfor ( int i=0; i<=ld; i++ ) {\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}\n\t\tSystem.out.println(chg);\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 t = sc.next();\n\n\t\tint ls = s.length();\n\t\tint lt = t.length();\n\t\tint ld = ls-lt;\n\n\t\tint chg = lt+1;\n\t\tfor ( int i=0; i<=ld; i++ ) {\n\t\t\tint chg1 = lt;\n\t\t\tfor ( int j=0; j<lt; j++ ) {\n\t\t\t\tif ( s.charAt(i+j)==t.charAt(j) ) chg1--;\n\t\t\t}\n\t\t\tchg = Math.min(chg, chg1);\n\t\t}\n\t\tSystem.out.println(chg);\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 t = sc.next();
int ls = s.length();
int lt = t.length();
int ld = ls-lt;
int chg = lt+1;
for ( int i=0; i<=ld; i++ ) {
int chg1 = lt;
for ( int j=0; j<lt; j++ ) {
if ( s.charAt(i+j)==t.charAt(j) ) chg1--;
}
chg = Math.min(chg, chg1);
}
System.out.println(chg);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
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,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
13,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
0,
13,
17,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
6
],
[
6,
7
],
[
6,
8
],
[
107,
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
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
11,
32
],
[
32,
33
],
[
32,
34
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
35,
47
],
[
47,
48
],
[
48,
49
],
[
35,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
75,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
68,
86
],
[
86,
87
],
[
86,
88
],
[
51,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
91,
95
],
[
11,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
9,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n private static final Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n String S = scanner.next();\n String T = scanner.next();\n int slen = S.length(), tlen = T.length(), res = 0;\n for (int i = 0; i < slen - tlen + 1; ++i) {\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }\n System.out.println(tlen - res);\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n private static final Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n String S = scanner.next();\n String T = scanner.next();\n int slen = S.length(), tlen = T.length(), res = 0;\n for (int i = 0; i < slen - tlen + 1; ++i) {\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }\n System.out.println(tlen - res);\n }\n\n}",
"Main",
"private static final Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"public static void main(String[] args) {\n String S = scanner.next();\n String T = scanner.next();\n int slen = S.length(), tlen = T.length(), res = 0;\n for (int i = 0; i < slen - tlen + 1; ++i) {\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }\n System.out.println(tlen - res);\n }",
"main",
"{\n String S = scanner.next();\n String T = scanner.next();\n int slen = S.length(), tlen = T.length(), res = 0;\n for (int i = 0; i < slen - tlen + 1; ++i) {\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }\n System.out.println(tlen - res);\n }",
"String S = scanner.next();",
"S",
"scanner.next()",
"scanner.next",
"scanner",
"String T = scanner.next();",
"T",
"scanner.next()",
"scanner.next",
"scanner",
"int slen = S.length()",
"slen",
"S.length()",
"S.length",
"S",
"tlen = T.length()",
"tlen",
"T.length()",
"T.length",
"T",
"res = 0;",
"res",
"0",
"for (int i = 0; i < slen - tlen + 1; ++i) {\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < slen - tlen + 1",
"i",
"slen - tlen + 1",
"slen - tlen",
"slen",
"tlen",
"1",
"++i",
"++i",
"i",
"{\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }",
"{\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }",
"int cur = 0;",
"cur",
"0",
"for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < tlen",
"j",
"tlen",
"++j",
"++j",
"j",
"{\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }",
"{\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }",
"if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;",
"i + j < slen && S.charAt(i + j) == T.charAt(j)",
"i + j < slen",
"i + j",
"i",
"j",
"slen",
"S.charAt(i + j) == T.charAt(j)",
"S.charAt(i + j)",
"S.charAt",
"S",
"i + j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"cur += 1",
"cur",
"1",
"res = Math.max(res, cur)",
"res",
"Math.max(res, cur)",
"Math.max",
"Math",
"res",
"cur",
"System.out.println(tlen - res)",
"System.out.println",
"System.out",
"System",
"System.out",
"tlen - res",
"tlen",
"res",
"String[] args",
"args",
"public class Main {\n\n private static final Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n String S = scanner.next();\n String T = scanner.next();\n int slen = S.length(), tlen = T.length(), res = 0;\n for (int i = 0; i < slen - tlen + 1; ++i) {\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }\n System.out.println(tlen - res);\n }\n\n}",
"public class Main {\n\n private static final Scanner scanner = new Scanner(System.in);\n\n public static void main(String[] args) {\n String S = scanner.next();\n String T = scanner.next();\n int slen = S.length(), tlen = T.length(), res = 0;\n for (int i = 0; i < slen - tlen + 1; ++i) {\n int cur = 0;\n for (int j = 0; j < tlen; ++j) {\n if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;\n }\n res = Math.max(res, cur);\n }\n System.out.println(tlen - res);\n }\n\n}",
"Main"
]
| import java.util.*;
public class Main {
private static final Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
String S = scanner.next();
String T = scanner.next();
int slen = S.length(), tlen = T.length(), res = 0;
for (int i = 0; i < slen - tlen + 1; ++i) {
int cur = 0;
for (int j = 0; j < tlen; ++j) {
if (i + j < slen && S.charAt(i + j) == T.charAt(j)) cur += 1;
}
res = Math.max(res, cur);
}
System.out.println(tlen - res);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
118,
8
],
[
118,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
33,
35
],
[
33,
36
],
[
11,
37
],
[
37,
38
],
[
38,
39
],
[
9,
40
],
[
40,
41
],
[
118,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
57,
65
],
[
50,
66
],
[
66,
67
],
[
67,
68
],
[
50,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
74,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
90,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
89,
101
],
[
101,
102
],
[
102,
103
],
[
70,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
106,
110
],
[
44,
111
],
[
111,
112
],
[
42,
113
],
[
113,
114
],
[
42,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter prnt = new PrintWriter(System.out);\n StringTokenizer st;\n String S = read.readLine();\n String T = read.readLine();\n prnt.println(getMinimumChange(S, T));\n\n\n prnt.close();\n }\n\n static int getMinimumChange(String S, String T) {\n int res = T.length();\n for (int i = 0; i < (S.length() - T.length() + 1); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }\n return res;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter prnt = new PrintWriter(System.out);\n StringTokenizer st;\n String S = read.readLine();\n String T = read.readLine();\n prnt.println(getMinimumChange(S, T));\n\n\n prnt.close();\n }\n\n static int getMinimumChange(String S, String T) {\n int res = T.length();\n for (int i = 0; i < (S.length() - T.length() + 1); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }\n return res;\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter prnt = new PrintWriter(System.out);\n StringTokenizer st;\n String S = read.readLine();\n String T = read.readLine();\n prnt.println(getMinimumChange(S, T));\n\n\n prnt.close();\n }",
"main",
"{\n BufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter prnt = new PrintWriter(System.out);\n StringTokenizer st;\n String S = read.readLine();\n String T = read.readLine();\n prnt.println(getMinimumChange(S, T));\n\n\n prnt.close();\n }",
"BufferedReader read = new BufferedReader(new InputStreamReader(System.in));",
"read",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter prnt = new PrintWriter(System.out);",
"prnt",
"new PrintWriter(System.out)",
"StringTokenizer st;",
"st",
"String S = read.readLine();",
"S",
"read.readLine()",
"read.readLine",
"read",
"String T = read.readLine();",
"T",
"read.readLine()",
"read.readLine",
"read",
"prnt.println(getMinimumChange(S, T))",
"prnt.println",
"prnt",
"getMinimumChange(S, T)",
"getMinimumChange",
"S",
"T",
"prnt.close()",
"prnt.close",
"prnt",
"String[] args",
"args",
"static int getMinimumChange(String S, String T) {\n int res = T.length();\n for (int i = 0; i < (S.length() - T.length() + 1); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }\n return res;\n }",
"getMinimumChange",
"{\n int res = T.length();\n for (int i = 0; i < (S.length() - T.length() + 1); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }\n return res;\n }",
"int res = T.length();",
"res",
"T.length()",
"T.length",
"T",
"for (int i = 0; i < (S.length() - T.length() + 1); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < (S.length() - T.length() + 1)",
"i",
"(S.length() - T.length() + 1)",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"1",
"i++",
"i++",
"i",
"{\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }",
"{\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }",
"{\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }",
"if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }",
"S.charAt(i + j) != T.charAt(j)",
"S.charAt(i + j)",
"S.charAt",
"S",
"i + j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"{\n count++;\n }",
"count++",
"count",
"res = Math.min(res, count)",
"res",
"Math.min(res, count)",
"Math.min",
"Math",
"res",
"count",
"return res;",
"res",
"String S",
"S",
"String T",
"T",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter prnt = new PrintWriter(System.out);\n StringTokenizer st;\n String S = read.readLine();\n String T = read.readLine();\n prnt.println(getMinimumChange(S, T));\n\n\n prnt.close();\n }\n\n static int getMinimumChange(String S, String T) {\n int res = T.length();\n for (int i = 0; i < (S.length() - T.length() + 1); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }\n return res;\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader read = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter prnt = new PrintWriter(System.out);\n StringTokenizer st;\n String S = read.readLine();\n String T = read.readLine();\n prnt.println(getMinimumChange(S, T));\n\n\n prnt.close();\n }\n\n static int getMinimumChange(String S, String T) {\n int res = T.length();\n for (int i = 0; i < (S.length() - T.length() + 1); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n // System.out.println(S.charAt(i+j) + \" \" + T.charAt(j));\n if (S.charAt(i + j) != T.charAt(j)) {\n count++;\n }\n }\n res = Math.min(res, count);\n }\n return res;\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader read = new BufferedReader(new InputStreamReader(System.in));
PrintWriter prnt = new PrintWriter(System.out);
StringTokenizer st;
String S = read.readLine();
String T = read.readLine();
prnt.println(getMinimumChange(S, T));
prnt.close();
}
static int getMinimumChange(String S, String T) {
int res = T.length();
for (int i = 0; i < (S.length() - T.length() + 1); i++) {
int count = 0;
for (int j = 0; j < T.length(); j++) {
// System.out.println(S.charAt(i+j) + " " + T.charAt(j));
if (S.charAt(i + j) != T.charAt(j)) {
count++;
}
}
res = Math.min(res, count);
}
return res;
}
} |
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
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,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
108,
5
],
[
108,
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
],
[
26,
27
],
[
27,
28
],
[
10,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
10,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
10,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
46,
54
],
[
39,
55
],
[
55,
56
],
[
56,
57
],
[
39,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
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
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
78,
88
],
[
88,
89
],
[
89,
90
],
[
59,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
10,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
6,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\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\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\n\t\t}\n\t}",
"main",
"{\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\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 t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\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 t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"char[] sChar = s.toCharArray();",
"sChar",
"s.toCharArray()",
"s.toCharArray",
"s",
"char[] tChar = t.toCharArray();",
"tChar",
"t.toCharArray()",
"t.toCharArray",
"t",
"int len = tChar.length;",
"len",
"tChar.length",
"tChar",
"tChar.length",
"for(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < s.length() - t.length() + 1",
"i",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}",
"int cLen = 0;",
"cLen",
"0",
"for(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"{\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}",
"if ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}",
"sChar[i+j] != tChar[j]",
"sChar[i+j]",
"sChar",
"i+j",
"i",
"j",
"tChar[j]",
"tChar",
"j",
"{\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}",
"cLen++",
"cLen",
"if ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}",
"cLen < len",
"cLen",
"len",
"{\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}",
"len = cLen",
"len",
"cLen",
"System.out.println(len)",
"System.out.println",
"System.out",
"System",
"System.out",
"len",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\n\t\t}\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\t\n\t\t\tchar[] sChar = s.toCharArray();\n\t\t\tchar[] tChar = t.toCharArray();\n\t\t\t\n\t\t\tint len = tChar.length;\n\t\t\tfor(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {\n\t\t\t\t\n\t\t\t\tint cLen = 0;\n\t\t\t\tfor(int j = 0 ; j < t.length() ; j++ ) {\n\t\t\t\t\tif ( sChar[i+j] != tChar[j]) {\n\t\t\t\t\t\tcLen++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( cLen < len ) {\n\t\t\t\t\tlen = cLen;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(len);\n\t\t\n\t\t}\n\t}\n\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 t = sc.next();
char[] sChar = s.toCharArray();
char[] tChar = t.toCharArray();
int len = tChar.length;
for(int i = 0 ; i < s.length() - t.length() + 1; i++ ) {
int cLen = 0;
for(int j = 0 ; j < t.length() ; j++ ) {
if ( sChar[i+j] != tChar[j]) {
cLen++;
}
}
if ( cLen < len ) {
len = cLen;
}
}
System.out.println(len);
}
}
} |
[
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,
14,
2,
4,
18,
13,
4,
18,
13,
30,
4,
18,
18,
13,
13,
4,
13,
13,
13,
30,
4,
18,
18,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
29,
13,
23,
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
],
[
223,
8
],
[
223,
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
],
[
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
],
[
39,
40
],
[
39,
41
],
[
39,
42
],
[
25,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
49,
52
],
[
9,
53
],
[
53,
54
],
[
223,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
57,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
57,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
73,
85
],
[
85,
86
],
[
86,
87
],
[
73,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
93,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
107,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
115,
116
],
[
115,
117
],
[
106,
118
],
[
118,
119
],
[
119,
120
],
[
89,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
123,
127
],
[
57,
128
],
[
128,
129
],
[
55,
130
],
[
130,
131
],
[
55,
132
],
[
132,
133
],
[
223,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
134,
138
],
[
138,
139
],
[
134,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
134,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
149,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
159,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
148,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
134,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
178,
181
],
[
181,
182
],
[
134,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
190,
191
],
[
134,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
196,
199
],
[
199,
200
],
[
134,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
203,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
207,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
203,
220
],
[
220,
221
],
[
0,
222
],
[
222,
223
],
[
222,
224
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n String a = sc.next();\n String b = sc.next();\n if (a.length() <= b.length()) {\n System.out.println(minimumChar(a, b));\n } else {\n System.out.println(minimumChar(b, a));\n }\n }\n\n static int minimumChar(String S1, String S2) {\n int n = S1.length();\n int m = S2.length();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < m - n + 1; i++) {\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }\n\n return ans;\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new 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}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) {\n FastReader sc = new FastReader();\n String a = sc.next();\n String b = sc.next();\n if (a.length() <= b.length()) {\n System.out.println(minimumChar(a, b));\n } else {\n System.out.println(minimumChar(b, a));\n }\n }\n\n static int minimumChar(String S1, String S2) {\n int n = S1.length();\n int m = S2.length();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < m - n + 1; i++) {\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }\n\n return ans;\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new 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 sc = new FastReader();\n String a = sc.next();\n String b = sc.next();\n if (a.length() <= b.length()) {\n System.out.println(minimumChar(a, b));\n } else {\n System.out.println(minimumChar(b, a));\n }\n }",
"main",
"{\n FastReader sc = new FastReader();\n String a = sc.next();\n String b = sc.next();\n if (a.length() <= b.length()) {\n System.out.println(minimumChar(a, b));\n } else {\n System.out.println(minimumChar(b, a));\n }\n }",
"FastReader sc = new FastReader();",
"sc",
"new FastReader()",
"String a = sc.next();",
"a",
"sc.next()",
"sc.next",
"sc",
"String b = sc.next();",
"b",
"sc.next()",
"sc.next",
"sc",
"if (a.length() <= b.length()) {\n System.out.println(minimumChar(a, b));\n } else {\n System.out.println(minimumChar(b, a));\n }",
"a.length() <= b.length()",
"a.length()",
"a.length",
"a",
"b.length()",
"b.length",
"b",
"{\n System.out.println(minimumChar(a, b));\n }",
"System.out.println(minimumChar(a, b))",
"System.out.println",
"System.out",
"System",
"System.out",
"minimumChar(a, b)",
"minimumChar",
"a",
"b",
"{\n System.out.println(minimumChar(b, a));\n }",
"System.out.println(minimumChar(b, a))",
"System.out.println",
"System.out",
"System",
"System.out",
"minimumChar(b, a)",
"minimumChar",
"b",
"a",
"String[] args",
"args",
"static int minimumChar(String S1, String S2) {\n int n = S1.length();\n int m = S2.length();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < m - n + 1; i++) {\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }\n\n return ans;\n }",
"minimumChar",
"{\n int n = S1.length();\n int m = S2.length();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < m - n + 1; i++) {\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }\n\n return ans;\n }",
"int n = S1.length();",
"n",
"S1.length()",
"S1.length",
"S1",
"int m = S2.length();",
"m",
"S2.length()",
"S2.length",
"S2",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for (int i = 0; i < m - n + 1; i++) {\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m - n + 1",
"i",
"m - n + 1",
"m - n",
"m",
"n",
"1",
"i++",
"i++",
"i",
"{\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }",
"{\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }",
"int minRemovedChar = 0;",
"minRemovedChar",
"0",
"for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }",
"{\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }",
"if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }",
"S1.charAt(j) != S2.charAt(i + j)",
"S1.charAt(j)",
"S1.charAt",
"S1",
"j",
"S2.charAt(i + j)",
"S2.charAt",
"S2",
"i + j",
"i",
"j",
"{\n minRemovedChar++;\n }",
"minRemovedChar++",
"minRemovedChar",
"ans = Math.min(minRemovedChar, ans)",
"ans",
"Math.min(minRemovedChar, ans)",
"Math.min",
"Math",
"minRemovedChar",
"ans",
"return ans;",
"ans",
"String S1",
"S1",
"String S2",
"S2",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new 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",
"public FastReader() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastReader",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new 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 sc = new FastReader();\n String a = sc.next();\n String b = sc.next();\n if (a.length() <= b.length()) {\n System.out.println(minimumChar(a, b));\n } else {\n System.out.println(minimumChar(b, a));\n }\n }\n\n static int minimumChar(String S1, String S2) {\n int n = S1.length();\n int m = S2.length();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < m - n + 1; i++) {\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }\n\n return ans;\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new 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 sc = new FastReader();\n String a = sc.next();\n String b = sc.next();\n if (a.length() <= b.length()) {\n System.out.println(minimumChar(a, b));\n } else {\n System.out.println(minimumChar(b, a));\n }\n }\n\n static int minimumChar(String S1, String S2) {\n int n = S1.length();\n int m = S2.length();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < m - n + 1; i++) {\n int minRemovedChar = 0;\n for (int j = 0; j < n; j++) {\n if (S1.charAt(j) != S2.charAt(i + j)) {\n minRemovedChar++;\n }\n }\n\n ans = Math.min(minRemovedChar, ans);\n }\n\n return ans;\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new 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.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
FastReader sc = new FastReader();
String a = sc.next();
String b = sc.next();
if (a.length() <= b.length()) {
System.out.println(minimumChar(a, b));
} else {
System.out.println(minimumChar(b, a));
}
}
static int minimumChar(String S1, String S2) {
int n = S1.length();
int m = S2.length();
int ans = Integer.MAX_VALUE;
for (int i = 0; i < m - n + 1; i++) {
int minRemovedChar = 0;
for (int j = 0; j < n; j++) {
if (S1.charAt(j) != S2.charAt(i + j)) {
minRemovedChar++;
}
}
ans = Math.min(minRemovedChar, ans);
}
return ans;
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public 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,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
41,
13,
18,
13,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
18,
13,
13,
18,
13,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
13,
2,
13,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
40,
13,
18,
13,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
13,
13,
0,
13,
17,
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
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
16,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
16,
39
],
[
39,
40
],
[
39,
41
],
[
16,
42
],
[
42,
43
],
[
42,
44
],
[
16,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
45,
61
],
[
61,
62
],
[
62,
63
],
[
45,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
66,
78
],
[
78,
79
],
[
79,
80
],
[
66,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
83,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
65,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
98,
102
],
[
65,
103
],
[
103,
104
],
[
103,
105
],
[
65,
106
],
[
106,
107
],
[
106,
108
],
[
16,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
9,
115
],
[
115,
116
]
]
| [
"import java.io.*;\nimport java.util.*;\nclass Main\n{\n\tpublic static void main(String args[]) throws IOException\n\t{\n\t\ttry{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tchar a[]=br.readLine().toCharArray();\n\t\tchar b[]=br.readLine().toCharArray();\n\t\tint ans=Integer.MAX_VALUE;int cou=0;int ind=0;\n\t\tfor(int i=0;i<a.length-b.length+1;i++)\n\t\t{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tcatch(Exception e){}\n}}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n\tpublic static void main(String args[]) throws IOException\n\t{\n\t\ttry{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tchar a[]=br.readLine().toCharArray();\n\t\tchar b[]=br.readLine().toCharArray();\n\t\tint ans=Integer.MAX_VALUE;int cou=0;int ind=0;\n\t\tfor(int i=0;i<a.length-b.length+1;i++)\n\t\t{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tcatch(Exception e){}\n}}",
"Main",
"public static void main(String args[]) throws IOException\n\t{\n\t\ttry{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tchar a[]=br.readLine().toCharArray();\n\t\tchar b[]=br.readLine().toCharArray();\n\t\tint ans=Integer.MAX_VALUE;int cou=0;int ind=0;\n\t\tfor(int i=0;i<a.length-b.length+1;i++)\n\t\t{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tcatch(Exception e){}\n}",
"main",
"{\n\t\ttry{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tchar a[]=br.readLine().toCharArray();\n\t\tchar b[]=br.readLine().toCharArray();\n\t\tint ans=Integer.MAX_VALUE;int cou=0;int ind=0;\n\t\tfor(int i=0;i<a.length-b.length+1;i++)\n\t\t{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tcatch(Exception e){}\n}",
"try{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tchar a[]=br.readLine().toCharArray();\n\t\tchar b[]=br.readLine().toCharArray();\n\t\tint ans=Integer.MAX_VALUE;int cou=0;int ind=0;\n\t\tfor(int i=0;i<a.length-b.length+1;i++)\n\t\t{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\tcatch(Exception e){}",
"catch(Exception e){}",
"Exception e",
"{}",
"{\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tchar a[]=br.readLine().toCharArray();\n\t\tchar b[]=br.readLine().toCharArray();\n\t\tint ans=Integer.MAX_VALUE;int cou=0;int ind=0;\n\t\tfor(int i=0;i<a.length-b.length+1;i++)\n\t\t{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"char a[]=br.readLine().toCharArray();",
"a",
"br.readLine().toCharArray()",
"br.readLine().toCharArray",
"br.readLine()",
"br.readLine",
"br",
"char b[]=br.readLine().toCharArray();",
"b",
"br.readLine().toCharArray()",
"br.readLine().toCharArray",
"br.readLine()",
"br.readLine",
"br",
"int ans=Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"int cou=0;",
"cou",
"0",
"int ind=0;",
"ind",
"0",
"for(int i=0;i<a.length-b.length+1;i++)\n\t\t{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length-b.length+1",
"i",
"a.length-b.length+1",
"a.length-b.length",
"a.length",
"a",
"a.length",
"b.length",
"b",
"b.length",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}",
"{\n\t\t\t//System.out.print(a[i]+\",\");\n\t\t\tfor(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//System.out.println(cou);\n\t\t\tans=Math.min(cou,ans);\n\t\t\tind=0;cou=0;\n\t\t}",
"for(int j=i;j<i+b.length;j++)\n\t\t\t{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}",
"int j=i;",
"int j=i;",
"j",
"i",
"j<i+b.length",
"j",
"i+b.length",
"i",
"b.length",
"b",
"b.length",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}\n\t\t\t}",
"if(b[ind++]!=a[j])\n\t\t\t\t{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}",
"b[ind++]!=a[j]",
"b[ind++]",
"b",
"ind++",
"ind",
"a[j]",
"a",
"j",
"{\n\t\t\t\t\tcou+=1;\n\t\t\t\t}",
"cou+=1",
"cou",
"1",
"ans=Math.min(cou,ans)",
"ans",
"Math.min(cou,ans)",
"Math.min",
"Math",
"cou",
"ans",
"ind=0",
"ind",
"0",
"cou=0",
"cou",
"0",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String args[]",
"args"
]
| import java.io.*;
import java.util.*;
class Main
{
public static void main(String args[]) throws IOException
{
try{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
char a[]=br.readLine().toCharArray();
char b[]=br.readLine().toCharArray();
int ans=Integer.MAX_VALUE;int cou=0;int ind=0;
for(int i=0;i<a.length-b.length+1;i++)
{
//System.out.print(a[i]+",");
for(int j=i;j<i+b.length;j++)
{
if(b[ind++]!=a[j])
{
cou+=1;
}
}
//System.out.println(cou);
ans=Math.min(cou,ans);
ind=0;cou=0;
}
System.out.println(ans);
}
catch(Exception e){}
}} |
[
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,
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,
14,
2,
2,
13,
13,
4,
18,
13,
30,
0,
13,
17,
3,
14,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
40,
13,
14,
2,
13,
17,
3,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
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,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
286,
14
],
[
286,
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
],
[
37,
39
],
[
17,
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
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
58,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
72,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
87,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
86,
98
],
[
98,
99
],
[
54,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
54,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
107,
111
],
[
17,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
15,
118
],
[
118,
119
],
[
286,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
126,
128
],
[
126,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
122,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
122,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
145,
147
],
[
138,
148
],
[
148,
149
],
[
149,
150
],
[
138,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
120,
160
],
[
160,
161
],
[
286,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
168,
169
],
[
168,
170
],
[
168,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
164,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
176,
180
],
[
180,
181
],
[
181,
182
],
[
164,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
183,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
190,
192
],
[
183,
193
],
[
193,
194
],
[
194,
195
],
[
183,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
162,
205
],
[
205,
206
],
[
286,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
209,
211
],
[
207,
212
],
[
212,
213
],
[
212,
214
],
[
207,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
218,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
223,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
217,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
207,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
242,
245
],
[
245,
246
],
[
207,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
249,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
254,
259
],
[
259,
260
],
[
259,
261
],
[
254,
262
],
[
262,
263
],
[
263,
264
],
[
254,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
270,
271
],
[
249,
272
],
[
272,
273
],
[
247,
274
],
[
274,
275
],
[
207,
276
],
[
276,
277
],
[
276,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
280,
283
],
[
283,
284
],
[
0,
285
],
[
285,
286
],
[
285,
287
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.*;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int count=0;\n int flag=0;\n int min=(int)1e5;\n for (int i=0;i<s.length();i++){\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }\n System.out.println(min);\n\n\n }\n\n\n\n\n\n static void sort(int[] a) {\n ArrayList<Integer> l=new ArrayList<>();\n for (int i:a) l.add(i);\n Collections.sort(l);\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n static void sortReverse(long[] a) {\n ArrayList<Long> l=new ArrayList<>();\n for (long i:a) l.add(i);\n// Collections.sort.(l);\n Collections.sort(l,Collections.reverseOrder());\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\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.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int count=0;\n int flag=0;\n int min=(int)1e5;\n for (int i=0;i<s.length();i++){\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }\n System.out.println(min);\n\n\n }\n\n\n\n\n\n static void sort(int[] a) {\n ArrayList<Integer> l=new ArrayList<>();\n for (int i:a) l.add(i);\n Collections.sort(l);\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n static void sortReverse(long[] a) {\n ArrayList<Long> l=new ArrayList<>();\n for (long i:a) l.add(i);\n// Collections.sort.(l);\n Collections.sort(l,Collections.reverseOrder());\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int count=0;\n int flag=0;\n int min=(int)1e5;\n for (int i=0;i<s.length();i++){\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }\n System.out.println(min);\n\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int count=0;\n int flag=0;\n int min=(int)1e5;\n for (int i=0;i<s.length();i++){\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }\n System.out.println(min);\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 t=sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int count=0;",
"count",
"0",
"int flag=0;",
"flag",
"0",
"int min=(int)1e5;",
"min",
"(int)1e5",
"for (int i=0;i<s.length();i++){\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }",
"{\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }",
"count=0",
"count",
"0",
"for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }",
"{\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }",
"if ((i+j)>=s.length()){\n flag=1;\n break;\n }",
"(i+j)>=s.length()",
"(i+j)",
"i",
"j",
"s.length()",
"s.length",
"s",
"{\n flag=1;\n break;\n }",
"flag=1",
"flag",
"1",
"break;",
"if (t.charAt(j)!=s.charAt(j+i))count++;",
"t.charAt(j)!=s.charAt(j+i)",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"s.charAt(j+i)",
"s.charAt",
"s",
"j+i",
"j",
"i",
"count++",
"count",
"if (flag==1)break;",
"flag==1",
"flag",
"1",
"break;",
"min=Math.min(min,count)",
"min",
"Math.min(min,count)",
"Math.min",
"Math",
"min",
"count",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"static void sort(int[] a) {\n ArrayList<Integer> l=new ArrayList<>();\n for (int i:a) l.add(i);\n Collections.sort(l);\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }",
"sort",
"{\n ArrayList<Integer> l=new ArrayList<>();\n for (int i:a) l.add(i);\n Collections.sort(l);\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }",
"ArrayList<Integer> l=new ArrayList<>();",
"l",
"new ArrayList<>()",
"for (int i:a) l.add(i);",
"int i",
"a",
"l.add(i);",
"l.add(i)",
"l.add",
"l",
"i",
"Collections.sort(l)",
"Collections.sort",
"Collections",
"l",
"for (int i=0; i<a.length; i++) a[i]=l.get(i);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i]=l.get(i);",
"a[i]=l.get(i)",
"a[i]",
"a",
"i",
"l.get(i)",
"l.get",
"l",
"i",
"int[] a",
"a",
"static void sortReverse(long[] a) {\n ArrayList<Long> l=new ArrayList<>();\n for (long i:a) l.add(i);\n// Collections.sort.(l);\n Collections.sort(l,Collections.reverseOrder());\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }",
"sortReverse",
"{\n ArrayList<Long> l=new ArrayList<>();\n for (long i:a) l.add(i);\n// Collections.sort.(l);\n Collections.sort(l,Collections.reverseOrder());\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }",
"ArrayList<Long> l=new ArrayList<>();",
"l",
"new ArrayList<>()",
"for (long i:a) l.add(i);",
"long i",
"a",
"l.add(i);",
"l.add(i)",
"l.add",
"l",
"i",
"Collections.sort(l,Collections.reverseOrder())",
"Collections.sort",
"Collections",
"l",
"Collections.reverseOrder()",
"Collections.reverseOrder",
"Collections",
"for (int i=0; i<a.length; i++) a[i]=l.get(i);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i]=l.get(i);",
"a[i]=l.get(i)",
"a[i]",
"a",
"i",
"l.get(i)",
"l.get",
"l",
"i",
"long[] a",
"a",
"static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"next",
"{\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"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",
"int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"readArray",
"{\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"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",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int count=0;\n int flag=0;\n int min=(int)1e5;\n for (int i=0;i<s.length();i++){\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }\n System.out.println(min);\n\n\n }\n\n\n\n\n\n static void sort(int[] a) {\n ArrayList<Integer> l=new ArrayList<>();\n for (int i:a) l.add(i);\n Collections.sort(l);\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n static void sortReverse(long[] a) {\n ArrayList<Long> l=new ArrayList<>();\n for (long i:a) l.add(i);\n// Collections.sort.(l);\n Collections.sort(l,Collections.reverseOrder());\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\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 String t=sc.next();\n int count=0;\n int flag=0;\n int min=(int)1e5;\n for (int i=0;i<s.length();i++){\n count=0;\n for (int j=0;j<t.length();j++){\n if ((i+j)>=s.length()){\n flag=1;\n break;\n }\n if (t.charAt(j)!=s.charAt(j+i))count++;\n }\n if (flag==1)break;\n min=Math.min(min,count);\n }\n System.out.println(min);\n\n\n }\n\n\n\n\n\n static void sort(int[] a) {\n ArrayList<Integer> l=new ArrayList<>();\n for (int i:a) l.add(i);\n Collections.sort(l);\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n static void sortReverse(long[] a) {\n ArrayList<Long> l=new ArrayList<>();\n for (long i:a) l.add(i);\n// Collections.sort.(l);\n Collections.sort(l,Collections.reverseOrder());\n for (int i=0; i<a.length; i++) a[i]=l.get(i);\n }\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n long nextLong() {\n return Long.parseLong(next());\n }\n }\n\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s=sc.next();
String t=sc.next();
int count=0;
int flag=0;
int min=(int)1e5;
for (int i=0;i<s.length();i++){
count=0;
for (int j=0;j<t.length();j++){
if ((i+j)>=s.length()){
flag=1;
break;
}
if (t.charAt(j)!=s.charAt(j+i))count++;
}
if (flag==1)break;
min=Math.min(min,count);
}
System.out.println(min);
}
static void sort(int[] a) {
ArrayList<Integer> l=new ArrayList<>();
for (int i:a) l.add(i);
Collections.sort(l);
for (int i=0; i<a.length; i++) a[i]=l.get(i);
}
static void sortReverse(long[] a) {
ArrayList<Long> l=new ArrayList<>();
for (long i:a) l.add(i);
// Collections.sort.(l);
Collections.sort(l,Collections.reverseOrder());
for (int i=0; i<a.length; i++) a[i]=l.get(i);
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String next() {
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
long nextLong() {
return Long.parseLong(next());
}
}
}
|
[
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,
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,
20,
12,
13,
30,
0,
18,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
2,
18,
13,
2,
13,
17,
13,
13,
0,
18,
13,
13,
2,
13,
2,
2,
18,
13,
2,
13,
13,
2,
13,
13,
13,
0,
18,
13,
13,
2,
2,
18,
13,
2,
13,
17,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
17,
14,
2,
2,
13,
17,
2,
13,
17,
29,
17,
29,
2,
2,
18,
13,
13,
2,
2,
18,
13,
13,
18,
13,
2,
13,
13,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
13,
29,
2,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
13,
4,
13,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
13,
13,
2,
13,
17,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
0,
13,
17,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
4,
13,
23,
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,
2,
4,
18,
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,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
0,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
37,
20,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
20,
2,
13,
17,
0,
18,
36,
13,
20,
2,
13,
17,
4,
18,
13,
13,
40,
17,
4,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
13,
4,
13,
13,
4,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
17,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
14,
2,
18,
13,
13,
18,
13,
13,
40,
18,
13,
13,
29,
17,
23,
13,
23,
13,
12,
13,
30,
29,
2,
4,
13,
13,
4,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
18,
13,
13,
17,
29,
13,
29,
0,
13,
4,
13,
18,
13,
13,
23,
13,
12,
13,
30,
29,
40,
18,
13,
4,
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
],
[
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
],
[
46,
47
],
[
46,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
],
[
0,
55
],
[
55,
56
],
[
55,
57
],
[
0,
58
],
[
58,
59
],
[
58,
60
],
[
0,
61
],
[
61,
62
],
[
61,
63
],
[
0,
64
],
[
64,
65
],
[
64,
66
],
[
0,
67
],
[
67,
68
],
[
67,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
],
[
0,
73
],
[
861,
74
],
[
861,
75
],
[
75,
76
],
[
75,
77
],
[
861,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
80,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
80,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
80,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
104,
112
],
[
112,
113
],
[
113,
114
],
[
104,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
122,
128
],
[
121,
129
],
[
116,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
137,
143
],
[
143,
144
],
[
143,
145
],
[
136,
146
],
[
116,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
147,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
155,
157
],
[
152,
158
],
[
158,
159
],
[
158,
160
],
[
151,
161
],
[
78,
162
],
[
162,
163
],
[
78,
164
],
[
164,
165
],
[
78,
166
],
[
166,
167
],
[
78,
168
],
[
168,
169
],
[
78,
170
],
[
170,
171
],
[
861,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
179,
180
],
[
174,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
186,
188
],
[
181,
189
],
[
189,
190
],
[
174,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
193,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
204,
206
],
[
197,
207
],
[
192,
208
],
[
172,
209
],
[
209,
210
],
[
172,
211
],
[
211,
212
],
[
172,
213
],
[
213,
214
],
[
172,
215
],
[
215,
216
],
[
172,
217
],
[
217,
218
],
[
861,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
222,
226
],
[
226,
227
],
[
222,
228
],
[
228,
229
],
[
219,
230
],
[
230,
231
],
[
219,
232
],
[
232,
233
],
[
861,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
241,
242
],
[
237,
243
],
[
243,
244
],
[
234,
245
],
[
245,
246
],
[
234,
247
],
[
247,
248
],
[
861,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
254,
256
],
[
251,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
261
],
[
261,
262
],
[
261,
263
],
[
251,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
249,
268
],
[
268,
269
],
[
249,
270
],
[
270,
271
],
[
249,
272
],
[
272,
273
],
[
861,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
283,
284
],
[
283,
285
],
[
283,
286
],
[
278,
287
],
[
274,
288
],
[
288,
289
],
[
274,
290
],
[
290,
291
],
[
274,
292
],
[
292,
293
],
[
861,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
298,
301
],
[
301,
302
],
[
301,
303
],
[
298,
304
],
[
294,
305
],
[
305,
306
],
[
294,
307
],
[
307,
308
],
[
861,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
311,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
315,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
322,
323
],
[
322,
324
],
[
321,
325
],
[
320,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
319,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
335,
339
],
[
319,
340
],
[
340,
341
],
[
340,
342
],
[
311,
343
],
[
343,
344
],
[
309,
345
],
[
345,
346
],
[
309,
347
],
[
347,
348
],
[
309,
349
],
[
349,
350
],
[
861,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
354,
355
],
[
351,
356
],
[
356,
357
],
[
861,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
367,
368
],
[
360,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
372,
373
],
[
360,
374
],
[
374,
375
],
[
374,
376
],
[
376,
377
],
[
377,
378
],
[
360,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
381,
383
],
[
379,
384
],
[
384,
385
],
[
384,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
386,
390
],
[
390,
391
],
[
391,
392
],
[
379,
393
],
[
393,
394
],
[
394,
395
],
[
379,
396
],
[
397,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
397,
401
],
[
401,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
401,
406
],
[
406,
407
],
[
406,
408
],
[
408,
409
],
[
409,
410
],
[
401,
411
],
[
411,
412
],
[
412,
413
],
[
401,
414
],
[
415,
415
],
[
415,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
419,
420
],
[
418,
421
],
[
421,
422
],
[
421,
423
],
[
417,
424
],
[
424,
425
],
[
425,
426
],
[
424,
427
],
[
416,
428
],
[
428,
429
],
[
397,
430
],
[
430,
431
],
[
430,
432
],
[
432,
433
],
[
433,
434
],
[
432,
435
],
[
432,
436
],
[
360,
437
],
[
437,
438
],
[
438,
439
],
[
439,
440
],
[
439,
441
],
[
437,
442
],
[
861,
443
],
[
443,
444
],
[
443,
445
],
[
445,
446
],
[
443,
447
],
[
447,
448
],
[
447,
449
],
[
443,
451
],
[
451,
452
],
[
451,
453
],
[
443,
454
],
[
454,
455
],
[
454,
456
],
[
443,
457
],
[
457,
458
],
[
457,
459
],
[
459,
460
],
[
460,
461
],
[
460,
462
],
[
457,
463
],
[
463,
464
],
[
443,
465
],
[
465,
466
],
[
465,
467
],
[
467,
468
],
[
468,
469
],
[
469,
470
],
[
469,
471
],
[
468,
472
],
[
472,
473
],
[
473,
474
],
[
468,
475
],
[
475,
476
],
[
476,
477
],
[
476,
478
],
[
475,
479
],
[
479,
480
],
[
480,
481
],
[
480,
482
],
[
482,
483
],
[
483,
484
],
[
484,
485
],
[
479,
486
],
[
486,
487
],
[
487,
488
],
[
487,
489
],
[
489,
490
],
[
490,
491
],
[
489,
492
],
[
475,
493
],
[
493,
494
],
[
494,
495
],
[
494,
496
],
[
493,
497
],
[
497,
498
],
[
498,
499
],
[
467,
500
],
[
500,
501
],
[
443,
502
],
[
502,
503
],
[
502,
504
],
[
504,
505
],
[
505,
506
],
[
506,
507
],
[
505,
508
],
[
508,
509
],
[
509,
510
],
[
509,
511
],
[
511,
512
],
[
505,
513
],
[
513,
514
],
[
514,
515
],
[
443,
516
],
[
516,
517
],
[
516,
518
],
[
518,
519
],
[
519,
520
],
[
520,
521
],
[
521,
522
],
[
521,
523
],
[
520,
524
],
[
524,
525
],
[
524,
526
],
[
516,
527
],
[
527,
528
],
[
443,
529
],
[
529,
530
],
[
529,
531
],
[
531,
532
],
[
532,
533
],
[
533,
534
],
[
534,
535
],
[
533,
536
],
[
536,
537
],
[
537,
538
],
[
537,
539
],
[
539,
540
],
[
539,
541
],
[
532,
542
],
[
542,
543
],
[
531,
544
],
[
544,
545
],
[
545,
546
],
[
443,
547
],
[
547,
548
],
[
547,
549
],
[
549,
550
],
[
550,
551
],
[
551,
552
],
[
552,
553
],
[
550,
554
],
[
554,
555
],
[
549,
556
],
[
556,
557
],
[
556,
558
],
[
549,
559
],
[
559,
560
],
[
559,
561
],
[
561,
562
],
[
549,
563
],
[
563,
564
],
[
564,
565
],
[
564,
566
],
[
563,
567
],
[
567,
568
],
[
568,
569
],
[
569,
570
],
[
568,
571
],
[
567,
572
],
[
572,
573
],
[
572,
574
],
[
574,
575
],
[
549,
576
],
[
576,
577
],
[
577,
578
],
[
578,
579
],
[
443,
580
],
[
580,
581
],
[
580,
582
],
[
582,
583
],
[
583,
584
],
[
584,
585
],
[
585,
586
],
[
583,
587
],
[
587,
588
],
[
582,
589
],
[
589,
590
],
[
589,
591
],
[
582,
592
],
[
592,
593
],
[
592,
594
],
[
582,
595
],
[
595,
596
],
[
595,
597
],
[
597,
598
],
[
582,
599
],
[
599,
600
],
[
600,
601
],
[
600,
602
],
[
599,
603
],
[
603,
604
],
[
604,
605
],
[
604,
606
],
[
603,
607
],
[
607,
608
],
[
607,
609
],
[
609,
610
],
[
582,
611
],
[
611,
612
],
[
612,
613
],
[
613,
614
],
[
613,
615
],
[
612,
616
],
[
616,
617
],
[
616,
618
],
[
611,
619
],
[
619,
620
],
[
620,
621
],
[
582,
622
],
[
622,
623
],
[
622,
624
],
[
624,
625
],
[
625,
626
],
[
626,
627
],
[
627,
628
],
[
627,
629
],
[
626,
630
],
[
630,
631
],
[
630,
632
],
[
625,
633
],
[
633,
634
],
[
634,
635
],
[
634,
636
],
[
633,
637
],
[
637,
638
],
[
637,
639
],
[
639,
640
],
[
639,
641
],
[
625,
642
],
[
642,
643
],
[
643,
644
],
[
644,
645
],
[
644,
646
],
[
646,
647
],
[
643,
648
],
[
648,
649
],
[
649,
650
],
[
649,
651
],
[
642,
652
],
[
652,
653
],
[
653,
654
],
[
654,
655
],
[
654,
656
],
[
656,
657
],
[
654,
658
],
[
642,
659
],
[
659,
660
],
[
660,
661
],
[
624,
662
],
[
662,
663
],
[
662,
664
],
[
664,
665
],
[
443,
666
],
[
666,
667
],
[
666,
668
],
[
668,
669
],
[
669,
670
],
[
669,
671
],
[
671,
672
],
[
668,
673
],
[
673,
674
],
[
674,
675
],
[
675,
676
],
[
675,
677
],
[
677,
678
],
[
677,
679
],
[
674,
680
],
[
680,
681
],
[
680,
682
],
[
682,
683
],
[
682,
684
],
[
673,
685
],
[
685,
686
],
[
668,
687
],
[
687,
688
],
[
443,
689
],
[
689,
690
],
[
689,
691
],
[
691,
692
],
[
692,
693
],
[
693,
694
],
[
694,
695
],
[
693,
696
],
[
696,
697
],
[
861,
698
],
[
698,
699
],
[
698,
700
],
[
700,
701
],
[
698,
702
],
[
702,
703
],
[
698,
704
],
[
704,
705
],
[
704,
706
],
[
706,
707
],
[
707,
708
],
[
708,
709
],
[
708,
710
],
[
707,
711
],
[
712,
713
],
[
712,
714
],
[
706,
715
],
[
715,
716
],
[
716,
717
],
[
716,
718
],
[
715,
719
],
[
720,
721
],
[
720,
722
],
[
706,
723
],
[
723,
724
],
[
724,
725
],
[
723,
726
],
[
723,
727
],
[
727,
728
],
[
706,
729
],
[
729,
730
],
[
730,
731
],
[
729,
732
],
[
729,
733
],
[
704,
734
],
[
734,
735
],
[
698,
736
],
[
736,
737
],
[
736,
738
],
[
738,
739
],
[
739,
740
],
[
739,
741
],
[
741,
742
],
[
741,
743
],
[
739,
744
],
[
744,
745
],
[
744,
746
],
[
736,
747
],
[
747,
748
],
[
736,
749
],
[
749,
750
],
[
698,
751
],
[
751,
752
],
[
751,
753
],
[
753,
754
],
[
754,
755
],
[
755,
756
],
[
755,
757
],
[
754,
758
],
[
758,
759
],
[
753,
760
],
[
760,
761
],
[
761,
762
],
[
762,
763
],
[
762,
764
],
[
761,
765
],
[
765,
766
],
[
765,
767
],
[
760,
768
],
[
768,
769
],
[
769,
770
],
[
770,
771
],
[
770,
772
],
[
769,
773
],
[
773,
774
],
[
773,
775
],
[
768,
776
],
[
776,
777
],
[
777,
778
],
[
777,
779
],
[
776,
780
],
[
760,
781
],
[
781,
782
],
[
782,
783
],
[
783,
784
],
[
783,
785
],
[
782,
786
],
[
786,
787
],
[
786,
788
],
[
781,
789
],
[
789,
790
],
[
790,
791
],
[
790,
792
],
[
789,
793
],
[
781,
794
],
[
794,
795
],
[
795,
796
],
[
796,
797
],
[
796,
798
],
[
795,
799
],
[
799,
800
],
[
799,
801
],
[
794,
802
],
[
802,
803
],
[
803,
804
],
[
803,
805
],
[
753,
806
],
[
806,
807
],
[
751,
808
],
[
808,
809
],
[
751,
810
],
[
810,
811
],
[
698,
812
],
[
812,
813
],
[
812,
814
],
[
814,
815
],
[
815,
816
],
[
816,
817
],
[
817,
818
],
[
817,
819
],
[
816,
820
],
[
820,
821
],
[
820,
822
],
[
812,
823
],
[
823,
824
],
[
812,
825
],
[
825,
826
],
[
698,
827
],
[
827,
828
],
[
827,
829
],
[
829,
830
],
[
830,
831
],
[
831,
832
],
[
832,
833
],
[
832,
834
],
[
831,
835
],
[
830,
836
],
[
836,
837
],
[
830,
838
],
[
838,
839
],
[
839,
840
],
[
839,
841
],
[
841,
842
],
[
841,
843
],
[
843,
844
],
[
843,
845
],
[
827,
846
],
[
846,
847
],
[
698,
848
],
[
848,
849
],
[
848,
850
],
[
850,
851
],
[
851,
852
],
[
852,
853
],
[
853,
854
],
[
853,
855
],
[
855,
856
],
[
855,
857
],
[
848,
858
],
[
858,
859
],
[
0,
860
],
[
860,
861
],
[
860,
862
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.BitSet;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.Deque;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.NoSuchElementException;\nimport java.util.Objects;\nimport java.util.PriorityQueue;\nimport java.util.Queue;\nimport java.util.Scanner;\nimport java.util.Set;\nimport java.util.TreeMap;\nimport java.util.TreeSet;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc177_b();\n\t}\n \n \t\tpublic static void solve_abc177_b() {\n\t\n\t\t\tFastScanner sc = new FastScanner(System.in);\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tint nmin = t.length();\n\t\t\t\n\t\t\tfor(int i=0;i<=s.length() - t.length();i++){\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(nmin);\n\t\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.BitSet;",
"BitSet",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Comparator;",
"Comparator",
"java.util",
"import java.util.Deque;",
"Deque",
"java.util",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.Map.Entry;",
"Entry",
"java.util.Map",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"import java.util.Objects;",
"Objects",
"java.util",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"import java.util.Queue;",
"Queue",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"import java.util.TreeMap;",
"TreeMap",
"java.util",
"import java.util.TreeSet;",
"TreeSet",
"java.util",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc177_b();\n\t}\n \n \t\tpublic static void solve_abc177_b() {\n\t\n\t\t\tFastScanner sc = new FastScanner(System.in);\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tint nmin = t.length();\n\t\t\t\n\t\t\tfor(int i=0;i<=s.length() - t.length();i++){\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(nmin);\n\t\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}",
"hz_COMinit",
"{\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}",
"fac[0] = fac[1] = 1L",
"fac[0]",
"fac",
"0",
"fac[1] = 1L",
"fac[1]",
"fac",
"1",
"1L",
"finv[0] = finv[1] = 1L",
"finv[0]",
"finv",
"0",
"finv[1] = 1L",
"finv[1]",
"finv",
"1",
"1L",
"inv[1] = 1L",
"inv[1]",
"inv",
"1",
"1L",
"for (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < MAX",
"i",
"MAX",
"i++",
"i++",
"i",
"{\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}",
"{\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}",
"fac[i] = fac[i - 1] * i % MOD",
"fac[i]",
"fac",
"i",
"fac[i - 1] * i % MOD",
"fac[i - 1] * i",
"fac[i - 1]",
"fac",
"i - 1",
"i",
"1",
"i",
"MOD",
"inv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD",
"inv[i]",
"inv",
"i",
"MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD",
"MOD",
"inv[(int) (MOD % i)] * (MOD / i) % MOD",
"inv[(int) (MOD % i)] * (MOD / i)",
"inv[(int) (MOD % i)]",
"inv",
"(int) (MOD % i)",
"MOD",
"i",
"(MOD / i)",
"MOD",
"i",
"MOD",
"finv[i] = finv[i - 1] * inv[i] % MOD",
"finv[i]",
"finv",
"i",
"finv[i - 1] * inv[i] % MOD",
"finv[i - 1] * inv[i]",
"finv[i - 1]",
"finv",
"i - 1",
"i",
"1",
"inv[i]",
"inv",
"i",
"MOD",
"long fac[]",
"fac",
"long finv[]",
"finv",
"long inv[]",
"inv",
"final int MAX",
"MAX",
"final long MOD",
"MOD",
"/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}",
"hz_COM",
"{\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}",
"if (n < k)\n\t\t\treturn 0;",
"n < k",
"n",
"k",
"return 0;",
"0",
"if (n < 0 || k < 0)\n\t\t\treturn 0;",
"n < 0 || k < 0",
"n < 0",
"n",
"0",
"k < 0",
"k",
"0",
"return 0;",
"0",
"return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;",
"fac[n] * (finv[k] * finv[n - k] % MOD) % MOD",
"fac[n] * (finv[k] * finv[n - k] % MOD)",
"fac[n]",
"fac",
"n",
"(finv[k] * finv[n - k] % MOD)",
"finv[k] * finv[n - k]",
"finv[k]",
"finv",
"k",
"finv[n - k]",
"finv",
"n - k",
"n",
"k",
"MOD",
"MOD",
"long fac[]",
"fac",
"long finv[]",
"finv",
"int n",
"n",
"int k",
"k",
"final long MOD",
"MOD",
"static int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"hz_swap",
"{\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"if (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;",
"a >= b",
"a",
"b",
"return a;",
"a",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"static long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"hz_swap",
"{\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"if (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;",
"a >= b",
"a",
"b",
"return a;",
"a",
"return b;",
"b",
"long a",
"a",
"long b",
"b",
"// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}",
"hz_modSub",
"{\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}",
"long v = a - b;",
"v",
"a - b",
"a",
"b",
"if (v < 0)\n\t\t\tv += mod;",
"v < 0",
"v",
"0",
"v += mod",
"v",
"mod",
"return v % mod;",
"v % mod",
"v",
"mod",
"long a",
"a",
"long b",
"b",
"long mod",
"mod",
"// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}",
"hz_modDiv",
"{\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}",
"return (a % mod) * hz_modInv(b, mod) % mod;",
"(a % mod) * hz_modInv(b, mod) % mod",
"(a % mod) * hz_modInv(b, mod)",
"(a % mod)",
"a",
"mod",
"hz_modInv(b, mod)",
"hz_modInv",
"b",
"mod",
"mod",
"long a",
"a",
"long b",
"b",
"long mod",
"mod",
"// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}",
"hz_modInv",
"{\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}",
"return hz_modPow(a, mod - 2L, mod);",
"hz_modPow(a, mod - 2L, mod)",
"hz_modPow",
"a",
"mod - 2L",
"mod",
"2L",
"mod",
"long a",
"a",
"long mod",
"mod",
"// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}",
"hz_modPow",
"{\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}",
"long result = 1L;",
"result",
"1L",
"while (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}",
"k > 0L",
"k",
"0L",
"{\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}",
"if ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;",
"(k & 1L) == 1L",
"(k & 1L)",
"k",
"1L",
"1L",
"result = (result * n) % mod",
"result",
"(result * n) % mod",
"(result * n)",
"result",
"n",
"mod",
"n = n * n % mod",
"n",
"n * n % mod",
"n * n",
"n",
"n",
"mod",
"k >>= 1L",
"k",
"1L",
"return result;",
"result",
"long n",
"n",
"long k",
"k",
"long mod",
"mod",
"public static void main(String[] args) {\n\n\t\tsolve_abc177_b();\n\t}",
"main",
"{\n\n\t\tsolve_abc177_b();\n\t}",
"solve_abc177_b()",
"solve_abc177_b",
"String[] args",
"args",
"public static void solve_abc177_b() {\n\t\n\t\t\tFastScanner sc = new FastScanner(System.in);\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tint nmin = t.length();\n\t\t\t\n\t\t\tfor(int i=0;i<=s.length() - t.length();i++){\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(nmin);\n\t\t}",
"solve_abc177_b",
"{\n\t\n\t\t\tFastScanner sc = new FastScanner(System.in);\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tint nmin = t.length();\n\t\t\t\n\t\t\tfor(int i=0;i<=s.length() - t.length();i++){\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(nmin);\n\t\t}",
"FastScanner sc = new FastScanner(System.in);",
"sc",
"new FastScanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int nmin = t.length();",
"nmin",
"t.length()",
"t.length",
"t",
"for(int i=0;i<=s.length() - t.length();i++){\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}",
"{\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}",
"int n = 0;",
"n",
"0",
"for(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}",
"{\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}",
"if(s.charAt(i+j) != t.charAt(j)) n++;",
"s.charAt(i+j) != t.charAt(j)",
"s.charAt(i+j)",
"s.charAt",
"s",
"i+j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"n++",
"n",
"nmin = Math.min(nmin, n)",
"nmin",
"Math.min(nmin, n)",
"Math.min",
"Math",
"nmin",
"n",
"System.out.println(nmin)",
"System.out.println",
"System.out",
"System",
"System.out",
"nmin",
"static class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}",
"FastScanner",
"private final InputStream in;",
"in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"public FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}",
"FastScanner",
"{\n\t\t\tin = source;\n\t\t}",
"in = source",
"in",
"source",
"InputStream source",
"source",
"private boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"hasNextByte",
"{\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"if (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"ptr < buflen",
"ptr",
"buflen",
"{\n\t\t\t\treturn true;\n\t\t\t}",
"return true;",
"true",
"{\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"ptr = 0",
"ptr",
"0",
"try {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t}",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"buflen <= 0",
"buflen",
"0",
"{\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}",
"readByte",
"{\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}",
"if (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}",
"isPrintableChar",
"{\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}",
"hasNext",
"{\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}",
"while (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"ptr++",
"ptr",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"next",
"{\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"if (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}",
"nextLong",
"{\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}",
"if (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"b == '-'",
"b",
"'-'",
"{\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}",
"true",
"{\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}",
"if ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t}",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t}",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}",
"nextInt",
"{\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"static class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}",
"HZ_UF",
"public int[] par;",
"par",
"public int[] rank;",
"rank",
"public HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}",
"HZ_UF",
"{\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}",
"this.par = new int[n + 1]",
"this.par",
"this",
"this.par",
"new int[n + 1]",
"n + 1",
"n",
"1",
"this.rank = new int[n + 1]",
"this.rank",
"this",
"this.rank",
"new int[n + 1]",
"n + 1",
"n",
"1",
"Arrays.fill(par, -1)",
"Arrays.fill",
"Arrays",
"par",
"-1",
"1",
"Arrays.fill(rank, 0)",
"Arrays.fill",
"Arrays",
"rank",
"0",
"int n",
"n",
"public void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}",
"unite",
"{\n\t\t\tlink(root(x), root(y));\n\t\t}",
"link(root(x), root(y))",
"link",
"root(x)",
"root",
"x",
"root(y)",
"root",
"y",
"int x",
"x",
"int y",
"y",
"public boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"link",
"{\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"if (x == y)\n\t\t\t\treturn false;",
"x == y",
"x",
"y",
"return false;",
"false",
"if (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}",
"rank[x] > rank[y]",
"rank[x]",
"rank",
"x",
"rank[y]",
"rank",
"y",
"{\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t}",
"par[x] += par[y]",
"par[x]",
"par",
"x",
"par[y]",
"par",
"y",
"par[y] = x",
"par[y]",
"par",
"y",
"x",
"{\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}",
"par[y] += par[x]",
"par[y]",
"par",
"y",
"par[x]",
"par",
"x",
"par[x] = y",
"par[x]",
"par",
"x",
"y",
"if (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;",
"rank[x] == rank[y]",
"rank[x]",
"rank",
"x",
"rank[y]",
"rank",
"y",
"rank[y]++",
"rank[y]",
"rank",
"y",
"return true;",
"true",
"int x",
"x",
"int y",
"y",
"public boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}",
"isSame",
"{\n\t\t\treturn root(x) == root(y);\n\t\t}",
"return root(x) == root(y);",
"root(x) == root(y)",
"root(x)",
"root",
"x",
"root(y)",
"root",
"y",
"int x",
"x",
"int y",
"y",
"public int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}",
"root",
"{\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}",
"if (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);",
"par[x] < 0",
"par[x]",
"par",
"x",
"0",
"return x;",
"x",
"return x = root(par[x]);",
"x = root(par[x])",
"x",
"root(par[x])",
"root",
"par[x]",
"par",
"x",
"int x",
"x",
"public int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}",
"size",
"{\n\t\t\treturn -par[root(x)];\n\t\t}",
"return -par[root(x)];",
"-par[root(x)]",
"par[root(x)]",
"par",
"root(x)",
"root",
"x",
"int x",
"x",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc177_b();\n\t}\n \n \t\tpublic static void solve_abc177_b() {\n\t\n\t\t\tFastScanner sc = new FastScanner(System.in);\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tint nmin = t.length();\n\t\t\t\n\t\t\tfor(int i=0;i<=s.length() - t.length();i++){\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(nmin);\n\t\t}\n}",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc177_b();\n\t}\n \n \t\tpublic static void solve_abc177_b() {\n\t\n\t\t\tFastScanner sc = new FastScanner(System.in);\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tint nmin = t.length();\n\t\t\t\n\t\t\tfor(int i=0;i<=s.length() - t.length();i++){\n\t\t\t\tint n = 0;\n\t\t\t\tfor(int j=0;j<t.length();j++){\n\t\t\t\t\tif(s.charAt(i+j) != t.charAt(j)) n++;\n\t\t\t\t}\n\t\t\t\tnmin = Math.min(nmin, n);\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(nmin);\n\t\t}\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
public class Main {
static Scanner sc = new Scanner(System.in);
static class FastScanner {
private final InputStream in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
public FastScanner(InputStream source) {
in = source;
}
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
} else {
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() {
if (hasNextByte())
return buffer[ptr++];
else
return -1;
}
private static boolean isPrintableChar(int c) {
return 33 <= c && c <= 126;
}
public boolean hasNext() {
while (hasNextByte() && !isPrintableChar(buffer[ptr]))
ptr++;
return hasNextByte();
}
public String next() {
if (!hasNext())
throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext())
throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while (true) {
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
} else if (b == -1 || !isPrintableChar(b)) {
return minus ? -n : n;
} else {
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
throw new NumberFormatException();
return (int) nl;
}
public double nextDouble() {
return Double.parseDouble(next());
}
}
/**
* Compute n! mod. p, (n!)^(-1) mod.p
*
* @param fac[]
* : n! mod. p
* @param finv[]
* : (n!)^(-1) mod. p
* @param MAX
* :
* @param MOD
* :
*/
static void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {
fac[0] = fac[1] = 1L;
finv[0] = finv[1] = 1L;
inv[1] = 1L;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
/*
* static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,
* final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =
* 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -
* 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).
* longValue(); inv[i] =
* (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).
* multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).
* longValue(); finv[i] = (BigInteger.valueOf(finv[i -
* 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).
* longValue(); } }
*/
/**
* @Compute nCk(二項係数計算) mod. p
* @param fac[]
* : n! mod. p
* @param finv[]
* : (n!)^(-1) mod. p
* @return :nCk(二項係数計算) mod. p
*/
static long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
/*
* static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){
* if (n < k) return 0; if (n < 0 || k < 0) return 0; return
* BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])
* .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))
* ) .mod(BigInteger.valueOf(MOD)).longValue(); }
*/
static int hz_swap(int a, int b) {
if (a >= b)
return a;
else
return b;
}
static long hz_swap(long a, long b) {
if (a >= b)
return a;
else
return b;
}
// mod上での差分
static long hz_modSub(long a, long b, long mod) {
long v = a - b;
if (v < 0)
v += mod;
return v % mod;
}
// mod上での割算
static long hz_modDiv(long a, long b, long mod) {
return (a % mod) * hz_modInv(b, mod) % mod;
}
// 逆元
static long hz_modInv(long a, long mod) {
return hz_modPow(a, mod - 2L, mod);
}
// mod上での累乗
static long hz_modPow(long n, long k, long mod) {
long result = 1L;
// k を右シフトしつつ n を 2 乗していく
while (k > 0L) {
// k の最下ビットが 1 なら、今の n を答えに掛ける
if ((k & 1L) == 1L)
result = (result * n) % mod;
n = n * n % mod;
k >>= 1L;
}
return result;
}
// Union Find Tree
static class HZ_UF {
public int[] par;
public int[] rank;
public HZ_UF(int n) {
this.par = new int[n + 1];
this.rank = new int[n + 1];
Arrays.fill(par, -1);
Arrays.fill(rank, 0);
}
public void unite(int x, int y) {
link(root(x), root(y));
}
public boolean link(int x, int y) {
if (x == y)
return false;
if (rank[x] > rank[y]) {
par[x] += par[y];
par[y] = x;
} else {
par[y] += par[x];
par[x] = y;
if (rank[x] == rank[y])
rank[y]++;
}
return true;
}
public boolean isSame(int x, int y) {
return root(x) == root(y);
}
public int root(int x) {
if (par[x] < 0)
return x;
else
return x = root(par[x]);
}
public int size(int x) {
return -par[root(x)];
}
}
public static void main(String[] args) {
solve_abc177_b();
}
public static void solve_abc177_b() {
FastScanner sc = new FastScanner(System.in);
String s = sc.next();
String t = sc.next();
int nmin = t.length();
for(int i=0;i<=s.length() - t.length();i++){
int n = 0;
for(int j=0;j<t.length();j++){
if(s.charAt(i+j) != t.charAt(j)) n++;
}
nmin = Math.min(nmin, n);
}
System.out.println(nmin);
}
} |
[
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,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
2,
13,
13,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
13,
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
],
[
8,
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
],
[
47,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
40,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
64,
66
],
[
54,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
81,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
80,
90
],
[
90,
91
],
[
91,
92
],
[
54,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
6,
109
],
[
109,
110
]
]
| [
"import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n String s;\n int count = 0;\n int max = 0;\n\n int sLen = S.length();\n int tLen = T.length();\n for (int i = 0; i <= sLen - tLen; i++) { //T文字列が入りきるところまでループ\n s = S.substring(i, i + tLen); //1文字ずつずらして取り出し\n count = 0;\n for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }\n if (max < count) {\n max = count;\n }\n }\n System.out.println(tLen - max);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n String s;\n int count = 0;\n int max = 0;\n\n int sLen = S.length();\n int tLen = T.length();\n for (int i = 0; i <= sLen - tLen; i++) { //T文字列が入りきるところまでループ\n s = S.substring(i, i + tLen); //1文字ずつずらして取り出し\n count = 0;\n for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }\n if (max < count) {\n max = count;\n }\n }\n System.out.println(tLen - max);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n String s;\n int count = 0;\n int max = 0;\n\n int sLen = S.length();\n int tLen = T.length();\n for (int i = 0; i <= sLen - tLen; i++) { //T文字列が入りきるところまでループ\n s = S.substring(i, i + tLen); //1文字ずつずらして取り出し\n count = 0;\n for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }\n if (max < count) {\n max = count;\n }\n }\n System.out.println(tLen - max);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n String s;\n int count = 0;\n int max = 0;\n\n int sLen = S.length();\n int tLen = T.length();\n for (int i = 0; i <= sLen - tLen; i++) { //T文字列が入りきるところまでループ\n s = S.substring(i, i + tLen); //1文字ずつずらして取り出し\n count = 0;\n for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }\n if (max < count) {\n max = count;\n }\n }\n System.out.println(tLen - max);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"String s;",
"s",
"int count = 0;",
"count",
"0",
"int max = 0;",
"max",
"0",
"int sLen = S.length();",
"sLen",
"S.length()",
"S.length",
"S",
"int tLen = T.length();",
"tLen",
"T.length()",
"T.length",
"T",
"for (int i = 0; i <= sLen - tLen; i++) { //T文字列が入りきるところまでループ\n s = S.substring(i, i + tLen); //1文字ずつずらして取り出し\n count = 0;\n for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }\n if (max < count) {\n max = count;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= sLen - tLen",
"i",
"sLen - tLen",
"sLen",
"tLen",
"i++",
"i++",
"i",
"{ //T文字列が入りきるところまでループ\n s = S.substring(i, i + tLen); //1文字ずつずらして取り出し\n count = 0;\n for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }\n if (max < count) {\n max = count;\n }\n }",
"{ //T文字列が入りきるところまでループ\n s = S.substring(i, i + tLen); //1文字ずつずらして取り出し\n count = 0;\n for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }\n if (max < count) {\n max = count;\n }\n }",
"s = S.substring(i, i + tLen)",
"s",
"S.substring(i, i + tLen)",
"S.substring",
"S",
"i",
"i + tLen",
"i",
"tLen",
"count = 0",
"count",
"0",
"for (int j = 0; j < tLen; j++) {\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < tLen",
"j",
"tLen",
"j++",
"j++",
"j",
"{\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }",
"{\n if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }\n }",
"if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }",
"s.charAt(j) == T.charAt(j)",
"s.charAt(j)",
"s.charAt",
"s",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"{ //取り出した文字列を1文字ずつ比較\n count++; //一致したらcount++;\n }",
"count++",
"count",
"if (max < count) {\n max = count;\n }",
"max < count",
"max",
"count",
"{\n max = count;\n }",
"max = count",
"max",
"count",
"System.out.println(tLen - max)",
"System.out.println",
"System.out",
"System",
"System.out",
"tLen - max",
"tLen",
"max",
"String[] args",
"args"
]
| import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
String T = sc.next();
String s;
int count = 0;
int max = 0;
int sLen = S.length();
int tLen = T.length();
for (int i = 0; i <= sLen - tLen; i++) { //T文字列が入りきるところまでループ
s = S.substring(i, i + tLen); //1文字ずつずらして取り出し
count = 0;
for (int j = 0; j < tLen; j++) {
if (s.charAt(j) == T.charAt(j)) { //取り出した文字列を1文字ずつ比較
count++; //一致したらcount++;
}
}
if (max < count) {
max = count;
}
}
System.out.println(tLen - max);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
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,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
41,
13,
4,
18,
4,
18,
13,
29,
4,
18,
13,
13,
12,
13,
30,
41,
13,
4,
18,
4,
18,
13,
29,
4,
18,
13,
13,
12,
13,
30,
29,
4,
18,
4,
18,
13,
12,
13,
30,
29,
4,
18,
4,
18,
4,
18,
13,
17,
12,
13,
30,
41,
13,
4,
18,
36,
41,
13,
20,
18,
13,
13,
41,
13,
17,
28,
13,
13,
30,
30,
0,
18,
13,
40,
13,
4,
18,
13,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
218,
8
],
[
218,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
21,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
26,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
26,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
26,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
52,
64
],
[
64,
65
],
[
65,
66
],
[
52,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
68,
78
],
[
78,
79
],
[
78,
80
],
[
68,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
81,
91
],
[
91,
92
],
[
92,
93
],
[
81,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
97,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
96,
106
],
[
106,
107
],
[
68,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
110,
114
],
[
26,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
9,
121
],
[
121,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
123,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
135,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
123,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
150,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
159,
162
],
[
123,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
123,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
176,
183
],
[
123,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
186,
192
],
[
192,
193
],
[
192,
194
],
[
195,
196
],
[
195,
197
],
[
186,
198
],
[
198,
199
],
[
198,
200
],
[
186,
201
],
[
201,
202
],
[
201,
203
],
[
201,
204
],
[
205,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
206,
211
],
[
211,
212
],
[
212,
213
],
[
211,
214
],
[
186,
215
],
[
215,
216
],
[
0,
217
],
[
217,
218
],
[
217,
219
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc=new Scanner(System.in);\n\t\tReader reader=new Reader();\n\t\tint t=1;//sc.nextInt();\n\t\twhile(t-->0) {\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}\n\t}\n}\nclass Reader{\n\tBufferedReader reader;\n\tReader(){\n\t\treader=new BufferedReader(new InputStreamReader(System.in));\n\t}\n\tint nextInt() throws IOException{\n\t\tString in=reader.readLine().trim();\n\t\treturn Integer.parseInt(in);\n\t}\n\tlong nextLong() throws IOException{\n\t\tString in=reader.readLine().trim();\n\t\treturn Long.parseLong(in);\n\t}\n\tString next() throws IOException{\n\t\treturn reader.readLine().trim();\n\t}\n\tString[] stringArray() throws IOException{\n\t\treturn reader.readLine().trim().split(\"\\\\s+\");\n\t}\n\tint[] intArray() throws IOException{\n\t\tString[] inp=this.stringArray();\n\t\tint[] arr=new int[inp.length];\n\t\tint i=0;\n\t\tfor(String s:inp) {\n\t\t\tarr[i++]=Integer.parseInt(s);\n\t\t}\n\t\treturn arr;\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc=new Scanner(System.in);\n\t\tReader reader=new Reader();\n\t\tint t=1;//sc.nextInt();\n\t\twhile(t-->0) {\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\tScanner sc=new Scanner(System.in);\n\t\tReader reader=new Reader();\n\t\tint t=1;//sc.nextInt();\n\t\twhile(t-->0) {\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tReader reader=new Reader();\n\t\tint t=1;//sc.nextInt();\n\t\twhile(t-->0) {\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"Reader reader=new Reader();",
"reader",
"new Reader()",
"int t=1;",
"t",
"1",
"while(t-->0) {\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}",
"t-->0",
"t--",
"t",
"0",
"{\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}",
"String s1=reader.next();",
"s1",
"reader.next()",
"reader.next",
"reader",
"int n=s1.length();",
"n",
"s1.length()",
"s1.length",
"s1",
"String s2=reader.next();",
"s2",
"reader.next()",
"reader.next",
"reader",
"int len=s2.length();",
"len",
"s2.length()",
"s2.length",
"s2",
"int min=Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-len+1",
"i",
"n-len+1",
"n-len",
"n",
"len",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}",
"{\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}",
"String temp=s1.substring(i,i+len);",
"temp",
"s1.substring(i,i+len)",
"s1.substring",
"s1",
"i",
"i+len",
"i",
"len",
"int count=0;",
"count",
"0",
"for(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<temp.length()",
"j",
"temp.length()",
"temp.length",
"temp",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}",
"{\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}",
"if(temp.charAt(j)!=s2.charAt(j)) count++;",
"temp.charAt(j)!=s2.charAt(j)",
"temp.charAt(j)",
"temp.charAt",
"temp",
"j",
"s2.charAt(j)",
"s2.charAt",
"s2",
"j",
"count++",
"count",
"min=Math.min(count, min)",
"min",
"Math.min(count, min)",
"Math.min",
"Math",
"count",
"min",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"class Reader{\n\tBufferedReader reader;\n\tReader(){\n\t\treader=new BufferedReader(new InputStreamReader(System.in));\n\t}\n\tint nextInt() throws IOException{\n\t\tString in=reader.readLine().trim();\n\t\treturn Integer.parseInt(in);\n\t}\n\tlong nextLong() throws IOException{\n\t\tString in=reader.readLine().trim();\n\t\treturn Long.parseLong(in);\n\t}\n\tString next() throws IOException{\n\t\treturn reader.readLine().trim();\n\t}\n\tString[] stringArray() throws IOException{\n\t\treturn reader.readLine().trim().split(\"\\\\s+\");\n\t}\n\tint[] intArray() throws IOException{\n\t\tString[] inp=this.stringArray();\n\t\tint[] arr=new int[inp.length];\n\t\tint i=0;\n\t\tfor(String s:inp) {\n\t\t\tarr[i++]=Integer.parseInt(s);\n\t\t}\n\t\treturn arr;\n\t}\n}",
"Reader",
"BufferedReader reader;",
"reader",
"Reader(){\n\t\treader=new BufferedReader(new InputStreamReader(System.in));\n\t}",
"Reader",
"{\n\t\treader=new BufferedReader(new InputStreamReader(System.in));\n\t}",
"reader=new BufferedReader(new InputStreamReader(System.in))",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"int nextInt() throws IOException{\n\t\tString in=reader.readLine().trim();\n\t\treturn Integer.parseInt(in);\n\t}",
"nextInt",
"{\n\t\tString in=reader.readLine().trim();\n\t\treturn Integer.parseInt(in);\n\t}",
"String in=reader.readLine().trim();",
"in",
"reader.readLine().trim()",
"reader.readLine().trim",
"reader.readLine()",
"reader.readLine",
"reader",
"return Integer.parseInt(in);",
"Integer.parseInt(in)",
"Integer.parseInt",
"Integer",
"in",
"long nextLong() throws IOException{\n\t\tString in=reader.readLine().trim();\n\t\treturn Long.parseLong(in);\n\t}",
"nextLong",
"{\n\t\tString in=reader.readLine().trim();\n\t\treturn Long.parseLong(in);\n\t}",
"String in=reader.readLine().trim();",
"in",
"reader.readLine().trim()",
"reader.readLine().trim",
"reader.readLine()",
"reader.readLine",
"reader",
"return Long.parseLong(in);",
"Long.parseLong(in)",
"Long.parseLong",
"Long",
"in",
"String next() throws IOException{\n\t\treturn reader.readLine().trim();\n\t}",
"next",
"{\n\t\treturn reader.readLine().trim();\n\t}",
"return reader.readLine().trim();",
"reader.readLine().trim()",
"reader.readLine().trim",
"reader.readLine()",
"reader.readLine",
"reader",
"String[] stringArray() throws IOException{\n\t\treturn reader.readLine().trim().split(\"\\\\s+\");\n\t}",
"stringArray",
"{\n\t\treturn reader.readLine().trim().split(\"\\\\s+\");\n\t}",
"return reader.readLine().trim().split(\"\\\\s+\");",
"reader.readLine().trim().split(\"\\\\s+\")",
"reader.readLine().trim().split",
"reader.readLine().trim()",
"reader.readLine().trim",
"reader.readLine()",
"reader.readLine",
"reader",
"\"\\\\s+\"",
"int[] intArray() throws IOException{\n\t\tString[] inp=this.stringArray();\n\t\tint[] arr=new int[inp.length];\n\t\tint i=0;\n\t\tfor(String s:inp) {\n\t\t\tarr[i++]=Integer.parseInt(s);\n\t\t}\n\t\treturn arr;\n\t}",
"intArray",
"{\n\t\tString[] inp=this.stringArray();\n\t\tint[] arr=new int[inp.length];\n\t\tint i=0;\n\t\tfor(String s:inp) {\n\t\t\tarr[i++]=Integer.parseInt(s);\n\t\t}\n\t\treturn arr;\n\t}",
"String[] inp=this.stringArray();",
"inp",
"this.stringArray()",
"this.stringArray",
"this",
"int[] arr=new int[inp.length];",
"arr",
"new int[inp.length]",
"inp.length",
"inp",
"inp.length",
"int i=0;",
"i",
"0",
"for(String s:inp) {\n\t\t\tarr[i++]=Integer.parseInt(s);\n\t\t}",
"String s",
"inp",
"{\n\t\t\tarr[i++]=Integer.parseInt(s);\n\t\t}",
"{\n\t\t\tarr[i++]=Integer.parseInt(s);\n\t\t}",
"arr[i++]=Integer.parseInt(s)",
"arr[i++]",
"arr",
"i++",
"i",
"Integer.parseInt(s)",
"Integer.parseInt",
"Integer",
"s",
"return arr;",
"arr",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc=new Scanner(System.in);\n\t\tReader reader=new Reader();\n\t\tint t=1;//sc.nextInt();\n\t\twhile(t-->0) {\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner sc=new Scanner(System.in);\n\t\tReader reader=new Reader();\n\t\tint t=1;//sc.nextInt();\n\t\twhile(t-->0) {\n\t\t\tString s1=reader.next();\n\t\t\tint n=s1.length();\n\t\t\tString s2=reader.next();\n\t\t\tint len=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n-len+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+len);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException{
Scanner sc=new Scanner(System.in);
Reader reader=new Reader();
int t=1;//sc.nextInt();
while(t-->0) {
String s1=reader.next();
int n=s1.length();
String s2=reader.next();
int len=s2.length();
int min=Integer.MAX_VALUE;
for(int i=0;i<n-len+1;i++) {
String temp=s1.substring(i,i+len);
int count=0;
for(int j=0;j<temp.length();j++) {
if(temp.charAt(j)!=s2.charAt(j)) count++;
}
min=Math.min(count, min);
}
System.out.println(min);
}
}
}
class Reader{
BufferedReader reader;
Reader(){
reader=new BufferedReader(new InputStreamReader(System.in));
}
int nextInt() throws IOException{
String in=reader.readLine().trim();
return Integer.parseInt(in);
}
long nextLong() throws IOException{
String in=reader.readLine().trim();
return Long.parseLong(in);
}
String next() throws IOException{
return reader.readLine().trim();
}
String[] stringArray() throws IOException{
return reader.readLine().trim().split("\\s+");
}
int[] intArray() throws IOException{
String[] inp=this.stringArray();
int[] arr=new int[inp.length];
int i=0;
for(String s:inp) {
arr[i++]=Integer.parseInt(s);
}
return arr;
}
}
|
[
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,
41,
13,
17,
14,
4,
18,
13,
13,
30,
0,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
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,
4,
18,
13,
2,
13,
13,
2,
2,
13,
13,
17,
4,
18,
13,
13,
2,
13,
17,
17,
30,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
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
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
38,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
38,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
80,
86
],
[
87,
87
],
[
87,
88
],
[
87,
89
],
[
87,
90
],
[
78,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
91,
95
],
[
95,
96
],
[
95,
97
],
[
77,
98
],
[
76,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
62,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
62,
111
],
[
111,
112
],
[
111,
113
],
[
8,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
6,
120
],
[
120,
121
],
[
0,
122
],
[
122,
123
],
[
122,
124
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.nextLine();\n String T = sc.nextLine();\n //SとTの長さsl tl\n int sl = S.length();\n int tl = T.length();\n //一致していない文字数を数えmに格納。missよりmが小さければmissを更新する\n int miss = 1000;\n int m = 0;\n \n if(S.contains(T)){\n miss = 0;\n }else{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }\n System.out.println(miss);\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 String S = sc.nextLine();\n String T = sc.nextLine();\n //SとTの長さsl tl\n int sl = S.length();\n int tl = T.length();\n //一致していない文字数を数えmに格納。missよりmが小さければmissを更新する\n int miss = 1000;\n int m = 0;\n \n if(S.contains(T)){\n miss = 0;\n }else{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }\n System.out.println(miss);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.nextLine();\n String T = sc.nextLine();\n //SとTの長さsl tl\n int sl = S.length();\n int tl = T.length();\n //一致していない文字数を数えmに格納。missよりmが小さければmissを更新する\n int miss = 1000;\n int m = 0;\n \n if(S.contains(T)){\n miss = 0;\n }else{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }\n System.out.println(miss);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String S = sc.nextLine();\n String T = sc.nextLine();\n //SとTの長さsl tl\n int sl = S.length();\n int tl = T.length();\n //一致していない文字数を数えmに格納。missよりmが小さければmissを更新する\n int miss = 1000;\n int m = 0;\n \n if(S.contains(T)){\n miss = 0;\n }else{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }\n System.out.println(miss);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.nextLine();",
"S",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String T = sc.nextLine();",
"T",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int sl = S.length();",
"sl",
"S.length()",
"S.length",
"S",
"int tl = T.length();",
"tl",
"T.length()",
"T.length",
"T",
"int miss = 1000;",
"miss",
"1000",
"int m = 0;",
"m",
"0",
"if(S.contains(T)){\n miss = 0;\n }else{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }",
"S.contains(T)",
"S.contains",
"S",
"T",
"{\n miss = 0;\n }",
"miss = 0",
"miss",
"0",
"{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }",
"for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= sl - tl",
"i",
"sl - tl",
"sl",
"tl",
"i++",
"i++",
"i",
"{\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }",
"{\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }",
"for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < tl",
"j",
"tl",
"j++",
"j++",
"j",
"{\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }",
"{\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }",
"if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }",
"(S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false",
"(S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1))",
"(S.substring(i + j, i + j + 1)).equals",
"(S.substring(i + j, i + j + 1))",
"S.substring",
"S",
"i + j",
"i",
"j",
"i + j + 1",
"i + j + 1",
"i",
"j",
"1",
"T.substring(j, j + 1)",
"T.substring",
"T",
"j",
"j + 1",
"j",
"1",
"false",
"{\n m += 1;\n }",
"m += 1",
"m",
"1",
"if(miss > m){\n miss = m;\n }",
"miss > m",
"miss",
"m",
"{\n miss = m;\n }",
"miss = m",
"miss",
"m",
"m = 0",
"m",
"0",
"System.out.println(miss)",
"System.out.println",
"System.out",
"System",
"System.out",
"miss",
"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 String T = sc.nextLine();\n //SとTの長さsl tl\n int sl = S.length();\n int tl = T.length();\n //一致していない文字数を数えmに格納。missよりmが小さければmissを更新する\n int miss = 1000;\n int m = 0;\n \n if(S.contains(T)){\n miss = 0;\n }else{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }\n System.out.println(miss);\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 String T = sc.nextLine();\n //SとTの長さsl tl\n int sl = S.length();\n int tl = T.length();\n //一致していない文字数を数えmに格納。missよりmが小さければmissを更新する\n int miss = 1000;\n int m = 0;\n \n if(S.contains(T)){\n miss = 0;\n }else{\n for(int i = 0; i <= sl - tl; i++){\n for(int j = 0; j < tl; j++){\n if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){\n m += 1;\n }\n }\n if(miss > m){\n miss = m;\n }\n m = 0;\n }\n }\n System.out.println(miss);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.nextLine();
String T = sc.nextLine();
//SとTの長さsl tl
int sl = S.length();
int tl = T.length();
//一致していない文字数を数えmに格納。missよりmが小さければmissを更新する
int miss = 1000;
int m = 0;
if(S.contains(T)){
miss = 0;
}else{
for(int i = 0; i <= sl - tl; i++){
for(int j = 0; j < tl; j++){
if((S.substring(i + j, i + j + 1)).equals(T.substring(j, j + 1)) == false){
m += 1;
}
}
if(miss > m){
miss = m;
}
m = 0;
}
}
System.out.println(miss);
}
} |
[
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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
2,
13,
18,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
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
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
31,
45
],
[
45,
46
],
[
46,
47
],
[
31,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
53,
63
],
[
63,
64
],
[
64,
65
],
[
53,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
69,
75
],
[
75,
76
],
[
75,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
49,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
83,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
6,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tchar[] s = sc.next().toCharArray();\n \tchar[] t = sc.next().toCharArray();\n \tint min = Integer.MAX_VALUE;\n \tfor (int i = 0; i + t.length <= s.length; i++) {\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}\n \tSystem.out.println(min);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tchar[] s = sc.next().toCharArray();\n \tchar[] t = sc.next().toCharArray();\n \tint min = Integer.MAX_VALUE;\n \tfor (int i = 0; i + t.length <= s.length; i++) {\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}\n \tSystem.out.println(min);\n }\n}",
"Main",
"public static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tchar[] s = sc.next().toCharArray();\n \tchar[] t = sc.next().toCharArray();\n \tint min = Integer.MAX_VALUE;\n \tfor (int i = 0; i + t.length <= s.length; i++) {\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}\n \tSystem.out.println(min);\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n \tchar[] s = sc.next().toCharArray();\n \tchar[] t = sc.next().toCharArray();\n \tint min = Integer.MAX_VALUE;\n \tfor (int i = 0; i + t.length <= s.length; i++) {\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}\n \tSystem.out.println(min);\n }",
"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[] t = sc.next().toCharArray();",
"t",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"int min = Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for (int i = 0; i + t.length <= s.length; i++) {\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + t.length <= s.length",
"i + t.length",
"i",
"t.length",
"t",
"t.length",
"s.length",
"s",
"s.length",
"i++",
"i++",
"i",
"{\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}",
"{\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length",
"j",
"t.length",
"t",
"t.length",
"j++",
"j++",
"j",
"{\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }",
"{\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }",
"if (s[i + j] != t[j]) {\n \t count++;\n \t }",
"s[i + j] != t[j]",
"s[i + j]",
"s",
"i + j",
"i",
"j",
"t[j]",
"t",
"j",
"{\n \t count++;\n \t }",
"count++",
"count",
"min = Math.min(min, count)",
"min",
"Math.min(min, count)",
"Math.min",
"Math",
"min",
"count",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public class Main {\n\tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tchar[] s = sc.next().toCharArray();\n \tchar[] t = sc.next().toCharArray();\n \tint min = Integer.MAX_VALUE;\n \tfor (int i = 0; i + t.length <= s.length; i++) {\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}\n \tSystem.out.println(min);\n }\n}",
"public class Main {\n\tpublic static void main (String[] args) {\n \tScanner sc = new Scanner(System.in);\n \tchar[] s = sc.next().toCharArray();\n \tchar[] t = sc.next().toCharArray();\n \tint min = Integer.MAX_VALUE;\n \tfor (int i = 0; i + t.length <= s.length; i++) {\n \t int count = 0;\n \t for (int j = 0; j < t.length; j++) {\n \t if (s[i + j] != t[j]) {\n \t count++;\n \t }\n \t }\n \t min = Math.min(min, count);\n \t}\n \tSystem.out.println(min);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
char[] s = sc.next().toCharArray();
char[] t = sc.next().toCharArray();
int min = Integer.MAX_VALUE;
for (int i = 0; i + t.length <= s.length; i++) {
int count = 0;
for (int j = 0; j < t.length; j++) {
if (s[i + j] != t[j]) {
count++;
}
}
min = Math.min(min, count);
}
System.out.println(min);
}
}
|
[
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,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
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
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
27,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
45,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
60,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
59,
71
],
[
71,
72
],
[
72,
73
],
[
58,
74
],
[
74,
75
],
[
45,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
8,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
6,
90
],
[
90,
91
]
]
| [
"import java.util.Scanner;\n\nclass Main {\n public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n final String s = sc.nextLine();\n final String t = sc.nextLine();\n int min_diff = s.length();\n\n for (int i = 0; i <= (s.length() - t.length()); i++) {\n int j = 0;\n int diff = 0;\n while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }\n\n if (min_diff > diff) {\n min_diff = diff;\n }\n }\n\n System.out.println(min_diff);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n final String s = sc.nextLine();\n final String t = sc.nextLine();\n int min_diff = s.length();\n\n for (int i = 0; i <= (s.length() - t.length()); i++) {\n int j = 0;\n int diff = 0;\n while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }\n\n if (min_diff > diff) {\n min_diff = diff;\n }\n }\n\n System.out.println(min_diff);\n }\n}",
"Main",
"public static void main(String[] args) {\n final Scanner sc = new Scanner(System.in);\n final String s = sc.nextLine();\n final String t = sc.nextLine();\n int min_diff = s.length();\n\n for (int i = 0; i <= (s.length() - t.length()); i++) {\n int j = 0;\n int diff = 0;\n while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }\n\n if (min_diff > diff) {\n min_diff = diff;\n }\n }\n\n System.out.println(min_diff);\n }",
"main",
"{\n final Scanner sc = new Scanner(System.in);\n final String s = sc.nextLine();\n final String t = sc.nextLine();\n int min_diff = s.length();\n\n for (int i = 0; i <= (s.length() - t.length()); i++) {\n int j = 0;\n int diff = 0;\n while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }\n\n if (min_diff > diff) {\n min_diff = diff;\n }\n }\n\n System.out.println(min_diff);\n }",
"final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"final String t = sc.nextLine();",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int min_diff = s.length();",
"min_diff",
"s.length()",
"s.length",
"s",
"for (int i = 0; i <= (s.length() - t.length()); i++) {\n int j = 0;\n int diff = 0;\n while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }\n\n if (min_diff > diff) {\n min_diff = diff;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= (s.length() - t.length())",
"i",
"(s.length() - t.length())",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n int j = 0;\n int diff = 0;\n while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }\n\n if (min_diff > diff) {\n min_diff = diff;\n }\n }",
"{\n int j = 0;\n int diff = 0;\n while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }\n\n if (min_diff > diff) {\n min_diff = diff;\n }\n }",
"int j = 0;",
"j",
"0",
"int diff = 0;",
"diff",
"0",
"while (j < t.length()) {\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"{\n if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }\n j++;\n }",
"if (s.charAt(i + j) != t.charAt(j)) {\n diff++;\n }",
"s.charAt(i + j) != t.charAt(j)",
"s.charAt(i + j)",
"s.charAt",
"s",
"i + j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n diff++;\n }",
"diff++",
"diff",
"j++",
"j",
"if (min_diff > diff) {\n min_diff = diff;\n }",
"min_diff > diff",
"min_diff",
"diff",
"{\n min_diff = diff;\n }",
"min_diff = diff",
"min_diff",
"diff",
"System.out.println(min_diff)",
"System.out.println",
"System.out",
"System",
"System.out",
"min_diff",
"String[] args",
"args"
]
| import java.util.Scanner;
class Main {
public static void main(String[] args) {
final Scanner sc = new Scanner(System.in);
final String s = sc.nextLine();
final String t = sc.nextLine();
int min_diff = s.length();
for (int i = 0; i <= (s.length() - t.length()); i++) {
int j = 0;
int diff = 0;
while (j < t.length()) {
if (s.charAt(i + j) != t.charAt(j)) {
diff++;
}
j++;
}
if (min_diff > diff) {
min_diff = diff;
}
}
System.out.println(min_diff);
}
} |
[
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,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
8,
2,
13,
13,
17,
13,
4,
18,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
130,
8
],
[
130,
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
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
34,
48
],
[
48,
49
],
[
49,
50
],
[
34,
51
],
[
52,
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
],
[
64,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
71,
83
],
[
83,
84
],
[
84,
85
],
[
52,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
88,
92
],
[
11,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
98,
103
],
[
11,
104
],
[
104,
105
],
[
105,
106
],
[
130,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
107,
119
],
[
119,
120
],
[
130,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
121,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
]
| [
"\nimport java.io.PrintWriter;\nimport java.util.*;\n\npublic class Main {\n void run() {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String s = sc.next();\n String t = sc.next();\n\n int HOGE = 100000;\n int min = HOGE;\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n System.out.println(min == HOGE ? 0 : min);\n // out.println(\"Hello World\");\n out.flush();\n }\n\n void debug(Object... os) {\n System.err.println(Arrays.deepToString(os));\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n}",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n void run() {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String s = sc.next();\n String t = sc.next();\n\n int HOGE = 100000;\n int min = HOGE;\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n System.out.println(min == HOGE ? 0 : min);\n // out.println(\"Hello World\");\n out.flush();\n }\n\n void debug(Object... os) {\n System.err.println(Arrays.deepToString(os));\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n}",
"Main",
"void run() {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String s = sc.next();\n String t = sc.next();\n\n int HOGE = 100000;\n int min = HOGE;\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n System.out.println(min == HOGE ? 0 : min);\n // out.println(\"Hello World\");\n out.flush();\n }",
"run",
"{\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String s = sc.next();\n String t = sc.next();\n\n int HOGE = 100000;\n int min = HOGE;\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n System.out.println(min == HOGE ? 0 : min);\n // out.println(\"Hello World\");\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 t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int HOGE = 100000;",
"HOGE",
"100000",
"int min = HOGE;",
"min",
"HOGE",
"for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }",
"{\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }",
"{\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }",
"if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }",
"s.charAt(i + j) != t.charAt(j)",
"s.charAt(i + j)",
"s.charAt",
"s",
"i + j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n count++;\n }",
"count++",
"count",
"min = Math.min(min, count)",
"min",
"Math.min(min, count)",
"Math.min",
"Math",
"min",
"count",
"System.out.println(min == HOGE ? 0 : min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min == HOGE ? 0 : min",
"min == HOGE",
"min",
"HOGE",
"0",
"min",
"out.flush()",
"out.flush",
"out",
"void debug(Object... os) {\n System.err.println(Arrays.deepToString(os));\n }",
"debug",
"{\n System.err.println(Arrays.deepToString(os));\n }",
"System.err.println(Arrays.deepToString(os))",
"System.err.println",
"System.err",
"System",
"System.err",
"Arrays.deepToString(os)",
"Arrays.deepToString",
"Arrays",
"os",
"Object... os",
"os",
"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",
"public class Main {\n void run() {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String s = sc.next();\n String t = sc.next();\n\n int HOGE = 100000;\n int min = HOGE;\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n System.out.println(min == HOGE ? 0 : min);\n // out.println(\"Hello World\");\n out.flush();\n }\n\n void debug(Object... os) {\n System.err.println(Arrays.deepToString(os));\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n}",
"public class Main {\n void run() {\n Scanner sc = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n String s = sc.next();\n String t = sc.next();\n\n int HOGE = 100000;\n int min = HOGE;\n for (int i = 0; i <= s.length() - t.length(); i++) {\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n count++;\n }\n }\n min = Math.min(min, count);\n }\n System.out.println(min == HOGE ? 0 : min);\n // out.println(\"Hello World\");\n out.flush();\n }\n\n void debug(Object... os) {\n System.err.println(Arrays.deepToString(os));\n }\n\n public static void main(String[] args) {\n new Main().run();\n }\n}",
"Main"
]
|
import java.io.PrintWriter;
import java.util.*;
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out);
String s = sc.next();
String t = sc.next();
int HOGE = 100000;
int min = HOGE;
for (int i = 0; i <= s.length() - t.length(); i++) {
int count = 0;
for (int j = 0; j < t.length(); j++) {
if (s.charAt(i + j) != t.charAt(j)) {
count++;
}
}
min = Math.min(min, count);
}
System.out.println(min == HOGE ? 0 : min);
// out.println("Hello World");
out.flush();
}
void debug(Object... os) {
System.err.println(Arrays.deepToString(os));
}
public static void main(String[] args) {
new Main().run();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
2,
17,
17,
41,
13,
17,
41,
13,
39,
17,
40,
17,
17,
17,
41,
13,
39,
40,
17,
17,
17,
17,
41,
13,
39,
40,
17,
40,
17,
40,
17,
17,
17,
17,
17,
17,
41,
13,
39,
40,
17,
17,
17,
40,
17,
17,
40,
17,
17,
17,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
40,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
2,
17,
17,
41,
13,
20,
2,
2,
17,
17,
17,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
20,
17,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
37,
20,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
17,
0,
18,
13,
40,
13,
4,
13,
0,
13,
4,
13,
13,
13,
41,
13,
17,
41,
13,
17,
14,
2,
18,
13,
17,
17,
30,
0,
13,
17,
11,
1,
2,
13,
13,
1,
40,
13,
30,
0,
13,
2,
2,
2,
13,
17,
18,
13,
13,
17,
14,
2,
18,
13,
17,
17,
30,
0,
13,
40,
13,
29,
13,
12,
13,
30,
41,
13,
17,
0,
18,
13,
40,
13,
4,
13,
0,
13,
4,
13,
13,
13,
41,
13,
17,
41,
13,
17,
14,
2,
18,
13,
17,
17,
30,
0,
13,
17,
11,
1,
2,
13,
13,
1,
40,
13,
30,
0,
13,
2,
2,
2,
13,
17,
18,
13,
13,
17,
14,
2,
18,
13,
17,
17,
30,
0,
13,
40,
13,
29,
13,
12,
13,
30,
42,
17,
30,
41,
13,
4,
13,
14,
40,
18,
13,
13,
30,
29,
13,
12,
13,
30,
29,
20,
12,
13,
30,
41,
13,
17,
0,
18,
13,
40,
13,
4,
13,
0,
13,
4,
13,
13,
13,
29,
4,
18,
13,
13,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
38,
5,
13,
30,
30,
42,
17,
30,
41,
13,
4,
13,
14,
18,
13,
13,
30,
3,
14,
2,
18,
13,
13,
13,
30,
41,
13,
20,
2,
2,
18,
13,
13,
17,
17,
4,
18,
13,
13,
17,
13,
17,
18,
13,
13,
0,
13,
13,
0,
18,
13,
40,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
13,
17,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
6,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
776,
8
],
[
776,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
776,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
16,
18
],
[
776,
19
],
[
19,
20
],
[
19,
21
],
[
776,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
24,
28
],
[
24,
29
],
[
776,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
32,
36
],
[
32,
37
],
[
776,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
40,
45
],
[
45,
46
],
[
40,
47
],
[
40,
48
],
[
40,
49
],
[
40,
50
],
[
40,
51
],
[
776,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
54,
59
],
[
59,
60
],
[
54,
61
],
[
54,
62
],
[
62,
63
],
[
54,
64
],
[
54,
65
],
[
776,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
68,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
68,
79
],
[
79,
80
],
[
79,
81
],
[
68,
82
],
[
82,
83
],
[
82,
84
],
[
68,
85
],
[
85,
86
],
[
85,
87
],
[
68,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
88,
92
],
[
88,
93
],
[
68,
94
],
[
94,
95
],
[
95,
96
],
[
66,
97
],
[
97,
98
],
[
776,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
103,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
103,
114
],
[
114,
115
],
[
114,
116
],
[
103,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
128,
130
],
[
117,
131
],
[
131,
132
],
[
132,
133
],
[
117,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
139,
149
],
[
149,
150
],
[
150,
151
],
[
139,
152
],
[
153,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
158,
160
],
[
155,
161
],
[
161,
162
],
[
161,
163
],
[
154,
164
],
[
164,
165
],
[
135,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
170,
171
],
[
170,
172
],
[
103,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
101,
177
],
[
177,
178
],
[
101,
179
],
[
179,
180
],
[
101,
181
],
[
181,
182
],
[
776,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
183,
187
],
[
187,
188
],
[
183,
189
],
[
189,
190
],
[
183,
191
],
[
191,
192
],
[
191,
193
],
[
194,
195
],
[
194,
196
],
[
183,
197
],
[
197,
198
],
[
197,
199
],
[
201,
201
],
[
201,
202
],
[
201,
203
],
[
201,
204
],
[
183,
205
],
[
205,
206
],
[
205,
207
],
[
183,
209
],
[
209,
210
],
[
209,
211
],
[
183,
213
],
[
213,
214
],
[
213,
215
],
[
183,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
217,
223
],
[
223,
224
],
[
183,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
236,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
246,
247
],
[
245,
248
],
[
232,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
249,
253
],
[
253,
254
],
[
254,
255
],
[
227,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
183,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
263,
267
],
[
267,
268
],
[
268,
269
],
[
268,
270
],
[
270,
271
],
[
267,
272
],
[
272,
273
],
[
263,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
276,
278
],
[
276,
279
],
[
263,
280
],
[
280,
281
],
[
280,
282
],
[
263,
283
],
[
283,
284
],
[
283,
285
],
[
263,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
286,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
263,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
298,
300
],
[
296,
301
],
[
301,
302
],
[
302,
303
],
[
296,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
308,
312
],
[
312,
313
],
[
312,
314
],
[
307,
315
],
[
263,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
317,
321
],
[
316,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
325,
326
],
[
263,
327
],
[
327,
328
],
[
183,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
335,
340
],
[
340,
341
],
[
331,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
344,
346
],
[
344,
347
],
[
331,
348
],
[
348,
349
],
[
348,
350
],
[
331,
351
],
[
351,
352
],
[
351,
353
],
[
331,
354
],
[
354,
355
],
[
355,
356
],
[
356,
357
],
[
356,
358
],
[
355,
359
],
[
354,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
331,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
366,
368
],
[
364,
369
],
[
369,
370
],
[
370,
371
],
[
364,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
376,
377
],
[
377,
378
],
[
377,
379
],
[
376,
380
],
[
380,
381
],
[
380,
382
],
[
375,
383
],
[
331,
384
],
[
384,
385
],
[
385,
386
],
[
386,
387
],
[
386,
388
],
[
385,
389
],
[
384,
390
],
[
390,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
331,
395
],
[
395,
396
],
[
183,
397
],
[
397,
398
],
[
397,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
405,
406
],
[
402,
407
],
[
407,
408
],
[
408,
409
],
[
409,
410
],
[
409,
411
],
[
407,
412
],
[
412,
413
],
[
413,
414
],
[
183,
415
],
[
415,
416
],
[
415,
417
],
[
417,
418
],
[
418,
419
],
[
183,
420
],
[
420,
421
],
[
420,
422
],
[
422,
423
],
[
423,
424
],
[
423,
425
],
[
422,
426
],
[
426,
427
],
[
427,
428
],
[
427,
429
],
[
429,
430
],
[
426,
431
],
[
431,
432
],
[
422,
433
],
[
433,
434
],
[
433,
435
],
[
435,
436
],
[
435,
437
],
[
435,
438
],
[
422,
439
],
[
439,
440
],
[
440,
441
],
[
441,
442
],
[
440,
443
],
[
440,
444
],
[
183,
445
],
[
445,
446
],
[
445,
447
],
[
447,
448
],
[
448,
449
],
[
448,
450
],
[
447,
453
],
[
453,
454
],
[
454,
455
],
[
455,
456
],
[
455,
457
],
[
453,
458
],
[
458,
459
],
[
458,
460
],
[
453,
461
],
[
461,
462
],
[
462,
463
],
[
453,
464
],
[
465,
465
],
[
465,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
466,
470
],
[
470,
471
],
[
447,
472
],
[
472,
473
],
[
445,
474
],
[
474,
475
],
[
445,
476
],
[
476,
477
],
[
183,
478
],
[
478,
479
],
[
478,
480
],
[
480,
481
],
[
481,
482
],
[
482,
483
],
[
482,
484
],
[
481,
485
],
[
485,
486
],
[
486,
487
],
[
486,
488
],
[
488,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
488,
493
],
[
493,
494
],
[
494,
495
],
[
494,
496
],
[
493,
497
],
[
497,
498
],
[
488,
499
],
[
499,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
500,
504
],
[
499,
505
],
[
505,
506
],
[
506,
507
],
[
506,
508
],
[
509,
510
],
[
510,
511
],
[
511,
512
],
[
511,
513
],
[
510,
514
],
[
509,
515
],
[
505,
516
],
[
516,
517
],
[
517,
518
],
[
516,
519
],
[
516,
520
],
[
516,
521
],
[
516,
522
],
[
516,
523
],
[
523,
524
],
[
523,
525
],
[
505,
526
],
[
526,
527
],
[
526,
528
],
[
488,
529
],
[
529,
530
],
[
530,
531
],
[
530,
532
],
[
532,
533
],
[
529,
534
],
[
480,
535
],
[
535,
536
],
[
478,
537
],
[
537,
538
],
[
478,
539
],
[
539,
540
],
[
183,
541
],
[
541,
542
],
[
541,
543
],
[
543,
544
],
[
544,
545
],
[
544,
546
],
[
543,
548
],
[
548,
549
],
[
549,
550
],
[
550,
551
],
[
550,
552
],
[
548,
553
],
[
553,
554
],
[
553,
555
],
[
548,
556
],
[
556,
557
],
[
557,
558
],
[
548,
559
],
[
560,
560
],
[
560,
561
],
[
561,
562
],
[
562,
563
],
[
562,
564
],
[
561,
565
],
[
565,
566
],
[
543,
567
],
[
567,
568
],
[
541,
569
],
[
569,
570
],
[
183,
571
],
[
571,
572
],
[
571,
573
],
[
573,
574
],
[
574,
575
],
[
574,
576
],
[
577,
578
],
[
577,
579
],
[
573,
580
],
[
580,
581
],
[
581,
582
],
[
582,
583
],
[
582,
584
],
[
580,
585
],
[
585,
586
],
[
585,
587
],
[
587,
588
],
[
587,
589
],
[
580,
590
],
[
590,
591
],
[
591,
592
],
[
580,
593
],
[
594,
594
],
[
594,
595
],
[
595,
596
],
[
596,
597
],
[
596,
598
],
[
595,
599
],
[
599,
600
],
[
573,
601
],
[
601,
602
],
[
571,
603
],
[
603,
604
],
[
183,
605
],
[
605,
606
],
[
605,
607
],
[
607,
608
],
[
608,
609
],
[
608,
610
],
[
607,
612
],
[
612,
613
],
[
613,
614
],
[
614,
615
],
[
614,
616
],
[
612,
617
],
[
617,
618
],
[
617,
619
],
[
612,
620
],
[
620,
621
],
[
621,
622
],
[
612,
623
],
[
624,
624
],
[
624,
625
],
[
625,
626
],
[
626,
627
],
[
626,
628
],
[
625,
629
],
[
629,
630
],
[
630,
631
],
[
629,
632
],
[
607,
633
],
[
633,
634
],
[
605,
635
],
[
635,
636
],
[
183,
637
],
[
637,
638
],
[
637,
639
],
[
639,
640
],
[
640,
641
],
[
640,
642
],
[
639,
644
],
[
644,
645
],
[
645,
646
],
[
646,
647
],
[
646,
648
],
[
644,
649
],
[
649,
650
],
[
649,
651
],
[
644,
652
],
[
652,
653
],
[
653,
654
],
[
644,
655
],
[
656,
656
],
[
656,
657
],
[
657,
658
],
[
658,
659
],
[
658,
660
],
[
657,
661
],
[
661,
662
],
[
639,
663
],
[
663,
664
],
[
637,
665
],
[
665,
666
],
[
183,
667
],
[
667,
668
],
[
667,
669
],
[
669,
670
],
[
670,
671
],
[
670,
672
],
[
673,
674
],
[
673,
675
],
[
669,
676
],
[
676,
677
],
[
677,
678
],
[
678,
679
],
[
678,
680
],
[
676,
681
],
[
681,
682
],
[
681,
683
],
[
683,
684
],
[
683,
685
],
[
676,
686
],
[
686,
687
],
[
687,
688
],
[
676,
689
],
[
690,
690
],
[
690,
691
],
[
691,
692
],
[
692,
693
],
[
692,
694
],
[
691,
695
],
[
695,
696
],
[
669,
697
],
[
697,
698
],
[
667,
699
],
[
699,
700
],
[
183,
701
],
[
701,
702
],
[
701,
703
],
[
703,
704
],
[
704,
705
],
[
704,
706
],
[
703,
708
],
[
708,
709
],
[
709,
710
],
[
710,
711
],
[
710,
712
],
[
708,
713
],
[
713,
714
],
[
713,
715
],
[
708,
716
],
[
716,
717
],
[
717,
718
],
[
708,
719
],
[
720,
720
],
[
720,
721
],
[
721,
722
],
[
722,
723
],
[
722,
724
],
[
721,
725
],
[
725,
726
],
[
726,
727
],
[
725,
728
],
[
703,
729
],
[
729,
730
],
[
701,
731
],
[
731,
732
],
[
183,
733
],
[
733,
734
],
[
733,
735
],
[
735,
736
],
[
736,
737
],
[
737,
738
],
[
738,
739
],
[
737,
740
],
[
740,
741
],
[
183,
742
],
[
742,
743
],
[
742,
744
],
[
744,
745
],
[
745,
746
],
[
745,
747
],
[
744,
749
],
[
749,
750
],
[
750,
751
],
[
751,
752
],
[
751,
753
],
[
749,
754
],
[
754,
755
],
[
754,
756
],
[
749,
757
],
[
757,
758
],
[
758,
759
],
[
749,
760
],
[
761,
761
],
[
761,
762
],
[
762,
763
],
[
763,
764
],
[
763,
765
],
[
762,
766
],
[
766,
767
],
[
744,
768
],
[
768,
769
],
[
742,
770
],
[
770,
771
],
[
183,
772
],
[
772,
773
],
[
772,
774
],
[
0,
775
],
[
775,
776
],
[
775,
777
]
]
| [
"import java.io.*;\nimport java.util.Arrays;\n\n/**\n * @author tutuz on 2020/08/30\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n MyInput in = new MyInput(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskX solver = new TaskX();\n solver.solve(1, in, out);\n out.close();\n }\n\n static int INF = 1 << 30;\n static long LINF = 1L << 55;\n static int MOD = 1000000007;\n static int[] mh4 = {0, -1, 1, 0};\n static int[] mw4 = {-1, 0, 0, 1};\n static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};\n static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};\n\n static class TaskX {\n\n public void solve(int testNumber, MyInput in, PrintWriter out) {\n char[] s = in.nextChars(), t = in.nextChars();\n int ans = INF;\n for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }\n out.println(ans);\n }\n }\n\n static class MyInput {\n private final BufferedReader in;\n private static int pos;\n private static int readLen;\n private static final char[] buffer = new char[1024 * 8];\n private static char[] str = new char[500 * 8 * 2];\n private static boolean[] isDigit = new boolean[256];\n private static boolean[] isSpace = new boolean[256];\n private static boolean[] isLineSep = new boolean[256];\n\n static {\n for (int i = 0; i < 10; i++) {\n isDigit['0' + i] = true;\n }\n isDigit['-'] = true;\n isSpace[' '] = isSpace['\\r'] = isSpace['\\n'] = isSpace['\\t'] = true;\n isLineSep['\\r'] = isLineSep['\\n'] = true;\n }\n\n public MyInput(InputStream is) {\n in = new BufferedReader(new InputStreamReader(is));\n }\n\n public int read() {\n if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }\n return buffer[pos++];\n }\n\n public int nextInt() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n int ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public long nextLong() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n long ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public char nextChar() {\n while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }\n }\n\n public String nextString() {\n return new String(nextChars());\n }\n\n public char[] nextChars() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n return Arrays.copyOf(str, len);\n }\n\n public char[][] next2DChars(int h, int w) {\n char[][] s = new char[h][w];\n for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }\n return s;\n }\n\n int reads(int len, boolean[] accept) {\n try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }\n return len;\n }\n\n public int[] nextIntArray(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArray1Index(final int n) {\n final int[] res = new int[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArrayDec(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n\n public long[] nextLongArray(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArray1Index(final int n) {\n final long[] res = new long[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArrayDec(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextString());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n\n static class EndOfFileRuntimeException extends RuntimeException {\n }\n\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n MyInput in = new MyInput(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskX solver = new TaskX();\n solver.solve(1, in, out);\n out.close();\n }\n\n static int INF = 1 << 30;\n static long LINF = 1L << 55;\n static int MOD = 1000000007;\n static int[] mh4 = {0, -1, 1, 0};\n static int[] mw4 = {-1, 0, 0, 1};\n static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};\n static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};\n\n static class TaskX {\n\n public void solve(int testNumber, MyInput in, PrintWriter out) {\n char[] s = in.nextChars(), t = in.nextChars();\n int ans = INF;\n for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }\n out.println(ans);\n }\n }\n\n static class MyInput {\n private final BufferedReader in;\n private static int pos;\n private static int readLen;\n private static final char[] buffer = new char[1024 * 8];\n private static char[] str = new char[500 * 8 * 2];\n private static boolean[] isDigit = new boolean[256];\n private static boolean[] isSpace = new boolean[256];\n private static boolean[] isLineSep = new boolean[256];\n\n static {\n for (int i = 0; i < 10; i++) {\n isDigit['0' + i] = true;\n }\n isDigit['-'] = true;\n isSpace[' '] = isSpace['\\r'] = isSpace['\\n'] = isSpace['\\t'] = true;\n isLineSep['\\r'] = isLineSep['\\n'] = true;\n }\n\n public MyInput(InputStream is) {\n in = new BufferedReader(new InputStreamReader(is));\n }\n\n public int read() {\n if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }\n return buffer[pos++];\n }\n\n public int nextInt() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n int ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public long nextLong() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n long ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public char nextChar() {\n while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }\n }\n\n public String nextString() {\n return new String(nextChars());\n }\n\n public char[] nextChars() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n return Arrays.copyOf(str, len);\n }\n\n public char[][] next2DChars(int h, int w) {\n char[][] s = new char[h][w];\n for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }\n return s;\n }\n\n int reads(int len, boolean[] accept) {\n try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }\n return len;\n }\n\n public int[] nextIntArray(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArray1Index(final int n) {\n final int[] res = new int[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArrayDec(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n\n public long[] nextLongArray(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArray1Index(final int n) {\n final long[] res = new long[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArrayDec(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextString());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n\n static class EndOfFileRuntimeException extends RuntimeException {\n }\n\n }\n}",
"Main",
"static int INF = 1 << 30;",
"INF",
"1 << 30",
"1",
"30",
"static long LINF = 1L << 55;",
"LINF",
"1L << 55",
"1L",
"55",
"static int MOD = 1000000007;",
"MOD",
"1000000007",
"static int[] mh4 = {0, -1, 1, 0};",
"mh4",
"{0, -1, 1, 0}",
"0",
"-1",
"1",
"1",
"0",
"static int[] mw4 = {-1, 0, 0, 1};",
"mw4",
"{-1, 0, 0, 1}",
"-1",
"1",
"0",
"0",
"1",
"static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};",
"mh8",
"{-1, -1, -1, 0, 0, 1, 1, 1}",
"-1",
"1",
"-1",
"1",
"-1",
"1",
"0",
"0",
"1",
"1",
"1",
"static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};",
"mw8",
"{-1, 0, 1, -1, 1, -1, 0, 1}",
"-1",
"1",
"0",
"1",
"-1",
"1",
"1",
"-1",
"1",
"0",
"1",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n MyInput in = new MyInput(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskX solver = new TaskX();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n MyInput in = new MyInput(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskX solver = new TaskX();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"MyInput in = new MyInput(inputStream);",
"in",
"new MyInput(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"TaskX solver = new TaskX();",
"solver",
"new TaskX()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class TaskX {\n\n public void solve(int testNumber, MyInput in, PrintWriter out) {\n char[] s = in.nextChars(), t = in.nextChars();\n int ans = INF;\n for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }\n out.println(ans);\n }\n }",
"TaskX",
"public void solve(int testNumber, MyInput in, PrintWriter out) {\n char[] s = in.nextChars(), t = in.nextChars();\n int ans = INF;\n for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }\n out.println(ans);\n }",
"solve",
"{\n char[] s = in.nextChars(), t = in.nextChars();\n int ans = INF;\n for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }\n out.println(ans);\n }",
"char[] s = in.nextChars()",
"s",
"in.nextChars()",
"in.nextChars",
"in",
"t = in.nextChars();",
"t",
"in.nextChars()",
"in.nextChars",
"in",
"int ans = INF;",
"ans",
"INF",
"for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length - t.length",
"i",
"s.length - t.length",
"s.length",
"s",
"s.length",
"t.length",
"t",
"t.length",
"i++",
"i++",
"i",
"{\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }",
"{\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }",
"int diff = 0;",
"diff",
"0",
"for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length",
"j",
"t.length",
"t",
"t.length",
"j++",
"j++",
"j",
"{\n if (s[i + j] != t[j]) diff++;\n }",
"{\n if (s[i + j] != t[j]) diff++;\n }",
"if (s[i + j] != t[j]) diff++;",
"s[i + j] != t[j]",
"s[i + j]",
"s",
"i + j",
"i",
"j",
"t[j]",
"t",
"j",
"diff++",
"diff",
"if (diff < ans) ans = diff;",
"diff < ans",
"diff",
"ans",
"ans = diff",
"ans",
"diff",
"out.println(ans)",
"out.println",
"out",
"ans",
"int testNumber",
"testNumber",
"MyInput in",
"in",
"PrintWriter out",
"out",
"static class MyInput {\n private final BufferedReader in;\n private static int pos;\n private static int readLen;\n private static final char[] buffer = new char[1024 * 8];\n private static char[] str = new char[500 * 8 * 2];\n private static boolean[] isDigit = new boolean[256];\n private static boolean[] isSpace = new boolean[256];\n private static boolean[] isLineSep = new boolean[256];\n\n static {\n for (int i = 0; i < 10; i++) {\n isDigit['0' + i] = true;\n }\n isDigit['-'] = true;\n isSpace[' '] = isSpace['\\r'] = isSpace['\\n'] = isSpace['\\t'] = true;\n isLineSep['\\r'] = isLineSep['\\n'] = true;\n }\n\n public MyInput(InputStream is) {\n in = new BufferedReader(new InputStreamReader(is));\n }\n\n public int read() {\n if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }\n return buffer[pos++];\n }\n\n public int nextInt() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n int ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public long nextLong() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n long ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public char nextChar() {\n while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }\n }\n\n public String nextString() {\n return new String(nextChars());\n }\n\n public char[] nextChars() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n return Arrays.copyOf(str, len);\n }\n\n public char[][] next2DChars(int h, int w) {\n char[][] s = new char[h][w];\n for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }\n return s;\n }\n\n int reads(int len, boolean[] accept) {\n try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }\n return len;\n }\n\n public int[] nextIntArray(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArray1Index(final int n) {\n final int[] res = new int[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArrayDec(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n\n public long[] nextLongArray(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArray1Index(final int n) {\n final long[] res = new long[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArrayDec(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextString());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n\n static class EndOfFileRuntimeException extends RuntimeException {\n }\n\n }",
"MyInput",
"private final BufferedReader in;",
"in",
"private static int pos;",
"pos",
"private static int readLen;",
"readLen",
"private static final char[] buffer = new char[1024 * 8];",
"buffer",
"new char[1024 * 8]",
"1024 * 8",
"1024",
"8",
"private static char[] str = new char[500 * 8 * 2];",
"str",
"new char[500 * 8 * 2]",
"500 * 8 * 2",
"500 * 8 * 2",
"500",
"8",
"2",
"private static boolean[] isDigit = new boolean[256];",
"isDigit",
"new boolean[256]",
"256",
"private static boolean[] isSpace = new boolean[256];",
"isSpace",
"new boolean[256]",
"256",
"private static boolean[] isLineSep = new boolean[256];",
"isLineSep",
"new boolean[256]",
"256",
"public MyInput(InputStream is) {\n in = new BufferedReader(new InputStreamReader(is));\n }",
"MyInput",
"{\n in = new BufferedReader(new InputStreamReader(is));\n }",
"in = new BufferedReader(new InputStreamReader(is))",
"in",
"new BufferedReader(new InputStreamReader(is))",
"InputStream is",
"is",
"public int read() {\n if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }\n return buffer[pos++];\n }",
"read",
"{\n if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }\n return buffer[pos++];\n }",
"if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }",
"pos >= readLen",
"pos",
"readLen",
"{\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }",
"pos = 0",
"pos",
"0",
"try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }",
"catch (IOException e) {\n throw new RuntimeException();\n }",
"IOException e",
"{\n throw new RuntimeException();\n }",
"throw new RuntimeException();",
"new RuntimeException()",
"{\n readLen = in.read(buffer);\n }",
"readLen = in.read(buffer)",
"readLen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }",
"readLen <= 0",
"readLen",
"0",
"{\n throw new EndOfFileRuntimeException();\n }",
"throw new EndOfFileRuntimeException();",
"new EndOfFileRuntimeException()",
"return buffer[pos++];",
"buffer[pos++]",
"buffer",
"pos++",
"pos",
"public int nextInt() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n int ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }",
"nextInt",
"{\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n int ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }",
"int len = 0;",
"len",
"0",
"str[len++] = nextChar()",
"str[len++]",
"str",
"len++",
"len",
"nextChar()",
"nextChar",
"len = reads(len, isSpace)",
"len",
"reads(len, isSpace)",
"reads",
"len",
"isSpace",
"int i = 0;",
"i",
"0",
"int ret = 0;",
"ret",
"0",
"if (str[0] == '-') {\n i = 1;\n }",
"str[0] == '-'",
"str[0]",
"str",
"0",
"'-'",
"{\n i = 1;\n }",
"i = 1",
"i",
"1",
"for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';",
";",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"ret = ret * 10 + str[i] - '0';",
"ret = ret * 10 + str[i] - '0'",
"ret",
"ret * 10 + str[i] - '0'",
"ret * 10 + str[i]",
"ret * 10",
"ret",
"10",
"str[i]",
"str",
"i",
"'0'",
"if (str[0] == '-') {\n ret = -ret;\n }",
"str[0] == '-'",
"str[0]",
"str",
"0",
"'-'",
"{\n ret = -ret;\n }",
"ret = -ret",
"ret",
"-ret",
"ret",
"return ret;",
"ret",
"public long nextLong() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n long ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }",
"nextLong",
"{\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n long ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }",
"int len = 0;",
"len",
"0",
"str[len++] = nextChar()",
"str[len++]",
"str",
"len++",
"len",
"nextChar()",
"nextChar",
"len = reads(len, isSpace)",
"len",
"reads(len, isSpace)",
"reads",
"len",
"isSpace",
"int i = 0;",
"i",
"0",
"long ret = 0;",
"ret",
"0",
"if (str[0] == '-') {\n i = 1;\n }",
"str[0] == '-'",
"str[0]",
"str",
"0",
"'-'",
"{\n i = 1;\n }",
"i = 1",
"i",
"1",
"for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';",
";",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"ret = ret * 10 + str[i] - '0';",
"ret = ret * 10 + str[i] - '0'",
"ret",
"ret * 10 + str[i] - '0'",
"ret * 10 + str[i]",
"ret * 10",
"ret",
"10",
"str[i]",
"str",
"i",
"'0'",
"if (str[0] == '-') {\n ret = -ret;\n }",
"str[0] == '-'",
"str[0]",
"str",
"0",
"'-'",
"{\n ret = -ret;\n }",
"ret = -ret",
"ret",
"-ret",
"ret",
"return ret;",
"ret",
"public char nextChar() {\n while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }\n }",
"nextChar",
"{\n while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }\n }",
"while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }",
"true",
"{\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }",
"final int c = read();",
"c",
"read()",
"read",
"if (!isSpace[c]) {\n return (char) c;\n }",
"!isSpace[c]",
"isSpace[c]",
"isSpace",
"c",
"{\n return (char) c;\n }",
"return (char) c;",
"(char) c",
"public String nextString() {\n return new String(nextChars());\n }",
"nextString",
"{\n return new String(nextChars());\n }",
"return new String(nextChars());",
"new String(nextChars())",
"public char[] nextChars() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n return Arrays.copyOf(str, len);\n }",
"nextChars",
"{\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n return Arrays.copyOf(str, len);\n }",
"int len = 0;",
"len",
"0",
"str[len++] = nextChar()",
"str[len++]",
"str",
"len++",
"len",
"nextChar()",
"nextChar",
"len = reads(len, isSpace)",
"len",
"reads(len, isSpace)",
"reads",
"len",
"isSpace",
"return Arrays.copyOf(str, len);",
"Arrays.copyOf(str, len)",
"Arrays.copyOf",
"Arrays",
"str",
"len",
"public char[][] next2DChars(int h, int w) {\n char[][] s = new char[h][w];\n for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }\n return s;\n }",
"next2DChars",
"{\n char[][] s = new char[h][w];\n for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }\n return s;\n }",
"char[][] s = new char[h][w];",
"s",
"new char[h][w]",
"h",
"w",
"for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < h",
"i",
"h",
"i++",
"i++",
"i",
"{\n s[i] = nextChars();\n }",
"{\n s[i] = nextChars();\n }",
"s[i] = nextChars()",
"s[i]",
"s",
"i",
"nextChars()",
"nextChars",
"return s;",
"s",
"int h",
"h",
"int w",
"w",
"int reads(int len, boolean[] accept) {\n try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }\n return len;\n }",
"reads",
"{\n try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }\n return len;\n }",
"try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }",
"catch (EndOfFileRuntimeException e) {\n }",
"EndOfFileRuntimeException e",
"{\n }",
"{\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n }",
"while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }",
"true",
"{\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }",
"final int c = read();",
"c",
"read()",
"read",
"if (accept[c]) {\n break;\n }",
"accept[c]",
"accept",
"c",
"{\n break;\n }",
"break;",
"if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }",
"str.length == len",
"str.length",
"str",
"str.length",
"len",
"{\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }",
"char[] rep = new char[str.length * 3 / 2];",
"rep",
"new char[str.length * 3 / 2]",
"str.length * 3 / 2",
"str.length * 3",
"str.length",
"str",
"str.length",
"3",
"2",
"System.arraycopy(str, 0, rep, 0, str.length)",
"System.arraycopy",
"System",
"str",
"0",
"rep",
"0",
"str.length",
"str",
"str.length",
"str = rep",
"str",
"rep",
"str[len++] = (char) c",
"str[len++]",
"str",
"len++",
"len",
"(char) c",
"return len;",
"len",
"int len",
"len",
"boolean[] accept",
"accept",
"public int[] nextIntArray(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"nextIntArray",
"{\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"final int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextInt();\n }",
"{\n res[i] = nextInt();\n }",
"res[i] = nextInt()",
"res[i]",
"res",
"i",
"nextInt()",
"nextInt",
"return res;",
"res",
"final int n",
"n",
"public int[] nextIntArray1Index(final int n) {\n final int[] res = new int[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"nextIntArray1Index",
"{\n final int[] res = new int[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"final int[] res = new int[n + 1];",
"res",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n + 1",
"i",
"n + 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n res[i] = nextInt();\n }",
"{\n res[i] = nextInt();\n }",
"res[i] = nextInt()",
"res[i]",
"res",
"i",
"nextInt()",
"nextInt",
"return res;",
"res",
"final int n",
"n",
"public int[] nextIntArrayDec(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }",
"nextIntArrayDec",
"{\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }",
"final int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextInt() - 1;\n }",
"{\n res[i] = nextInt() - 1;\n }",
"res[i] = nextInt() - 1",
"res[i]",
"res",
"i",
"nextInt() - 1",
"nextInt()",
"nextInt",
"1",
"return res;",
"res",
"final int n",
"n",
"public long[] nextLongArray(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"nextLongArray",
"{\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"final long[] res = new long[n];",
"res",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextLong();\n }",
"{\n res[i] = nextLong();\n }",
"res[i] = nextLong()",
"res[i]",
"res",
"i",
"nextLong()",
"nextLong",
"return res;",
"res",
"final int n",
"n",
"public long[] nextLongArray1Index(final int n) {\n final long[] res = new long[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"nextLongArray1Index",
"{\n final long[] res = new long[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"final long[] res = new long[n + 1];",
"res",
"new long[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i < n + 1",
"i",
"n + 1",
"n",
"1",
"i++",
"i++",
"i",
"{\n res[i] = nextLong();\n }",
"{\n res[i] = nextLong();\n }",
"res[i] = nextLong()",
"res[i]",
"res",
"i",
"nextLong()",
"nextLong",
"return res;",
"res",
"final int n",
"n",
"public long[] nextLongArrayDec(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }",
"nextLongArrayDec",
"{\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }",
"final long[] res = new long[n];",
"res",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextLong() - 1;\n }",
"{\n res[i] = nextLong() - 1;\n }",
"res[i] = nextLong() - 1",
"res[i]",
"res",
"i",
"nextLong() - 1",
"nextLong()",
"nextLong",
"1",
"return res;",
"res",
"final int n",
"n",
"public double nextDouble() {\n return Double.parseDouble(nextString());\n }",
"nextDouble",
"{\n return Double.parseDouble(nextString());\n }",
"return Double.parseDouble(nextString());",
"Double.parseDouble(nextString())",
"Double.parseDouble",
"Double",
"nextString()",
"nextString",
"public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }",
"nextDoubleArray",
"{\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }",
"double[] res = new double[n];",
"res",
"new double[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextDouble();\n }",
"{\n res[i] = nextDouble();\n }",
"res[i] = nextDouble()",
"res[i]",
"res",
"i",
"nextDouble()",
"nextDouble",
"return res;",
"res",
"int n",
"n",
"static class EndOfFileRuntimeException extends RuntimeException {\n }",
"EndOfFileRuntimeException",
"RuntimeException",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n MyInput in = new MyInput(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskX solver = new TaskX();\n solver.solve(1, in, out);\n out.close();\n }\n\n static int INF = 1 << 30;\n static long LINF = 1L << 55;\n static int MOD = 1000000007;\n static int[] mh4 = {0, -1, 1, 0};\n static int[] mw4 = {-1, 0, 0, 1};\n static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};\n static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};\n\n static class TaskX {\n\n public void solve(int testNumber, MyInput in, PrintWriter out) {\n char[] s = in.nextChars(), t = in.nextChars();\n int ans = INF;\n for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }\n out.println(ans);\n }\n }\n\n static class MyInput {\n private final BufferedReader in;\n private static int pos;\n private static int readLen;\n private static final char[] buffer = new char[1024 * 8];\n private static char[] str = new char[500 * 8 * 2];\n private static boolean[] isDigit = new boolean[256];\n private static boolean[] isSpace = new boolean[256];\n private static boolean[] isLineSep = new boolean[256];\n\n static {\n for (int i = 0; i < 10; i++) {\n isDigit['0' + i] = true;\n }\n isDigit['-'] = true;\n isSpace[' '] = isSpace['\\r'] = isSpace['\\n'] = isSpace['\\t'] = true;\n isLineSep['\\r'] = isLineSep['\\n'] = true;\n }\n\n public MyInput(InputStream is) {\n in = new BufferedReader(new InputStreamReader(is));\n }\n\n public int read() {\n if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }\n return buffer[pos++];\n }\n\n public int nextInt() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n int ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public long nextLong() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n long ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public char nextChar() {\n while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }\n }\n\n public String nextString() {\n return new String(nextChars());\n }\n\n public char[] nextChars() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n return Arrays.copyOf(str, len);\n }\n\n public char[][] next2DChars(int h, int w) {\n char[][] s = new char[h][w];\n for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }\n return s;\n }\n\n int reads(int len, boolean[] accept) {\n try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }\n return len;\n }\n\n public int[] nextIntArray(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArray1Index(final int n) {\n final int[] res = new int[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArrayDec(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n\n public long[] nextLongArray(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArray1Index(final int n) {\n final long[] res = new long[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArrayDec(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextString());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n\n static class EndOfFileRuntimeException extends RuntimeException {\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n MyInput in = new MyInput(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskX solver = new TaskX();\n solver.solve(1, in, out);\n out.close();\n }\n\n static int INF = 1 << 30;\n static long LINF = 1L << 55;\n static int MOD = 1000000007;\n static int[] mh4 = {0, -1, 1, 0};\n static int[] mw4 = {-1, 0, 0, 1};\n static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};\n static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};\n\n static class TaskX {\n\n public void solve(int testNumber, MyInput in, PrintWriter out) {\n char[] s = in.nextChars(), t = in.nextChars();\n int ans = INF;\n for (int i = 0; i <= s.length - t.length; i++) {\n int diff = 0;\n for (int j = 0; j < t.length; j++) {\n if (s[i + j] != t[j]) diff++;\n }\n if (diff < ans) ans = diff;\n }\n out.println(ans);\n }\n }\n\n static class MyInput {\n private final BufferedReader in;\n private static int pos;\n private static int readLen;\n private static final char[] buffer = new char[1024 * 8];\n private static char[] str = new char[500 * 8 * 2];\n private static boolean[] isDigit = new boolean[256];\n private static boolean[] isSpace = new boolean[256];\n private static boolean[] isLineSep = new boolean[256];\n\n static {\n for (int i = 0; i < 10; i++) {\n isDigit['0' + i] = true;\n }\n isDigit['-'] = true;\n isSpace[' '] = isSpace['\\r'] = isSpace['\\n'] = isSpace['\\t'] = true;\n isLineSep['\\r'] = isLineSep['\\n'] = true;\n }\n\n public MyInput(InputStream is) {\n in = new BufferedReader(new InputStreamReader(is));\n }\n\n public int read() {\n if (pos >= readLen) {\n pos = 0;\n try {\n readLen = in.read(buffer);\n } catch (IOException e) {\n throw new RuntimeException();\n }\n if (readLen <= 0) {\n throw new EndOfFileRuntimeException();\n }\n }\n return buffer[pos++];\n }\n\n public int nextInt() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n int ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public long nextLong() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n int i = 0;\n long ret = 0;\n if (str[0] == '-') {\n i = 1;\n }\n for (; i < len; i++)\n ret = ret * 10 + str[i] - '0';\n if (str[0] == '-') {\n ret = -ret;\n }\n return ret;\n }\n\n public char nextChar() {\n while (true) {\n final int c = read();\n if (!isSpace[c]) {\n return (char) c;\n }\n }\n }\n\n public String nextString() {\n return new String(nextChars());\n }\n\n public char[] nextChars() {\n int len = 0;\n str[len++] = nextChar();\n len = reads(len, isSpace);\n return Arrays.copyOf(str, len);\n }\n\n public char[][] next2DChars(int h, int w) {\n char[][] s = new char[h][w];\n for (int i = 0; i < h; i++) {\n s[i] = nextChars();\n }\n return s;\n }\n\n int reads(int len, boolean[] accept) {\n try {\n while (true) {\n final int c = read();\n if (accept[c]) {\n break;\n }\n if (str.length == len) {\n char[] rep = new char[str.length * 3 / 2];\n System.arraycopy(str, 0, rep, 0, str.length);\n str = rep;\n }\n str[len++] = (char) c;\n }\n } catch (EndOfFileRuntimeException e) {\n }\n return len;\n }\n\n public int[] nextIntArray(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArray1Index(final int n) {\n final int[] res = new int[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n\n public int[] nextIntArrayDec(final int n) {\n final int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n\n public long[] nextLongArray(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArray1Index(final int n) {\n final long[] res = new long[n + 1];\n for (int i = 1; i < n + 1; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n\n public long[] nextLongArrayDec(final int n) {\n final long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextString());\n }\n\n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n\n static class EndOfFileRuntimeException extends RuntimeException {\n }\n\n }\n}",
"Main"
]
| import java.io.*;
import java.util.Arrays;
/**
* @author tutuz on 2020/08/30
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
MyInput in = new MyInput(inputStream);
PrintWriter out = new PrintWriter(outputStream);
TaskX solver = new TaskX();
solver.solve(1, in, out);
out.close();
}
static int INF = 1 << 30;
static long LINF = 1L << 55;
static int MOD = 1000000007;
static int[] mh4 = {0, -1, 1, 0};
static int[] mw4 = {-1, 0, 0, 1};
static int[] mh8 = {-1, -1, -1, 0, 0, 1, 1, 1};
static int[] mw8 = {-1, 0, 1, -1, 1, -1, 0, 1};
static class TaskX {
public void solve(int testNumber, MyInput in, PrintWriter out) {
char[] s = in.nextChars(), t = in.nextChars();
int ans = INF;
for (int i = 0; i <= s.length - t.length; i++) {
int diff = 0;
for (int j = 0; j < t.length; j++) {
if (s[i + j] != t[j]) diff++;
}
if (diff < ans) ans = diff;
}
out.println(ans);
}
}
static class MyInput {
private final BufferedReader in;
private static int pos;
private static int readLen;
private static final char[] buffer = new char[1024 * 8];
private static char[] str = new char[500 * 8 * 2];
private static boolean[] isDigit = new boolean[256];
private static boolean[] isSpace = new boolean[256];
private static boolean[] isLineSep = new boolean[256];
static {
for (int i = 0; i < 10; i++) {
isDigit['0' + i] = true;
}
isDigit['-'] = true;
isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
isLineSep['\r'] = isLineSep['\n'] = true;
}
public MyInput(InputStream is) {
in = new BufferedReader(new InputStreamReader(is));
}
public int read() {
if (pos >= readLen) {
pos = 0;
try {
readLen = in.read(buffer);
} catch (IOException e) {
throw new RuntimeException();
}
if (readLen <= 0) {
throw new EndOfFileRuntimeException();
}
}
return buffer[pos++];
}
public int nextInt() {
int len = 0;
str[len++] = nextChar();
len = reads(len, isSpace);
int i = 0;
int ret = 0;
if (str[0] == '-') {
i = 1;
}
for (; i < len; i++)
ret = ret * 10 + str[i] - '0';
if (str[0] == '-') {
ret = -ret;
}
return ret;
}
public long nextLong() {
int len = 0;
str[len++] = nextChar();
len = reads(len, isSpace);
int i = 0;
long ret = 0;
if (str[0] == '-') {
i = 1;
}
for (; i < len; i++)
ret = ret * 10 + str[i] - '0';
if (str[0] == '-') {
ret = -ret;
}
return ret;
}
public char nextChar() {
while (true) {
final int c = read();
if (!isSpace[c]) {
return (char) c;
}
}
}
public String nextString() {
return new String(nextChars());
}
public char[] nextChars() {
int len = 0;
str[len++] = nextChar();
len = reads(len, isSpace);
return Arrays.copyOf(str, len);
}
public char[][] next2DChars(int h, int w) {
char[][] s = new char[h][w];
for (int i = 0; i < h; i++) {
s[i] = nextChars();
}
return s;
}
int reads(int len, boolean[] accept) {
try {
while (true) {
final int c = read();
if (accept[c]) {
break;
}
if (str.length == len) {
char[] rep = new char[str.length * 3 / 2];
System.arraycopy(str, 0, rep, 0, str.length);
str = rep;
}
str[len++] = (char) c;
}
} catch (EndOfFileRuntimeException e) {
}
return len;
}
public int[] nextIntArray(final int n) {
final int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt();
}
return res;
}
public int[] nextIntArray1Index(final int n) {
final int[] res = new int[n + 1];
for (int i = 1; i < n + 1; i++) {
res[i] = nextInt();
}
return res;
}
public int[] nextIntArrayDec(final int n) {
final int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt() - 1;
}
return res;
}
public long[] nextLongArray(final int n) {
final long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong();
}
return res;
}
public long[] nextLongArray1Index(final int n) {
final long[] res = new long[n + 1];
for (int i = 1; i < n + 1; i++) {
res[i] = nextLong();
}
return res;
}
public long[] nextLongArrayDec(final int n) {
final long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong() - 1;
}
return res;
}
public double nextDouble() {
return Double.parseDouble(nextString());
}
public double[] nextDoubleArray(int n) {
double[] res = new double[n];
for (int i = 0; i < n; i++) {
res[i] = nextDouble();
}
return res;
}
static class EndOfFileRuntimeException extends RuntimeException {
}
}
}
|
[
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,
2,
4,
18,
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,
14,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
30,
40,
13,
0,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
13,
14,
2,
13,
13,
30,
29,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
117,
5
],
[
117,
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
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
27,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
49,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
65,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
64,
76
],
[
76,
77
],
[
77,
78
],
[
45,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
81,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
6,
91
],
[
91,
92
],
[
117,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
101,
102
],
[
96,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
103,
110
],
[
110,
111
],
[
93,
112
],
[
112,
113
],
[
93,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
]
| [
"import 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.nextLine();\n\n\t\tString T = sc.nextLine();\n\t\t//int T = sc.nextInt();\n\t\tint ans = T.length();\n\n\t\tfor(int start = 0; start <= S.length() - T.length(); start++) {\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}\n\n\t\tSystem.out.print(ans);\n\n }\n\n\tstatic int min(int x,int y) {\n\t\tif(x>y) {\n\t\treturn y;\n\t\t}\n\t\telse if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;\n\t}\n}\n\n\n\n//cabacc\n//abc",
"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.nextLine();\n\n\t\tString T = sc.nextLine();\n\t\t//int T = sc.nextInt();\n\t\tint ans = T.length();\n\n\t\tfor(int start = 0; start <= S.length() - T.length(); start++) {\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}\n\n\t\tSystem.out.print(ans);\n\n }\n\n\tstatic int min(int x,int y) {\n\t\tif(x>y) {\n\t\treturn y;\n\t\t}\n\t\telse if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.nextLine();\n\n\t\tString T = sc.nextLine();\n\t\t//int T = sc.nextInt();\n\t\tint ans = T.length();\n\n\t\tfor(int start = 0; start <= S.length() - T.length(); start++) {\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}\n\n\t\tSystem.out.print(ans);\n\n }",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.nextLine();\n\n\t\tString T = sc.nextLine();\n\t\t//int T = sc.nextInt();\n\t\tint ans = T.length();\n\n\t\tfor(int start = 0; start <= S.length() - T.length(); start++) {\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}\n\n\t\tSystem.out.print(ans);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.nextLine();",
"S",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String T = sc.nextLine();",
"T",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int ans = T.length();",
"ans",
"T.length()",
"T.length",
"T",
"for(int start = 0; start <= S.length() - T.length(); start++) {\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}",
"int start = 0;",
"int start = 0;",
"start",
"0",
"start <= S.length() - T.length()",
"start",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"start++",
"start++",
"start",
"{\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}",
"{\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}",
"int diff = 0;",
"diff",
"0",
"for(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<T.length()",
"i",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"if(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}",
"T.charAt(i) != S.charAt(start+i)",
"T.charAt(i)",
"T.charAt",
"T",
"i",
"S.charAt(start+i)",
"S.charAt",
"S",
"start+i",
"start",
"i",
"{\n\t\t\t\t\tdiff++;\n\t\t\t\t}",
"diff++",
"diff",
"ans = min(ans , diff)",
"ans",
"min(ans , diff)",
"min",
"ans",
"diff",
"System.out.print(ans)",
"System.out.print",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"static int min(int x,int y) {\n\t\tif(x>y) {\n\t\treturn y;\n\t\t}\n\t\telse if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;\n\t}",
"min",
"{\n\t\tif(x>y) {\n\t\treturn y;\n\t\t}\n\t\telse if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;\n\t}",
"if(x>y) {\n\t\treturn y;\n\t\t}\n\t\telse if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;",
"x>y",
"x",
"y",
"{\n\t\treturn y;\n\t\t}",
"return y;",
"y",
"if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;",
"x<y",
"x",
"y",
"{\n\t\t\treturn x;\n\t\t}",
"return x;",
"x",
"return x;",
"x",
"int x",
"x",
"int y",
"y",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tString S = sc.nextLine();\n\n\t\tString T = sc.nextLine();\n\t\t//int T = sc.nextInt();\n\t\tint ans = T.length();\n\n\t\tfor(int start = 0; start <= S.length() - T.length(); start++) {\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}\n\n\t\tSystem.out.print(ans);\n\n }\n\n\tstatic int min(int x,int y) {\n\t\tif(x>y) {\n\t\treturn y;\n\t\t}\n\t\telse if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;\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.nextLine();\n\n\t\tString T = sc.nextLine();\n\t\t//int T = sc.nextInt();\n\t\tint ans = T.length();\n\n\t\tfor(int start = 0; start <= S.length() - T.length(); start++) {\n\t\t\tint diff = 0;\n\t\t\tfor(int i = 0; i<T.length();i++) {\n\t\t\t\tif(T.charAt(i) != S.charAt(start+i)) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tans = min(ans , diff);\n\t\t}\n\n\t\tSystem.out.print(ans);\n\n }\n\n\tstatic int min(int x,int y) {\n\t\tif(x>y) {\n\t\treturn y;\n\t\t}\n\t\telse if(x<y) {\n\t\t\treturn x;\n\t\t}\n\t\telse\n\t\t\treturn x;\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 T = sc.nextLine();
//int T = sc.nextInt();
int ans = T.length();
for(int start = 0; start <= S.length() - T.length(); start++) {
int diff = 0;
for(int i = 0; i<T.length();i++) {
if(T.charAt(i) != S.charAt(start+i)) {
diff++;
}
}
ans = min(ans , diff);
}
System.out.print(ans);
}
static int min(int x,int y) {
if(x>y) {
return y;
}
else if(x<y) {
return x;
}
else
return x;
}
}
//cabacc
//abc |
[
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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
13,
41,
13,
4,
13,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
40,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
159,
5
],
[
159,
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
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
37,
47
],
[
47,
48
],
[
48,
49
],
[
37,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
51,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
63,
67
],
[
51,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
70,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
6,
81
],
[
81,
82
],
[
159,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
101,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
103,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
102,
112
],
[
112,
113
],
[
85,
114
],
[
114,
115
],
[
83,
116
],
[
116,
117
],
[
83,
118
],
[
118,
119
],
[
83,
120
],
[
120,
121
],
[
159,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
124,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
122,
138
],
[
138,
139
],
[
122,
140
],
[
140,
141
],
[
159,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
150,
151
],
[
150,
152
],
[
150,
153
],
[
142,
154
],
[
154,
155
],
[
142,
156
],
[
156,
157
],
[
0,
158
],
[
158,
159
],
[
158,
160
]
]
| [
"//package hiougyf;\n\nimport java.util.*;;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t //Reader sc=new Reader();\n Scanner sc =new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n // if(n<m) System.out.println();\n for(int i=0;i<=(n-m);i++) {\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }\n System.out.println(min);\n\t}\n static int find(String s,String t,int n) {\n \t int ans=0;\n \t for(int i=0;i<n;i++) {\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }\n \t return ans;\n }\n \n \n public static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n \n return gcd(b%a, a); \n } \n public static int lcm(int a, int b) \n { \n return (a*b)/gcd(a, b); \n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t //Reader sc=new Reader();\n Scanner sc =new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n // if(n<m) System.out.println();\n for(int i=0;i<=(n-m);i++) {\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }\n System.out.println(min);\n\t}\n static int find(String s,String t,int n) {\n \t int ans=0;\n \t for(int i=0;i<n;i++) {\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }\n \t return ans;\n }\n \n \n public static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n \n return gcd(b%a, a); \n } \n public static int lcm(int a, int b) \n { \n return (a*b)/gcd(a, b); \n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t //Reader sc=new Reader();\n Scanner sc =new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n // if(n<m) System.out.println();\n for(int i=0;i<=(n-m);i++) {\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }\n System.out.println(min);\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\t //Reader sc=new Reader();\n Scanner sc =new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n // if(n<m) System.out.println();\n for(int i=0;i<=(n-m);i++) {\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }\n System.out.println(min);\n\t}",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s=sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t=sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int n=s.length();",
"n",
"s.length()",
"s.length",
"s",
"int m=t.length();",
"m",
"t.length()",
"t.length",
"t",
"int min=Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i=0;i<=(n-m);i++) {\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=(n-m)",
"i",
"(n-m)",
"n",
"m",
"i++",
"i++",
"i",
"{\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }",
"{\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }",
"String c=s.substring(i,(i+m));",
"c",
"s.substring(i,(i+m))",
"s.substring",
"s",
"i",
"(i+m)",
"i",
"m",
"int h=find(c,t,m);",
"h",
"find(c,t,m)",
"find",
"c",
"t",
"m",
"min=Math.min(min, h)",
"min",
"Math.min(min, h)",
"Math.min",
"Math",
"min",
"h",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"static int find(String s,String t,int n) {\n \t int ans=0;\n \t for(int i=0;i<n;i++) {\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }\n \t return ans;\n }",
"find",
"{\n \t int ans=0;\n \t for(int i=0;i<n;i++) {\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }\n \t return ans;\n }",
"int ans=0;",
"ans",
"0",
"for(int i=0;i<n;i++) {\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }",
"{\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }",
"if(s.charAt(i)!=t.charAt(i)) ans++;",
"s.charAt(i)!=t.charAt(i)",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"ans++",
"ans",
"return ans;",
"ans",
"String s",
"s",
"String t",
"t",
"int n",
"n",
"public static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n \n return gcd(b%a, a); \n }",
"gcd",
"{ \n if (a == 0) \n return b; \n \n return gcd(b%a, a); \n }",
"if (a == 0) \n return b;",
"a == 0",
"a",
"0",
"return b;",
"b",
"return gcd(b%a, a);",
"gcd(b%a, a)",
"gcd",
"b%a",
"b",
"a",
"a",
"int a",
"a",
"int b",
"b",
"public static int lcm(int a, int b) \n { \n return (a*b)/gcd(a, b); \n\t}",
"lcm",
"{ \n return (a*b)/gcd(a, b); \n\t}",
"return (a*b)/gcd(a, b);",
"(a*b)/gcd(a, b)",
"(a*b)",
"a",
"b",
"gcd(a, b)",
"gcd",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t //Reader sc=new Reader();\n Scanner sc =new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n // if(n<m) System.out.println();\n for(int i=0;i<=(n-m);i++) {\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }\n System.out.println(min);\n\t}\n static int find(String s,String t,int n) {\n \t int ans=0;\n \t for(int i=0;i<n;i++) {\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }\n \t return ans;\n }\n \n \n public static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n \n return gcd(b%a, a); \n } \n public static int lcm(int a, int b) \n { \n return (a*b)/gcd(a, b); \n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t //Reader sc=new Reader();\n Scanner sc =new Scanner(System.in);\n String s=sc.next();\n String t=sc.next();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n // if(n<m) System.out.println();\n for(int i=0;i<=(n-m);i++) {\n \t String c=s.substring(i,(i+m));\n \t// System.out.println(c);\n \t int h=find(c,t,m);\n \t min=Math.min(min, h);\n }\n System.out.println(min);\n\t}\n static int find(String s,String t,int n) {\n \t int ans=0;\n \t for(int i=0;i<n;i++) {\n \t\t if(s.charAt(i)!=t.charAt(i)) ans++;\n \t }\n \t return ans;\n }\n \n \n public static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n \n return gcd(b%a, a); \n } \n public static int lcm(int a, int b) \n { \n return (a*b)/gcd(a, b); \n\t}\n\n}",
"Main"
]
| //package hiougyf;
import java.util.*;;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
//Reader sc=new Reader();
Scanner sc =new Scanner(System.in);
String s=sc.next();
String t=sc.next();
int n=s.length();
int m=t.length();
int min=Integer.MAX_VALUE;
// if(n<m) System.out.println();
for(int i=0;i<=(n-m);i++) {
String c=s.substring(i,(i+m));
// System.out.println(c);
int h=find(c,t,m);
min=Math.min(min, h);
}
System.out.println(min);
}
static int find(String s,String t,int n) {
int ans=0;
for(int i=0;i<n;i++) {
if(s.charAt(i)!=t.charAt(i)) ans++;
}
return ans;
}
public static int gcd(int a, int b)
{
if (a == 0)
return b;
return gcd(b%a, a);
}
public static int lcm(int a, int b)
{
return (a*b)/gcd(a, b);
}
}
|
[
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,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
40,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
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
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
27,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
45,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
66,
80
],
[
80,
81
],
[
45,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
6,
95
],
[
95,
96
]
]
| [
"import java.util.*;\nclass Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tint sol = t.length();\n\t\tfor (int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\tint count = 0;\n\t\t\tint k = i;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tsol = Math.min(count, sol);\n\t\t}\n\t\tSystem.out.println(sol);\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tint sol = t.length();\n\t\tfor (int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\tint count = 0;\n\t\t\tint k = i;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tsol = Math.min(count, sol);\n\t\t}\n\t\tSystem.out.println(sol);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tint sol = t.length();\n\t\tfor (int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\tint count = 0;\n\t\t\tint k = i;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tsol = Math.min(count, sol);\n\t\t}\n\t\tSystem.out.println(sol);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tint sol = t.length();\n\t\tfor (int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\tint count = 0;\n\t\t\tint k = i;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tsol = Math.min(count, sol);\n\t\t}\n\t\tSystem.out.println(sol);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int sol = t.length();",
"sol",
"t.length()",
"t.length",
"t",
"for (int i = 0; i <= s.length() - t.length(); i++) {\n\t\t\tint count = 0;\n\t\t\tint k = i;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tsol = Math.min(count, sol);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tint count = 0;\n\t\t\tint k = i;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tsol = Math.min(count, sol);\n\t\t}",
"{\n\t\t\tint count = 0;\n\t\t\tint k = i;\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}\n\t\t\tsol = Math.min(count, sol);\n\t\t}",
"int count = 0;",
"count",
"0",
"int k = i;",
"k",
"i",
"for (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}",
"{\n\t\t\t\tif (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tk++;\n\t\t\t}",
"if (s.charAt(k) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"s.charAt(k) != t.charAt(j)",
"s.charAt(k)",
"s.charAt",
"s",
"k",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"count++",
"count",
"k++",
"k",
"sol = Math.min(count, sol)",
"sol",
"Math.min(count, sol)",
"Math.min",
"Math",
"count",
"sol",
"System.out.println(sol)",
"System.out.println",
"System.out",
"System",
"System.out",
"sol",
"String[] args",
"args"
]
| import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
int sol = t.length();
for (int i = 0; i <= s.length() - t.length(); i++) {
int count = 0;
int k = i;
for (int j = 0; j < t.length(); j++) {
if (s.charAt(k) != t.charAt(j)) {
count++;
}
k++;
}
sol = Math.min(count, sol);
}
System.out.println(sol);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
14,
2,
4,
18,
13,
4,
18,
13,
29,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
40,
13,
29,
13,
23,
13,
23,
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,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
4,
18,
13,
13,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
121,
5
],
[
121,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
13,
17
],
[
17,
18
],
[
18,
19
],
[
12,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
24,
34
],
[
34,
35
],
[
35,
36
],
[
24,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
39,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
38,
48
],
[
48,
49
],
[
8,
50
],
[
50,
51
],
[
6,
52
],
[
52,
53
],
[
6,
54
],
[
54,
55
],
[
121,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
58,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
58,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
58,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
77,
91
],
[
91,
92
],
[
92,
93
],
[
77,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
98,
104
],
[
95,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
58,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
56,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
]
| [
"import java.util.*;\npublic class Main {\n\n\tpublic static int finddiff(String s, String t)\n\t{\n\t\tint res = 0;\n\t\tif(t.length()>s.length())\n\t\t\treturn Integer.MAX_VALUE;\n\t\tfor(int i=0;i<t.length();i++)\n\t\t\t\tif(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;\n\t\treturn res;\n\t}\n\tpublic static void main(String[] args) {\t\t\n\t\tScanner scn = new Scanner(System.in);\n\t\tString s = scn.next();\n\t\tString t = scn.next();\n\t\tint min = t.length();\n\t\tfor(int i=0;i<=s.length()-t.length();i++)\n\t\t{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n// codeforces coderraces\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static int finddiff(String s, String t)\n\t{\n\t\tint res = 0;\n\t\tif(t.length()>s.length())\n\t\t\treturn Integer.MAX_VALUE;\n\t\tfor(int i=0;i<t.length();i++)\n\t\t\t\tif(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;\n\t\treturn res;\n\t}\n\tpublic static void main(String[] args) {\t\t\n\t\tScanner scn = new Scanner(System.in);\n\t\tString s = scn.next();\n\t\tString t = scn.next();\n\t\tint min = t.length();\n\t\tfor(int i=0;i<=s.length()-t.length();i++)\n\t\t{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n// codeforces coderraces\n}",
"Main",
"public static int finddiff(String s, String t)\n\t{\n\t\tint res = 0;\n\t\tif(t.length()>s.length())\n\t\t\treturn Integer.MAX_VALUE;\n\t\tfor(int i=0;i<t.length();i++)\n\t\t\t\tif(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;\n\t\treturn res;\n\t}",
"finddiff",
"{\n\t\tint res = 0;\n\t\tif(t.length()>s.length())\n\t\t\treturn Integer.MAX_VALUE;\n\t\tfor(int i=0;i<t.length();i++)\n\t\t\t\tif(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;\n\t\treturn res;\n\t}",
"int res = 0;",
"res",
"0",
"if(t.length()>s.length())\n\t\t\treturn Integer.MAX_VALUE;",
"t.length()>s.length()",
"t.length()",
"t.length",
"t",
"s.length()",
"s.length",
"s",
"return Integer.MAX_VALUE;",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i=0;i<t.length();i++)\n\t\t\t\tif(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<t.length()",
"i",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"if(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;",
"if(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;",
"t.charAt(i)!=s.charAt(i)",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"res++",
"res",
"return res;",
"res",
"String s",
"s",
"String t",
"t",
"public static void main(String[] args) {\t\t\n\t\tScanner scn = new Scanner(System.in);\n\t\tString s = scn.next();\n\t\tString t = scn.next();\n\t\tint min = t.length();\n\t\tfor(int i=0;i<=s.length()-t.length();i++)\n\t\t{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"main",
"{\t\t\n\t\tScanner scn = new Scanner(System.in);\n\t\tString s = scn.next();\n\t\tString t = scn.next();\n\t\tint min = t.length();\n\t\tfor(int i=0;i<=s.length()-t.length();i++)\n\t\t{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"String s = scn.next();",
"s",
"scn.next()",
"scn.next",
"scn",
"String t = scn.next();",
"t",
"scn.next()",
"scn.next",
"scn",
"int min = t.length();",
"min",
"t.length()",
"t.length",
"t",
"for(int i=0;i<=s.length()-t.length();i++)\n\t\t{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=s.length()-t.length()",
"i",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}",
"{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}",
"int val = finddiff(s.substring(i),t);",
"val",
"finddiff(s.substring(i),t)",
"finddiff",
"s.substring(i)",
"s.substring",
"s",
"i",
"t",
"if(min>val)\n\t\t\t\tmin = val;",
"min>val",
"min",
"val",
"min = val",
"min",
"val",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public class Main {\n\n\tpublic static int finddiff(String s, String t)\n\t{\n\t\tint res = 0;\n\t\tif(t.length()>s.length())\n\t\t\treturn Integer.MAX_VALUE;\n\t\tfor(int i=0;i<t.length();i++)\n\t\t\t\tif(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;\n\t\treturn res;\n\t}\n\tpublic static void main(String[] args) {\t\t\n\t\tScanner scn = new Scanner(System.in);\n\t\tString s = scn.next();\n\t\tString t = scn.next();\n\t\tint min = t.length();\n\t\tfor(int i=0;i<=s.length()-t.length();i++)\n\t\t{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n// codeforces coderraces\n}",
"public class Main {\n\n\tpublic static int finddiff(String s, String t)\n\t{\n\t\tint res = 0;\n\t\tif(t.length()>s.length())\n\t\t\treturn Integer.MAX_VALUE;\n\t\tfor(int i=0;i<t.length();i++)\n\t\t\t\tif(t.charAt(i)!=s.charAt(i))\n\t\t\t\t\tres++;\n\t\treturn res;\n\t}\n\tpublic static void main(String[] args) {\t\t\n\t\tScanner scn = new Scanner(System.in);\n\t\tString s = scn.next();\n\t\tString t = scn.next();\n\t\tint min = t.length();\n\t\tfor(int i=0;i<=s.length()-t.length();i++)\n\t\t{\n\t\t\tint val = finddiff(s.substring(i),t);\n\t\t\tif(min>val)\n\t\t\t\tmin = val;\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n// codeforces coderraces\n}",
"Main"
]
| import java.util.*;
public class Main {
public static int finddiff(String s, String t)
{
int res = 0;
if(t.length()>s.length())
return Integer.MAX_VALUE;
for(int i=0;i<t.length();i++)
if(t.charAt(i)!=s.charAt(i))
res++;
return res;
}
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
String s = scn.next();
String t = scn.next();
int min = t.length();
for(int i=0;i<=s.length()-t.length();i++)
{
int val = finddiff(s.substring(i),t);
if(min>val)
min = val;
}
System.out.println(min);
}
// codeforces coderraces
}
|
[
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,
18,
13,
13,
41,
13,
2,
18,
13,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
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
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
8,
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
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
62,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
77,
87
],
[
87,
88
],
[
88,
89
],
[
58,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
92,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
]
| [
"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.next();\n String t = sc.next();\n char[] ss = s.toCharArray();\n char[] ts = t.toCharArray();\n int ans = Integer.MAX_VALUE;\n int limit = ss.length - ts.length;\n for (int i = 0; i <= limit; i++) {\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }\n System.out.println(ans);\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 String t = sc.next();\n char[] ss = s.toCharArray();\n char[] ts = t.toCharArray();\n int ans = Integer.MAX_VALUE;\n int limit = ss.length - ts.length;\n for (int i = 0; i <= limit; i++) {\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] ss = s.toCharArray();\n char[] ts = t.toCharArray();\n int ans = Integer.MAX_VALUE;\n int limit = ss.length - ts.length;\n for (int i = 0; i <= limit; i++) {\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] ss = s.toCharArray();\n char[] ts = t.toCharArray();\n int ans = Integer.MAX_VALUE;\n int limit = ss.length - ts.length;\n for (int i = 0; i <= limit; i++) {\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"char[] ss = s.toCharArray();",
"ss",
"s.toCharArray()",
"s.toCharArray",
"s",
"char[] ts = t.toCharArray();",
"ts",
"t.toCharArray()",
"t.toCharArray",
"t",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"int limit = ss.length - ts.length;",
"limit",
"ss.length - ts.length",
"ss.length",
"ss",
"ss.length",
"ts.length",
"ts",
"ts.length",
"for (int i = 0; i <= limit; i++) {\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= limit",
"i",
"limit",
"i++",
"i++",
"i",
"{\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }",
"{\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < ts.length",
"j",
"ts.length",
"ts",
"ts.length",
"j++",
"j++",
"j",
"{\n if(ss[i + j] != ts[j]){\n count++;\n }\n }",
"{\n if(ss[i + j] != ts[j]){\n count++;\n }\n }",
"if(ss[i + j] != ts[j]){\n count++;\n }",
"ss[i + j] != ts[j]",
"ss[i + j]",
"ss",
"i + j",
"i",
"j",
"ts[j]",
"ts",
"j",
"{\n count++;\n }",
"count++",
"count",
"ans = Math.min(ans,count)",
"ans",
"Math.min(ans,count)",
"Math.min",
"Math",
"ans",
"count",
"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) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] ss = s.toCharArray();\n char[] ts = t.toCharArray();\n int ans = Integer.MAX_VALUE;\n int limit = ss.length - ts.length;\n for (int i = 0; i <= limit; i++) {\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }\n System.out.println(ans);\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 String t = sc.next();\n char[] ss = s.toCharArray();\n char[] ts = t.toCharArray();\n int ans = Integer.MAX_VALUE;\n int limit = ss.length - ts.length;\n for (int i = 0; i <= limit; i++) {\n int count = 0;\n for (int j = 0; j < ts.length; j++) {\n if(ss[i + j] != ts[j]){\n count++;\n }\n }\n ans = Math.min(ans,count);\n }\n System.out.println(ans);\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 t = sc.next();
char[] ss = s.toCharArray();
char[] ts = t.toCharArray();
int ans = Integer.MAX_VALUE;
int limit = ss.length - ts.length;
for (int i = 0; i <= limit; i++) {
int count = 0;
for (int j = 0; j < ts.length; j++) {
if(ss[i + j] != ts[j]){
count++;
}
}
ans = Math.min(ans,count);
}
System.out.println(ans);
}
}
|
[
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,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
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,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
107,
5
],
[
107,
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
],
[
34,
35
],
[
35,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
32,
40
],
[
25,
41
],
[
41,
42
],
[
42,
43
],
[
25,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
45,
57
],
[
57,
58
],
[
57,
59
],
[
45,
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
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
76,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
75,
85
],
[
85,
86
],
[
45,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
89,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
99,
103
],
[
6,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n int maxSame = 0;\n for (int i = 0; i < s.length()-t.length()+1; i++) {\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }\n System.out.println(t.length() - maxSame);\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 String s = sc.next();\n String t = sc.next();\n int maxSame = 0;\n for (int i = 0; i < s.length()-t.length()+1; i++) {\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }\n System.out.println(t.length() - maxSame);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n int maxSame = 0;\n for (int i = 0; i < s.length()-t.length()+1; i++) {\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }\n System.out.println(t.length() - maxSame);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n int maxSame = 0;\n for (int i = 0; i < s.length()-t.length()+1; i++) {\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }\n System.out.println(t.length() - maxSame);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int maxSame = 0;",
"maxSame",
"0",
"for (int i = 0; i < s.length()-t.length()+1; i++) {\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()-t.length()+1",
"i",
"s.length()-t.length()+1",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }",
"{\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }",
"String sPart = s.substring(i, i+t.length());",
"sPart",
"s.substring(i, i+t.length())",
"s.substring",
"s",
"i",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }",
"{\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }",
"if (sPart.charAt(j) == t.charAt(j)) count++;",
"sPart.charAt(j) == t.charAt(j)",
"sPart.charAt(j)",
"sPart.charAt",
"sPart",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"count++",
"count",
"maxSame = Math.max(maxSame, count)",
"maxSame",
"Math.max(maxSame, count)",
"Math.max",
"Math",
"maxSame",
"count",
"System.out.println(t.length() - maxSame)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length() - maxSame",
"t.length()",
"t.length",
"t",
"maxSame",
"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 String t = sc.next();\n int maxSame = 0;\n for (int i = 0; i < s.length()-t.length()+1; i++) {\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }\n System.out.println(t.length() - maxSame);\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 String t = sc.next();\n int maxSame = 0;\n for (int i = 0; i < s.length()-t.length()+1; i++) {\n String sPart = s.substring(i, i+t.length());\n int count = 0;\n for (int j = 0; j < t.length(); j++) {\n if (sPart.charAt(j) == t.charAt(j)) count++;\n }\n maxSame = Math.max(maxSame, count);\n }\n System.out.println(t.length() - maxSame);\n }\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 t = sc.next();
int maxSame = 0;
for (int i = 0; i < s.length()-t.length()+1; i++) {
String sPart = s.substring(i, i+t.length());
int count = 0;
for (int j = 0; j < t.length(); j++) {
if (sPart.charAt(j) == t.charAt(j)) count++;
}
maxSame = Math.max(maxSame, count);
}
System.out.println(t.length() - maxSame);
}
}
|
[
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,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
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,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
108,
5
],
[
108,
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
],
[
34,
35
],
[
35,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
32,
40
],
[
25,
41
],
[
41,
42
],
[
42,
43
],
[
25,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
45,
57
],
[
57,
58
],
[
57,
59
],
[
45,
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
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
76,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
45,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
90,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
100,
104
],
[
6,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n int max = 0;\n for (int i = 0; i < S.length()-T.length()+1; i++) {\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }\n System.out.println(T.length()-max);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n int max = 0;\n for (int i = 0; i < S.length()-T.length()+1; i++) {\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }\n System.out.println(T.length()-max);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n int max = 0;\n for (int i = 0; i < S.length()-T.length()+1; i++) {\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }\n System.out.println(T.length()-max);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n int max = 0;\n for (int i = 0; i < S.length()-T.length()+1; i++) {\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }\n System.out.println(T.length()-max);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"int max = 0;",
"max",
"0",
"for (int i = 0; i < S.length()-T.length()+1; i++) {\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < S.length()-T.length()+1",
"i",
"S.length()-T.length()+1",
"S.length()-T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"1",
"i++",
"i++",
"i",
"{\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }",
"{\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }",
"String now = S.substring(i, i+T.length());",
"now",
"S.substring(i, i+T.length())",
"S.substring",
"S",
"i",
"i+T.length()",
"i",
"T.length()",
"T.length",
"T",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }",
"{\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }",
"if (T.charAt(j) == now.charAt(j)) {\n count++;\n }",
"T.charAt(j) == now.charAt(j)",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"now.charAt(j)",
"now.charAt",
"now",
"j",
"{\n count++;\n }",
"count++",
"count",
"max = Math.max(max, count)",
"max",
"Math.max(max, count)",
"Math.max",
"Math",
"max",
"count",
"System.out.println(T.length()-max)",
"System.out.println",
"System.out",
"System",
"System.out",
"T.length()-max",
"T.length()",
"T.length",
"T",
"max",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n int max = 0;\n for (int i = 0; i < S.length()-T.length()+1; i++) {\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }\n System.out.println(T.length()-max);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n int max = 0;\n for (int i = 0; i < S.length()-T.length()+1; i++) {\n String now = S.substring(i, i+T.length());\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (T.charAt(j) == now.charAt(j)) {\n count++;\n }\n }\n max = Math.max(max, count);\n }\n System.out.println(T.length()-max);\n }\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 T = sc.next();
int max = 0;
for (int i = 0; i < S.length()-T.length()+1; i++) {
String now = S.substring(i, i+T.length());
int count = 0;
for (int j = 0; j < T.length(); j++) {
if (T.charAt(j) == now.charAt(j)) {
count++;
}
}
max = Math.max(max, count);
}
System.out.println(T.length()-max);
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
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,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
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
],
[
112,
8
],
[
112,
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
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
11,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
40,
52
],
[
52,
53
],
[
53,
54
],
[
40,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
66,
68
],
[
56,
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
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
85,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
84,
94
],
[
94,
95
],
[
56,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
98,
102
],
[
11,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
9,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args)\n {\n\t\tScanner sc=new Scanner(System.in);\n\t\t\tString s1=sc.next();\n\t\t\tint n1=s1.length();\n\t\t\tString s2=sc.next();\n\t\t\tint n2=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n1-n2+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }\n\t\t\tSystem.out.println(min);\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args)\n {\n\t\tScanner sc=new Scanner(System.in);\n\t\t\tString s1=sc.next();\n\t\t\tint n1=s1.length();\n\t\t\tString s2=sc.next();\n\t\t\tint n2=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n1-n2+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }\n\t\t\tSystem.out.println(min);\n\t}\n}",
"Main",
"public static void main(String[] args)\n {\n\t\tScanner sc=new Scanner(System.in);\n\t\t\tString s1=sc.next();\n\t\t\tint n1=s1.length();\n\t\t\tString s2=sc.next();\n\t\t\tint n2=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n1-n2+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }\n\t\t\tSystem.out.println(min);\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\t\tString s1=sc.next();\n\t\t\tint n1=s1.length();\n\t\t\tString s2=sc.next();\n\t\t\tint n2=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n1-n2+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }\n\t\t\tSystem.out.println(min);\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s1=sc.next();",
"s1",
"sc.next()",
"sc.next",
"sc",
"int n1=s1.length();",
"n1",
"s1.length()",
"s1.length",
"s1",
"String s2=sc.next();",
"s2",
"sc.next()",
"sc.next",
"sc",
"int n2=s2.length();",
"n2",
"s2.length()",
"s2.length",
"s2",
"int min=Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i=0;i<n1-n2+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n1-n2+1",
"i",
"n1-n2+1",
"n1-n2",
"n1",
"n2",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }",
"{\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }",
"String temp=s1.substring(i,i+n2);",
"temp",
"s1.substring(i,i+n2)",
"s1.substring",
"s1",
"i",
"i+n2",
"i",
"n2",
"int count=0;",
"count",
"0",
"for(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<temp.length()",
"j",
"temp.length()",
"temp.length",
"temp",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}",
"{\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}",
"if(temp.charAt(j)!=s2.charAt(j)) count++;",
"temp.charAt(j)!=s2.charAt(j)",
"temp.charAt(j)",
"temp.charAt",
"temp",
"j",
"s2.charAt(j)",
"s2.charAt",
"s2",
"j",
"count++",
"count",
"min=Math.min(count, min)",
"min",
"Math.min(count, min)",
"Math.min",
"Math",
"count",
"min",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args)\n {\n\t\tScanner sc=new Scanner(System.in);\n\t\t\tString s1=sc.next();\n\t\t\tint n1=s1.length();\n\t\t\tString s2=sc.next();\n\t\t\tint n2=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n1-n2+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }\n\t\t\tSystem.out.println(min);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args)\n {\n\t\tScanner sc=new Scanner(System.in);\n\t\t\tString s1=sc.next();\n\t\t\tint n1=s1.length();\n\t\t\tString s2=sc.next();\n\t\t\tint n2=s2.length();\n\t\t\tint min=Integer.MAX_VALUE;\n\t\t\tfor(int i=0;i<n1-n2+1;i++) {\n\t\t\t\tString temp=s1.substring(i,i+n2);\n\t\t\t\tint count=0;\n\t\t\t\tfor(int j=0;j<temp.length();j++) {\n\t\t\t\t\tif(temp.charAt(j)!=s2.charAt(j)) count++;\n\t\t\t\t}\n\t\t\t\tmin=Math.min(count, min);\n }\n\t\t\tSystem.out.println(min);\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
String s1=sc.next();
int n1=s1.length();
String s2=sc.next();
int n2=s2.length();
int min=Integer.MAX_VALUE;
for(int i=0;i<n1-n2+1;i++) {
String temp=s1.substring(i,i+n2);
int count=0;
for(int j=0;j<temp.length();j++) {
if(temp.charAt(j)!=s2.charAt(j)) count++;
}
min=Math.min(count, min);
}
System.out.println(min);
}
}
|
[
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,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
41,
13,
20,
2,
2,
4,
18,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
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,
4,
18,
18,
13,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
177,
5
],
[
177,
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
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
28,
38
],
[
38,
39
],
[
39,
40
],
[
28,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
54,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
70,
78
],
[
63,
79
],
[
79,
80
],
[
80,
81
],
[
63,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
8,
97
],
[
97,
98
],
[
97,
99
],
[
8,
100
],
[
100,
101
],
[
100,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
111,
115
],
[
115,
116
],
[
116,
117
],
[
110,
118
],
[
103,
119
],
[
119,
120
],
[
120,
121
],
[
103,
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
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
140,
147
],
[
147,
148
],
[
147,
149
],
[
139,
150
],
[
150,
151
],
[
151,
152
],
[
123,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
123,
161
],
[
161,
162
],
[
161,
163
],
[
8,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
169,
173
],
[
6,
174
],
[
174,
175
],
[
0,
176
],
[
176,
177
],
[
176,
178
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] Ts = new char[t.length()];\n for(int a = 0; a < t.length(); a++) {\n Ts[a] = t.charAt(a);\n }\n String[] Scut = new String[s.length() - t.length() + 1];\n for(int i = 0; i < s.length() - t.length() + 1; i++) {\n Scut[i] = s.substring(i, i + t.length());\n }\n int count = 0;\n int mostCount = 0;\n for(int j = 0; j < s.length() - t.length() + 1; j++) {\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }\n System.out.println(t.length() - mostCount);\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 String s = sc.next();\n String t = sc.next();\n char[] Ts = new char[t.length()];\n for(int a = 0; a < t.length(); a++) {\n Ts[a] = t.charAt(a);\n }\n String[] Scut = new String[s.length() - t.length() + 1];\n for(int i = 0; i < s.length() - t.length() + 1; i++) {\n Scut[i] = s.substring(i, i + t.length());\n }\n int count = 0;\n int mostCount = 0;\n for(int j = 0; j < s.length() - t.length() + 1; j++) {\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }\n System.out.println(t.length() - mostCount);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] Ts = new char[t.length()];\n for(int a = 0; a < t.length(); a++) {\n Ts[a] = t.charAt(a);\n }\n String[] Scut = new String[s.length() - t.length() + 1];\n for(int i = 0; i < s.length() - t.length() + 1; i++) {\n Scut[i] = s.substring(i, i + t.length());\n }\n int count = 0;\n int mostCount = 0;\n for(int j = 0; j < s.length() - t.length() + 1; j++) {\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }\n System.out.println(t.length() - mostCount);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] Ts = new char[t.length()];\n for(int a = 0; a < t.length(); a++) {\n Ts[a] = t.charAt(a);\n }\n String[] Scut = new String[s.length() - t.length() + 1];\n for(int i = 0; i < s.length() - t.length() + 1; i++) {\n Scut[i] = s.substring(i, i + t.length());\n }\n int count = 0;\n int mostCount = 0;\n for(int j = 0; j < s.length() - t.length() + 1; j++) {\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }\n System.out.println(t.length() - mostCount);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"char[] Ts = new char[t.length()];",
"Ts",
"new char[t.length()]",
"t.length()",
"t.length",
"t",
"for(int a = 0; a < t.length(); a++) {\n Ts[a] = t.charAt(a);\n }",
"int a = 0;",
"int a = 0;",
"a",
"0",
"a < t.length()",
"a",
"t.length()",
"t.length",
"t",
"a++",
"a++",
"a",
"{\n Ts[a] = t.charAt(a);\n }",
"{\n Ts[a] = t.charAt(a);\n }",
"Ts[a] = t.charAt(a)",
"Ts[a]",
"Ts",
"a",
"t.charAt(a)",
"t.charAt",
"t",
"a",
"String[] Scut = new String[s.length() - t.length() + 1];",
"Scut",
"new String[s.length() - t.length() + 1]",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"for(int i = 0; i < s.length() - t.length() + 1; i++) {\n Scut[i] = s.substring(i, i + t.length());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length() - t.length() + 1",
"i",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n Scut[i] = s.substring(i, i + t.length());\n }",
"{\n Scut[i] = s.substring(i, i + t.length());\n }",
"Scut[i] = s.substring(i, i + t.length())",
"Scut[i]",
"Scut",
"i",
"s.substring(i, i + t.length())",
"s.substring",
"s",
"i",
"i + t.length()",
"i",
"t.length()",
"t.length",
"t",
"int count = 0;",
"count",
"0",
"int mostCount = 0;",
"mostCount",
"0",
"for(int j = 0; j < s.length() - t.length() + 1; j++) {\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < s.length() - t.length() + 1",
"j",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"j++",
"j++",
"j",
"{\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }",
"{\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }",
"for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }",
"int b = 0;",
"int b = 0;",
"b",
"0",
"b < t.length()",
"b",
"t.length()",
"t.length",
"t",
"b++",
"b++",
"b",
"{\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }",
"{\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }",
"if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }",
"Scut[j].charAt(b) == Ts[b]",
"Scut[j].charAt(b)",
"Scut[j].charAt",
"Scut[j]",
"Scut",
"j",
"b",
"Ts[b]",
"Ts",
"b",
"{\n count++;\n }",
"count++",
"count",
"if(mostCount <= count) {\n mostCount = count;\n }",
"mostCount <= count",
"mostCount",
"count",
"{\n mostCount = count;\n }",
"mostCount = count",
"mostCount",
"count",
"count = 0",
"count",
"0",
"System.out.println(t.length() - mostCount)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length() - mostCount",
"t.length()",
"t.length",
"t",
"mostCount",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] Ts = new char[t.length()];\n for(int a = 0; a < t.length(); a++) {\n Ts[a] = t.charAt(a);\n }\n String[] Scut = new String[s.length() - t.length() + 1];\n for(int i = 0; i < s.length() - t.length() + 1; i++) {\n Scut[i] = s.substring(i, i + t.length());\n }\n int count = 0;\n int mostCount = 0;\n for(int j = 0; j < s.length() - t.length() + 1; j++) {\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }\n System.out.println(t.length() - mostCount);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n char[] Ts = new char[t.length()];\n for(int a = 0; a < t.length(); a++) {\n Ts[a] = t.charAt(a);\n }\n String[] Scut = new String[s.length() - t.length() + 1];\n for(int i = 0; i < s.length() - t.length() + 1; i++) {\n Scut[i] = s.substring(i, i + t.length());\n }\n int count = 0;\n int mostCount = 0;\n for(int j = 0; j < s.length() - t.length() + 1; j++) {\n for(int b = 0; b < t.length(); b++) {\n if(Scut[j].charAt(b) == Ts[b]) {\n count++;\n }\n }\n if(mostCount <= count) {\n mostCount = count;\n }\n count = 0;\n }\n System.out.println(t.length() - mostCount);\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 t = sc.next();
char[] Ts = new char[t.length()];
for(int a = 0; a < t.length(); a++) {
Ts[a] = t.charAt(a);
}
String[] Scut = new String[s.length() - t.length() + 1];
for(int i = 0; i < s.length() - t.length() + 1; i++) {
Scut[i] = s.substring(i, i + t.length());
}
int count = 0;
int mostCount = 0;
for(int j = 0; j < s.length() - t.length() + 1; j++) {
for(int b = 0; b < t.length(); b++) {
if(Scut[j].charAt(b) == Ts[b]) {
count++;
}
}
if(mostCount <= count) {
mostCount = count;
}
count = 0;
}
System.out.println(t.length() - mostCount);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
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,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
13,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
40,
13,
29,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
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
],
[
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
],
[
220,
23
],
[
220,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
26,
37
],
[
37,
38
],
[
37,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
26,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
46,
50
],
[
46,
51
],
[
26,
52
],
[
52,
53
],
[
53,
54
],
[
24,
55
],
[
55,
56
],
[
220,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
61,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
77,
91
],
[
91,
92
],
[
92,
93
],
[
77,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
98,
102
],
[
95,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
105,
109
],
[
61,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
59,
114
],
[
114,
115
],
[
59,
116
],
[
116,
117
],
[
59,
118
],
[
118,
119
],
[
57,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
131,
132
],
[
131,
133
],
[
126,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
126,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
142,
143
],
[
126,
144
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
147,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
146,
156
],
[
156,
157
],
[
122,
158
],
[
158,
159
],
[
120,
160
],
[
160,
161
],
[
120,
162
],
[
162,
163
],
[
120,
164
],
[
164,
165
],
[
220,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
166,
170
],
[
170,
171
],
[
166,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
178,
179
],
[
178,
180
],
[
172,
181
],
[
181,
182
],
[
166,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
186,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
196,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
185,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
166,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
214,
217
],
[
217,
218
],
[
0,
219
],
[
219,
220
],
[
219,
221
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n\n Problem solver = new Problem();\n solver.solve(0, in, out);\n out.close();\n }\n\n static class Problem {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next(), t = in.next();\n int min = t.length();\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }\n out.println(min);\n }\n\n private int getCount(String s, String t, int idx) {\n int count = 0;\n for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }\n return count;\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n\n Problem solver = new Problem();\n solver.solve(0, in, out);\n out.close();\n }\n\n static class Problem {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next(), t = in.next();\n int min = t.length();\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }\n out.println(min);\n }\n\n private int getCount(String s, String t, int idx) {\n int count = 0;\n for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }\n return count;\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n\n Problem solver = new Problem();\n solver.solve(0, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n\n Problem solver = new Problem();\n solver.solve(0, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"Problem solver = new Problem();",
"solver",
"new Problem()",
"solver.solve(0, in, out)",
"solver.solve",
"solver",
"0",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class Problem {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next(), t = in.next();\n int min = t.length();\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }\n out.println(min);\n }\n\n private int getCount(String s, String t, int idx) {\n int count = 0;\n for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }\n return count;\n }\n\n }",
"Problem",
"public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next(), t = in.next();\n int min = t.length();\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }\n out.println(min);\n }",
"solve",
"{\n String s = in.next(), t = in.next();\n int min = t.length();\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }\n out.println(min);\n }",
"String s = in.next()",
"s",
"in.next()",
"in.next",
"in",
"t = in.next();",
"t",
"in.next()",
"in.next",
"in",
"int min = t.length();",
"min",
"t.length()",
"t.length",
"t",
"for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }",
"{\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }",
"int count = getCount(s, t, i);",
"count",
"getCount(s, t, i)",
"getCount",
"s",
"t",
"i",
"min = Math.min(min, count)",
"min",
"Math.min(min, count)",
"Math.min",
"Math",
"min",
"count",
"out.println(min)",
"out.println",
"out",
"min",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"PrintWriter out",
"out",
"private int getCount(String s, String t, int idx) {\n int count = 0;\n for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }\n return count;\n }",
"getCount",
"{\n int count = 0;\n for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }\n return count;\n }",
"int count = 0;",
"count",
"0",
"for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }",
"int i = idx, j = 0;",
"int i = idx",
"i",
"idx",
"j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"i++, j++",
"i++",
"i",
"j++",
"j",
"{\n if(s.charAt(i) != t.charAt(j))\n count++;\n }",
"{\n if(s.charAt(i) != t.charAt(j))\n count++;\n }",
"if(s.charAt(i) != t.charAt(j))\n count++;",
"s.charAt(i) != t.charAt(j)",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"count++",
"count",
"return count;",
"count",
"String s",
"s",
"String t",
"t",
"int idx",
"idx",
"static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }",
"InputReader",
"public BufferedReader reader;",
"reader",
"public StringTokenizer tokenizer;",
"tokenizer",
"public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"InputReader",
"{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"reader = new BufferedReader(new InputStreamReader(stream), 32768)",
"reader",
"new BufferedReader(new InputStreamReader(stream), 32768)",
"tokenizer = null",
"tokenizer",
"null",
"InputStream stream",
"stream",
"public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n tokenizer = new StringTokenizer(reader.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 tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public 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",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n\n Problem solver = new Problem();\n solver.solve(0, in, out);\n out.close();\n }\n\n static class Problem {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next(), t = in.next();\n int min = t.length();\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }\n out.println(min);\n }\n\n private int getCount(String s, String t, int idx) {\n int count = 0;\n for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }\n return count;\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n\n Problem solver = new Problem();\n solver.solve(0, in, out);\n out.close();\n }\n\n static class Problem {\n\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n String s = in.next(), t = in.next();\n int min = t.length();\n for(int i = 0; i <= s.length() - t.length(); i++) {\n int count = getCount(s, t, i);\n min = Math.min(min, count);\n }\n out.println(min);\n }\n\n private int getCount(String s, String t, int idx) {\n int count = 0;\n for(int i = idx, j = 0; j < t.length(); i++, j++) {\n if(s.charAt(i) != t.charAt(j))\n count++;\n }\n return count;\n }\n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
Problem solver = new Problem();
solver.solve(0, in, out);
out.close();
}
static class Problem {
public void solve(int testNumber, InputReader in, PrintWriter out) {
String s = in.next(), t = in.next();
int min = t.length();
for(int i = 0; i <= s.length() - t.length(); i++) {
int count = getCount(s, t, i);
min = Math.min(min, count);
}
out.println(min);
}
private int getCount(String s, String t, int idx) {
int count = 0;
for(int i = idx, j = 0; j < t.length(); i++, j++) {
if(s.charAt(i) != t.charAt(j))
count++;
}
return count;
}
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
}
}
|
[
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,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
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,
13,
30,
40,
13,
14,
2,
13,
17,
0,
13,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
109,
5
],
[
109,
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
],
[
34,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
25,
39
],
[
39,
40
],
[
40,
41
],
[
25,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
46,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
43,
55
],
[
55,
56
],
[
55,
57
],
[
43,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
58,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
74,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
43,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
86,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
8,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
6,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String s = scan.nextLine();\n String sub = scan.nextLine();\n\n int min = 0;\n\n for (int i = 0; i <= s.length()-sub.length(); i++){\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }\n\n System.out.println(min);\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\n String s = scan.nextLine();\n String sub = scan.nextLine();\n\n int min = 0;\n\n for (int i = 0; i <= s.length()-sub.length(); i++){\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }\n\n System.out.println(min);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String s = scan.nextLine();\n String sub = scan.nextLine();\n\n int min = 0;\n\n for (int i = 0; i <= s.length()-sub.length(); i++){\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }\n\n System.out.println(min);\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n\n String s = scan.nextLine();\n String sub = scan.nextLine();\n\n int min = 0;\n\n for (int i = 0; i <= s.length()-sub.length(); i++){\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }\n\n System.out.println(min);\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.nextLine();",
"s",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String sub = scan.nextLine();",
"sub",
"scan.nextLine()",
"scan.nextLine",
"scan",
"int min = 0;",
"min",
"0",
"for (int i = 0; i <= s.length()-sub.length(); i++){\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length()-sub.length()",
"i",
"s.length()-sub.length()",
"s.length()",
"s.length",
"s",
"sub.length()",
"sub.length",
"sub",
"i++",
"i++",
"i",
"{\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }",
"{\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }",
"String sSub = s.substring(i,i+sub.length());",
"sSub",
"s.substring(i,i+sub.length())",
"s.substring",
"s",
"i",
"i+sub.length()",
"i",
"sub.length()",
"sub.length",
"sub",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < sub.length()",
"j",
"sub.length()",
"sub.length",
"sub",
"j++",
"j++",
"j",
"{\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }",
"{\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }",
"if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }",
"sSub.charAt(j) != sub.charAt(j)",
"sSub.charAt(j)",
"sSub.charAt",
"sSub",
"j",
"sub.charAt(j)",
"sub.charAt",
"sub",
"j",
"{\n count++;\n }",
"count++",
"count",
"if (i == 0)\n min = count;\n else if (count < min)\n min = count;",
"i == 0",
"i",
"0",
"min = count",
"min",
"count",
"if (count < min)\n min = count;",
"count < min",
"count",
"min",
"min = count",
"min",
"count",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String s = scan.nextLine();\n String sub = scan.nextLine();\n\n int min = 0;\n\n for (int i = 0; i <= s.length()-sub.length(); i++){\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }\n\n System.out.println(min);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n String s = scan.nextLine();\n String sub = scan.nextLine();\n\n int min = 0;\n\n for (int i = 0; i <= s.length()-sub.length(); i++){\n String sSub = s.substring(i,i+sub.length());\n int count = 0;\n for (int j = 0; j < sub.length(); j++){\n if (sSub.charAt(j) != sub.charAt(j)){\n count++;\n }\n }\n if (i == 0)\n min = count;\n else if (count < min)\n min = count;\n }\n\n System.out.println(min);\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 sub = scan.nextLine();
int min = 0;
for (int i = 0; i <= s.length()-sub.length(); i++){
String sSub = s.substring(i,i+sub.length());
int count = 0;
for (int j = 0; j < sub.length(); j++){
if (sSub.charAt(j) != sub.charAt(j)){
count++;
}
}
if (i == 0)
min = count;
else if (count < min)
min = count;
}
System.out.println(min);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
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,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
114,
8
],
[
114,
9
],
[
9,
10
],
[
9,
11
],
[
114,
12
],
[
12,
13
],
[
12,
14
],
[
114,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
17,
24
],
[
24,
25
],
[
25,
26
],
[
15,
27
],
[
27,
28
],
[
114,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
31,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
31,
52
],
[
52,
53
],
[
52,
54
],
[
31,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
55,
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
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
73,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
91,
93
],
[
87,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
86,
98
],
[
98,
99
],
[
69,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
102,
106
],
[
31,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \tMain g=new Main();\n\t \tg.main();\n\t \tout.close();\n\t}\n\n\t\n\t\n\t//Main\n\tvoid main() {\n\t\t\n\t\tString s=inp.next();\n\t\tString t=inp.next();\n\t\tint n=s.length();\n\t\tint m=t.length();\n\t\tint gg=m;\n\t\tfor(int i=0;i<=n-m;i++) {\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}\n\t\tSystem.out.println(gg);\n\t}\n \n \n\t\t\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \tMain g=new Main();\n\t \tg.main();\n\t \tout.close();\n\t}\n\n\t\n\t\n\t//Main\n\tvoid main() {\n\t\t\n\t\tString s=inp.next();\n\t\tString t=inp.next();\n\t\tint n=s.length();\n\t\tint m=t.length();\n\t\tint gg=m;\n\t\tfor(int i=0;i<=n-m;i++) {\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}\n\t\tSystem.out.println(gg);\n\t}\n \n \n\t\t\n}",
"Main",
"static Scanner inp= new Scanner(System.in);",
"inp",
"new Scanner(System.in)",
"static PrintWriter out= new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"public static void main(String args[]) {\t\t \t\n\t \tMain g=new Main();\n\t \tg.main();\n\t \tout.close();\n\t}",
"main",
"{\t\t \t\n\t \tMain g=new Main();\n\t \tg.main();\n\t \tout.close();\n\t}",
"Main g=new Main();",
"g",
"new Main()",
"g.main()",
"g.main",
"g",
"out.close()",
"out.close",
"out",
"String args[]",
"args",
"//Main\n\tvoid main() {\n\t\t\n\t\tString s=inp.next();\n\t\tString t=inp.next();\n\t\tint n=s.length();\n\t\tint m=t.length();\n\t\tint gg=m;\n\t\tfor(int i=0;i<=n-m;i++) {\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}\n\t\tSystem.out.println(gg);\n\t}",
"main",
"{\n\t\t\n\t\tString s=inp.next();\n\t\tString t=inp.next();\n\t\tint n=s.length();\n\t\tint m=t.length();\n\t\tint gg=m;\n\t\tfor(int i=0;i<=n-m;i++) {\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}\n\t\tSystem.out.println(gg);\n\t}",
"String s=inp.next();",
"s",
"inp.next()",
"inp.next",
"inp",
"String t=inp.next();",
"t",
"inp.next()",
"inp.next",
"inp",
"int n=s.length();",
"n",
"s.length()",
"s.length",
"s",
"int m=t.length();",
"m",
"t.length()",
"t.length",
"t",
"int gg=m;",
"gg",
"m",
"for(int i=0;i<=n-m;i++) {\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=n-m",
"i",
"n-m",
"n",
"m",
"i++",
"i++",
"i",
"{\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}",
"{\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}",
"int c=m;",
"c",
"m",
"for(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<m",
"j",
"m",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}",
"{\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}",
"if(s.charAt(i+j)==t.charAt(j)) c--;",
"s.charAt(i+j)==t.charAt(j)",
"s.charAt(i+j)",
"s.charAt",
"s",
"i+j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"c--",
"c",
"gg=Math.min(gg, c)",
"gg",
"Math.min(gg, c)",
"Math.min",
"Math",
"gg",
"c",
"System.out.println(gg)",
"System.out.println",
"System.out",
"System",
"System.out",
"gg",
"public class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \tMain g=new Main();\n\t \tg.main();\n\t \tout.close();\n\t}\n\n\t\n\t\n\t//Main\n\tvoid main() {\n\t\t\n\t\tString s=inp.next();\n\t\tString t=inp.next();\n\t\tint n=s.length();\n\t\tint m=t.length();\n\t\tint gg=m;\n\t\tfor(int i=0;i<=n-m;i++) {\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}\n\t\tSystem.out.println(gg);\n\t}\n \n \n\t\t\n}",
"public class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \tMain g=new Main();\n\t \tg.main();\n\t \tout.close();\n\t}\n\n\t\n\t\n\t//Main\n\tvoid main() {\n\t\t\n\t\tString s=inp.next();\n\t\tString t=inp.next();\n\t\tint n=s.length();\n\t\tint m=t.length();\n\t\tint gg=m;\n\t\tfor(int i=0;i<=n-m;i++) {\n\t\t\tint c=m;\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tif(s.charAt(i+j)==t.charAt(j)) c--;\n\t\t\t}\n\t\t\tgg=Math.min(gg, c);\n\t\t}\n\t\tSystem.out.println(gg);\n\t}\n \n \n\t\t\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
static Scanner inp= new Scanner(System.in);
static PrintWriter out= new PrintWriter(System.out);
public static void main(String args[]) {
Main g=new Main();
g.main();
out.close();
}
//Main
void main() {
String s=inp.next();
String t=inp.next();
int n=s.length();
int m=t.length();
int gg=m;
for(int i=0;i<=n-m;i++) {
int c=m;
for(int j=0;j<m;j++) {
if(s.charAt(i+j)==t.charAt(j)) c--;
}
gg=Math.min(gg, c);
}
System.out.println(gg);
}
}
|
[
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,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
4,
18,
13,
41,
13,
4,
18,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
2,
13,
18,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
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,
2,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
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,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
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
],
[
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
],
[
195,
29
],
[
195,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
32,
43
],
[
43,
44
],
[
43,
45
],
[
32,
46
],
[
46,
47
],
[
46,
48
],
[
32,
49
],
[
49,
50
],
[
49,
51
],
[
32,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
52,
56
],
[
52,
57
],
[
32,
58
],
[
58,
59
],
[
59,
60
],
[
30,
61
],
[
61,
62
],
[
195,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
67,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
67,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
67,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
92,
98
],
[
98,
99
],
[
98,
100
],
[
87,
101
],
[
101,
102
],
[
102,
103
],
[
87,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
109,
119
],
[
119,
120
],
[
120,
121
],
[
109,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
124,
134
],
[
134,
135
],
[
105,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
138,
142
],
[
67,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
65,
147
],
[
147,
148
],
[
65,
149
],
[
149,
150
],
[
65,
151
],
[
151,
152
],
[
195,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
153,
157
],
[
157,
158
],
[
153,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
159,
165
],
[
165,
166
],
[
153,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
171,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
170,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
180,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
169,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
0,
194
],
[
194,
195
],
[
194,
196
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author lucasr\n */\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tBSubstring solver = new BSubstring();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n\n\tstatic class BSubstring {\n\t\tpublic void solve(int testNumber, MyScanner sc, PrintWriter out) {\n\t\t\tchar[] S = sc.next().toCharArray();\n\t\t\tchar[] T = sc.next().toCharArray();\n\t\t\tint ans = T.length;\n\n\t\t\tfor (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}\n\n\t\t\tout.println(ans);\n\t\t}\n\n\t}\n\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\n\t\tpublic MyScanner(InputStream is) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t}\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tBSubstring solver = new BSubstring();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n\n\tstatic class BSubstring {\n\t\tpublic void solve(int testNumber, MyScanner sc, PrintWriter out) {\n\t\t\tchar[] S = sc.next().toCharArray();\n\t\t\tchar[] T = sc.next().toCharArray();\n\t\t\tint ans = T.length;\n\n\t\t\tfor (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}\n\n\t\t\tout.println(ans);\n\t\t}\n\n\t}\n\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\n\t\tpublic MyScanner(InputStream is) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tBSubstring solver = new BSubstring();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}",
"main",
"{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tBSubstring solver = new BSubstring();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"MyScanner in = new MyScanner(inputStream);",
"in",
"new MyScanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"BSubstring solver = new BSubstring();",
"solver",
"new BSubstring()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BSubstring {\n\t\tpublic void solve(int testNumber, MyScanner sc, PrintWriter out) {\n\t\t\tchar[] S = sc.next().toCharArray();\n\t\t\tchar[] T = sc.next().toCharArray();\n\t\t\tint ans = T.length;\n\n\t\t\tfor (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}\n\n\t\t\tout.println(ans);\n\t\t}\n\n\t}",
"BSubstring",
"public void solve(int testNumber, MyScanner sc, PrintWriter out) {\n\t\t\tchar[] S = sc.next().toCharArray();\n\t\t\tchar[] T = sc.next().toCharArray();\n\t\t\tint ans = T.length;\n\n\t\t\tfor (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}\n\n\t\t\tout.println(ans);\n\t\t}",
"solve",
"{\n\t\t\tchar[] S = sc.next().toCharArray();\n\t\t\tchar[] T = sc.next().toCharArray();\n\t\t\tint ans = T.length;\n\n\t\t\tfor (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}\n\n\t\t\tout.println(ans);\n\t\t}",
"char[] S = sc.next().toCharArray();",
"S",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"char[] T = sc.next().toCharArray();",
"T",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"int ans = T.length;",
"ans",
"T.length",
"T",
"T.length",
"for (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + T.length <= S.length",
"i + T.length",
"i",
"T.length",
"T",
"T.length",
"S.length",
"S",
"S.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}",
"{\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}",
"int tmp = 0;",
"tmp",
"0",
"for (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length",
"j",
"T.length",
"T",
"T.length",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}",
"{\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}",
"if (T[j] != S[i + j]) tmp++;",
"T[j] != S[i + j]",
"T[j]",
"T",
"j",
"S[i + j]",
"S",
"i + j",
"i",
"j",
"tmp++",
"tmp",
"ans = Math.min(ans, tmp)",
"ans",
"Math.min(ans, tmp)",
"Math.min",
"Math",
"ans",
"tmp",
"out.println(ans)",
"out.println",
"out",
"ans",
"int testNumber",
"testNumber",
"MyScanner sc",
"sc",
"PrintWriter out",
"out",
"static class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\n\t\tpublic MyScanner(InputStream is) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t}",
"MyScanner",
"private BufferedReader br;",
"br",
"private StringTokenizer tokenizer;",
"tokenizer",
"public MyScanner(InputStream is) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t}",
"MyScanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(is))",
"br",
"new BufferedReader(new InputStreamReader(is))",
"InputStream is",
"is",
"public String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}",
"try {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t}",
"tokenizer = new StringTokenizer(br.readLine())",
"tokenizer",
"new StringTokenizer(br.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tBSubstring solver = new BSubstring();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n\n\tstatic class BSubstring {\n\t\tpublic void solve(int testNumber, MyScanner sc, PrintWriter out) {\n\t\t\tchar[] S = sc.next().toCharArray();\n\t\t\tchar[] T = sc.next().toCharArray();\n\t\t\tint ans = T.length;\n\n\t\t\tfor (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}\n\n\t\t\tout.println(ans);\n\t\t}\n\n\t}\n\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\n\t\tpublic MyScanner(InputStream is) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tBSubstring solver = new BSubstring();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n\n\tstatic class BSubstring {\n\t\tpublic void solve(int testNumber, MyScanner sc, PrintWriter out) {\n\t\t\tchar[] S = sc.next().toCharArray();\n\t\t\tchar[] T = sc.next().toCharArray();\n\t\t\tint ans = T.length;\n\n\t\t\tfor (int i = 0; i + T.length <= S.length; i++) {\n\t\t\t\tint tmp = 0;\n\t\t\t\tfor (int j = 0; j < T.length; j++) {\n\t\t\t\t\tif (T[j] != S[i + j]) tmp++;\n\t\t\t\t}\n\t\t\t\tans = Math.min(ans, tmp);\n\t\t\t}\n\n\t\t\tout.println(ans);\n\t\t}\n\n\t}\n\n\tstatic class MyScanner {\n\t\tprivate BufferedReader br;\n\t\tprivate StringTokenizer tokenizer;\n\n\t\tpublic MyScanner(InputStream is) {\n\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t}\n\n\t\tpublic String next() {\n\t\t\twhile (tokenizer == null || !tokenizer.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\ttokenizer = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t}\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author lucasr
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
MyScanner in = new MyScanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
BSubstring solver = new BSubstring();
solver.solve(1, in, out);
out.close();
}
static class BSubstring {
public void solve(int testNumber, MyScanner sc, PrintWriter out) {
char[] S = sc.next().toCharArray();
char[] T = sc.next().toCharArray();
int ans = T.length;
for (int i = 0; i + T.length <= S.length; i++) {
int tmp = 0;
for (int j = 0; j < T.length; j++) {
if (T[j] != S[i + j]) tmp++;
}
ans = Math.min(ans, tmp);
}
out.println(ans);
}
}
static class MyScanner {
private BufferedReader br;
private StringTokenizer tokenizer;
public MyScanner(InputStream is) {
br = new BufferedReader(new InputStreamReader(is));
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(br.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
}
}
|
[
7,
15,
13,
17,
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,
4,
18,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
18,
13,
13,
18,
13,
13,
30,
0,
13,
17,
14,
2,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
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
],
[
132,
11
],
[
132,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
14,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
14,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
49,
57
],
[
42,
58
],
[
58,
59
],
[
59,
60
],
[
42,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
65,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
62,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
62,
80
],
[
80,
81
],
[
80,
82
],
[
62,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
83,
93
],
[
93,
94
],
[
94,
95
],
[
83,
96
],
[
97,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
105,
107
],
[
98,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
62,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
14,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
14,
123
],
[
123,
124
],
[
124,
125
],
[
14,
126
],
[
126,
127
],
[
127,
128
],
[
12,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.PrintWriter;\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n\n String S = br.readLine();\n String T = br.readLine();\n\n String[] T_array = T.split(\"\");\n\n int ans = T.length();\n\n for(int i = 0; i < S.length() - T.length() + 1; i++) {\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }\n\n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n\n String S = br.readLine();\n String T = br.readLine();\n\n String[] T_array = T.split(\"\");\n\n int ans = T.length();\n\n for(int i = 0; i < S.length() - T.length() + 1; i++) {\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }\n\n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n\n String S = br.readLine();\n String T = br.readLine();\n\n String[] T_array = T.split(\"\");\n\n int ans = T.length();\n\n for(int i = 0; i < S.length() - T.length() + 1; i++) {\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }\n\n pw.println(ans);\n br.close();\n pw.close();\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n\n String S = br.readLine();\n String T = br.readLine();\n\n String[] T_array = T.split(\"\");\n\n int ans = T.length();\n\n for(int i = 0; i < S.length() - T.length() + 1; i++) {\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }\n\n pw.println(ans);\n br.close();\n pw.close();\n }",
"BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));",
"br",
"new BufferedReader(new java.io.InputStreamReader(System.in))",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"String S = br.readLine();",
"S",
"br.readLine()",
"br.readLine",
"br",
"String T = br.readLine();",
"T",
"br.readLine()",
"br.readLine",
"br",
"String[] T_array = T.split(\"\");",
"T_array",
"T.split(\"\")",
"T.split",
"T",
"\"\"",
"int ans = T.length();",
"ans",
"T.length()",
"T.length",
"T",
"for(int i = 0; i < S.length() - T.length() + 1; i++) {\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < S.length() - T.length() + 1",
"i",
"S.length() - T.length() + 1",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"1",
"i++",
"i++",
"i",
"{\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }",
"{\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }",
"String str = S.substring(i, i + T.length());",
"str",
"S.substring(i, i + T.length())",
"S.substring",
"S",
"i",
"i + T.length()",
"i",
"T.length()",
"T.length",
"T",
"String[] str_array = str.split(\"\");",
"str_array",
"str.split(\"\")",
"str.split",
"str",
"\"\"",
"int tmp = 0;",
"tmp",
"0",
"for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < str_array.length",
"j",
"str_array.length",
"str_array",
"str_array.length",
"j++",
"j++",
"j",
"{\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }",
"{\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }",
"if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }",
"!str_array[j].equals(T_array[j])",
"str_array[j].equals(T_array[j])",
"str_array[j].equals",
"str_array[j]",
"str_array",
"j",
"T_array[j]",
"T_array",
"j",
"{\n tmp += 1;\n }",
"tmp += 1",
"tmp",
"1",
"if(ans > tmp) ans = tmp;",
"ans > tmp",
"ans",
"tmp",
"ans = tmp",
"ans",
"tmp",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"br.close()",
"br.close",
"br",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n\n String S = br.readLine();\n String T = br.readLine();\n\n String[] T_array = T.split(\"\");\n\n int ans = T.length();\n\n for(int i = 0; i < S.length() - T.length() + 1; i++) {\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }\n\n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n\n String S = br.readLine();\n String T = br.readLine();\n\n String[] T_array = T.split(\"\");\n\n int ans = T.length();\n\n for(int i = 0; i < S.length() - T.length() + 1; i++) {\n String str = S.substring(i, i + T.length());\n String[] str_array = str.split(\"\");\n\n int tmp = 0;\n\n for(int j = 0; j < str_array.length; j++) {\n if(!str_array[j].equals(T_array[j])) {\n tmp += 1;\n }\n }\n\n if(ans > tmp) ans = tmp;\n }\n\n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
String S = br.readLine();
String T = br.readLine();
String[] T_array = T.split("");
int ans = T.length();
for(int i = 0; i < S.length() - T.length() + 1; i++) {
String str = S.substring(i, i + T.length());
String[] str_array = str.split("");
int tmp = 0;
for(int j = 0; j < str_array.length; j++) {
if(!str_array[j].equals(T_array[j])) {
tmp += 1;
}
}
if(ans > tmp) ans = tmp;
}
pw.println(ans);
br.close();
pw.close();
}
} |
[
7,
15,
13,
17,
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
18,
13,
13,
18,
13,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
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
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
23,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
23,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
23,
49
],
[
49,
50
],
[
49,
51
],
[
23,
52
],
[
52,
53
],
[
52,
54
],
[
23,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
55,
71
],
[
71,
72
],
[
72,
73
],
[
55,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
76,
86
],
[
86,
87
],
[
87,
88
],
[
76,
89
],
[
90,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
93,
100
],
[
100,
101
],
[
100,
102
],
[
91,
103
],
[
103,
104
],
[
104,
105
],
[
75,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
75,
114
],
[
114,
115
],
[
114,
116
],
[
23,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
21,
123
],
[
123,
124
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.HashSet;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S=sc.next();\n String T=sc.next();\n String []Ss = S.split(\"\");\n String []Ts = T.split(\"\");\n\n\n int Sum=0;\n int Ans=1001;\nfor (int i=0;i<Ss.length-Ts.length+1 ;i++){\n for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }\n if(Ans>Sum){\n Ans=Sum;\n }\n Sum=0;\n\n}\nSystem.out.println(Ans);\n}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.stream.Collectors;",
"Collectors",
"java.util.stream",
"import java.util.HashSet;",
"HashSet",
"java.util",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S=sc.next();\n String T=sc.next();\n String []Ss = S.split(\"\");\n String []Ts = T.split(\"\");\n\n\n int Sum=0;\n int Ans=1001;\nfor (int i=0;i<Ss.length-Ts.length+1 ;i++){\n for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }\n if(Ans>Sum){\n Ans=Sum;\n }\n Sum=0;\n\n}\nSystem.out.println(Ans);\n}\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String S=sc.next();\n String T=sc.next();\n String []Ss = S.split(\"\");\n String []Ts = T.split(\"\");\n\n\n int Sum=0;\n int Ans=1001;\nfor (int i=0;i<Ss.length-Ts.length+1 ;i++){\n for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }\n if(Ans>Sum){\n Ans=Sum;\n }\n Sum=0;\n\n}\nSystem.out.println(Ans);\n}",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String S=sc.next();\n String T=sc.next();\n String []Ss = S.split(\"\");\n String []Ts = T.split(\"\");\n\n\n int Sum=0;\n int Ans=1001;\nfor (int i=0;i<Ss.length-Ts.length+1 ;i++){\n for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }\n if(Ans>Sum){\n Ans=Sum;\n }\n Sum=0;\n\n}\nSystem.out.println(Ans);\n}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S=sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T=sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"String []Ss = S.split(\"\");",
"Ss",
"S.split(\"\")",
"S.split",
"S",
"\"\"",
"String []Ts = T.split(\"\");",
"Ts",
"T.split(\"\")",
"T.split",
"T",
"\"\"",
"int Sum=0;",
"Sum",
"0",
"int Ans=1001;",
"Ans",
"1001",
"for (int i=0;i<Ss.length-Ts.length+1 ;i++){\n for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }\n if(Ans>Sum){\n Ans=Sum;\n }\n Sum=0;\n\n}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<Ss.length-Ts.length+1",
"i",
"Ss.length-Ts.length+1",
"Ss.length-Ts.length",
"Ss.length",
"Ss",
"Ss.length",
"Ts.length",
"Ts",
"Ts.length",
"1",
"i++",
"i++",
"i",
"{\n for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }\n if(Ans>Sum){\n Ans=Sum;\n }\n Sum=0;\n\n}",
"{\n for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }\n if(Ans>Sum){\n Ans=Sum;\n }\n Sum=0;\n\n}",
"for (int j=0;j<Ts.length ;j++) {\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<Ts.length",
"j",
"Ts.length",
"Ts",
"Ts.length",
"j++",
"j++",
"j",
"{\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }",
"{\n if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }\n }",
"if(!(Ss[i+j].equals(Ts[j]))){\n Sum++;\n }",
"!(Ss[i+j].equals(Ts[j]))",
"(Ss[i+j].equals(Ts[j]))",
"Ss[i+j].equals",
"Ss[i+j]",
"Ss",
"i+j",
"i",
"j",
"Ts[j]",
"Ts",
"j",
"{\n Sum++;\n }",
"Sum++",
"Sum",
"if(Ans>Sum){\n Ans=Sum;\n }",
"Ans>Sum",
"Ans",
"Sum",
"{\n Ans=Sum;\n }",
"Ans=Sum",
"Ans",
"Sum",
"Sum=0",
"Sum",
"0",
"System.out.println(Ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"Ans",
"String[] args",
"args"
]
| import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.HashSet;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S=sc.next();
String T=sc.next();
String []Ss = S.split("");
String []Ts = T.split("");
int Sum=0;
int Ans=1001;
for (int i=0;i<Ss.length-Ts.length+1 ;i++){
for (int j=0;j<Ts.length ;j++) {
if(!(Ss[i+j].equals(Ts[j]))){
Sum++;
}
}
if(Ans>Sum){
Ans=Sum;
}
Sum=0;
}
System.out.println(Ans);
}
}
|
[
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,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
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,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
2,
4,
18,
13,
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
],
[
23,
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
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
31,
47
],
[
47,
48
],
[
48,
49
],
[
31,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
68,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
67,
79
],
[
79,
80
],
[
80,
81
],
[
51,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
51,
89
],
[
89,
90
],
[
89,
91
],
[
8,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
97,
101
],
[
6,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\t public static void main(String[] args){\n\t Scanner scan = new Scanner(System.in);\n\t String s = scan.nextLine();\n\t String t = scan.nextLine();\n\t scan.close();\n\n\t int count = 0;\n\t int ans = 0;\n\n\t for(int i=0;i<s.length()-t.length()+1;i++) {\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }\n\t System.out.println(t.length()-ans);\n\t }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t public static void main(String[] args){\n\t Scanner scan = new Scanner(System.in);\n\t String s = scan.nextLine();\n\t String t = scan.nextLine();\n\t scan.close();\n\n\t int count = 0;\n\t int ans = 0;\n\n\t for(int i=0;i<s.length()-t.length()+1;i++) {\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }\n\t System.out.println(t.length()-ans);\n\t }\n}",
"Main",
"public static void main(String[] args){\n\t Scanner scan = new Scanner(System.in);\n\t String s = scan.nextLine();\n\t String t = scan.nextLine();\n\t scan.close();\n\n\t int count = 0;\n\t int ans = 0;\n\n\t for(int i=0;i<s.length()-t.length()+1;i++) {\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }\n\t System.out.println(t.length()-ans);\n\t }",
"main",
"{\n\t Scanner scan = new Scanner(System.in);\n\t String s = scan.nextLine();\n\t String t = scan.nextLine();\n\t scan.close();\n\n\t int count = 0;\n\t int ans = 0;\n\n\t for(int i=0;i<s.length()-t.length()+1;i++) {\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }\n\t System.out.println(t.length()-ans);\n\t }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s = scan.nextLine();",
"s",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String t = scan.nextLine();",
"t",
"scan.nextLine()",
"scan.nextLine",
"scan",
"scan.close()",
"scan.close",
"scan",
"int count = 0;",
"count",
"0",
"int ans = 0;",
"ans",
"0",
"for(int i=0;i<s.length()-t.length()+1;i++) {\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()-t.length()+1",
"i",
"s.length()-t.length()+1",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }",
"{\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }",
"for(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}",
"{\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}",
"if(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}",
"s.charAt(i+j) == t.charAt(j)",
"s.charAt(i+j)",
"s.charAt",
"s",
"i+j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n\t \t\t\tcount++;\n\t \t\t}",
"count++",
"count",
"ans = Math.max(ans,count)",
"ans",
"Math.max(ans,count)",
"Math.max",
"Math",
"ans",
"count",
"count = 0",
"count",
"0",
"System.out.println(t.length()-ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length()-ans",
"t.length()",
"t.length",
"t",
"ans",
"String[] args",
"args",
"public class Main {\n\t public static void main(String[] args){\n\t Scanner scan = new Scanner(System.in);\n\t String s = scan.nextLine();\n\t String t = scan.nextLine();\n\t scan.close();\n\n\t int count = 0;\n\t int ans = 0;\n\n\t for(int i=0;i<s.length()-t.length()+1;i++) {\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }\n\t System.out.println(t.length()-ans);\n\t }\n}",
"public class Main {\n\t public static void main(String[] args){\n\t Scanner scan = new Scanner(System.in);\n\t String s = scan.nextLine();\n\t String t = scan.nextLine();\n\t scan.close();\n\n\t int count = 0;\n\t int ans = 0;\n\n\t for(int i=0;i<s.length()-t.length()+1;i++) {\n\t \tfor(int j=0;j<t.length();j++) {\n\t \t\tif(s.charAt(i+j) == t.charAt(j)) {\n\t \t\t\tcount++;\n\t \t\t}\n\t \t}\n\t \tans = Math.max(ans,count);\n \t\tcount = 0;\n\t }\n\t System.out.println(t.length()-ans);\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.nextLine();
String t = scan.nextLine();
scan.close();
int count = 0;
int ans = 0;
for(int i=0;i<s.length()-t.length()+1;i++) {
for(int j=0;j<t.length();j++) {
if(s.charAt(i+j) == t.charAt(j)) {
count++;
}
}
ans = Math.max(ans,count);
count = 0;
}
System.out.println(t.length()-ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
13,
17,
13,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
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,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
2,
18,
13,
13,
17,
42,
2,
13,
2,
13,
17,
30,
41,
13,
2,
13,
2,
2,
13,
13,
17,
14,
2,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
17,
14,
2,
18,
13,
13,
13,
30,
29,
13,
14,
2,
18,
13,
13,
13,
30,
29,
13,
29,
40,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
2,
18,
13,
13,
17,
42,
2,
13,
2,
13,
17,
30,
41,
13,
2,
13,
2,
2,
13,
13,
17,
14,
2,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
17,
14,
2,
18,
13,
13,
13,
30,
29,
13,
14,
2,
18,
13,
13,
13,
30,
29,
13,
29,
40,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
41,
13,
2,
4,
13,
13,
2,
13,
17,
17,
14,
2,
13,
13,
30,
29,
20,
29,
20,
23,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
17,
41,
13,
2,
18,
13,
13,
17,
42,
2,
13,
13,
30,
41,
13,
2,
13,
2,
2,
13,
13,
17,
14,
2,
18,
13,
13,
13,
30,
0,
13,
13,
0,
13,
2,
13,
17,
30,
0,
13,
2,
13,
17,
29,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
2,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
41,
13,
17,
41,
13,
13,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
30,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
13,
17,
41,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
2,
18,
13,
2,
13,
17,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
14,
2,
18,
13,
17,
17,
30,
29,
40,
17,
29,
2,
2,
2,
18,
13,
17,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
20,
41,
13,
4,
13,
13,
2,
13,
13,
29,
20,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
18,
13,
13,
4,
13,
18,
13,
13,
13,
13,
4,
13,
18,
13,
2,
13,
13,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
17,
41,
13,
40,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
4,
13,
13,
13,
13,
13,
30,
29,
17,
29,
13,
23,
13,
12,
13,
30,
14,
2,
18,
13,
13,
13,
30,
29,
17,
14,
2,
18,
13,
13,
13,
30,
29,
17,
0,
18,
13,
13,
13,
28,
13,
18,
13,
13,
30,
30,
14,
40,
4,
13,
13,
13,
13,
13,
30,
29,
17,
0,
18,
13,
13,
13,
4,
18,
13,
13,
29,
17,
23,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
23,
13,
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,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
915,
8
],
[
915,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
18,
21
],
[
18,
22
],
[
9,
23
],
[
23,
24
],
[
915,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
40,
56
],
[
56,
57
],
[
56,
58
],
[
40,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
40,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
40,
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
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
95,
96
],
[
96,
97
],
[
87,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
101,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
109,
111
],
[
100,
112
],
[
112,
113
],
[
113,
114
],
[
83,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
117,
121
],
[
40,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
27,
126
],
[
126,
127
],
[
127,
128
],
[
25,
129
],
[
129,
130
],
[
25,
131
],
[
131,
132
],
[
25,
133
],
[
133,
134
],
[
915,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
139,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
153,
155
],
[
150,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
156,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
166,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
166,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
179,
181
],
[
139,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
182,
188
],
[
188,
189
],
[
189,
190
],
[
182,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
192,
196
],
[
191,
197
],
[
197,
198
],
[
198,
199
],
[
139,
200
],
[
200,
201
],
[
201,
202
],
[
137,
203
],
[
203,
204
],
[
137,
205
],
[
205,
206
],
[
135,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
215,
219
],
[
209,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
223,
225
],
[
220,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
231,
235
],
[
226,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
236,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
236,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
249,
251
],
[
209,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
253,
257
],
[
252,
258
],
[
258,
259
],
[
259,
260
],
[
252,
261
],
[
261,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
262,
266
],
[
261,
267
],
[
267,
268
],
[
268,
269
],
[
209,
270
],
[
270,
271
],
[
271,
272
],
[
207,
273
],
[
273,
274
],
[
207,
275
],
[
275,
276
],
[
135,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
282,
284
],
[
282,
285
],
[
279,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
289,
292
],
[
292,
293
],
[
292,
294
],
[
288,
295
],
[
279,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
296,
300
],
[
300,
301
],
[
301,
302
],
[
279,
303
],
[
303,
304
],
[
277,
305
],
[
305,
306
],
[
277,
307
],
[
307,
308
],
[
135,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
314,
316
],
[
311,
317
],
[
317,
318
],
[
317,
319
],
[
311,
320
],
[
320,
321
],
[
320,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
322,
326
],
[
311,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
327,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
334,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
336,
340
],
[
331,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
346
],
[
341,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
347,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
353,
355
],
[
341,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
359,
361
],
[
311,
362
],
[
362,
363
],
[
309,
364
],
[
364,
365
],
[
309,
366
],
[
366,
367
],
[
915,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
370,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
375,
377
],
[
372,
378
],
[
378,
379
],
[
379,
380
],
[
379,
381
],
[
378,
382
],
[
382,
383
],
[
383,
384
],
[
383,
385
],
[
372,
386
],
[
386,
387
],
[
370,
388
],
[
388,
389
],
[
370,
390
],
[
390,
391
],
[
370,
392
],
[
392,
393
],
[
368,
394
],
[
394,
395
],
[
394,
396
],
[
396,
397
],
[
397,
398
],
[
397,
399
],
[
399,
400
],
[
399,
401
],
[
396,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
402,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
396,
410
],
[
410,
411
],
[
394,
412
],
[
412,
413
],
[
394,
414
],
[
414,
415
],
[
394,
416
],
[
416,
417
],
[
368,
418
],
[
418,
419
],
[
418,
420
],
[
420,
421
],
[
421,
422
],
[
422,
423
],
[
422,
424
],
[
421,
425
],
[
425,
426
],
[
426,
427
],
[
420,
428
],
[
428,
429
],
[
428,
430
],
[
420,
431
],
[
431,
432
],
[
431,
433
],
[
420,
434
],
[
434,
435
],
[
435,
436
],
[
435,
437
],
[
434,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
441,
442
],
[
441,
443
],
[
440,
444
],
[
439,
445
],
[
445,
446
],
[
446,
447
],
[
446,
448
],
[
448,
449
],
[
449,
450
],
[
449,
451
],
[
448,
452
],
[
438,
453
],
[
453,
454
],
[
453,
455
],
[
455,
456
],
[
456,
457
],
[
456,
458
],
[
455,
459
],
[
438,
460
],
[
460,
461
],
[
460,
462
],
[
462,
463
],
[
462,
464
],
[
420,
465
],
[
465,
466
],
[
465,
467
],
[
467,
468
],
[
468,
469
],
[
468,
470
],
[
467,
471
],
[
420,
472
],
[
472,
473
],
[
418,
474
],
[
474,
475
],
[
418,
476
],
[
476,
477
],
[
418,
478
],
[
478,
479
],
[
368,
480
],
[
480,
481
],
[
480,
482
],
[
482,
483
],
[
483,
484
],
[
484,
485
],
[
484,
486
],
[
483,
487
],
[
487,
488
],
[
488,
489
],
[
482,
490
],
[
490,
491
],
[
491,
492
],
[
491,
493
],
[
491,
494
],
[
494,
495
],
[
494,
496
],
[
480,
497
],
[
497,
498
],
[
480,
499
],
[
499,
500
],
[
368,
501
],
[
501,
502
],
[
501,
503
],
[
503,
504
],
[
504,
505
],
[
504,
506
],
[
507,
508
],
[
507,
509
],
[
503,
510
],
[
510,
511
],
[
511,
512
],
[
511,
513
],
[
510,
514
],
[
503,
515
],
[
515,
516
],
[
516,
517
],
[
517,
518
],
[
517,
519
],
[
515,
520
],
[
520,
521
],
[
520,
522
],
[
515,
523
],
[
523,
524
],
[
524,
525
],
[
515,
526
],
[
527,
527
],
[
527,
528
],
[
528,
529
],
[
529,
530
],
[
529,
531
],
[
528,
532
],
[
532,
533
],
[
533,
534
],
[
534,
535
],
[
534,
536
],
[
536,
537
],
[
536,
538
],
[
533,
539
],
[
532,
540
],
[
503,
541
],
[
541,
542
],
[
501,
543
],
[
543,
544
],
[
501,
545
],
[
545,
546
],
[
368,
547
],
[
547,
548
],
[
547,
549
],
[
549,
550
],
[
550,
551
],
[
550,
552
],
[
552,
553
],
[
552,
554
],
[
552,
555
],
[
549,
556
],
[
556,
557
],
[
557,
558
],
[
558,
559
],
[
558,
560
],
[
557,
561
],
[
556,
562
],
[
562,
563
],
[
563,
564
],
[
564,
565
],
[
549,
566
],
[
566,
567
],
[
567,
568
],
[
568,
569
],
[
569,
570
],
[
570,
571
],
[
570,
572
],
[
569,
573
],
[
568,
574
],
[
567,
575
],
[
547,
576
],
[
576,
577
],
[
547,
578
],
[
578,
579
],
[
368,
580
],
[
580,
581
],
[
580,
582
],
[
582,
583
],
[
583,
584
],
[
584,
585
],
[
584,
586
],
[
583,
587
],
[
587,
588
],
[
588,
589
],
[
582,
590
],
[
590,
591
],
[
590,
592
],
[
592,
593
],
[
592,
594
],
[
592,
595
],
[
595,
596
],
[
595,
597
],
[
582,
598
],
[
598,
599
],
[
580,
600
],
[
600,
601
],
[
580,
602
],
[
602,
603
],
[
368,
604
],
[
604,
605
],
[
604,
606
],
[
606,
607
],
[
607,
608
],
[
608,
609
],
[
609,
610
],
[
610,
611
],
[
611,
612
],
[
612,
613
],
[
612,
614
],
[
611,
615
],
[
615,
616
],
[
615,
617
],
[
617,
618
],
[
617,
619
],
[
615,
620
],
[
610,
621
],
[
609,
622
],
[
622,
623
],
[
622,
624
],
[
624,
625
],
[
624,
626
],
[
626,
627
],
[
626,
628
],
[
622,
629
],
[
608,
630
],
[
604,
631
],
[
631,
632
],
[
604,
633
],
[
633,
634
],
[
604,
635
],
[
635,
636
],
[
604,
637
],
[
637,
638
],
[
915,
639
],
[
639,
640
],
[
639,
641
],
[
641,
642
],
[
641,
643
],
[
639,
644
],
[
644,
645
],
[
644,
646
],
[
646,
647
],
[
639,
648
],
[
648,
649
],
[
648,
650
],
[
639,
651
],
[
651,
652
],
[
651,
653
],
[
653,
654
],
[
654,
655
],
[
654,
656
],
[
653,
657
],
[
657,
658
],
[
657,
659
],
[
660,
661
],
[
660,
662
],
[
653,
663
],
[
663,
664
],
[
664,
665
],
[
665,
666
],
[
665,
667
],
[
663,
668
],
[
668,
669
],
[
668,
670
],
[
670,
671
],
[
670,
672
],
[
663,
673
],
[
673,
674
],
[
674,
675
],
[
663,
676
],
[
677,
677
],
[
677,
678
],
[
678,
679
],
[
679,
680
],
[
680,
681
],
[
680,
682
],
[
680,
683
],
[
680,
684
],
[
680,
685
],
[
678,
686
],
[
686,
687
],
[
687,
688
],
[
653,
689
],
[
689,
690
],
[
651,
691
],
[
691,
692
],
[
639,
693
],
[
693,
694
],
[
693,
695
],
[
695,
696
],
[
696,
697
],
[
697,
698
],
[
698,
699
],
[
698,
700
],
[
697,
701
],
[
696,
702
],
[
702,
703
],
[
703,
704
],
[
696,
705
],
[
705,
706
],
[
706,
707
],
[
707,
708
],
[
707,
709
],
[
706,
710
],
[
705,
711
],
[
711,
712
],
[
712,
713
],
[
695,
714
],
[
714,
715
],
[
715,
716
],
[
715,
717
],
[
714,
718
],
[
695,
719
],
[
719,
720
],
[
719,
721
],
[
721,
722
],
[
721,
723
],
[
719,
724
],
[
725,
725
],
[
725,
726
],
[
726,
727
],
[
727,
728
],
[
728,
729
],
[
728,
730
],
[
728,
731
],
[
728,
732
],
[
728,
733
],
[
726,
734
],
[
734,
735
],
[
735,
736
],
[
695,
737
],
[
737,
738
],
[
738,
739
],
[
738,
740
],
[
737,
741
],
[
695,
742
],
[
742,
743
],
[
743,
744
],
[
742,
745
],
[
695,
746
],
[
746,
747
],
[
693,
748
],
[
748,
749
],
[
693,
750
],
[
750,
751
],
[
693,
752
],
[
752,
753
],
[
693,
754
],
[
754,
755
],
[
915,
756
],
[
756,
757
],
[
756,
758
],
[
758,
759
],
[
756,
760
],
[
760,
761
],
[
756,
762
],
[
762,
763
],
[
762,
764
],
[
764,
765
],
[
765,
766
],
[
766,
767
],
[
766,
768
],
[
768,
769
],
[
769,
770
],
[
770,
771
],
[
765,
772
],
[
772,
773
],
[
773,
774
],
[
773,
775
],
[
762,
776
],
[
776,
777
],
[
756,
778
],
[
778,
779
],
[
778,
780
],
[
780,
781
],
[
781,
782
],
[
782,
783
],
[
783,
784
],
[
783,
785
],
[
782,
786
],
[
786,
787
],
[
787,
788
],
[
788,
789
],
[
781,
790
],
[
790,
791
],
[
791,
792
],
[
792,
793
],
[
792,
794
],
[
794,
795
],
[
795,
796
],
[
796,
797
],
[
791,
798
],
[
798,
799
],
[
799,
800
],
[
799,
801
],
[
780,
802
],
[
802,
803
],
[
803,
804
],
[
804,
805
],
[
756,
806
],
[
806,
807
],
[
806,
808
],
[
808,
809
],
[
809,
810
],
[
810,
811
],
[
811,
812
],
[
810,
813
],
[
813,
814
],
[
756,
815
],
[
815,
816
],
[
815,
817
],
[
817,
818
],
[
818,
819
],
[
819,
820
],
[
820,
821
],
[
819,
822
],
[
822,
823
],
[
756,
824
],
[
824,
825
],
[
824,
826
],
[
826,
827
],
[
827,
828
],
[
828,
829
],
[
829,
830
],
[
828,
831
],
[
831,
832
],
[
756,
833
],
[
833,
834
],
[
833,
835
],
[
835,
836
],
[
836,
837
],
[
836,
838
],
[
835,
839
],
[
839,
840
],
[
840,
841
],
[
840,
842
],
[
842,
843
],
[
843,
844
],
[
844,
845
],
[
839,
846
],
[
846,
847
],
[
847,
848
],
[
847,
849
],
[
849,
850
],
[
850,
851
],
[
835,
852
],
[
852,
853
],
[
756,
854
],
[
854,
855
],
[
854,
856
],
[
856,
857
],
[
857,
858
],
[
857,
859
],
[
856,
861
],
[
861,
862
],
[
862,
863
],
[
863,
864
],
[
863,
865
],
[
861,
866
],
[
866,
867
],
[
866,
868
],
[
861,
869
],
[
869,
870
],
[
870,
871
],
[
861,
872
],
[
873,
873
],
[
873,
874
],
[
874,
875
],
[
875,
876
],
[
875,
877
],
[
874,
878
],
[
878,
879
],
[
856,
880
],
[
880,
881
],
[
854,
882
],
[
882,
883
],
[
756,
884
],
[
884,
885
],
[
884,
886
],
[
886,
887
],
[
887,
888
],
[
887,
889
],
[
886,
891
],
[
891,
892
],
[
892,
893
],
[
893,
894
],
[
893,
895
],
[
891,
896
],
[
896,
897
],
[
896,
898
],
[
891,
899
],
[
899,
900
],
[
900,
901
],
[
891,
902
],
[
903,
903
],
[
903,
904
],
[
904,
905
],
[
905,
906
],
[
905,
907
],
[
904,
908
],
[
908,
909
],
[
886,
910
],
[
910,
911
],
[
884,
912
],
[
912,
913
],
[
0,
914
],
[
914,
915
],
[
914,
916
]
]
| [
"//package atcoder.beginner177;\n\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n// try {\n// FastScanner in = new FastScanner(new FileInputStream(\"src/input.in\"));\n// PrintWriter out = new PrintWriter(new FileOutputStream(\"src/output.out\"));\n\n FastScanner in = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n solve(1, in, out);\n\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }\n\n private static void solve(int q, FastScanner in, PrintWriter out) {\n for (int qq = 0; qq < q; qq++) {\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }\n out.close();\n }\n\n private static class BinarySearch {\n // return the right most index i such that a[i] <= t\n private static int rightMostUpperBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }\n if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }\n return -1;\n }\n\n // return the left most index i such that a[i] >= t\n private static int leftMostLowerBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }\n if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }\n return -1;\n }\n\n // Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found\n private static int[] searchRange(Integer[] a, int t) {\n int first = firstPos(a, t);\n int last = firstPos(a, t + 1) - 1;\n if (first <= last) {\n return new int[]{first, last};\n }\n return new int[]{-1, -1};\n }\n\n private static int firstPos(Integer[] a, int t) {\n int first = a.length;\n int l = 0, r = a.length - 1;\n while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }\n return first;\n }\n }\n\n private static class NumberTheory {\n private static long modularAdd(long a, long b, int mod) {\n long sum = a + b;\n if (sum >= mod) {\n sum -= mod;\n }\n return sum;\n }\n\n private static long modularSubtract(long a, long b, int mod) {\n long diff = a - b;\n if (diff < 0) {\n diff += mod;\n }\n return diff;\n }\n\n private static long fastModPow(long x, int n, long mod) {\n if (n == 0) {\n return 1;\n }\n long coeff = 1, base = x;\n while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }\n long res = coeff * base % mod;\n return res;\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private static long[] factorial(int n, long mod) {\n long[] factor = new long[n + 1];\n factor[0] = 1;\n for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }\n return factor;\n }\n\n private static long modInv_EEA(long a, long mod) {\n long[] res = solveGcdEquation(a, mod);\n if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }\n return (res[0] % mod + mod) % mod;\n }\n\n private static long[] solveGcdEquation(long a, long b) {\n if (b == 0) {\n return new long[]{1, 0, a};\n }\n long[] res = solveGcdEquation(b, a % b);\n return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};\n }\n\n private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {\n return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;\n }\n }\n\n private static class Graph {\n private static int UNVISITED = 0;\n private static int VISITING = -1;\n private static int VISITED = 1;\n\n private static Stack<Integer> topologicalSort(Set<Integer>[] g) {\n Stack<Integer> stack = new Stack<>();\n int[] state = new int[g.length];\n\n for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }\n return stack;\n }\n\n private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {\n if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }\n state[currNode] = VISITING;\n for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }\n state[currNode] = VISITED;\n stack.push(currNode);\n return true;\n }\n }\n\n private static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n FastScanner(InputStream stream) {\n try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n String next() {\n while (st == null || !st.hasMoreTokens()) {\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 Integer[] nextIntArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n Long[] nextLongArray(int n) {\n Long[] a = new Long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }\n }\n}\n\n",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n// try {\n// FastScanner in = new FastScanner(new FileInputStream(\"src/input.in\"));\n// PrintWriter out = new PrintWriter(new FileOutputStream(\"src/output.out\"));\n\n FastScanner in = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n solve(1, in, out);\n\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }\n\n private static void solve(int q, FastScanner in, PrintWriter out) {\n for (int qq = 0; qq < q; qq++) {\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }\n out.close();\n }\n\n private static class BinarySearch {\n // return the right most index i such that a[i] <= t\n private static int rightMostUpperBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }\n if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }\n return -1;\n }\n\n // return the left most index i such that a[i] >= t\n private static int leftMostLowerBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }\n if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }\n return -1;\n }\n\n // Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found\n private static int[] searchRange(Integer[] a, int t) {\n int first = firstPos(a, t);\n int last = firstPos(a, t + 1) - 1;\n if (first <= last) {\n return new int[]{first, last};\n }\n return new int[]{-1, -1};\n }\n\n private static int firstPos(Integer[] a, int t) {\n int first = a.length;\n int l = 0, r = a.length - 1;\n while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }\n return first;\n }\n }\n\n private static class NumberTheory {\n private static long modularAdd(long a, long b, int mod) {\n long sum = a + b;\n if (sum >= mod) {\n sum -= mod;\n }\n return sum;\n }\n\n private static long modularSubtract(long a, long b, int mod) {\n long diff = a - b;\n if (diff < 0) {\n diff += mod;\n }\n return diff;\n }\n\n private static long fastModPow(long x, int n, long mod) {\n if (n == 0) {\n return 1;\n }\n long coeff = 1, base = x;\n while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }\n long res = coeff * base % mod;\n return res;\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private static long[] factorial(int n, long mod) {\n long[] factor = new long[n + 1];\n factor[0] = 1;\n for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }\n return factor;\n }\n\n private static long modInv_EEA(long a, long mod) {\n long[] res = solveGcdEquation(a, mod);\n if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }\n return (res[0] % mod + mod) % mod;\n }\n\n private static long[] solveGcdEquation(long a, long b) {\n if (b == 0) {\n return new long[]{1, 0, a};\n }\n long[] res = solveGcdEquation(b, a % b);\n return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};\n }\n\n private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {\n return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;\n }\n }\n\n private static class Graph {\n private static int UNVISITED = 0;\n private static int VISITING = -1;\n private static int VISITED = 1;\n\n private static Stack<Integer> topologicalSort(Set<Integer>[] g) {\n Stack<Integer> stack = new Stack<>();\n int[] state = new int[g.length];\n\n for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }\n return stack;\n }\n\n private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {\n if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }\n state[currNode] = VISITING;\n for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }\n state[currNode] = VISITED;\n stack.push(currNode);\n return true;\n }\n }\n\n private static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n FastScanner(InputStream stream) {\n try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n String next() {\n while (st == null || !st.hasMoreTokens()) {\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 Integer[] nextIntArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n Long[] nextLongArray(int n) {\n Long[] a = new Long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n// try {\n// FastScanner in = new FastScanner(new FileInputStream(\"src/input.in\"));\n// PrintWriter out = new PrintWriter(new FileOutputStream(\"src/output.out\"));\n\n FastScanner in = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n solve(1, in, out);\n\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }",
"main",
"{\n// try {\n// FastScanner in = new FastScanner(new FileInputStream(\"src/input.in\"));\n// PrintWriter out = new PrintWriter(new FileOutputStream(\"src/output.out\"));\n\n FastScanner in = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n solve(1, in, out);\n\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }",
"FastScanner in = new FastScanner(System.in);",
"in",
"new FastScanner(System.in)",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"solve(1, in, out)",
"solve",
"1",
"in",
"out",
"String[] args",
"args",
"private static void solve(int q, FastScanner in, PrintWriter out) {\n for (int qq = 0; qq < q; qq++) {\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }\n out.close();\n }",
"solve",
"{\n for (int qq = 0; qq < q; qq++) {\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }\n out.close();\n }",
"for (int qq = 0; qq < q; qq++) {\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }",
"int qq = 0;",
"int qq = 0;",
"qq",
"0",
"qq < q",
"qq",
"q",
"qq++",
"qq++",
"qq",
"{\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }",
"{\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }",
"String s = in.next()",
"s",
"in.next()",
"in.next",
"in",
"t = in.next();",
"t",
"in.next()",
"in.next",
"in",
"int best = t.length();",
"best",
"t.length()",
"t.length",
"t",
"int diff = 0",
"diff",
"0",
"m = t.length()",
"m",
"t.length()",
"t.length",
"t",
"n = s.length();",
"n",
"s.length()",
"s.length",
"s",
"for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= n - m",
"i",
"n - m",
"n",
"m",
"i++",
"i++",
"i",
"{\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }",
"{\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }",
"diff = 0",
"diff",
"0",
"for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"{\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }",
"{\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }",
"if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }",
"t.charAt(j) != s.charAt(j + i)",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"s.charAt(j + i)",
"s.charAt",
"s",
"j + i",
"j",
"i",
"{\n diff++;\n }",
"diff++",
"diff",
"best = Math.min(best, diff)",
"best",
"Math.min(best, diff)",
"Math.min",
"Math",
"best",
"diff",
"out.println(best)",
"out.println",
"out",
"best",
"out.close()",
"out.close",
"out",
"int q",
"q",
"FastScanner in",
"in",
"PrintWriter out",
"out",
"private static class BinarySearch {\n // return the right most index i such that a[i] <= t\n private static int rightMostUpperBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }\n if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }\n return -1;\n }\n\n // return the left most index i such that a[i] >= t\n private static int leftMostLowerBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }\n if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }\n return -1;\n }\n\n // Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found\n private static int[] searchRange(Integer[] a, int t) {\n int first = firstPos(a, t);\n int last = firstPos(a, t + 1) - 1;\n if (first <= last) {\n return new int[]{first, last};\n }\n return new int[]{-1, -1};\n }\n\n private static int firstPos(Integer[] a, int t) {\n int first = a.length;\n int l = 0, r = a.length - 1;\n while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }\n return first;\n }\n }",
"BinarySearch",
"// return the right most index i such that a[i] <= t\n private static int rightMostUpperBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }\n if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }\n return -1;\n }",
"rightMostUpperBound",
"{\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }\n if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }\n return -1;\n }",
"int l = 0",
"l",
"0",
"r = a.length - 1;",
"r",
"a.length - 1",
"a.length",
"a",
"a.length",
"1",
"while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }",
"l < r - 1",
"l",
"r - 1",
"r",
"1",
"{\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }",
"int mid = l + (r - l) / 2;",
"mid",
"l + (r - l) / 2",
"l",
"(r - l) / 2",
"(r - l)",
"r",
"l",
"2",
"if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }",
"a[mid] <= t",
"a[mid]",
"a",
"mid",
"t",
"{\n l = mid;\n }",
"l = mid",
"l",
"mid",
"{\n r = mid - 1;\n }",
"r = mid - 1",
"r",
"mid - 1",
"mid",
"1",
"if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }",
"a[r] <= t",
"a[r]",
"a",
"r",
"t",
"{\n return r;\n }",
"return r;",
"r",
"if (a[l] <= t) {\n return l;\n }",
"a[l] <= t",
"a[l]",
"a",
"l",
"t",
"{\n return l;\n }",
"return l;",
"l",
"return -1;",
"-1",
"1",
"Integer[] a",
"a",
"int t",
"t",
"// return the left most index i such that a[i] >= t\n private static int leftMostLowerBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }\n if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }\n return -1;\n }",
"leftMostLowerBound",
"{\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }\n if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }\n return -1;\n }",
"int l = 0",
"l",
"0",
"r = a.length - 1;",
"r",
"a.length - 1",
"a.length",
"a",
"a.length",
"1",
"while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }",
"l < r - 1",
"l",
"r - 1",
"r",
"1",
"{\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }",
"int mid = l + (r - l) / 2;",
"mid",
"l + (r - l) / 2",
"l",
"(r - l) / 2",
"(r - l)",
"r",
"l",
"2",
"if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }",
"a[mid] >= t",
"a[mid]",
"a",
"mid",
"t",
"{\n r = mid;\n }",
"r = mid",
"r",
"mid",
"{\n l = mid + 1;\n }",
"l = mid + 1",
"l",
"mid + 1",
"mid",
"1",
"if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }",
"a[l] >= t",
"a[l]",
"a",
"l",
"t",
"{\n return l;\n }",
"return l;",
"l",
"if (a[r] >= t) {\n return r;\n }",
"a[r] >= t",
"a[r]",
"a",
"r",
"t",
"{\n return r;\n }",
"return r;",
"r",
"return -1;",
"-1",
"1",
"Integer[] a",
"a",
"int t",
"t",
"// Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found\n private static int[] searchRange(Integer[] a, int t) {\n int first = firstPos(a, t);\n int last = firstPos(a, t + 1) - 1;\n if (first <= last) {\n return new int[]{first, last};\n }\n return new int[]{-1, -1};\n }",
"searchRange",
"{\n int first = firstPos(a, t);\n int last = firstPos(a, t + 1) - 1;\n if (first <= last) {\n return new int[]{first, last};\n }\n return new int[]{-1, -1};\n }",
"int first = firstPos(a, t);",
"first",
"firstPos(a, t)",
"firstPos",
"a",
"t",
"int last = firstPos(a, t + 1) - 1;",
"last",
"firstPos(a, t + 1) - 1",
"firstPos(a, t + 1)",
"firstPos",
"a",
"t + 1",
"t",
"1",
"1",
"if (first <= last) {\n return new int[]{first, last};\n }",
"first <= last",
"first",
"last",
"{\n return new int[]{first, last};\n }",
"return new int[]{first, last};",
"new int[]{first, last}",
"return new int[]{-1, -1};",
"new int[]{-1, -1}",
"Integer[] a",
"a",
"int t",
"t",
"private static int firstPos(Integer[] a, int t) {\n int first = a.length;\n int l = 0, r = a.length - 1;\n while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }\n return first;\n }",
"firstPos",
"{\n int first = a.length;\n int l = 0, r = a.length - 1;\n while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }\n return first;\n }",
"int first = a.length;",
"first",
"a.length",
"a",
"a.length",
"int l = 0",
"l",
"0",
"r = a.length - 1;",
"r",
"a.length - 1",
"a.length",
"a",
"a.length",
"1",
"while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }",
"l <= r",
"l",
"r",
"{\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }",
"int mid = l + (r - l) / 2;",
"mid",
"l + (r - l) / 2",
"l",
"(r - l) / 2",
"(r - l)",
"r",
"l",
"2",
"if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }",
"a[mid] >= t",
"a[mid]",
"a",
"mid",
"t",
"{\n first = mid;\n r = mid - 1;\n }",
"first = mid",
"first",
"mid",
"r = mid - 1",
"r",
"mid - 1",
"mid",
"1",
"{\n l = mid + 1;\n }",
"l = mid + 1",
"l",
"mid + 1",
"mid",
"1",
"return first;",
"first",
"Integer[] a",
"a",
"int t",
"t",
"private static class NumberTheory {\n private static long modularAdd(long a, long b, int mod) {\n long sum = a + b;\n if (sum >= mod) {\n sum -= mod;\n }\n return sum;\n }\n\n private static long modularSubtract(long a, long b, int mod) {\n long diff = a - b;\n if (diff < 0) {\n diff += mod;\n }\n return diff;\n }\n\n private static long fastModPow(long x, int n, long mod) {\n if (n == 0) {\n return 1;\n }\n long coeff = 1, base = x;\n while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }\n long res = coeff * base % mod;\n return res;\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private static long[] factorial(int n, long mod) {\n long[] factor = new long[n + 1];\n factor[0] = 1;\n for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }\n return factor;\n }\n\n private static long modInv_EEA(long a, long mod) {\n long[] res = solveGcdEquation(a, mod);\n if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }\n return (res[0] % mod + mod) % mod;\n }\n\n private static long[] solveGcdEquation(long a, long b) {\n if (b == 0) {\n return new long[]{1, 0, a};\n }\n long[] res = solveGcdEquation(b, a % b);\n return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};\n }\n\n private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {\n return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;\n }\n }",
"NumberTheory",
"private static long modularAdd(long a, long b, int mod) {\n long sum = a + b;\n if (sum >= mod) {\n sum -= mod;\n }\n return sum;\n }",
"modularAdd",
"{\n long sum = a + b;\n if (sum >= mod) {\n sum -= mod;\n }\n return sum;\n }",
"long sum = a + b;",
"sum",
"a + b",
"a",
"b",
"if (sum >= mod) {\n sum -= mod;\n }",
"sum >= mod",
"sum",
"mod",
"{\n sum -= mod;\n }",
"sum -= mod",
"sum",
"mod",
"return sum;",
"sum",
"long a",
"a",
"long b",
"b",
"int mod",
"mod",
"private static long modularSubtract(long a, long b, int mod) {\n long diff = a - b;\n if (diff < 0) {\n diff += mod;\n }\n return diff;\n }",
"modularSubtract",
"{\n long diff = a - b;\n if (diff < 0) {\n diff += mod;\n }\n return diff;\n }",
"long diff = a - b;",
"diff",
"a - b",
"a",
"b",
"if (diff < 0) {\n diff += mod;\n }",
"diff < 0",
"diff",
"0",
"{\n diff += mod;\n }",
"diff += mod",
"diff",
"mod",
"return diff;",
"diff",
"long a",
"a",
"long b",
"b",
"int mod",
"mod",
"private static long fastModPow(long x, int n, long mod) {\n if (n == 0) {\n return 1;\n }\n long coeff = 1, base = x;\n while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }\n long res = coeff * base % mod;\n return res;\n }",
"fastModPow",
"{\n if (n == 0) {\n return 1;\n }\n long coeff = 1, base = x;\n while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }\n long res = coeff * base % mod;\n return res;\n }",
"if (n == 0) {\n return 1;\n }",
"n == 0",
"n",
"0",
"{\n return 1;\n }",
"return 1;",
"1",
"long coeff = 1",
"coeff",
"1",
"base = x;",
"base",
"x",
"while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }",
"n > 1",
"n",
"1",
"{\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }",
"if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }",
"n % 2 != 0",
"n % 2",
"n",
"2",
"0",
"{\n coeff = (coeff * base % mod);\n }",
"coeff = (coeff * base % mod)",
"coeff",
"(coeff * base % mod)",
"coeff * base",
"coeff",
"base",
"mod",
"base = (base * base % mod)",
"base",
"(base * base % mod)",
"base * base",
"base",
"base",
"mod",
"n = n / 2",
"n",
"n / 2",
"n",
"2",
"long res = coeff * base % mod;",
"res",
"coeff * base % mod",
"coeff * base",
"coeff",
"base",
"mod",
"return res;",
"res",
"long x",
"x",
"int n",
"n",
"long mod",
"mod",
"private static long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }",
"gcd",
"{\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }",
"if (b == 0) {\n return a;\n }",
"b == 0",
"b",
"0",
"{\n return a;\n }",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"private static long[] factorial(int n, long mod) {\n long[] factor = new long[n + 1];\n factor[0] = 1;\n for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }\n return factor;\n }",
"factorial",
"{\n long[] factor = new long[n + 1];\n factor[0] = 1;\n for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }\n return factor;\n }",
"long[] factor = new long[n + 1];",
"factor",
"new long[n + 1]",
"n + 1",
"n",
"1",
"factor[0] = 1",
"factor[0]",
"factor",
"0",
"1",
"for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n factor[i] = factor[i - 1] * i % mod;\n }",
"{\n factor[i] = factor[i - 1] * i % mod;\n }",
"factor[i] = factor[i - 1] * i % mod",
"factor[i]",
"factor",
"i",
"factor[i - 1] * i % mod",
"factor[i - 1] * i",
"factor[i - 1]",
"factor",
"i - 1",
"i",
"1",
"i",
"mod",
"return factor;",
"factor",
"int n",
"n",
"long mod",
"mod",
"private static long modInv_EEA(long a, long mod) {\n long[] res = solveGcdEquation(a, mod);\n if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }\n return (res[0] % mod + mod) % mod;\n }",
"modInv_EEA",
"{\n long[] res = solveGcdEquation(a, mod);\n if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }\n return (res[0] % mod + mod) % mod;\n }",
"long[] res = solveGcdEquation(a, mod);",
"res",
"solveGcdEquation(a, mod)",
"solveGcdEquation",
"a",
"mod",
"if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }",
"res[2] != 1",
"res[2]",
"res",
"2",
"1",
"{\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }",
"return -1;",
"-1",
"1",
"return (res[0] % mod + mod) % mod;",
"(res[0] % mod + mod) % mod",
"(res[0] % mod + mod)",
"res[0] % mod",
"res[0]",
"res",
"0",
"mod",
"mod",
"mod",
"long a",
"a",
"long mod",
"mod",
"private static long[] solveGcdEquation(long a, long b) {\n if (b == 0) {\n return new long[]{1, 0, a};\n }\n long[] res = solveGcdEquation(b, a % b);\n return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};\n }",
"solveGcdEquation",
"{\n if (b == 0) {\n return new long[]{1, 0, a};\n }\n long[] res = solveGcdEquation(b, a % b);\n return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};\n }",
"if (b == 0) {\n return new long[]{1, 0, a};\n }",
"b == 0",
"b",
"0",
"{\n return new long[]{1, 0, a};\n }",
"return new long[]{1, 0, a};",
"new long[]{1, 0, a}",
"long[] res = solveGcdEquation(b, a % b);",
"res",
"solveGcdEquation(b, a % b)",
"solveGcdEquation",
"b",
"a % b",
"a",
"b",
"return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};",
"new long[]{res[1], res[0] - (a / b) * res[1], res[2]}",
"long a",
"a",
"long b",
"b",
"private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {\n return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;\n }",
"binomialCoefficient",
"{\n return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;\n }",
"return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;",
"factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod",
"factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod)",
"factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod",
"factorial[(int) n] * modInv_EEA(factorial[(int) k], mod)",
"factorial[(int) n]",
"factorial",
"(int) n",
"modInv_EEA(factorial[(int) k], mod)",
"modInv_EEA",
"factorial[(int) k]",
"factorial",
"(int) k",
"mod",
"mod",
"modInv_EEA(factorial[(int) (n - k)], mod)",
"modInv_EEA",
"factorial[(int) (n - k)]",
"factorial",
"(int) (n - k)",
"n",
"k",
"mod",
"mod",
"long[] factorial",
"factorial",
"long n",
"n",
"long k",
"k",
"long mod",
"mod",
"private static class Graph {\n private static int UNVISITED = 0;\n private static int VISITING = -1;\n private static int VISITED = 1;\n\n private static Stack<Integer> topologicalSort(Set<Integer>[] g) {\n Stack<Integer> stack = new Stack<>();\n int[] state = new int[g.length];\n\n for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }\n return stack;\n }\n\n private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {\n if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }\n state[currNode] = VISITING;\n for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }\n state[currNode] = VISITED;\n stack.push(currNode);\n return true;\n }\n }",
"Graph",
"private static int UNVISITED = 0;",
"UNVISITED",
"0",
"private static int VISITING = -1;",
"VISITING",
"-1",
"1",
"private static int VISITED = 1;",
"VISITED",
"1",
"private static Stack<Integer> topologicalSort(Set<Integer>[] g) {\n Stack<Integer> stack = new Stack<>();\n int[] state = new int[g.length];\n\n for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }\n return stack;\n }",
"topologicalSort",
"{\n Stack<Integer> stack = new Stack<>();\n int[] state = new int[g.length];\n\n for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }\n return stack;\n }",
"Stack<Integer> stack = new Stack<>();",
"stack",
"new Stack<>()",
"int[] state = new int[g.length];",
"state",
"new int[g.length]",
"g.length",
"g",
"g.length",
"for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }",
"int node = 0;",
"int node = 0;",
"node",
"0",
"node < g.length",
"node",
"g.length",
"g",
"g.length",
"node++",
"node++",
"node",
"{\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }",
"{\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }",
"if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }",
"!topoSortHelper(g, stack, state, node)",
"topoSortHelper(g, stack, state, node)",
"topoSortHelper",
"g",
"stack",
"state",
"node",
"{\n return null;\n }",
"return null;",
"null",
"return stack;",
"stack",
"Set<Integer>[] g",
"g",
"private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {\n if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }\n state[currNode] = VISITING;\n for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }\n state[currNode] = VISITED;\n stack.push(currNode);\n return true;\n }",
"topoSortHelper",
"{\n if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }\n state[currNode] = VISITING;\n for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }\n state[currNode] = VISITED;\n stack.push(currNode);\n return true;\n }",
"if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }",
"state[currNode] == VISITED",
"state[currNode]",
"state",
"currNode",
"VISITED",
"{\n return true;\n }",
"return true;",
"true",
"if (state[currNode] == VISITING) {\n return false;\n }",
"state[currNode] == VISITING",
"state[currNode]",
"state",
"currNode",
"VISITING",
"{\n return false;\n }",
"return false;",
"false",
"state[currNode] = VISITING",
"state[currNode]",
"state",
"currNode",
"VISITING",
"for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }",
"int neighbor",
"g[currNode]",
"g",
"currNode",
"{\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }",
"{\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }",
"if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }",
"!topoSortHelper(g, stack, state, neighbor)",
"topoSortHelper(g, stack, state, neighbor)",
"topoSortHelper",
"g",
"stack",
"state",
"neighbor",
"{\n return false;\n }",
"return false;",
"false",
"state[currNode] = VISITED",
"state[currNode]",
"state",
"currNode",
"VISITED",
"stack.push(currNode)",
"stack.push",
"stack",
"currNode",
"return true;",
"true",
"Set<Integer>[] g",
"g",
"Stack<Integer> stack",
"stack",
"int[] state",
"state",
"int currNode",
"currNode",
"private static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n FastScanner(InputStream stream) {\n try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n String next() {\n while (st == null || !st.hasMoreTokens()) {\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 Integer[] nextIntArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n Long[] nextLongArray(int n) {\n Long[] a = new Long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }\n }",
"FastScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"FastScanner(InputStream stream) {\n try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"FastScanner",
"{\n try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n br = new BufferedReader(new InputStreamReader(stream));\n }",
"br = new BufferedReader(new InputStreamReader(stream))",
"br",
"new BufferedReader(new InputStreamReader(stream))",
"InputStream stream",
"stream",
"String next() {\n while (st == null || !st.hasMoreTokens()) {\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.hasMoreTokens()) {\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.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"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",
"Integer[] nextIntArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"nextIntArray",
"{\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"Integer[] a = new Integer[n];",
"a",
"new Integer[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nextInt();\n }",
"{\n a[i] = nextInt();\n }",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"Long[] nextLongArray(int n) {\n Long[] a = new Long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }",
"nextLongArray",
"{\n Long[] a = new Long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }",
"Long[] a = new Long[n];",
"a",
"new Long[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nextLong();\n }",
"{\n a[i] = nextLong();\n }",
"a[i] = nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"public class Main {\n public static void main(String[] args) {\n// try {\n// FastScanner in = new FastScanner(new FileInputStream(\"src/input.in\"));\n// PrintWriter out = new PrintWriter(new FileOutputStream(\"src/output.out\"));\n\n FastScanner in = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n solve(1, in, out);\n\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }\n\n private static void solve(int q, FastScanner in, PrintWriter out) {\n for (int qq = 0; qq < q; qq++) {\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }\n out.close();\n }\n\n private static class BinarySearch {\n // return the right most index i such that a[i] <= t\n private static int rightMostUpperBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }\n if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }\n return -1;\n }\n\n // return the left most index i such that a[i] >= t\n private static int leftMostLowerBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }\n if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }\n return -1;\n }\n\n // Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found\n private static int[] searchRange(Integer[] a, int t) {\n int first = firstPos(a, t);\n int last = firstPos(a, t + 1) - 1;\n if (first <= last) {\n return new int[]{first, last};\n }\n return new int[]{-1, -1};\n }\n\n private static int firstPos(Integer[] a, int t) {\n int first = a.length;\n int l = 0, r = a.length - 1;\n while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }\n return first;\n }\n }\n\n private static class NumberTheory {\n private static long modularAdd(long a, long b, int mod) {\n long sum = a + b;\n if (sum >= mod) {\n sum -= mod;\n }\n return sum;\n }\n\n private static long modularSubtract(long a, long b, int mod) {\n long diff = a - b;\n if (diff < 0) {\n diff += mod;\n }\n return diff;\n }\n\n private static long fastModPow(long x, int n, long mod) {\n if (n == 0) {\n return 1;\n }\n long coeff = 1, base = x;\n while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }\n long res = coeff * base % mod;\n return res;\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private static long[] factorial(int n, long mod) {\n long[] factor = new long[n + 1];\n factor[0] = 1;\n for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }\n return factor;\n }\n\n private static long modInv_EEA(long a, long mod) {\n long[] res = solveGcdEquation(a, mod);\n if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }\n return (res[0] % mod + mod) % mod;\n }\n\n private static long[] solveGcdEquation(long a, long b) {\n if (b == 0) {\n return new long[]{1, 0, a};\n }\n long[] res = solveGcdEquation(b, a % b);\n return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};\n }\n\n private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {\n return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;\n }\n }\n\n private static class Graph {\n private static int UNVISITED = 0;\n private static int VISITING = -1;\n private static int VISITED = 1;\n\n private static Stack<Integer> topologicalSort(Set<Integer>[] g) {\n Stack<Integer> stack = new Stack<>();\n int[] state = new int[g.length];\n\n for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }\n return stack;\n }\n\n private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {\n if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }\n state[currNode] = VISITING;\n for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }\n state[currNode] = VISITED;\n stack.push(currNode);\n return true;\n }\n }\n\n private static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n FastScanner(InputStream stream) {\n try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n String next() {\n while (st == null || !st.hasMoreTokens()) {\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 Integer[] nextIntArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n Long[] nextLongArray(int n) {\n Long[] a = new Long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n// try {\n// FastScanner in = new FastScanner(new FileInputStream(\"src/input.in\"));\n// PrintWriter out = new PrintWriter(new FileOutputStream(\"src/output.out\"));\n\n FastScanner in = new FastScanner(System.in);\n PrintWriter out = new PrintWriter(System.out);\n\n solve(1, in, out);\n\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n }\n\n private static void solve(int q, FastScanner in, PrintWriter out) {\n for (int qq = 0; qq < q; qq++) {\n String s = in.next(), t = in.next();\n int best = t.length();\n\n int diff = 0, m = t.length(), n = s.length();\n for(int i = 0; i <= n - m; i++) {\n diff = 0;\n for(int j = 0; j < m; j++) {\n if(t.charAt(j) != s.charAt(j + i)) {\n diff++;\n }\n }\n best = Math.min(best, diff);\n }\n out.println(best);\n }\n out.close();\n }\n\n private static class BinarySearch {\n // return the right most index i such that a[i] <= t\n private static int rightMostUpperBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] <= t) {\n l = mid;\n } else {\n r = mid - 1;\n }\n }\n if (a[r] <= t) {\n return r;\n } else if (a[l] <= t) {\n return l;\n }\n return -1;\n }\n\n // return the left most index i such that a[i] >= t\n private static int leftMostLowerBound(Integer[] a, int t) {\n int l = 0, r = a.length - 1;\n while (l < r - 1) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n r = mid;\n } else {\n l = mid + 1;\n }\n }\n if (a[l] >= t) {\n return l;\n } else if (a[r] >= t) {\n return r;\n }\n return -1;\n }\n\n // Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found\n private static int[] searchRange(Integer[] a, int t) {\n int first = firstPos(a, t);\n int last = firstPos(a, t + 1) - 1;\n if (first <= last) {\n return new int[]{first, last};\n }\n return new int[]{-1, -1};\n }\n\n private static int firstPos(Integer[] a, int t) {\n int first = a.length;\n int l = 0, r = a.length - 1;\n while (l <= r) {\n int mid = l + (r - l) / 2;\n if (a[mid] >= t) {\n first = mid;\n r = mid - 1;\n } else {\n l = mid + 1;\n }\n }\n return first;\n }\n }\n\n private static class NumberTheory {\n private static long modularAdd(long a, long b, int mod) {\n long sum = a + b;\n if (sum >= mod) {\n sum -= mod;\n }\n return sum;\n }\n\n private static long modularSubtract(long a, long b, int mod) {\n long diff = a - b;\n if (diff < 0) {\n diff += mod;\n }\n return diff;\n }\n\n private static long fastModPow(long x, int n, long mod) {\n if (n == 0) {\n return 1;\n }\n long coeff = 1, base = x;\n while (n > 1) {\n if (n % 2 != 0) {\n coeff = (coeff * base % mod);\n }\n base = (base * base % mod);\n n = n / 2;\n }\n long res = coeff * base % mod;\n return res;\n }\n\n private static long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private static long[] factorial(int n, long mod) {\n long[] factor = new long[n + 1];\n factor[0] = 1;\n for (int i = 1; i <= n; i++) {\n factor[i] = factor[i - 1] * i % mod;\n }\n return factor;\n }\n\n private static long modInv_EEA(long a, long mod) {\n long[] res = solveGcdEquation(a, mod);\n if (res[2] != 1) {\n // a and m are not coprime, modular inverse of a by m does not exist.\n return -1;\n }\n return (res[0] % mod + mod) % mod;\n }\n\n private static long[] solveGcdEquation(long a, long b) {\n if (b == 0) {\n return new long[]{1, 0, a};\n }\n long[] res = solveGcdEquation(b, a % b);\n return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};\n }\n\n private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {\n return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod\n * modInv_EEA(factorial[(int) (n - k)], mod) % mod;\n }\n }\n\n private static class Graph {\n private static int UNVISITED = 0;\n private static int VISITING = -1;\n private static int VISITED = 1;\n\n private static Stack<Integer> topologicalSort(Set<Integer>[] g) {\n Stack<Integer> stack = new Stack<>();\n int[] state = new int[g.length];\n\n for (int node = 0; node < g.length; node++) {\n if (!topoSortHelper(g, stack, state, node)) {\n return null;\n }\n }\n return stack;\n }\n\n private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {\n if (state[currNode] == VISITED) {\n return true;\n } else if (state[currNode] == VISITING) {\n return false;\n }\n state[currNode] = VISITING;\n for (int neighbor : g[currNode]) {\n if (!topoSortHelper(g, stack, state, neighbor)) {\n return false;\n }\n }\n state[currNode] = VISITED;\n stack.push(currNode);\n return true;\n }\n }\n\n private static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n FastScanner(InputStream stream) {\n try {\n br = new BufferedReader(new InputStreamReader(stream));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n String next() {\n while (st == null || !st.hasMoreTokens()) {\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 Integer[] nextIntArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n Long[] nextLongArray(int n) {\n Long[] a = new Long[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextLong();\n }\n return a;\n }\n }\n}",
"Main"
]
| //package atcoder.beginner177;
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
// try {
// FastScanner in = new FastScanner(new FileInputStream("src/input.in"));
// PrintWriter out = new PrintWriter(new FileOutputStream("src/output.out"));
FastScanner in = new FastScanner(System.in);
PrintWriter out = new PrintWriter(System.out);
solve(1, in, out);
// } catch (IOException e) {
// e.printStackTrace();
// }
}
private static void solve(int q, FastScanner in, PrintWriter out) {
for (int qq = 0; qq < q; qq++) {
String s = in.next(), t = in.next();
int best = t.length();
int diff = 0, m = t.length(), n = s.length();
for(int i = 0; i <= n - m; i++) {
diff = 0;
for(int j = 0; j < m; j++) {
if(t.charAt(j) != s.charAt(j + i)) {
diff++;
}
}
best = Math.min(best, diff);
}
out.println(best);
}
out.close();
}
private static class BinarySearch {
// return the right most index i such that a[i] <= t
private static int rightMostUpperBound(Integer[] a, int t) {
int l = 0, r = a.length - 1;
while (l < r - 1) {
int mid = l + (r - l) / 2;
if (a[mid] <= t) {
l = mid;
} else {
r = mid - 1;
}
}
if (a[r] <= t) {
return r;
} else if (a[l] <= t) {
return l;
}
return -1;
}
// return the left most index i such that a[i] >= t
private static int leftMostLowerBound(Integer[] a, int t) {
int l = 0, r = a.length - 1;
while (l < r - 1) {
int mid = l + (r - l) / 2;
if (a[mid] >= t) {
r = mid;
} else {
l = mid + 1;
}
}
if (a[l] >= t) {
return l;
} else if (a[r] >= t) {
return r;
}
return -1;
}
// Find the start and end index of a given t in a sorted(ascending) array; return [-1, -1] is t is not found
private static int[] searchRange(Integer[] a, int t) {
int first = firstPos(a, t);
int last = firstPos(a, t + 1) - 1;
if (first <= last) {
return new int[]{first, last};
}
return new int[]{-1, -1};
}
private static int firstPos(Integer[] a, int t) {
int first = a.length;
int l = 0, r = a.length - 1;
while (l <= r) {
int mid = l + (r - l) / 2;
if (a[mid] >= t) {
first = mid;
r = mid - 1;
} else {
l = mid + 1;
}
}
return first;
}
}
private static class NumberTheory {
private static long modularAdd(long a, long b, int mod) {
long sum = a + b;
if (sum >= mod) {
sum -= mod;
}
return sum;
}
private static long modularSubtract(long a, long b, int mod) {
long diff = a - b;
if (diff < 0) {
diff += mod;
}
return diff;
}
private static long fastModPow(long x, int n, long mod) {
if (n == 0) {
return 1;
}
long coeff = 1, base = x;
while (n > 1) {
if (n % 2 != 0) {
coeff = (coeff * base % mod);
}
base = (base * base % mod);
n = n / 2;
}
long res = coeff * base % mod;
return res;
}
private static long gcd(long a, long b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
private static long[] factorial(int n, long mod) {
long[] factor = new long[n + 1];
factor[0] = 1;
for (int i = 1; i <= n; i++) {
factor[i] = factor[i - 1] * i % mod;
}
return factor;
}
private static long modInv_EEA(long a, long mod) {
long[] res = solveGcdEquation(a, mod);
if (res[2] != 1) {
// a and m are not coprime, modular inverse of a by m does not exist.
return -1;
}
return (res[0] % mod + mod) % mod;
}
private static long[] solveGcdEquation(long a, long b) {
if (b == 0) {
return new long[]{1, 0, a};
}
long[] res = solveGcdEquation(b, a % b);
return new long[]{res[1], res[0] - (a / b) * res[1], res[2]};
}
private static long binomialCoefficient(long[] factorial, long n, long k, long mod) {
return factorial[(int) n] * modInv_EEA(factorial[(int) k], mod) % mod
* modInv_EEA(factorial[(int) (n - k)], mod) % mod;
}
}
private static class Graph {
private static int UNVISITED = 0;
private static int VISITING = -1;
private static int VISITED = 1;
private static Stack<Integer> topologicalSort(Set<Integer>[] g) {
Stack<Integer> stack = new Stack<>();
int[] state = new int[g.length];
for (int node = 0; node < g.length; node++) {
if (!topoSortHelper(g, stack, state, node)) {
return null;
}
}
return stack;
}
private static boolean topoSortHelper(Set<Integer>[] g, Stack<Integer> stack, int[] state, int currNode) {
if (state[currNode] == VISITED) {
return true;
} else if (state[currNode] == VISITING) {
return false;
}
state[currNode] = VISITING;
for (int neighbor : g[currNode]) {
if (!topoSortHelper(g, stack, state, neighbor)) {
return false;
}
}
state[currNode] = VISITED;
stack.push(currNode);
return true;
}
}
private static class FastScanner {
BufferedReader br;
StringTokenizer st;
FastScanner(InputStream stream) {
try {
br = new BufferedReader(new InputStreamReader(stream));
} catch (Exception e) {
e.printStackTrace();
}
}
String next() {
while (st == null || !st.hasMoreTokens()) {
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;
}
Integer[] nextIntArray(int n) {
Integer[] a = new Integer[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
Long[] nextLongArray(int n) {
Long[] a = new Long[n];
for (int i = 0; i < n; i++) {
a[i] = nextLong();
}
return a;
}
}
}
|
[
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,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
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,
4,
18,
13,
13,
4,
18,
13,
2,
13,
13,
30,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
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
],
[
27,
28
],
[
28,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
37,
45
],
[
30,
46
],
[
46,
47
],
[
47,
48
],
[
30,
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
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
66,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
50,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
50,
90
],
[
90,
91
],
[
90,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n\n String s = stdIn.nextLine();\n String t = stdIn.nextLine();\n int c = 0;\n int x = t.length();\n for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }\n System.out.println(x);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n\n String s = stdIn.nextLine();\n String t = stdIn.nextLine();\n int c = 0;\n int x = t.length();\n for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }\n System.out.println(x);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n\n String s = stdIn.nextLine();\n String t = stdIn.nextLine();\n int c = 0;\n int x = t.length();\n for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }\n System.out.println(x);\n }",
"main",
"{\n Scanner stdIn = new Scanner(System.in);\n\n String s = stdIn.nextLine();\n String t = stdIn.nextLine();\n int c = 0;\n int x = t.length();\n for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }\n System.out.println(x);\n }",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"String s = stdIn.nextLine();",
"s",
"stdIn.nextLine()",
"stdIn.nextLine",
"stdIn",
"String t = stdIn.nextLine();",
"t",
"stdIn.nextLine()",
"stdIn.nextLine",
"stdIn",
"int c = 0;",
"c",
"0",
"int x = t.length();",
"x",
"t.length()",
"t.length",
"t",
"for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < (s.length() - t.length()) + 1",
"i",
"(s.length() - t.length()) + 1",
"(s.length() - t.length())",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }",
"{\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }",
"for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }",
"{\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }",
"if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }",
"t.charAt(j) != s.charAt(i + j)",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"s.charAt(i + j)",
"s.charAt",
"s",
"i + j",
"i",
"j",
"{\n c += 1;\n }",
"c += 1",
"c",
"1",
"if(x > c){\n x = c;\n }",
"x > c",
"x",
"c",
"{\n x = c;\n }",
"x = c",
"x",
"c",
"c = 0",
"c",
"0",
"System.out.println(x)",
"System.out.println",
"System.out",
"System",
"System.out",
"x",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n\n String s = stdIn.nextLine();\n String t = stdIn.nextLine();\n int c = 0;\n int x = t.length();\n for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }\n System.out.println(x);\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner stdIn = new Scanner(System.in);\n\n String s = stdIn.nextLine();\n String t = stdIn.nextLine();\n int c = 0;\n int x = t.length();\n for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){\n for(int j = 0 ; j < t.length() ; j++){\n if(t.charAt(j) != s.charAt(i + j)){\n c += 1;\n }\n }\n if(x > c){\n x = c;\n }\n c = 0;\n }\n System.out.println(x);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
String s = stdIn.nextLine();
String t = stdIn.nextLine();
int c = 0;
int x = t.length();
for(int i = 0 ; i < (s.length() - t.length()) + 1 ; i++){
for(int j = 0 ; j < t.length() ; j++){
if(t.charAt(j) != s.charAt(i + j)){
c += 1;
}
}
if(x > c){
x = c;
}
c = 0;
}
System.out.println(x);
}
}
|
[
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,
6,
13,
41,
13,
17,
12,
13,
30,
14,
2,
4,
18,
13,
4,
18,
13,
29,
18,
13,
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,
13,
40,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
2,
13,
4,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
8,
4,
18,
13,
18,
13,
13,
20,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
4,
13,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
20,
0,
18,
36,
13,
17,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
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
],
[
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
],
[
258,
29
],
[
258,
30
],
[
30,
31
],
[
30,
32
],
[
258,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
35,
48
],
[
48,
49
],
[
48,
50
],
[
35,
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
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
66,
76
],
[
76,
77
],
[
35,
78
],
[
78,
79
],
[
33,
80
],
[
80,
81
],
[
33,
82
],
[
82,
83
],
[
258,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
86,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
86,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
102,
112
],
[
112,
113
],
[
113,
114
],
[
102,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
119,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
125,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
132,
133
],
[
133,
134
],
[
129,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
123,
140
],
[
86,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
84,
145
],
[
145,
146
],
[
84,
147
],
[
147,
148
],
[
258,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
154,
158
],
[
158,
159
],
[
158,
160
],
[
154,
161
],
[
151,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
164,
166
],
[
151,
167
],
[
167,
168
],
[
167,
169
],
[
151,
170
],
[
170,
171
],
[
170,
172
],
[
151,
173
],
[
173,
174
],
[
173,
175
],
[
173,
176
],
[
151,
177
],
[
177,
178
],
[
178,
179
],
[
149,
180
],
[
180,
181
],
[
258,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
182,
186
],
[
186,
187
],
[
182,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
195
],
[
190,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
200
],
[
188,
201
],
[
201,
202
],
[
182,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
206,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
216,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
205,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
182,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
234,
237
],
[
237,
238
],
[
182,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
243,
246
],
[
246,
247
],
[
182,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
252,
255
],
[
255,
256
],
[
0,
257
],
[
257,
258
],
[
257,
259
]
]
| [
"\nimport java.io.BufferedReader;\nimport java.io.File;\nimport java.io.FileInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n private static final String INPUT_FILE_PATH = \"\";\n\n static int count(String s, String t) {\n if (t.length() > s.length()) return Integer.MAX_VALUE;\n int res = 0;\n for (int i = 0; i < t.length(); i++) {\n if (s.charAt(i) != t.charAt(i)) res++;\n }\n return res;\n }\n\n static void solve(InputReader in, PrintWriter out) {\n String s = in.nextToken(), t = in.nextToken();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < s.length(); i++) {\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }\n out.println(ans);\n }\n\n public static void main(String[] args) throws Exception {\n InputStream inputStream = INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH));\n OutputStream outputStream = System.out;\n\n InputReader inputReader = new InputReader(inputStream);\n PrintWriter printWriter = new PrintWriter(outputStream);\n\n solve(inputReader, printWriter);\n\n printWriter.close();\n }\n\n private static class InputReader {\n private BufferedReader br;\n private StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);\n this.st = null;\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n\n public long nextLong() {\n return Long.parseLong(nextToken());\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextToken());\n }\n }\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.File;",
"File",
"java.io",
"import java.io.FileInputStream;",
"FileInputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\n private static final String INPUT_FILE_PATH = \"\";\n\n static int count(String s, String t) {\n if (t.length() > s.length()) return Integer.MAX_VALUE;\n int res = 0;\n for (int i = 0; i < t.length(); i++) {\n if (s.charAt(i) != t.charAt(i)) res++;\n }\n return res;\n }\n\n static void solve(InputReader in, PrintWriter out) {\n String s = in.nextToken(), t = in.nextToken();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < s.length(); i++) {\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }\n out.println(ans);\n }\n\n public static void main(String[] args) throws Exception {\n InputStream inputStream = INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH));\n OutputStream outputStream = System.out;\n\n InputReader inputReader = new InputReader(inputStream);\n PrintWriter printWriter = new PrintWriter(outputStream);\n\n solve(inputReader, printWriter);\n\n printWriter.close();\n }\n\n private static class InputReader {\n private BufferedReader br;\n private StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);\n this.st = null;\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n\n public long nextLong() {\n return Long.parseLong(nextToken());\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextToken());\n }\n }\n\n}",
"Main",
"private static final String INPUT_FILE_PATH = \"\";",
"INPUT_FILE_PATH",
"\"\"",
"static int count(String s, String t) {\n if (t.length() > s.length()) return Integer.MAX_VALUE;\n int res = 0;\n for (int i = 0; i < t.length(); i++) {\n if (s.charAt(i) != t.charAt(i)) res++;\n }\n return res;\n }",
"count",
"{\n if (t.length() > s.length()) return Integer.MAX_VALUE;\n int res = 0;\n for (int i = 0; i < t.length(); i++) {\n if (s.charAt(i) != t.charAt(i)) res++;\n }\n return res;\n }",
"if (t.length() > s.length()) return Integer.MAX_VALUE;",
"t.length() > s.length()",
"t.length()",
"t.length",
"t",
"s.length()",
"s.length",
"s",
"return Integer.MAX_VALUE;",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"int res = 0;",
"res",
"0",
"for (int i = 0; i < t.length(); i++) {\n if (s.charAt(i) != t.charAt(i)) res++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < t.length()",
"i",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n if (s.charAt(i) != t.charAt(i)) res++;\n }",
"{\n if (s.charAt(i) != t.charAt(i)) res++;\n }",
"if (s.charAt(i) != t.charAt(i)) res++;",
"s.charAt(i) != t.charAt(i)",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"res++",
"res",
"return res;",
"res",
"String s",
"s",
"String t",
"t",
"static void solve(InputReader in, PrintWriter out) {\n String s = in.nextToken(), t = in.nextToken();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < s.length(); i++) {\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }\n out.println(ans);\n }",
"solve",
"{\n String s = in.nextToken(), t = in.nextToken();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < s.length(); i++) {\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }\n out.println(ans);\n }",
"String s = in.nextToken()",
"s",
"in.nextToken()",
"in.nextToken",
"in",
"t = in.nextToken();",
"t",
"in.nextToken()",
"in.nextToken",
"in",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for (int i = 0; i < s.length(); i++) {\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }",
"{\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }",
"ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t))",
"ans",
"Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t))",
"Math.min",
"Math",
"ans",
"count(s.substring(i, Math.min(s.length(), i + t.length())), t)",
"count",
"s.substring(i, Math.min(s.length(), i + t.length()))",
"s.substring",
"s",
"i",
"Math.min(s.length(), i + t.length())",
"Math.min",
"Math",
"s.length()",
"s.length",
"s",
"i + t.length()",
"i",
"t.length()",
"t.length",
"t",
"t",
"out.println(ans)",
"out.println",
"out",
"ans",
"InputReader in",
"in",
"PrintWriter out",
"out",
"public static void main(String[] args) throws Exception {\n InputStream inputStream = INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH));\n OutputStream outputStream = System.out;\n\n InputReader inputReader = new InputReader(inputStream);\n PrintWriter printWriter = new PrintWriter(outputStream);\n\n solve(inputReader, printWriter);\n\n printWriter.close();\n }",
"main",
"{\n InputStream inputStream = INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH));\n OutputStream outputStream = System.out;\n\n InputReader inputReader = new InputReader(inputStream);\n PrintWriter printWriter = new PrintWriter(outputStream);\n\n solve(inputReader, printWriter);\n\n printWriter.close();\n }",
"InputStream inputStream = INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH));",
"inputStream",
"INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH))",
"INPUT_FILE_PATH.isEmpty()",
"INPUT_FILE_PATH.isEmpty",
"INPUT_FILE_PATH",
"System.in",
"System",
"System.in",
"new FileInputStream(new File(INPUT_FILE_PATH))",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader inputReader = new InputReader(inputStream);",
"inputReader",
"new InputReader(inputStream)",
"PrintWriter printWriter = new PrintWriter(outputStream);",
"printWriter",
"new PrintWriter(outputStream)",
"solve(inputReader, printWriter)",
"solve",
"inputReader",
"printWriter",
"printWriter.close()",
"printWriter.close",
"printWriter",
"String[] args",
"args",
"private static class InputReader {\n private BufferedReader br;\n private StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);\n this.st = null;\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n\n public long nextLong() {\n return Long.parseLong(nextToken());\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextToken());\n }\n }",
"InputReader",
"private BufferedReader br;",
"br",
"private StringTokenizer st;",
"st",
"public InputReader(InputStream inputStream) {\n this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);\n this.st = null;\n }",
"InputReader",
"{\n this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);\n this.st = null;\n }",
"this.br = new BufferedReader(new InputStreamReader(inputStream), 32768)",
"this.br",
"this",
"this.br",
"new BufferedReader(new InputStreamReader(inputStream), 32768)",
"this.st = null",
"this.st",
"this",
"this.st",
"null",
"InputStream inputStream",
"inputStream",
"public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }",
"nextToken",
"{\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n st = new StringTokenizer(br.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 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 int nextInt() {\n return Integer.parseInt(nextToken());\n }",
"nextInt",
"{\n return Integer.parseInt(nextToken());\n }",
"return Integer.parseInt(nextToken());",
"Integer.parseInt(nextToken())",
"Integer.parseInt",
"Integer",
"nextToken()",
"nextToken",
"public long nextLong() {\n return Long.parseLong(nextToken());\n }",
"nextLong",
"{\n return Long.parseLong(nextToken());\n }",
"return Long.parseLong(nextToken());",
"Long.parseLong(nextToken())",
"Long.parseLong",
"Long",
"nextToken()",
"nextToken",
"public double nextDouble() {\n return Double.parseDouble(nextToken());\n }",
"nextDouble",
"{\n return Double.parseDouble(nextToken());\n }",
"return Double.parseDouble(nextToken());",
"Double.parseDouble(nextToken())",
"Double.parseDouble",
"Double",
"nextToken()",
"nextToken",
"public class Main {\n\n private static final String INPUT_FILE_PATH = \"\";\n\n static int count(String s, String t) {\n if (t.length() > s.length()) return Integer.MAX_VALUE;\n int res = 0;\n for (int i = 0; i < t.length(); i++) {\n if (s.charAt(i) != t.charAt(i)) res++;\n }\n return res;\n }\n\n static void solve(InputReader in, PrintWriter out) {\n String s = in.nextToken(), t = in.nextToken();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < s.length(); i++) {\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }\n out.println(ans);\n }\n\n public static void main(String[] args) throws Exception {\n InputStream inputStream = INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH));\n OutputStream outputStream = System.out;\n\n InputReader inputReader = new InputReader(inputStream);\n PrintWriter printWriter = new PrintWriter(outputStream);\n\n solve(inputReader, printWriter);\n\n printWriter.close();\n }\n\n private static class InputReader {\n private BufferedReader br;\n private StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);\n this.st = null;\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n\n public long nextLong() {\n return Long.parseLong(nextToken());\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextToken());\n }\n }\n\n}",
"public class Main {\n\n private static final String INPUT_FILE_PATH = \"\";\n\n static int count(String s, String t) {\n if (t.length() > s.length()) return Integer.MAX_VALUE;\n int res = 0;\n for (int i = 0; i < t.length(); i++) {\n if (s.charAt(i) != t.charAt(i)) res++;\n }\n return res;\n }\n\n static void solve(InputReader in, PrintWriter out) {\n String s = in.nextToken(), t = in.nextToken();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < s.length(); i++) {\n ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));\n }\n out.println(ans);\n }\n\n public static void main(String[] args) throws Exception {\n InputStream inputStream = INPUT_FILE_PATH.isEmpty()\n ? System.in\n : new FileInputStream(new File(INPUT_FILE_PATH));\n OutputStream outputStream = System.out;\n\n InputReader inputReader = new InputReader(inputStream);\n PrintWriter printWriter = new PrintWriter(outputStream);\n\n solve(inputReader, printWriter);\n\n printWriter.close();\n }\n\n private static class InputReader {\n private BufferedReader br;\n private StringTokenizer st;\n\n public InputReader(InputStream inputStream) {\n this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);\n this.st = null;\n }\n\n public String nextToken() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(nextToken());\n }\n\n public long nextLong() {\n return Long.parseLong(nextToken());\n }\n\n public double nextDouble() {\n return Double.parseDouble(nextToken());\n }\n }\n\n}",
"Main"
]
|
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
private static final String INPUT_FILE_PATH = "";
static int count(String s, String t) {
if (t.length() > s.length()) return Integer.MAX_VALUE;
int res = 0;
for (int i = 0; i < t.length(); i++) {
if (s.charAt(i) != t.charAt(i)) res++;
}
return res;
}
static void solve(InputReader in, PrintWriter out) {
String s = in.nextToken(), t = in.nextToken();
int ans = Integer.MAX_VALUE;
for (int i = 0; i < s.length(); i++) {
ans = Math.min(ans, count(s.substring(i, Math.min(s.length(), i + t.length())), t));
}
out.println(ans);
}
public static void main(String[] args) throws Exception {
InputStream inputStream = INPUT_FILE_PATH.isEmpty()
? System.in
: new FileInputStream(new File(INPUT_FILE_PATH));
OutputStream outputStream = System.out;
InputReader inputReader = new InputReader(inputStream);
PrintWriter printWriter = new PrintWriter(outputStream);
solve(inputReader, printWriter);
printWriter.close();
}
private static class InputReader {
private BufferedReader br;
private StringTokenizer st;
public InputReader(InputStream inputStream) {
this.br = new BufferedReader(new InputStreamReader(inputStream), 32768);
this.st = null;
}
public String nextToken() {
while (st == null || !st.hasMoreTokens()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return st.nextToken();
}
public int nextInt() {
return Integer.parseInt(nextToken());
}
public long nextLong() {
return Long.parseLong(nextToken());
}
public double nextDouble() {
return Double.parseDouble(nextToken());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
40,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
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,
2,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
4,
18,
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
],
[
199,
8
],
[
199,
9
],
[
9,
10
],
[
9,
11
],
[
199,
12
],
[
12,
13
],
[
12,
14
],
[
199,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
199,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
25,
27
],
[
21,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
21,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
21,
38
],
[
38,
39
],
[
38,
40
],
[
21,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
41,
55
],
[
55,
56
],
[
56,
57
],
[
41,
58
],
[
59,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
63,
75
],
[
75,
76
],
[
76,
77
],
[
63,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
81,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
80,
92
],
[
92,
93
],
[
59,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
96,
100
],
[
21,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
21,
105
],
[
105,
106
],
[
106,
107
],
[
19,
108
],
[
108,
109
],
[
199,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
110,
114
],
[
114,
115
],
[
110,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
110,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
125,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
135,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
124,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
110,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
157,
158
],
[
110,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
166,
167
],
[
110,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
175,
176
],
[
110,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
179,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
183,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
179,
196
],
[
196,
197
],
[
0,
198
],
[
198,
199
],
[
198,
200
]
]
| [
"import java.io.*;\nimport java.util.*;\n \npublic class Main {\n static final long MOD = 1000000007L;\n static final int INF = 50000000;\n static final int NINF = -50000000;\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter pw = new PrintWriter(System.out);\n \n String s = sc.next();\n String t = sc.next();\n int ans = INF;\n for (int i = 0; i <= s.length()-t.length(); i++) {\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }\n pw.println(ans);\n pw.close();\n }\n \n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new 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 ni() {\n return Integer.parseInt(next());\n }\n \n long nl() {\n return Long.parseLong(next());\n }\n \n double nd() {\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}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n static final long MOD = 1000000007L;\n static final int INF = 50000000;\n static final int NINF = -50000000;\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter pw = new PrintWriter(System.out);\n \n String s = sc.next();\n String t = sc.next();\n int ans = INF;\n for (int i = 0; i <= s.length()-t.length(); i++) {\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }\n pw.println(ans);\n pw.close();\n }\n \n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new 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 ni() {\n return Integer.parseInt(next());\n }\n \n long nl() {\n return Long.parseLong(next());\n }\n \n double nd() {\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",
"static final long MOD = 1000000007L;",
"MOD",
"1000000007L",
"static final int INF = 50000000;",
"INF",
"50000000",
"static final int NINF = -50000000;",
"NINF",
"-50000000",
"50000000",
"public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter pw = new PrintWriter(System.out);\n \n String s = sc.next();\n String t = sc.next();\n int ans = INF;\n for (int i = 0; i <= s.length()-t.length(); i++) {\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }\n pw.println(ans);\n pw.close();\n }",
"main",
"{\n FastScanner sc = new FastScanner();\n PrintWriter pw = new PrintWriter(System.out);\n \n String s = sc.next();\n String t = sc.next();\n int ans = INF;\n for (int i = 0; i <= s.length()-t.length(); i++) {\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }\n pw.println(ans);\n pw.close();\n }",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int ans = INF;",
"ans",
"INF",
"for (int i = 0; i <= s.length()-t.length(); i++) {\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length()-t.length()",
"i",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }",
"{\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }",
"int v = 0;",
"v",
"0",
"for (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}",
"int j = i;",
"int j = i;",
"j",
"i",
"j < i+t.length()",
"j",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}",
"{\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}",
"if (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;",
"s.charAt(j)!=t.charAt(j-i)",
"s.charAt(j)",
"s.charAt",
"s",
"j",
"t.charAt(j-i)",
"t.charAt",
"t",
"j-i",
"j",
"i",
"v++",
"v",
"ans = Math.min(ans,v)",
"ans",
"Math.min(ans,v)",
"Math.min",
"Math",
"ans",
"v",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new 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 ni() {\n return Integer.parseInt(next());\n }\n \n long nl() {\n return Long.parseLong(next());\n }\n \n double nd() {\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 }",
"FastScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastScanner",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new 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 ni() {\n return Integer.parseInt(next());\n }",
"ni",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nl() {\n return Long.parseLong(next());\n }",
"nl",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nd() {\n return Double.parseDouble(next());\n }",
"nd",
"{\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 static final long MOD = 1000000007L;\n static final int INF = 50000000;\n static final int NINF = -50000000;\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter pw = new PrintWriter(System.out);\n \n String s = sc.next();\n String t = sc.next();\n int ans = INF;\n for (int i = 0; i <= s.length()-t.length(); i++) {\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }\n pw.println(ans);\n pw.close();\n }\n \n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new 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 ni() {\n return Integer.parseInt(next());\n }\n \n long nl() {\n return Long.parseLong(next());\n }\n \n double nd() {\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 static final long MOD = 1000000007L;\n static final int INF = 50000000;\n static final int NINF = -50000000;\n public static void main(String[] args) {\n FastScanner sc = new FastScanner();\n PrintWriter pw = new PrintWriter(System.out);\n \n String s = sc.next();\n String t = sc.next();\n int ans = INF;\n for (int i = 0; i <= s.length()-t.length(); i++) {\n \tint v = 0;\n \tfor (int j = i; j < i+t.length(); j++) {\n \t\tif (s.charAt(j)!=t.charAt(j-i))\n \t\t\tv++;\n \t}\n \tans = Math.min(ans,v);\n }\n pw.println(ans);\n pw.close();\n }\n \n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n \n public FastScanner() {\n br = new BufferedReader(new 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 ni() {\n return Integer.parseInt(next());\n }\n \n long nl() {\n return Long.parseLong(next());\n }\n \n double nd() {\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.*;
import java.util.*;
public class Main {
static final long MOD = 1000000007L;
static final int INF = 50000000;
static final int NINF = -50000000;
public static void main(String[] args) {
FastScanner sc = new FastScanner();
PrintWriter pw = new PrintWriter(System.out);
String s = sc.next();
String t = sc.next();
int ans = INF;
for (int i = 0; i <= s.length()-t.length(); i++) {
int v = 0;
for (int j = i; j < i+t.length(); j++) {
if (s.charAt(j)!=t.charAt(j-i))
v++;
}
ans = Math.min(ans,v);
}
pw.println(ans);
pw.close();
}
static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() {
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 ni() {
return Integer.parseInt(next());
}
long nl() {
return Long.parseLong(next());
}
double nd() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
} |
[
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,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
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,
4,
18,
13,
2,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
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
],
[
102,
11
],
[
102,
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
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
33,
47
],
[
47,
48
],
[
48,
49
],
[
33,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
57,
67
],
[
67,
68
],
[
68,
69
],
[
57,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
73,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
72,
84
],
[
84,
85
],
[
51,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
88,
92
],
[
14,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
12,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = in.readLine();\n\t\tString t = in.readLine();\n\t\tint min = t.length();\n\t\tfor (int i = 0; i <= s.length()-t.length(); i++) {\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}\n\t\tSystem.out.println(min);\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) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = in.readLine();\n\t\tString t = in.readLine();\n\t\tint min = t.length();\n\t\tfor (int i = 0; i <= s.length()-t.length(); i++) {\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = in.readLine();\n\t\tString t = in.readLine();\n\t\tint min = t.length();\n\t\tfor (int i = 0; i <= s.length()-t.length(); i++) {\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"main",
"{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = in.readLine();\n\t\tString t = in.readLine();\n\t\tint min = t.length();\n\t\tfor (int i = 0; i <= s.length()-t.length(); i++) {\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String s = in.readLine();",
"s",
"in.readLine()",
"in.readLine",
"in",
"String t = in.readLine();",
"t",
"in.readLine()",
"in.readLine",
"in",
"int min = t.length();",
"min",
"t.length()",
"t.length",
"t",
"for (int i = 0; i <= s.length()-t.length(); i++) {\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length()-t.length()",
"i",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}",
"{\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}",
"int change = t.length();",
"change",
"t.length()",
"t.length",
"t",
"for (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}",
"{\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}",
"if (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;",
"t.charAt(j) == s.charAt(i+j)",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"s.charAt(i+j)",
"s.charAt",
"s",
"i+j",
"i",
"j",
"change--",
"change",
"min = Math.min(change, min)",
"min",
"Math.min(change, min)",
"Math.min",
"Math",
"change",
"min",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = in.readLine();\n\t\tString t = in.readLine();\n\t\tint min = t.length();\n\t\tfor (int i = 0; i <= s.length()-t.length(); i++) {\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString s = in.readLine();\n\t\tString t = in.readLine();\n\t\tint min = t.length();\n\t\tfor (int i = 0; i <= s.length()-t.length(); i++) {\n\t\t\tint change = t.length();\n\t\t\tfor (int j = 0; j < t.length(); j++) {\n\t\t\t\tif (t.charAt(j) == s.charAt(i+j))\n\t\t\t\t\tchange--;\n\t\t\t}\n\t\t\tmin = Math.min(change, min);\n\t\t}\n\t\tSystem.out.println(min);\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) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String s = in.readLine();
String t = in.readLine();
int min = t.length();
for (int i = 0; i <= s.length()-t.length(); i++) {
int change = t.length();
for (int j = 0; j < t.length(); j++) {
if (t.charAt(j) == s.charAt(i+j))
change--;
}
min = Math.min(change, min);
}
System.out.println(min);
}
}
|
[
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,
17,
41,
13,
2,
18,
13,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
2,
18,
13,
2,
13,
13,
18,
13,
13,
40,
13,
14,
2,
13,
13,
3,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
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
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
57,
67
],
[
67,
68
],
[
68,
69
],
[
57,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
80,
81
],
[
80,
82
],
[
72,
83
],
[
83,
84
],
[
71,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
53,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
]
| [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n char[] t = sc.next().toCharArray();\n int unmatch = 0;\n int unmatch_min = 1000;\n int cyc_max=s.length-t.length;\n for (int i=0; i<=cyc_max; i++){\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }\n\n System.out.println(unmatch_min);\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 char[] s = sc.next().toCharArray();\n char[] t = sc.next().toCharArray();\n int unmatch = 0;\n int unmatch_min = 1000;\n int cyc_max=s.length-t.length;\n for (int i=0; i<=cyc_max; i++){\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }\n\n System.out.println(unmatch_min);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n char[] t = sc.next().toCharArray();\n int unmatch = 0;\n int unmatch_min = 1000;\n int cyc_max=s.length-t.length;\n for (int i=0; i<=cyc_max; i++){\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }\n\n System.out.println(unmatch_min);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n char[] t = sc.next().toCharArray();\n int unmatch = 0;\n int unmatch_min = 1000;\n int cyc_max=s.length-t.length;\n for (int i=0; i<=cyc_max; i++){\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }\n\n System.out.println(unmatch_min);\n }",
"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[] t = sc.next().toCharArray();",
"t",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"int unmatch = 0;",
"unmatch",
"0",
"int unmatch_min = 1000;",
"unmatch_min",
"1000",
"int cyc_max=s.length-t.length;",
"cyc_max",
"s.length-t.length",
"s.length",
"s",
"s.length",
"t.length",
"t",
"t.length",
"for (int i=0; i<=cyc_max; i++){\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=cyc_max",
"i",
"cyc_max",
"i++",
"i++",
"i",
"{\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }",
"{\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }",
"unmatch=0",
"unmatch",
"0",
"for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<t.length",
"j",
"t.length",
"t",
"t.length",
"j++",
"j++",
"j",
"{\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }",
"{\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }",
"if (!(s[i+j]==t[j])) unmatch++;",
"!(s[i+j]==t[j])",
"(s[i+j]==t[j])",
"s[i+j]",
"s",
"i+j",
"i",
"j",
"t[j]",
"t",
"j",
"unmatch++",
"unmatch",
"if (unmatch>=unmatch_min) break;",
"unmatch>=unmatch_min",
"unmatch",
"unmatch_min",
"break;",
"if (unmatch<unmatch_min) unmatch_min=unmatch;",
"unmatch<unmatch_min",
"unmatch",
"unmatch_min",
"unmatch_min=unmatch",
"unmatch_min",
"unmatch",
"System.out.println(unmatch_min)",
"System.out.println",
"System.out",
"System",
"System.out",
"unmatch_min",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n char[] t = sc.next().toCharArray();\n int unmatch = 0;\n int unmatch_min = 1000;\n int cyc_max=s.length-t.length;\n for (int i=0; i<=cyc_max; i++){\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }\n\n System.out.println(unmatch_min);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n char[] t = sc.next().toCharArray();\n int unmatch = 0;\n int unmatch_min = 1000;\n int cyc_max=s.length-t.length;\n for (int i=0; i<=cyc_max; i++){\n unmatch=0;\n for (int j=0; j<t.length; j++){\n if (!(s[i+j]==t[j])) unmatch++;\n \tif (unmatch>=unmatch_min) break;\n }\n if (unmatch<unmatch_min) unmatch_min=unmatch;\n }\n\n System.out.println(unmatch_min);\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
char[] s = sc.next().toCharArray();
char[] t = sc.next().toCharArray();
int unmatch = 0;
int unmatch_min = 1000;
int cyc_max=s.length-t.length;
for (int i=0; i<=cyc_max; i++){
unmatch=0;
for (int j=0; j<t.length; j++){
if (!(s[i+j]==t[j])) unmatch++;
if (unmatch>=unmatch_min) break;
}
if (unmatch<unmatch_min) unmatch_min=unmatch;
}
System.out.println(unmatch_min);
}
} |
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
17,
41,
13,
17,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
18,
13,
13,
18,
13,
13,
30,
0,
13,
2,
13,
17,
0,
18,
13,
13,
13,
0,
13,
17,
41,
13,
18,
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,
18,
13,
13,
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
],
[
188,
8
],
[
188,
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
],
[
26,
27
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
11,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
11,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
41,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
11,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
11,
75
],
[
75,
76
],
[
75,
77
],
[
11,
78
],
[
78,
79
],
[
78,
80
],
[
81,
82
],
[
82,
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
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
101,
107
],
[
98,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
108,
118
],
[
118,
119
],
[
119,
120
],
[
108,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
130,
131
],
[
130,
132
],
[
123,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
98,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
98,
144
],
[
144,
145
],
[
144,
146
],
[
11,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
11,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
159,
161
],
[
152,
162
],
[
162,
163
],
[
163,
164
],
[
152,
165
],
[
166,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
170,
172
],
[
167,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
176,
178
],
[
11,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
179,
184
],
[
9,
185
],
[
185,
186
],
[
0,
187
],
[
187,
188
],
[
187,
189
]
]
| [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tString S = scan.next();\n\t\tString T = scan.next();\n\t\tscan.close();\n\n\t\tint Slength = S.length();\n\t\tint Tlength = T.length();\n\n\t\tArrayList<String> SstrArray = new ArrayList<String>();\n\n\t\tfor (int i = 0; i <= (Slength - Tlength); i++) {\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}\n\n\n\t\tString[] Tarray = T.split(\"\");\n\t\tint count = 0;\n\t\tint[] countArray = new int[SstrArray.size()];\n\n\n\t\tfor (int j = 0; j < SstrArray.size(); j++) {\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}\n\n\t\tint countMin = countArray[0];\n\t\tfor(int m = 0; m < countArray.length; m++) {\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(countMin);\n\n\t}\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tString S = scan.next();\n\t\tString T = scan.next();\n\t\tscan.close();\n\n\t\tint Slength = S.length();\n\t\tint Tlength = T.length();\n\n\t\tArrayList<String> SstrArray = new ArrayList<String>();\n\n\t\tfor (int i = 0; i <= (Slength - Tlength); i++) {\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}\n\n\n\t\tString[] Tarray = T.split(\"\");\n\t\tint count = 0;\n\t\tint[] countArray = new int[SstrArray.size()];\n\n\n\t\tfor (int j = 0; j < SstrArray.size(); j++) {\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}\n\n\t\tint countMin = countArray[0];\n\t\tfor(int m = 0; m < countArray.length; m++) {\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(countMin);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tString S = scan.next();\n\t\tString T = scan.next();\n\t\tscan.close();\n\n\t\tint Slength = S.length();\n\t\tint Tlength = T.length();\n\n\t\tArrayList<String> SstrArray = new ArrayList<String>();\n\n\t\tfor (int i = 0; i <= (Slength - Tlength); i++) {\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}\n\n\n\t\tString[] Tarray = T.split(\"\");\n\t\tint count = 0;\n\t\tint[] countArray = new int[SstrArray.size()];\n\n\n\t\tfor (int j = 0; j < SstrArray.size(); j++) {\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}\n\n\t\tint countMin = countArray[0];\n\t\tfor(int m = 0; m < countArray.length; m++) {\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(countMin);\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tString S = scan.next();\n\t\tString T = scan.next();\n\t\tscan.close();\n\n\t\tint Slength = S.length();\n\t\tint Tlength = T.length();\n\n\t\tArrayList<String> SstrArray = new ArrayList<String>();\n\n\t\tfor (int i = 0; i <= (Slength - Tlength); i++) {\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}\n\n\n\t\tString[] Tarray = T.split(\"\");\n\t\tint count = 0;\n\t\tint[] countArray = new int[SstrArray.size()];\n\n\n\t\tfor (int j = 0; j < SstrArray.size(); j++) {\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}\n\n\t\tint countMin = countArray[0];\n\t\tfor(int m = 0; m < countArray.length; m++) {\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(countMin);\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String S = scan.next();",
"S",
"scan.next()",
"scan.next",
"scan",
"String T = scan.next();",
"T",
"scan.next()",
"scan.next",
"scan",
"scan.close()",
"scan.close",
"scan",
"int Slength = S.length();",
"Slength",
"S.length()",
"S.length",
"S",
"int Tlength = T.length();",
"Tlength",
"T.length()",
"T.length",
"T",
"ArrayList<String> SstrArray = new ArrayList<String>();",
"SstrArray",
"new ArrayList<String>()",
"for (int i = 0; i <= (Slength - Tlength); i++) {\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= (Slength - Tlength)",
"i",
"(Slength - Tlength)",
"Slength",
"Tlength",
"i++",
"i++",
"i",
"{\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}",
"{\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}",
"String Sstr = S.substring(i, Tlength + i);",
"Sstr",
"S.substring(i, Tlength + i)",
"S.substring",
"S",
"i",
"Tlength + i",
"Tlength",
"i",
"SstrArray.add(Sstr)",
"SstrArray.add",
"SstrArray",
"Sstr",
"String[] Tarray = T.split(\"\");",
"Tarray",
"T.split(\"\")",
"T.split",
"T",
"\"\"",
"int count = 0;",
"count",
"0",
"int[] countArray = new int[SstrArray.size()];",
"countArray",
"new int[SstrArray.size()]",
"SstrArray.size()",
"SstrArray.size",
"SstrArray",
"for (int j = 0; j < SstrArray.size(); j++) {\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < SstrArray.size()",
"j",
"SstrArray.size()",
"SstrArray.size",
"SstrArray",
"j++",
"j++",
"j",
"{\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}",
"{\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}",
"String[] SstrArray2 = SstrArray.get(j).split(\"\");",
"SstrArray2",
"SstrArray.get(j).split(\"\")",
"SstrArray.get(j).split",
"SstrArray.get(j)",
"SstrArray.get",
"SstrArray",
"j",
"\"\"",
"for (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}",
"int k = 0;",
"int k = 0;",
"k",
"0",
"k < Tarray.length",
"k",
"Tarray.length",
"Tarray",
"Tarray.length",
"k++",
"k++",
"k",
"{\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}",
"if (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}",
"!(Tarray[k].equals(SstrArray2[k]))",
"(Tarray[k].equals(SstrArray2[k]))",
"Tarray[k].equals",
"Tarray[k]",
"Tarray",
"k",
"SstrArray2[k]",
"SstrArray2",
"k",
"{\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}",
"count = count + 1",
"count",
"count + 1",
"count",
"1",
"countArray[j] = count",
"countArray[j]",
"countArray",
"j",
"count",
"count = 0",
"count",
"0",
"int countMin = countArray[0];",
"countMin",
"countArray[0]",
"countArray",
"0",
"for(int m = 0; m < countArray.length; m++) {\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}",
"int m = 0;",
"int m = 0;",
"m",
"0",
"m < countArray.length",
"m",
"countArray.length",
"countArray",
"countArray.length",
"m++",
"m++",
"m",
"{\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}",
"if(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}",
"countMin > countArray[m]",
"countMin",
"countArray[m]",
"countArray",
"m",
"{\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}",
"countMin = countArray[m]",
"countMin",
"countArray[m]",
"countArray",
"m",
"System.out.println(countMin)",
"System.out.println",
"System.out",
"System",
"System.out",
"countMin",
"String[] args",
"args",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tString S = scan.next();\n\t\tString T = scan.next();\n\t\tscan.close();\n\n\t\tint Slength = S.length();\n\t\tint Tlength = T.length();\n\n\t\tArrayList<String> SstrArray = new ArrayList<String>();\n\n\t\tfor (int i = 0; i <= (Slength - Tlength); i++) {\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}\n\n\n\t\tString[] Tarray = T.split(\"\");\n\t\tint count = 0;\n\t\tint[] countArray = new int[SstrArray.size()];\n\n\n\t\tfor (int j = 0; j < SstrArray.size(); j++) {\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}\n\n\t\tint countMin = countArray[0];\n\t\tfor(int m = 0; m < countArray.length; m++) {\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(countMin);\n\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner scan = new Scanner(System.in);\n\t\tString S = scan.next();\n\t\tString T = scan.next();\n\t\tscan.close();\n\n\t\tint Slength = S.length();\n\t\tint Tlength = T.length();\n\n\t\tArrayList<String> SstrArray = new ArrayList<String>();\n\n\t\tfor (int i = 0; i <= (Slength - Tlength); i++) {\n\t\t\tString Sstr = S.substring(i, Tlength + i);\n\t\t\tSstrArray.add(Sstr);\n\t\t}\n\n\n\t\tString[] Tarray = T.split(\"\");\n\t\tint count = 0;\n\t\tint[] countArray = new int[SstrArray.size()];\n\n\n\t\tfor (int j = 0; j < SstrArray.size(); j++) {\n\t\t\tString[] SstrArray2 = SstrArray.get(j).split(\"\");\n\t\t\tfor (int k = 0; k < Tarray.length; k++) {\n\t\t\t\tif (!(Tarray[k].equals(SstrArray2[k]))) {\n\t\t\t\t\tcount = count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcountArray[j] = count;\n\t\t\tcount = 0;\n\t\t}\n\n\t\tint countMin = countArray[0];\n\t\tfor(int m = 0; m < countArray.length; m++) {\n\t\t\tif(countMin > countArray[m]) {\n\t\t\t\tcountMin = countArray[m];\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(countMin);\n\n\t}\n\n}",
"Main"
]
| import java.util.ArrayList;
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 T = scan.next();
scan.close();
int Slength = S.length();
int Tlength = T.length();
ArrayList<String> SstrArray = new ArrayList<String>();
for (int i = 0; i <= (Slength - Tlength); i++) {
String Sstr = S.substring(i, Tlength + i);
SstrArray.add(Sstr);
}
String[] Tarray = T.split("");
int count = 0;
int[] countArray = new int[SstrArray.size()];
for (int j = 0; j < SstrArray.size(); j++) {
String[] SstrArray2 = SstrArray.get(j).split("");
for (int k = 0; k < Tarray.length; k++) {
if (!(Tarray[k].equals(SstrArray2[k]))) {
count = count + 1;
}
}
countArray[j] = count;
count = 0;
}
int countMin = countArray[0];
for(int m = 0; m < countArray.length; m++) {
if(countMin > countArray[m]) {
countMin = countArray[m];
}
}
System.out.println(countMin);
}
}
|
[
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,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
14,
2,
18,
13,
13,
18,
13,
2,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
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
],
[
34,
35
],
[
35,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
37,
51
],
[
51,
52
],
[
52,
53
],
[
37,
54
],
[
55,
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
],
[
81,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
55,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
89,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
8,
100
],
[
100,
101
],
[
101,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
]
| [
"import 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\t// 入力値の取得\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tchar[] ScharArray = S.toCharArray();\n\t\tchar[] TcharArray = T.toCharArray();\n\t\t\n\t\t// 結果の出力\n\t\tint count = T.length();\n\t\tfor (int i = 0; i <= (S.length() - T.length()); i++) {\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}\n\t\tSystem.out.println(count);\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\n\t\t// 入力値の取得\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tchar[] ScharArray = S.toCharArray();\n\t\tchar[] TcharArray = T.toCharArray();\n\t\t\n\t\t// 結果の出力\n\t\tint count = T.length();\n\t\tfor (int i = 0; i <= (S.length() - T.length()); i++) {\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}\n\t\tSystem.out.println(count);\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\n\t\t// 入力値の取得\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tchar[] ScharArray = S.toCharArray();\n\t\tchar[] TcharArray = T.toCharArray();\n\t\t\n\t\t// 結果の出力\n\t\tint count = T.length();\n\t\tfor (int i = 0; i <= (S.length() - T.length()); i++) {\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tchar[] ScharArray = S.toCharArray();\n\t\tchar[] TcharArray = T.toCharArray();\n\t\t\n\t\t// 結果の出力\n\t\tint count = T.length();\n\t\tfor (int i = 0; i <= (S.length() - T.length()); i++) {\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}\n\t\tSystem.out.println(count);\n\t\t\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"char[] ScharArray = S.toCharArray();",
"ScharArray",
"S.toCharArray()",
"S.toCharArray",
"S",
"char[] TcharArray = T.toCharArray();",
"TcharArray",
"T.toCharArray()",
"T.toCharArray",
"T",
"int count = T.length();",
"count",
"T.length()",
"T.length",
"T",
"for (int i = 0; i <= (S.length() - T.length()); i++) {\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= (S.length() - T.length())",
"i",
"(S.length() - T.length())",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}",
"{\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}",
"int diff = 0;",
"diff",
"0",
"for (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}",
"if (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}",
"TcharArray[j] != ScharArray[i + j]",
"TcharArray[j]",
"TcharArray",
"j",
"ScharArray[i + j]",
"ScharArray",
"i + j",
"i",
"j",
"{\n\t\t\t\t\tdiff++;\n\t\t\t\t}",
"diff++",
"diff",
"count = Math.min(count, diff)",
"count",
"Math.min(count, diff)",
"Math.min",
"Math",
"count",
"diff",
"System.out.println(count)",
"System.out.println",
"System.out",
"System",
"System.out",
"count",
"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\n\t\t// 入力値の取得\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tchar[] ScharArray = S.toCharArray();\n\t\tchar[] TcharArray = T.toCharArray();\n\t\t\n\t\t// 結果の出力\n\t\tint count = T.length();\n\t\tfor (int i = 0; i <= (S.length() - T.length()); i++) {\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}\n\t\tSystem.out.println(count);\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\n\t\t// 入力値の取得\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tchar[] ScharArray = S.toCharArray();\n\t\tchar[] TcharArray = T.toCharArray();\n\t\t\n\t\t// 結果の出力\n\t\tint count = T.length();\n\t\tfor (int i = 0; i <= (S.length() - T.length()); i++) {\n\t\t\tint diff = 0;\n\t\t\tfor (int j = 0; j < T.length(); j++) {\n\t\t\t\tif (TcharArray[j] != ScharArray[i + j]) {\n\t\t\t\t\tdiff++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcount = Math.min(count, diff);\n\t\t}\n\t\tSystem.out.println(count);\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);
// 入力値の取得
String S = sc.next();
String T = sc.next();
char[] ScharArray = S.toCharArray();
char[] TcharArray = T.toCharArray();
// 結果の出力
int count = T.length();
for (int i = 0; i <= (S.length() - T.length()); i++) {
int diff = 0;
for (int j = 0; j < T.length(); j++) {
if (TcharArray[j] != ScharArray[i + j]) {
diff++;
}
}
count = Math.min(count, diff);
}
System.out.println(count);
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,
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,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
100,
5
],
[
100,
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
],
[
44,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
35,
49
],
[
49,
50
],
[
50,
51
],
[
35,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
57,
67
],
[
67,
68
],
[
68,
69
],
[
57,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
72,
82
],
[
82,
83
],
[
53,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
8,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
6,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n char[] ss = s.toCharArray();\n String t = sc.next();\n char[] tt = t.toCharArray();\n int difmin = 100000;\n for(int i = 0;i<=s.length()-t.length();i++){\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }\n System.out.println(difmin);\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 String s = sc.next();\n char[] ss = s.toCharArray();\n String t = sc.next();\n char[] tt = t.toCharArray();\n int difmin = 100000;\n for(int i = 0;i<=s.length()-t.length();i++){\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }\n System.out.println(difmin);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n char[] ss = s.toCharArray();\n String t = sc.next();\n char[] tt = t.toCharArray();\n int difmin = 100000;\n for(int i = 0;i<=s.length()-t.length();i++){\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }\n System.out.println(difmin);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n char[] ss = s.toCharArray();\n String t = sc.next();\n char[] tt = t.toCharArray();\n int difmin = 100000;\n for(int i = 0;i<=s.length()-t.length();i++){\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }\n System.out.println(difmin);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"char[] ss = s.toCharArray();",
"ss",
"s.toCharArray()",
"s.toCharArray",
"s",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"char[] tt = t.toCharArray();",
"tt",
"t.toCharArray()",
"t.toCharArray",
"t",
"int difmin = 100000;",
"difmin",
"100000",
"for(int i = 0;i<=s.length()-t.length();i++){\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<=s.length()-t.length()",
"i",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }",
"{\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }",
"int dif = 0;",
"dif",
"0",
"for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if(ss[i+j]!=tt[j])dif++;\n }",
"{\n if(ss[i+j]!=tt[j])dif++;\n }",
"if(ss[i+j]!=tt[j])dif++;",
"ss[i+j]!=tt[j]",
"ss[i+j]",
"ss",
"i+j",
"i",
"j",
"tt[j]",
"tt",
"j",
"dif++",
"dif",
"difmin = Math.min(dif,difmin)",
"difmin",
"Math.min(dif,difmin)",
"Math.min",
"Math",
"dif",
"difmin",
"System.out.println(difmin)",
"System.out.println",
"System.out",
"System",
"System.out",
"difmin",
"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 char[] ss = s.toCharArray();\n String t = sc.next();\n char[] tt = t.toCharArray();\n int difmin = 100000;\n for(int i = 0;i<=s.length()-t.length();i++){\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }\n System.out.println(difmin);\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 char[] ss = s.toCharArray();\n String t = sc.next();\n char[] tt = t.toCharArray();\n int difmin = 100000;\n for(int i = 0;i<=s.length()-t.length();i++){\n int dif = 0;\n for(int j = 0;j<t.length();j++){\n if(ss[i+j]!=tt[j])dif++;\n }\n difmin = Math.min(dif,difmin);\n }\n System.out.println(difmin);\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String s = sc.next();
char[] ss = s.toCharArray();
String t = sc.next();
char[] tt = t.toCharArray();
int difmin = 100000;
for(int i = 0;i<=s.length()-t.length();i++){
int dif = 0;
for(int j = 0;j<t.length();j++){
if(ss[i+j]!=tt[j])dif++;
}
difmin = Math.min(dif,difmin);
}
System.out.println(difmin);
}
}
|
[
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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
100,
5
],
[
100,
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
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
37,
49
],
[
49,
50
],
[
50,
51
],
[
37,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
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
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
71,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
70,
82
],
[
82,
83
],
[
53,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
8,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
6,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n String s=sc.nextLine();\n String t=sc.nextLine();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<n-m+1;i++)\n {\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }\n System.out.println(min);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n String s=sc.nextLine();\n String t=sc.nextLine();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<n-m+1;i++)\n {\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }\n System.out.println(min);\n }\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n String s=sc.nextLine();\n String t=sc.nextLine();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<n-m+1;i++)\n {\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }\n System.out.println(min);\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n String s=sc.nextLine();\n String t=sc.nextLine();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<n-m+1;i++)\n {\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }\n System.out.println(min);\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s=sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String t=sc.nextLine();",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int n=s.length();",
"n",
"s.length()",
"s.length",
"s",
"int m=t.length();",
"m",
"t.length()",
"t.length",
"t",
"int min=Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i=0;i<n-m+1;i++)\n {\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-m+1",
"i",
"n-m+1",
"n-m",
"n",
"m",
"1",
"i++",
"i++",
"i",
"{\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }",
"{\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }",
"int cnt=0;",
"cnt",
"0",
"for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<m",
"j",
"m",
"j++",
"j++",
"j",
"{\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }",
"{\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }",
"if(s.charAt(i+j)!=t.charAt(j))\n cnt++;",
"s.charAt(i+j)!=t.charAt(j)",
"s.charAt(i+j)",
"s.charAt",
"s",
"i+j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"cnt++",
"cnt",
"min=Math.min(min,cnt)",
"min",
"Math.min(min,cnt)",
"Math.min",
"Math",
"min",
"cnt",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n String s=sc.nextLine();\n String t=sc.nextLine();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<n-m+1;i++)\n {\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }\n System.out.println(min);\n }\n}",
"public class Main{\n public static void main(String[] args)\n {\n Scanner sc=new Scanner(System.in);\n String s=sc.nextLine();\n String t=sc.nextLine();\n int n=s.length();\n int m=t.length();\n int min=Integer.MAX_VALUE;\n for(int i=0;i<n-m+1;i++)\n {\n int cnt=0;\n for(int j=0;j<m;j++)\n {\n if(s.charAt(i+j)!=t.charAt(j))\n cnt++;\n }\n min=Math.min(min,cnt);\n }\n System.out.println(min);\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
String s=sc.nextLine();
String t=sc.nextLine();
int n=s.length();
int m=t.length();
int min=Integer.MAX_VALUE;
for(int i=0;i<n-m+1;i++)
{
int cnt=0;
for(int j=0;j<m;j++)
{
if(s.charAt(i+j)!=t.charAt(j))
cnt++;
}
min=Math.min(min,cnt);
}
System.out.println(min);
}
} |
[
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,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
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,
4,
18,
13,
13,
30,
40,
13,
4,
18,
13,
13,
0,
13,
17,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
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
],
[
117,
11
],
[
117,
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
],
[
14,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
41,
49
],
[
34,
50
],
[
50,
51
],
[
51,
52
],
[
34,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
54,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
82,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
81,
91
],
[
91,
92
],
[
92,
93
],
[
54,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
54,
98
],
[
98,
99
],
[
98,
100
],
[
14,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
14,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
12,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
]
| [
"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tCollections.sort(list);\n\t\tSystem.out.println(list.get(0));\n\t}\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tCollections.sort(list);\n\t\tSystem.out.println(list.get(0));\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tCollections.sort(list);\n\t\tSystem.out.println(list.get(0));\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tCollections.sort(list);\n\t\tSystem.out.println(list.get(0));\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"ArrayList<Integer> list = new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length() - t.length() + 1",
"i",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}",
"{\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}",
"String temp = s.substring(i, i + t.length());",
"temp",
"s.substring(i, i + t.length())",
"s.substring",
"s",
"i",
"i + t.length()",
"i",
"t.length()",
"t.length",
"t",
"for(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"if(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"temp.charAt(j) != t.charAt(j)",
"temp.charAt(j)",
"temp.charAt",
"temp",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"count++",
"count",
"list.add(count)",
"list.add",
"list",
"count",
"count = 0",
"count",
"0",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"System.out.println(list.get(0))",
"System.out.println",
"System.out",
"System",
"System.out",
"list.get(0)",
"list.get",
"list",
"0",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tCollections.sort(list);\n\t\tSystem.out.println(list.get(0));\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\t\n\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < s.length() - t.length() + 1; i++) {\n\t\t\tString temp = s.substring(i, i + t.length());\n\t\t\tfor(int j = 0; j < t.length(); j++) {\n\t\t\t\tif(temp.charAt(j) != t.charAt(j)) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tlist.add(count);\n\t\t\tcount = 0;\n\t\t}\n\t\tCollections.sort(list);\n\t\tSystem.out.println(list.get(0));\n\t}\n\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
ArrayList<Integer> list = new ArrayList<Integer>();
int count = 0;
for(int i = 0; i < s.length() - t.length() + 1; i++) {
String temp = s.substring(i, i + t.length());
for(int j = 0; j < t.length(); j++) {
if(temp.charAt(j) != t.charAt(j)) {
count++;
}
}
list.add(count);
count = 0;
}
Collections.sort(list);
System.out.println(list.get(0));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
2,
13,
17,
2,
2,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
4,
18,
13,
2,
13,
17,
13,
4,
18,
13,
2,
13,
17,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
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,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
171,
8
],
[
171,
9
],
[
9,
10
],
[
171,
11
],
[
11,
12
],
[
171,
13
],
[
13,
14
],
[
171,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
17,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
41,
49
],
[
34,
50
],
[
50,
51
],
[
51,
52
],
[
34,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
54,
70
],
[
70,
71
],
[
70,
72
],
[
54,
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
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
92,
98
],
[
90,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
88,
106
],
[
106,
107
],
[
107,
108
],
[
54,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
111,
115
],
[
17,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
15,
122
],
[
122,
123
],
[
171,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
131,
132
],
[
171,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
171,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
149,
150
],
[
171,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
154,
163
],
[
163,
164
],
[
163,
165
],
[
153,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
0,
170
],
[
170,
171
],
[
170,
172
]
]
| [
"import java.util.*; \nimport java.io.*;\n\n//the answer must be bountry * bountry\npublic class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n String S = next();\n String T = next();\n \n int ans = Integer.MAX_VALUE;\n\n for (int i=1; i<=S.length()-T.length()+1; i++) {\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }\n\n System.out.println(ans);\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n String S = next();\n String T = next();\n \n int ans = Integer.MAX_VALUE;\n\n for (int i=1; i<=S.length()-T.length()+1; i++) {\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }\n\n System.out.println(ans);\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"Main",
"static StringTokenizer st;",
"st",
"static BufferedReader br;",
"br",
"static PrintWriter out;",
"out",
"public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n String S = next();\n String T = next();\n \n int ans = Integer.MAX_VALUE;\n\n for (int i=1; i<=S.length()-T.length()+1; i++) {\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }\n\n System.out.println(ans);\n \n }",
"main",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n \n String S = next();\n String T = next();\n \n int ans = Integer.MAX_VALUE;\n\n for (int i=1; i<=S.length()-T.length()+1; i++) {\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }\n\n System.out.println(ans);\n \n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String S = next();",
"S",
"next()",
"next",
"String T = next();",
"T",
"next()",
"next",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for (int i=1; i<=S.length()-T.length()+1; i++) {\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=S.length()-T.length()+1",
"i",
"S.length()-T.length()+1",
"S.length()-T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"1",
"i++",
"i++",
"i",
"{\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }",
"{\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }",
"String temp = S.substring(i-1, i-1+T.length());",
"temp",
"S.substring(i-1, i-1+T.length())",
"S.substring",
"S",
"i-1",
"i",
"1",
"i-1+T.length()",
"i-1",
"i",
"1",
"T.length()",
"T.length",
"T",
"int count = 0;",
"count",
"0",
"for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }",
"int j=1;",
"int j=1;",
"j",
"1",
"j<=T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }",
"{\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }",
"if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }",
"!temp.substring(j-1,j).equals(T.substring(j-1,j))",
"temp.substring(j-1,j).equals(T.substring(j-1,j))",
"temp.substring(j-1,j).equals",
"temp.substring(j-1,j)",
"temp.substring",
"temp",
"j-1",
"j",
"1",
"j",
"T.substring(j-1,j)",
"T.substring",
"T",
"j-1",
"j",
"1",
"j",
"{\n count ++;\n }",
"count ++",
"count",
"ans = Math.min(ans, count)",
"ans",
"Math.min(ans, count)",
"Math.min",
"Math",
"ans",
"count",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public static int nextInt() throws IOException {\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",
"public static long nextLong() throws IOException {\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",
"public static double nextDouble() throws IOException {\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",
"static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine().trim())",
"st",
"new StringTokenizer(br.readLine().trim())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n String S = next();\n String T = next();\n \n int ans = Integer.MAX_VALUE;\n\n for (int i=1; i<=S.length()-T.length()+1; i++) {\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }\n\n System.out.println(ans);\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"public class Main {\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n String S = next();\n String T = next();\n \n int ans = Integer.MAX_VALUE;\n\n for (int i=1; i<=S.length()-T.length()+1; i++) {\n String temp = S.substring(i-1, i-1+T.length());\n int count = 0;\n for (int j=1; j<=T.length(); j++) {\n if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){\n count ++;\n }\n }; \n \n ans = Math.min(ans, count);\n }\n\n System.out.println(ans);\n \n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
//the answer must be bountry * bountry
public class Main {
static StringTokenizer st;
static BufferedReader br;
static PrintWriter out;
public static void main(String[] args) throws IOException {
br = new BufferedReader(new InputStreamReader(System.in));
String S = next();
String T = next();
int ans = Integer.MAX_VALUE;
for (int i=1; i<=S.length()-T.length()+1; i++) {
String temp = S.substring(i-1, i-1+T.length());
int count = 0;
for (int j=1; j<=T.length(); j++) {
if(!temp.substring(j-1,j).equals(T.substring(j-1,j))){
count ++;
}
};
ans = Math.min(ans, count);
}
System.out.println(ans);
}
public static int nextInt() throws IOException {
return Integer.parseInt(next());
}
public static long nextLong() throws IOException {
return Long.parseLong(next());
}
public static double nextDouble() throws IOException {
return Double.parseDouble(next());
}
static String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
}
|
[
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,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
13,
41,
13,
4,
13,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
4,
18,
18,
13,
13,
2,
13,
13,
23,
13,
12,
13,
30,
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,
13,
4,
18,
13,
13,
30,
40,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
129,
5
],
[
129,
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
],
[
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
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
35,
47
],
[
47,
48
],
[
48,
49
],
[
35,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
51,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
51,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
6,
83
],
[
83,
84
],
[
129,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
87,
93
],
[
93,
94
],
[
93,
95
],
[
87,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
110,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
109,
119
],
[
119,
120
],
[
120,
121
],
[
87,
122
],
[
122,
123
],
[
85,
124
],
[
124,
125
],
[
85,
126
],
[
126,
127
],
[
0,
128
],
[
128,
129
],
[
128,
130
]
]
| [
"import java.util.*;\npublic class Main {\n public static void main(String[] args){\n // 入力\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n // 一致する文字数の最大値を取得\n int max = 0;\n int lenS = S.length();\n int lenT = T.length();\n for(int i = 0; i < lenS-lenT+1; i++){\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }\n \n // 出力\n System.out.println(lenT - max);\n }\n \n // 2つの文字列の一致する文字数を数える関数\n public static int matchStr(String str1, String str2){\n int len = str1.length();\n int count = 0;\n for(int i = 0; i < len; i++){\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }\n return count;\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n // 入力\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n // 一致する文字数の最大値を取得\n int max = 0;\n int lenS = S.length();\n int lenT = T.length();\n for(int i = 0; i < lenS-lenT+1; i++){\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }\n \n // 出力\n System.out.println(lenT - max);\n }\n \n // 2つの文字列の一致する文字数を数える関数\n public static int matchStr(String str1, String str2){\n int len = str1.length();\n int count = 0;\n for(int i = 0; i < len; i++){\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }\n return count;\n }\n\n}",
"Main",
"public static void main(String[] args){\n // 入力\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n // 一致する文字数の最大値を取得\n int max = 0;\n int lenS = S.length();\n int lenT = T.length();\n for(int i = 0; i < lenS-lenT+1; i++){\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }\n \n // 出力\n System.out.println(lenT - max);\n }",
"main",
"{\n // 入力\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n // 一致する文字数の最大値を取得\n int max = 0;\n int lenS = S.length();\n int lenT = T.length();\n for(int i = 0; i < lenS-lenT+1; i++){\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }\n \n // 出力\n System.out.println(lenT - max);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"int max = 0;",
"max",
"0",
"int lenS = S.length();",
"lenS",
"S.length()",
"S.length",
"S",
"int lenT = T.length();",
"lenT",
"T.length()",
"T.length",
"T",
"for(int i = 0; i < lenS-lenT+1; i++){\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < lenS-lenT+1",
"i",
"lenS-lenT+1",
"lenS-lenT",
"lenS",
"lenT",
"1",
"i++",
"i++",
"i",
"{\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }",
"{\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }",
"String subS = S.substring(i, i+lenT);",
"subS",
"S.substring(i, i+lenT)",
"S.substring",
"S",
"i",
"i+lenT",
"i",
"lenT",
"int count = matchStr(subS, T);",
"count",
"matchStr(subS, T)",
"matchStr",
"subS",
"T",
"if(count > max){\n max = count;\n }",
"count > max",
"count",
"max",
"{\n max = count;\n }",
"max = count",
"max",
"count",
"System.out.println(lenT - max)",
"System.out.println",
"System.out",
"System",
"System.out",
"lenT - max",
"lenT",
"max",
"String[] args",
"args",
"// 2つの文字列の一致する文字数を数える関数\n public static int matchStr(String str1, String str2){\n int len = str1.length();\n int count = 0;\n for(int i = 0; i < len; i++){\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }\n return count;\n }",
"matchStr",
"{\n int len = str1.length();\n int count = 0;\n for(int i = 0; i < len; i++){\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }\n return count;\n }",
"int len = str1.length();",
"len",
"str1.length()",
"str1.length",
"str1",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < len; i++){\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"{\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }",
"{\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }",
"if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }",
"str1.charAt(i) == str2.charAt(i)",
"str1.charAt(i)",
"str1.charAt",
"str1",
"i",
"str2.charAt(i)",
"str2.charAt",
"str2",
"i",
"{\n count++;\n }",
"count++",
"count",
"return count;",
"count",
"String str1",
"str1",
"String str2",
"str2",
"public class Main {\n public static void main(String[] args){\n // 入力\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n // 一致する文字数の最大値を取得\n int max = 0;\n int lenS = S.length();\n int lenT = T.length();\n for(int i = 0; i < lenS-lenT+1; i++){\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }\n \n // 出力\n System.out.println(lenT - max);\n }\n \n // 2つの文字列の一致する文字数を数える関数\n public static int matchStr(String str1, String str2){\n int len = str1.length();\n int count = 0;\n for(int i = 0; i < len; i++){\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }\n return count;\n }\n\n}",
"public class Main {\n public static void main(String[] args){\n // 入力\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n // 一致する文字数の最大値を取得\n int max = 0;\n int lenS = S.length();\n int lenT = T.length();\n for(int i = 0; i < lenS-lenT+1; i++){\n String subS = S.substring(i, i+lenT);\n int count = matchStr(subS, T);\n if(count > max){\n max = count;\n }\n }\n \n // 出力\n System.out.println(lenT - max);\n }\n \n // 2つの文字列の一致する文字数を数える関数\n public static int matchStr(String str1, String str2){\n int len = str1.length();\n int count = 0;\n for(int i = 0; i < len; i++){\n if(str1.charAt(i) == str2.charAt(i)){\n count++;\n }\n }\n return count;\n }\n\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 T = sc.next();
// 一致する文字数の最大値を取得
int max = 0;
int lenS = S.length();
int lenT = T.length();
for(int i = 0; i < lenS-lenT+1; i++){
String subS = S.substring(i, i+lenT);
int count = matchStr(subS, T);
if(count > max){
max = count;
}
}
// 出力
System.out.println(lenT - max);
}
// 2つの文字列の一致する文字数を数える関数
public static int matchStr(String str1, String str2){
int len = str1.length();
int count = 0;
for(int i = 0; i < len; i++){
if(str1.charAt(i) == str2.charAt(i)){
count++;
}
}
return count;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
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,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
14,
2,
13,
13,
40,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
131,
8
],
[
131,
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
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
36,
40
],
[
40,
41
],
[
41,
42
],
[
35,
43
],
[
28,
44
],
[
44,
45
],
[
45,
46
],
[
28,
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
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
62,
65
],
[
48,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
11,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
78,
82
],
[
9,
83
],
[
83,
84
],
[
131,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
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
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
105,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
105,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
87,
124
],
[
124,
125
],
[
85,
126
],
[
126,
127
],
[
85,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n //String subArray[] = sub.split(\"\");\n //String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n //String subArray[] = sub.split(\"\");\n //String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int m_x = 0;",
"m_x",
"0",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()-t.length()+1",
"i",
"s.length()-t.length()+1",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }",
"{\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }",
"String sub = s.substring(i,i+t.length());",
"sub",
"s.substring(i,i+t.length())",
"s.substring",
"s",
"i",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"int c = monmo(sub,t);",
"c",
"monmo(sub,t)",
"monmo",
"sub",
"t",
"if(m_x < c)m_x = c;",
"m_x < c",
"m_x",
"c",
"m_x = c",
"m_x",
"c",
"System.out.println(t.length()-m_x)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length()-m_x",
"t.length()",
"t.length",
"t",
"m_x",
"String[] args",
"args",
"static int monmo(String sub,String t){\n int count=0;\n //String subArray[] = sub.split(\"\");\n //String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }\n \n return count;\n }",
"monmo",
"{\n int count=0;\n //String subArray[] = sub.split(\"\");\n //String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }\n \n return count;\n }",
"int count=0;",
"count",
"0",
"for(int i=0;i<t.length();i++){\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<t.length()",
"i",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }",
"{\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }",
"char subA = sub.charAt(i);",
"subA",
"sub.charAt(i)",
"sub.charAt",
"sub",
"i",
"char tA = t.charAt(i);",
"tA",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"if(subA == tA)count++;",
"subA == tA",
"subA",
"tA",
"count++",
"count",
"return count;",
"count",
"String sub",
"sub",
"String t",
"t",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n //String subArray[] = sub.split(\"\");\n //String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n //String subArray[] = sub.split(\"\");\n //String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n char subA = sub.charAt(i);\n char tA = t.charAt(i);\n //if(subArray[i].equals(tArray[i]))count++;\n if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int m_x = 0;
String s = sc.next();
String t = sc.next();
for(int i=0;i<s.length()-t.length()+1;i++){
String sub = s.substring(i,i+t.length());
int c = monmo(sub,t);
if(m_x < c)m_x = c;
}
System.out.println(t.length()-m_x);
}
static int monmo(String sub,String t){
int count=0;
//String subArray[] = sub.split("");
//String tArray[] = t.split("");
for(int i=0;i<t.length();i++){
char subA = sub.charAt(i);
char tA = t.charAt(i);
//if(subArray[i].equals(tArray[i]))count++;
if(subA == tA)count++;
}
return count;
}
}
|
[
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,
41,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
2,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
40,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
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
],
[
112,
11
],
[
112,
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
],
[
14,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
33,
47
],
[
47,
48
],
[
48,
49
],
[
33,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
58,
62
],
[
51,
63
],
[
63,
64
],
[
63,
65
],
[
51,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
81,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
80,
90
],
[
90,
91
],
[
51,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
14,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
14,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
12,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
]
| [
"import java.util.ArrayList;\nimport java.util.Collections;\nimport java.util.Scanner;\n\npublic class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String t = sc.next();\n String s = sc.next();\n\n ArrayList<Integer> list = new ArrayList<>();\n\n String hantei;\n for(int i = 0; i <= t.length() - s.length(); i++) {\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }\n\n Collections.sort(list);\n System.out.println(list.get(0));\n }\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String t = sc.next();\n String s = sc.next();\n\n ArrayList<Integer> list = new ArrayList<>();\n\n String hantei;\n for(int i = 0; i <= t.length() - s.length(); i++) {\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }\n\n Collections.sort(list);\n System.out.println(list.get(0));\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String t = sc.next();\n String s = sc.next();\n\n ArrayList<Integer> list = new ArrayList<>();\n\n String hantei;\n for(int i = 0; i <= t.length() - s.length(); i++) {\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }\n\n Collections.sort(list);\n System.out.println(list.get(0));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n String t = sc.next();\n String s = sc.next();\n\n ArrayList<Integer> list = new ArrayList<>();\n\n String hantei;\n for(int i = 0; i <= t.length() - s.length(); i++) {\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }\n\n Collections.sort(list);\n System.out.println(list.get(0));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"ArrayList<Integer> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"String hantei;",
"hantei",
"for(int i = 0; i <= t.length() - s.length(); i++) {\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= t.length() - s.length()",
"i",
"t.length() - s.length()",
"t.length()",
"t.length",
"t",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }",
"{\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }",
"hantei = t.substring(i, s.length() + i)",
"hantei",
"t.substring(i, s.length() + i)",
"t.substring",
"t",
"i",
"s.length() + i",
"s.length()",
"s.length",
"s",
"i",
"int c = 0;",
"c",
"0",
"for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < s.length()",
"j",
"s.length()",
"s.length",
"s",
"j++",
"j++",
"j",
"if(s.charAt(j) != hantei.charAt(j)) ++c;",
"if(s.charAt(j) != hantei.charAt(j)) ++c;",
"s.charAt(j) != hantei.charAt(j)",
"s.charAt(j)",
"s.charAt",
"s",
"j",
"hantei.charAt(j)",
"hantei.charAt",
"hantei",
"j",
"++c",
"c",
"list.add(c)",
"list.add",
"list",
"c",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"System.out.println(list.get(0))",
"System.out.println",
"System.out",
"System",
"System.out",
"list.get(0)",
"list.get",
"list",
"0",
"String[] args",
"args",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String t = sc.next();\n String s = sc.next();\n\n ArrayList<Integer> list = new ArrayList<>();\n\n String hantei;\n for(int i = 0; i <= t.length() - s.length(); i++) {\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }\n\n Collections.sort(list);\n System.out.println(list.get(0));\n }\n\n}",
"public class Main{\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String t = sc.next();\n String s = sc.next();\n\n ArrayList<Integer> list = new ArrayList<>();\n\n String hantei;\n for(int i = 0; i <= t.length() - s.length(); i++) {\n hantei = t.substring(i, s.length() + i);\n int c = 0;\n for(int j = 0; j < s.length(); j++)\n \tif(s.charAt(j) != hantei.charAt(j)) ++c;\n list.add(c);\n }\n\n Collections.sort(list);\n System.out.println(list.get(0));\n }\n\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String t = sc.next();
String s = sc.next();
ArrayList<Integer> list = new ArrayList<>();
String hantei;
for(int i = 0; i <= t.length() - s.length(); i++) {
hantei = t.substring(i, s.length() + i);
int c = 0;
for(int j = 0; j < s.length(); j++)
if(s.charAt(j) != hantei.charAt(j)) ++c;
list.add(c);
}
Collections.sort(list);
System.out.println(list.get(0));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
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
],
[
99,
8
],
[
99,
9
],
[
9,
10
],
[
9,
11
],
[
99,
12
],
[
12,
13
],
[
99,
14
],
[
14,
15
],
[
14,
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
],
[
16,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
32,
46
],
[
46,
47
],
[
47,
48
],
[
32,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
54,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
74,
76
],
[
70,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
69,
81
],
[
81,
82
],
[
50,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
85,
89
],
[
16,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
14,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n private static StringTokenizer st;\n\n public static void main(String[] args) throws IOException {\n String S = br.readLine();\n String T = br.readLine();\n\n int res = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }\n System.out.println(res);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n private static StringTokenizer st;\n\n public static void main(String[] args) throws IOException {\n String S = br.readLine();\n String T = br.readLine();\n\n int res = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }\n System.out.println(res);\n }\n}",
"Main",
"private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"private static StringTokenizer st;",
"st",
"public static void main(String[] args) throws IOException {\n String S = br.readLine();\n String T = br.readLine();\n\n int res = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }\n System.out.println(res);\n }",
"main",
"{\n String S = br.readLine();\n String T = br.readLine();\n\n int res = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }\n System.out.println(res);\n }",
"String S = br.readLine();",
"S",
"br.readLine()",
"br.readLine",
"br",
"String T = br.readLine();",
"T",
"br.readLine()",
"br.readLine",
"br",
"int res = T.length();",
"res",
"T.length()",
"T.length",
"T",
"for (int i = 0; i <= S.length() - T.length(); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= S.length() - T.length()",
"i",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }",
"{\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }",
"int count = 0;",
"count",
"0",
"for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }",
"{\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }",
"if (S.charAt(i + j) != T.charAt(j)) count++;",
"S.charAt(i + j) != T.charAt(j)",
"S.charAt(i + j)",
"S.charAt",
"S",
"i + j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"count++",
"count",
"res = Math.min(res, count)",
"res",
"Math.min(res, count)",
"Math.min",
"Math",
"res",
"count",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String[] args",
"args",
"public class Main {\n private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n private static StringTokenizer st;\n\n public static void main(String[] args) throws IOException {\n String S = br.readLine();\n String T = br.readLine();\n\n int res = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }\n System.out.println(res);\n }\n}",
"public class Main {\n private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n private static StringTokenizer st;\n\n public static void main(String[] args) throws IOException {\n String S = br.readLine();\n String T = br.readLine();\n\n int res = T.length();\n for (int i = 0; i <= S.length() - T.length(); i++) {\n int count = 0;\n for (int j = 0; j < T.length(); j++) {\n if (S.charAt(i + j) != T.charAt(j)) count++;\n }\n res = Math.min(res, count);\n }\n System.out.println(res);\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
private static StringTokenizer st;
public static void main(String[] args) throws IOException {
String S = br.readLine();
String T = br.readLine();
int res = T.length();
for (int i = 0; i <= S.length() - T.length(); i++) {
int count = 0;
for (int j = 0; j < T.length(); j++) {
if (S.charAt(i + j) != T.charAt(j)) count++;
}
res = Math.min(res, count);
}
System.out.println(res);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
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,
18,
13,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
18,
13,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
40,
13,
14,
2,
13,
13,
0,
13,
13,
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
],
[
103,
11
],
[
103,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
14,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
14,
37
],
[
37,
38
],
[
37,
39
],
[
14,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
40,
54
],
[
54,
55
],
[
55,
56
],
[
40,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
76,
82
],
[
82,
83
],
[
82,
84
],
[
75,
85
],
[
85,
86
],
[
58,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
91,
93
],
[
14,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
12,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
]
| [
"import java.util.*;\nimport java.math.RoundingMode;\nimport java.math.BigDecimal;\n \n \npublic class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] t = sc.next().toCharArray();\n\t\tint l = t.length;\n\t\tint min = l;\n\t\t\tfor(int i = 0; i < s.length-l+1; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.RoundingMode;",
"RoundingMode",
"java.math",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"public class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] t = sc.next().toCharArray();\n\t\tint l = t.length;\n\t\tint min = l;\n\t\t\tfor(int i = 0; i < s.length-l+1; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t}\n}",
"Main",
"public static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] t = sc.next().toCharArray();\n\t\tint l = t.length;\n\t\tint min = l;\n\t\t\tfor(int i = 0; i < s.length-l+1; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] t = sc.next().toCharArray();\n\t\tint l = t.length;\n\t\tint min = l;\n\t\t\tfor(int i = 0; i < s.length-l+1; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}\n\t\t\tSystem.out.println(min);\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[] t = sc.next().toCharArray();",
"t",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"int l = t.length;",
"l",
"t.length",
"t",
"t.length",
"int min = l;",
"min",
"l",
"for(int i = 0; i < s.length-l+1; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length-l+1",
"i",
"s.length-l+1",
"s.length-l",
"s.length",
"s",
"s.length",
"l",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}",
"{\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}",
"int count = 0;",
"count",
"0",
"for(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < l",
"j",
"l",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}",
"{\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}",
"if(s[i+j]!=t[j])count++;",
"s[i+j]!=t[j]",
"s[i+j]",
"s",
"i+j",
"i",
"j",
"t[j]",
"t",
"j",
"count++",
"count",
"if(count<min)min=count;",
"count<min",
"count",
"min",
"min=count",
"min",
"count",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"public class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] t = sc.next().toCharArray();\n\t\tint l = t.length;\n\t\tint min = l;\n\t\t\tfor(int i = 0; i < s.length-l+1; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t}\n}",
"public class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tchar[] s = sc.next().toCharArray();\n\t\tchar[] t = sc.next().toCharArray();\n\t\tint l = t.length;\n\t\tint min = l;\n\t\t\tfor(int i = 0; i < s.length-l+1; i++) {\n\t\t\t\tint count = 0;\n\t\t\t\tfor(int j = 0; j < l; j++) {\n\t\t\t\t\tif(s[i+j]!=t[j])count++;\n\t\t\t\t}\n\t\t\t\tif(count<min)min=count;\n\t\t\t}\n\t\t\tSystem.out.println(min);\n\t}\n}",
"Main"
]
| import java.util.*;
import java.math.RoundingMode;
import java.math.BigDecimal;
public class Main{
public static void main (String[] args){
Scanner sc = new Scanner(System.in);
char[] s = sc.next().toCharArray();
char[] t = sc.next().toCharArray();
int l = t.length;
int min = l;
for(int i = 0; i < s.length-l+1; i++) {
int count = 0;
for(int j = 0; j < l; j++) {
if(s[i+j]!=t[j])count++;
}
if(count<min)min=count;
}
System.out.println(min);
}
} |
[
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,
4,
18,
13,
17,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
2,
18,
13,
13,
18,
13,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
40,
4,
18,
18,
13,
2,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
111,
5
],
[
111,
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
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
8,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
52,
54
],
[
47,
55
],
[
40,
56
],
[
56,
57
],
[
57,
58
],
[
40,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
61,
71
],
[
71,
72
],
[
72,
73
],
[
61,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
78,
85
],
[
85,
86
],
[
85,
87
],
[
76,
88
],
[
88,
89
],
[
89,
90
],
[
60,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
60,
99
],
[
99,
100
],
[
99,
101
],
[
8,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
6,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString S = in.next();\n\t\tString T = in.next();\n\t\tint a = 0;\n\t\tint b = 10000;\n\n\t\tString[] SArray = S.split(\"\");\n\t\tString[] TArray = T.split(\"\");\n\n\t\tfor(int i=0; i<SArray.length - TArray.length + 1; i++) {\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}\n\n\t\tSystem.out.println(b);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString S = in.next();\n\t\tString T = in.next();\n\t\tint a = 0;\n\t\tint b = 10000;\n\n\t\tString[] SArray = S.split(\"\");\n\t\tString[] TArray = T.split(\"\");\n\n\t\tfor(int i=0; i<SArray.length - TArray.length + 1; i++) {\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}\n\n\t\tSystem.out.println(b);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString S = in.next();\n\t\tString T = in.next();\n\t\tint a = 0;\n\t\tint b = 10000;\n\n\t\tString[] SArray = S.split(\"\");\n\t\tString[] TArray = T.split(\"\");\n\n\t\tfor(int i=0; i<SArray.length - TArray.length + 1; i++) {\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}\n\n\t\tSystem.out.println(b);\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tString S = in.next();\n\t\tString T = in.next();\n\t\tint a = 0;\n\t\tint b = 10000;\n\n\t\tString[] SArray = S.split(\"\");\n\t\tString[] TArray = T.split(\"\");\n\n\t\tfor(int i=0; i<SArray.length - TArray.length + 1; i++) {\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}\n\n\t\tSystem.out.println(b);\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String S = in.next();",
"S",
"in.next()",
"in.next",
"in",
"String T = in.next();",
"T",
"in.next()",
"in.next",
"in",
"int a = 0;",
"a",
"0",
"int b = 10000;",
"b",
"10000",
"String[] SArray = S.split(\"\");",
"SArray",
"S.split(\"\")",
"S.split",
"S",
"\"\"",
"String[] TArray = T.split(\"\");",
"TArray",
"T.split(\"\")",
"T.split",
"T",
"\"\"",
"for(int i=0; i<SArray.length - TArray.length + 1; i++) {\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<SArray.length - TArray.length + 1",
"i",
"SArray.length - TArray.length + 1",
"SArray.length - TArray.length",
"SArray.length",
"SArray",
"SArray.length",
"TArray.length",
"TArray",
"TArray.length",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}",
"{\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}",
"for(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<TArray.length",
"j",
"TArray.length",
"TArray",
"TArray.length",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}",
"if(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}",
"!SArray[j+i].equals(TArray[j])",
"SArray[j+i].equals(TArray[j])",
"SArray[j+i].equals",
"SArray[j+i]",
"SArray",
"j+i",
"j",
"i",
"TArray[j]",
"TArray",
"j",
"{\n\t\t\t\t\ta++;\n\t\t\t\t}",
"a++",
"a",
"if(a < b) {\n\t\t\t\tb = a;\n\t\t\t}",
"a < b",
"a",
"b",
"{\n\t\t\t\tb = a;\n\t\t\t}",
"b = a",
"b",
"a",
"a = 0",
"a",
"0",
"System.out.println(b)",
"System.out.println",
"System.out",
"System",
"System.out",
"b",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString S = in.next();\n\t\tString T = in.next();\n\t\tint a = 0;\n\t\tint b = 10000;\n\n\t\tString[] SArray = S.split(\"\");\n\t\tString[] TArray = T.split(\"\");\n\n\t\tfor(int i=0; i<SArray.length - TArray.length + 1; i++) {\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}\n\n\t\tSystem.out.println(b);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString S = in.next();\n\t\tString T = in.next();\n\t\tint a = 0;\n\t\tint b = 10000;\n\n\t\tString[] SArray = S.split(\"\");\n\t\tString[] TArray = T.split(\"\");\n\n\t\tfor(int i=0; i<SArray.length - TArray.length + 1; i++) {\n\t\t\tfor(int j=0; j<TArray.length; j++) {\n\t\t\t\tif(!SArray[j+i].equals(TArray[j])) {\n\t\t\t\t\ta++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a < b) {\n\t\t\t\tb = a;\n\t\t\t}\n\t\t\ta = 0;\n\t\t}\n\n\t\tSystem.out.println(b);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String S = in.next();
String T = in.next();
int a = 0;
int b = 10000;
String[] SArray = S.split("");
String[] TArray = T.split("");
for(int i=0; i<SArray.length - TArray.length + 1; i++) {
for(int j=0; j<TArray.length; j++) {
if(!SArray[j+i].equals(TArray[j])) {
a++;
}
}
if(a < b) {
b = a;
}
a = 0;
}
System.out.println(b);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
40,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
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,
4,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
17,
13,
0,
13,
4,
18,
13,
13,
4,
13,
13,
13,
4,
18,
13,
2,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
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,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
17,
13,
13,
17,
0,
18,
13,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
18,
13,
17,
41,
13,
17,
42,
2,
18,
13,
17,
17,
30,
14,
2,
2,
18,
13,
17,
17,
17,
0,
13,
2,
2,
13,
18,
13,
17,
13,
0,
18,
13,
17,
17,
0,
18,
13,
17,
2,
2,
18,
13,
17,
18,
13,
17,
13,
29,
13,
23,
13,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
13,
17,
23,
13,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
28,
13,
13,
30,
30,
41,
13,
17,
14,
4,
18,
4,
18,
13,
30,
41,
13,
4,
18,
4,
18,
4,
18,
13,
35,
13,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
30,
30,
4,
13,
2,
13,
17,
3,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
40,
13,
30,
4,
13,
2,
2,
13,
17,
13,
40,
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
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
759,
20
],
[
759,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
23,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
23,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
23,
65
],
[
65,
66
],
[
21,
67
],
[
67,
68
],
[
21,
69
],
[
69,
70
],
[
759,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
77,
79
],
[
73,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
73,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
73,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
73,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
73,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
102,
105
],
[
73,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
106,
116
],
[
116,
117
],
[
117,
118
],
[
106,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
120,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
128,
132
],
[
132,
133
],
[
132,
134
],
[
132,
135
],
[
73,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
139,
140
],
[
139,
141
],
[
73,
142
],
[
142,
143
],
[
143,
144
],
[
71,
145
],
[
145,
146
],
[
759,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
152,
153
],
[
152,
154
],
[
147,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
158,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
163,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
157,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
147,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
182,
185
],
[
185,
186
],
[
147,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
191,
194
],
[
194,
195
],
[
147,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
203,
204
],
[
147,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
212,
217
],
[
217,
218
],
[
217,
219
],
[
212,
220
],
[
220,
221
],
[
221,
222
],
[
212,
223
],
[
224,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
225,
229
],
[
229,
230
],
[
207,
231
],
[
231,
232
],
[
205,
233
],
[
233,
234
],
[
147,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
242,
247
],
[
247,
248
],
[
247,
249
],
[
242,
250
],
[
250,
251
],
[
251,
252
],
[
242,
253
],
[
254,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
255,
259
],
[
259,
260
],
[
237,
261
],
[
261,
262
],
[
235,
263
],
[
263,
264
],
[
147,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
268,
269
],
[
268,
270
],
[
267,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
272,
277
],
[
277,
278
],
[
277,
279
],
[
272,
280
],
[
280,
281
],
[
281,
282
],
[
272,
283
],
[
284,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
286,
292
],
[
285,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
267,
298
],
[
298,
299
],
[
265,
300
],
[
300,
301
],
[
147,
302
],
[
302,
303
],
[
302,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
307,
309
],
[
304,
310
],
[
310,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
311,
315
],
[
310,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
318,
320
],
[
304,
321
],
[
321,
322
],
[
321,
323
],
[
304,
324
],
[
324,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
325,
329
],
[
324,
330
],
[
330,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
334,
335
],
[
334,
336
],
[
333,
337
],
[
332,
338
],
[
331,
339
],
[
339,
340
],
[
339,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
344,
346
],
[
341,
347
],
[
330,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
348,
352
],
[
330,
353
],
[
353,
354
],
[
354,
355
],
[
354,
356
],
[
353,
357
],
[
357,
358
],
[
358,
359
],
[
359,
360
],
[
359,
361
],
[
358,
362
],
[
362,
363
],
[
362,
364
],
[
357,
365
],
[
304,
366
],
[
366,
367
],
[
302,
368
],
[
368,
369
],
[
147,
370
],
[
370,
371
],
[
370,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
373,
376
],
[
377,
377
],
[
377,
378
],
[
378,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
378,
383
],
[
383,
384
],
[
383,
385
],
[
370,
386
],
[
386,
387
],
[
147,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
391,
392
],
[
391,
393
],
[
391,
394
],
[
395,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
396,
401
],
[
401,
402
],
[
401,
403
],
[
390,
404
],
[
404,
405
],
[
405,
406
],
[
406,
407
],
[
406,
408
],
[
388,
409
],
[
409,
410
],
[
147,
411
],
[
411,
412
],
[
411,
413
],
[
413,
414
],
[
414,
415
],
[
414,
416
],
[
413,
417
],
[
417,
418
],
[
417,
419
],
[
417,
420
],
[
421,
421
],
[
421,
422
],
[
422,
423
],
[
422,
424
],
[
421,
425
],
[
425,
426
],
[
426,
427
],
[
427,
428
],
[
428,
429
],
[
429,
430
],
[
425,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
435,
436
],
[
436,
437
],
[
437,
438
],
[
438,
439
],
[
439,
440
],
[
431,
441
],
[
441,
442
],
[
441,
443
],
[
443,
444
],
[
443,
445
],
[
445,
446
],
[
446,
447
],
[
447,
448
],
[
447,
449
],
[
446,
450
],
[
450,
451
],
[
450,
452
],
[
453,
453
],
[
453,
454
],
[
453,
455
],
[
453,
456
],
[
456,
457
],
[
457,
458
],
[
456,
459
],
[
446,
460
],
[
441,
461
],
[
461,
462
],
[
461,
463
],
[
463,
464
],
[
464,
465
],
[
465,
466
],
[
465,
467
],
[
464,
468
],
[
468,
469
],
[
468,
470
],
[
471,
471
],
[
471,
472
],
[
471,
473
],
[
471,
474
],
[
474,
475
],
[
475,
476
],
[
474,
477
],
[
464,
478
],
[
441,
479
],
[
479,
480
],
[
479,
481
],
[
481,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
482,
486
],
[
486,
487
],
[
486,
488
],
[
489,
489
],
[
489,
490
],
[
489,
491
],
[
489,
492
],
[
492,
493
],
[
493,
494
],
[
492,
495
],
[
482,
496
],
[
441,
497
],
[
497,
498
],
[
497,
499
],
[
499,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
500,
504
],
[
504,
505
],
[
504,
506
],
[
507,
507
],
[
507,
508
],
[
507,
509
],
[
507,
510
],
[
510,
511
],
[
511,
512
],
[
510,
513
],
[
500,
514
],
[
441,
515
],
[
515,
516
],
[
515,
517
],
[
517,
518
],
[
518,
519
],
[
519,
520
],
[
519,
521
],
[
518,
522
],
[
522,
523
],
[
522,
524
],
[
525,
525
],
[
525,
526
],
[
525,
527
],
[
525,
528
],
[
528,
529
],
[
529,
530
],
[
528,
531
],
[
518,
532
],
[
441,
533
],
[
533,
534
],
[
533,
535
],
[
535,
536
],
[
536,
537
],
[
537,
538
],
[
537,
539
],
[
536,
540
],
[
540,
541
],
[
540,
542
],
[
543,
543
],
[
543,
544
],
[
543,
545
],
[
543,
546
],
[
546,
547
],
[
547,
548
],
[
546,
549
],
[
536,
550
],
[
441,
551
],
[
551,
552
],
[
551,
553
],
[
553,
554
],
[
554,
555
],
[
555,
556
],
[
555,
557
],
[
554,
558
],
[
558,
559
],
[
558,
560
],
[
561,
561
],
[
561,
562
],
[
561,
563
],
[
561,
564
],
[
564,
565
],
[
565,
566
],
[
564,
567
],
[
554,
568
],
[
441,
569
],
[
569,
570
],
[
569,
571
],
[
571,
572
],
[
572,
573
],
[
573,
574
],
[
573,
575
],
[
572,
576
],
[
576,
577
],
[
576,
578
],
[
579,
579
],
[
579,
580
],
[
579,
581
],
[
579,
582
],
[
582,
583
],
[
583,
584
],
[
582,
585
],
[
572,
586
],
[
441,
587
],
[
587,
588
],
[
587,
589
],
[
589,
590
],
[
590,
591
],
[
591,
592
],
[
591,
593
],
[
590,
594
],
[
594,
595
],
[
594,
596
],
[
597,
597
],
[
597,
598
],
[
597,
599
],
[
597,
600
],
[
600,
601
],
[
601,
602
],
[
600,
603
],
[
590,
604
],
[
441,
605
],
[
605,
606
],
[
605,
607
],
[
607,
608
],
[
608,
609
],
[
609,
610
],
[
609,
611
],
[
608,
612
],
[
612,
613
],
[
612,
614
],
[
615,
615
],
[
615,
616
],
[
615,
617
],
[
615,
618
],
[
618,
619
],
[
619,
620
],
[
618,
621
],
[
608,
622
],
[
441,
623
],
[
623,
624
],
[
624,
625
],
[
625,
626
],
[
626,
627
],
[
626,
628
],
[
628,
629
],
[
628,
630
],
[
625,
631
],
[
431,
632
],
[
632,
633
],
[
632,
634
],
[
421,
635
],
[
635,
636
],
[
636,
637
],
[
637,
638
],
[
638,
639
],
[
636,
640
],
[
640,
641
],
[
635,
642
],
[
642,
643
],
[
643,
644
],
[
643,
645
],
[
646,
646
],
[
646,
647
],
[
646,
648
],
[
646,
649
],
[
642,
650
],
[
650,
651
],
[
650,
652
],
[
421,
653
],
[
653,
654
],
[
654,
655
],
[
655,
656
],
[
656,
657
],
[
654,
658
],
[
658,
659
],
[
653,
660
],
[
660,
661
],
[
661,
662
],
[
661,
663
],
[
664,
664
],
[
664,
665
],
[
664,
666
],
[
664,
667
],
[
660,
668
],
[
668,
669
],
[
668,
670
],
[
421,
671
],
[
671,
672
],
[
672,
673
],
[
673,
674
],
[
674,
675
],
[
672,
676
],
[
676,
677
],
[
671,
678
],
[
678,
679
],
[
679,
680
],
[
679,
681
],
[
682,
682
],
[
682,
683
],
[
682,
684
],
[
682,
685
],
[
678,
686
],
[
686,
687
],
[
686,
688
],
[
421,
689
],
[
689,
690
],
[
690,
691
],
[
691,
692
],
[
692,
693
],
[
690,
694
],
[
694,
695
],
[
689,
696
],
[
696,
697
],
[
697,
698
],
[
697,
699
],
[
700,
700
],
[
700,
701
],
[
700,
702
],
[
700,
703
],
[
696,
704
],
[
704,
705
],
[
704,
706
],
[
421,
707
],
[
707,
708
],
[
708,
709
],
[
709,
710
],
[
710,
711
],
[
708,
712
],
[
712,
713
],
[
707,
714
],
[
714,
715
],
[
715,
716
],
[
715,
717
],
[
718,
718
],
[
718,
719
],
[
718,
720
],
[
718,
721
],
[
714,
722
],
[
722,
723
],
[
722,
724
],
[
421,
725
],
[
725,
726
],
[
726,
727
],
[
727,
728
],
[
728,
729
],
[
726,
730
],
[
730,
731
],
[
725,
732
],
[
732,
733
],
[
733,
734
],
[
733,
735
],
[
736,
736
],
[
736,
737
],
[
736,
738
],
[
736,
739
],
[
732,
740
],
[
740,
741
],
[
740,
742
],
[
421,
743
],
[
743,
744
],
[
744,
745
],
[
743,
746
],
[
746,
747
],
[
747,
748
],
[
747,
749
],
[
750,
750
],
[
750,
751
],
[
750,
752
],
[
750,
753
],
[
421,
754
],
[
754,
755
],
[
411,
756
],
[
756,
757
],
[
0,
758
],
[
758,
759
],
[
758,
760
]
]
| [
"import java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\nimport static java.lang.Math.PI;\nimport static java.lang.System.in;\nimport static java.lang.System.out;\n\npublic class Main\n{ \n static int matched(String s, String t)\n {\n int count = 0;\n char a[] = s.toCharArray();\n char b[] = t.toCharArray();\n int n = b.length;\n for(int i = 0; i < n; i++)\n {\n if(a[i] == b[i])\n count++;\n }\n return count;\n }\n public static void main(String [] args) throws Exception\n {\n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n String s = sc.next();\n String t = sc.next();\n int n = s.length();\n int n2 = t.length();\n int maxMatch = matched(s, t);\n for(int i = 0; i < n-n2; i++)\n {\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }\n p.println(n2-maxMatch);\n p.close();\n }\n\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n System.out.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"import static java.lang.Math.PI;",
"import static java.lang.Math.PI;",
"import static java.lang.Math.PI;",
"import static java.lang.System.in;",
"import static java.lang.System.in;",
"import static java.lang.System.in;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"public class Main\n{ \n static int matched(String s, String t)\n {\n int count = 0;\n char a[] = s.toCharArray();\n char b[] = t.toCharArray();\n int n = b.length;\n for(int i = 0; i < n; i++)\n {\n if(a[i] == b[i])\n count++;\n }\n return count;\n }\n public static void main(String [] args) throws Exception\n {\n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n String s = sc.next();\n String t = sc.next();\n int n = s.length();\n int n2 = t.length();\n int maxMatch = matched(s, t);\n for(int i = 0; i < n-n2; i++)\n {\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }\n p.println(n2-maxMatch);\n p.close();\n }\n\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n System.out.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"Main",
"static int matched(String s, String t)\n {\n int count = 0;\n char a[] = s.toCharArray();\n char b[] = t.toCharArray();\n int n = b.length;\n for(int i = 0; i < n; i++)\n {\n if(a[i] == b[i])\n count++;\n }\n return count;\n }",
"matched",
"{\n int count = 0;\n char a[] = s.toCharArray();\n char b[] = t.toCharArray();\n int n = b.length;\n for(int i = 0; i < n; i++)\n {\n if(a[i] == b[i])\n count++;\n }\n return count;\n }",
"int count = 0;",
"count",
"0",
"char a[] = s.toCharArray();",
"a",
"s.toCharArray()",
"s.toCharArray",
"s",
"char b[] = t.toCharArray();",
"b",
"t.toCharArray()",
"t.toCharArray",
"t",
"int n = b.length;",
"n",
"b.length",
"b",
"b.length",
"for(int i = 0; i < n; i++)\n {\n if(a[i] == b[i])\n count++;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(a[i] == b[i])\n count++;\n }",
"{\n if(a[i] == b[i])\n count++;\n }",
"if(a[i] == b[i])\n count++;",
"a[i] == b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"count++",
"count",
"return count;",
"count",
"String s",
"s",
"String t",
"t",
"public static void main(String [] args) throws Exception\n {\n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n String s = sc.next();\n String t = sc.next();\n int n = s.length();\n int n2 = t.length();\n int maxMatch = matched(s, t);\n for(int i = 0; i < n-n2; i++)\n {\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }\n p.println(n2-maxMatch);\n p.close();\n }",
"main",
"{\n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n String s = sc.next();\n String t = sc.next();\n int n = s.length();\n int n2 = t.length();\n int maxMatch = matched(s, t);\n for(int i = 0; i < n-n2; i++)\n {\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }\n p.println(n2-maxMatch);\n p.close();\n }",
"Foster sc = new Foster();",
"sc",
"new Foster()",
"PrintWriter p = new PrintWriter(out);",
"p",
"new PrintWriter(out)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int n = s.length();",
"n",
"s.length()",
"s.length",
"s",
"int n2 = t.length();",
"n2",
"t.length()",
"t.length",
"t",
"int maxMatch = matched(s, t);",
"maxMatch",
"matched(s, t)",
"matched",
"s",
"t",
"for(int i = 0; i < n-n2; i++)\n {\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n-n2",
"i",
"n-n2",
"n",
"n2",
"i++",
"i++",
"i",
"{\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }",
"{\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }",
"t = \"?\" + t",
"t",
"\"?\" + t",
"\"?\"",
"t",
"maxMatch = Math.max(maxMatch, matched(s, t))",
"maxMatch",
"Math.max(maxMatch, matched(s, t))",
"Math.max",
"Math",
"maxMatch",
"matched(s, t)",
"matched",
"s",
"t",
"p.println(n2-maxMatch)",
"p.println",
"p",
"n2-maxMatch",
"n2",
"maxMatch",
"p.close()",
"p.close",
"p",
"String [] args",
"args",
" static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n System.out.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }",
"Foster",
"BufferedReader br = new BufferedReader(new InputStreamReader(in));",
"br",
"new BufferedReader(new InputStreamReader(in))",
"StringTokenizer st = new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"next",
"{\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }",
"catch (IOException e) \n {\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 {\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 {\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 {\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",
"int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }",
"intArray",
"{\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }",
"int arr[] = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextInt();\n }",
"{\n arr[i] = nextInt();\n }",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }",
"longArray",
"{\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }",
"long arr[] = new long[n];",
"arr",
"new long[n]",
"n",
"for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextLong();\n }",
"{\n arr[i] = nextLong();\n }",
"arr[i] = nextLong()",
"arr[i]",
"arr",
"i",
"nextLong()",
"nextLong",
"return arr;",
"arr",
"int n",
"n",
"int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }",
"getBits",
"{\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }",
"int a[] = new int[31];",
"a",
"new int[31]",
"31",
"for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 31",
"i",
"31",
"i++",
"i++",
"i",
"{\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }",
"{\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }",
"if(((1<<i) & n) != 0)\n a[i] = 1;",
"((1<<i) & n) != 0",
"((1<<i) & n)",
"(1<<i)",
"1",
"i",
"n",
"0",
"a[i] = 1",
"a[i]",
"a",
"i",
"1",
"return a;",
"a",
"int n",
"n",
"static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }",
"pow",
"{\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }",
"long mod = Long.MAX_VALUE;",
"mod",
"Long.MAX_VALUE",
"Long",
"Long.MAX_VALUE",
"if(a.length == 3) mod = a[2];",
"a.length == 3",
"a.length",
"a",
"a.length",
"3",
"mod = a[2]",
"mod",
"a[2]",
"a",
"2",
"long res = 1;",
"res",
"1",
"while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }",
"a[1] > 0",
"a[1]",
"a",
"1",
"0",
"{\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }",
"if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;",
"(a[1] & 1) == 1",
"(a[1] & 1)",
"a[1]",
"a",
"1",
"1",
"1",
"res = (res * a[0]) % mod",
"res",
"(res * a[0]) % mod",
"(res * a[0])",
"res",
"a[0]",
"a",
"0",
"mod",
"a[1] /= 2",
"a[1]",
"a",
"1",
"2",
"a[0] = (a[0] * a[0]) % mod",
"a[0]",
"a",
"0",
"(a[0] * a[0]) % mod",
"(a[0] * a[0])",
"a[0]",
"a",
"0",
"a[0]",
"a",
"0",
"mod",
"return res;",
"res",
"long... a",
"a",
"void print(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n }",
"print",
"{\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n }",
"for(Object next : o)\n {\n System.out.print(next + \" \");\n }",
"Object next",
"o",
"{\n System.out.print(next + \" \");\n }",
"{\n System.out.print(next + \" \");\n }",
"System.out.print(next + \" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"next + \" \"",
"next",
"\" \"",
"Object... o",
"o",
"void println(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n System.out.println();\n }",
"println",
"{\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n System.out.println();\n }",
"for(Object next : o)\n {\n System.out.print(next + \" \");\n }",
"Object next",
"o",
"{\n System.out.print(next + \" \");\n }",
"{\n System.out.print(next + \" \");\n }",
"System.out.print(next + \" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"next + \" \"",
"next",
"\" \"",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"Object... o",
"o",
"void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }",
"watch",
"{\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }",
"int i = 1;",
"i",
"1",
"for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }",
"Object o",
"a",
"{\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }",
"{\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }",
"boolean found = false;",
"found",
"false",
"if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }",
"o.getClass().isArray()",
"o.getClass().isArray",
"o.getClass()",
"o.getClass",
"o",
"{\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }",
"String type = o.getClass().getName().toString();",
"type",
"o.getClass().getName().toString()",
"o.getClass().getName().toString",
"o.getClass().getName()",
"o.getClass().getName",
"o.getClass()",
"o.getClass",
"o",
"switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }",
"type",
"case \"[I\":",
"\"[I\"",
"case \"[I\":",
"{\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }",
"int[] test = (int[]) o;",
"test",
"(int[]) o",
"println(i + \" : \" + Arrays.toString(test))",
"println",
"i + \" : \" + Arrays.toString(test)",
"i + \" : \" + Arrays.toString(test)",
"i",
"\" : \"",
"Arrays.toString(test)",
"Arrays.toString",
"Arrays",
"test",
"break;",
"case \"[[I\":",
"\"[[I\"",
"case \"[[I\":",
"{\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"int[][] obj = (int[][]) o;",
"obj",
"(int[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[J\":",
"\"[J\"",
"case \"[J\":",
"{\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"long[] obj = (long[]) o;",
"obj",
"(long[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[J\":",
"\"[[J\"",
"case \"[[J\":",
"{\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"long[][] obj = (long[][]) o;",
"obj",
"(long[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[D\":",
"\"[D\"",
"case \"[D\":",
"{\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"double[] obj = (double[]) o;",
"obj",
"(double[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[D\":",
"\"[[D\"",
"case \"[[D\":",
"{\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"double[][] obj = (double[][]) o;",
"obj",
"(double[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[Ljava.lang.String\":",
"\"[Ljava.lang.String\"",
"case \"[Ljava.lang.String\":",
"{\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"String[] obj = (String[]) o;",
"obj",
"(String[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[Ljava.lang.String\":",
"\"[[Ljava.lang.String\"",
"case \"[[Ljava.lang.String\":",
"{\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"String[][] obj = (String[][]) o;",
"obj",
"(String[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[C\":",
"\"[C\"",
"case \"[C\":",
"{\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"char[] obj = (char[]) o;",
"obj",
"(char[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[C\":",
"\"[[C\"",
"case \"[[C\":",
"{\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"char[][] obj = (char[][]) o;",
"obj",
"(char[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"default:",
"default:",
"{\n println(i + \" : type not identified\");\n break;\n }",
"println(i + \" : type not identified\")",
"println",
"i + \" : type not identified\"",
"i",
"\" : type not identified\"",
"break;",
"found = true",
"found",
"true",
"if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"o.getClass() == ArrayList.class",
"o.getClass()",
"o.getClass",
"o",
"ArrayList.class",
"ArrayList.class",
"{\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"println(i + \" : LIST = \" + o)",
"println",
"i + \" : LIST = \" + o",
"i + \" : LIST = \" + o",
"i",
"\" : LIST = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }",
"o.getClass() == TreeSet.class",
"o.getClass()",
"o.getClass",
"o",
"TreeSet.class",
"TreeSet.class",
"{\n println(i + \" : SET = \" + o);\n found = true;\n }",
"println(i + \" : SET = \" + o)",
"println",
"i + \" : SET = \" + o",
"i + \" : SET = \" + o",
"i",
"\" : SET = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"o.getClass() == TreeMap.class",
"o.getClass()",
"o.getClass",
"o",
"TreeMap.class",
"TreeMap.class",
"{\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"println(i + \" : MAP = \" + o)",
"println",
"i + \" : MAP = \" + o",
"i + \" : MAP = \" + o",
"i",
"\" : MAP = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"o.getClass() == HashMap.class",
"o.getClass()",
"o.getClass",
"o",
"HashMap.class",
"HashMap.class",
"{\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"println(i + \" : MAP = \" + o)",
"println",
"i + \" : MAP = \" + o",
"i + \" : MAP = \" + o",
"i",
"\" : MAP = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"o.getClass() == LinkedList.class",
"o.getClass()",
"o.getClass",
"o",
"LinkedList.class",
"LinkedList.class",
"{\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"println(i + \" : LIST = \" + o)",
"println",
"i + \" : LIST = \" + o",
"i + \" : LIST = \" + o",
"i",
"\" : LIST = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }",
"o.getClass() == PriorityQueue.class",
"o.getClass()",
"o.getClass",
"o",
"PriorityQueue.class",
"PriorityQueue.class",
"{\n println(i + \" : PQ = \" + o);\n found = true;\n }",
"println(i + \" : PQ = \" + o)",
"println",
"i + \" : PQ = \" + o",
"i + \" : PQ = \" + o",
"i",
"\" : PQ = \"",
"o",
"found = true",
"found",
"true",
"if (!found) \n {\n println(i + \" = \" + o);\n }",
"!found",
"found",
"{\n println(i + \" = \" + o);\n }",
"println(i + \" = \" + o)",
"println",
"i + \" = \" + o",
"i + \" = \" + o",
"i",
"\" = \"",
"o",
"i++",
"i",
"Object...a",
"a",
"public class Main\n{ \n static int matched(String s, String t)\n {\n int count = 0;\n char a[] = s.toCharArray();\n char b[] = t.toCharArray();\n int n = b.length;\n for(int i = 0; i < n; i++)\n {\n if(a[i] == b[i])\n count++;\n }\n return count;\n }\n public static void main(String [] args) throws Exception\n {\n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n String s = sc.next();\n String t = sc.next();\n int n = s.length();\n int n2 = t.length();\n int maxMatch = matched(s, t);\n for(int i = 0; i < n-n2; i++)\n {\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }\n p.println(n2-maxMatch);\n p.close();\n }\n\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n System.out.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"public class Main\n{ \n static int matched(String s, String t)\n {\n int count = 0;\n char a[] = s.toCharArray();\n char b[] = t.toCharArray();\n int n = b.length;\n for(int i = 0; i < n; i++)\n {\n if(a[i] == b[i])\n count++;\n }\n return count;\n }\n public static void main(String [] args) throws Exception\n {\n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n String s = sc.next();\n String t = sc.next();\n int n = s.length();\n int n2 = t.length();\n int maxMatch = matched(s, t);\n for(int i = 0; i < n-n2; i++)\n {\n t = \"?\" + t;\n maxMatch = Math.max(maxMatch, matched(s, t));\n }\n p.println(n2-maxMatch);\n p.close();\n }\n\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.out.print(next + \" \");\n }\n System.out.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"Main"
]
| import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.PI;
import static java.lang.System.in;
import static java.lang.System.out;
public class Main
{
static int matched(String s, String t)
{
int count = 0;
char a[] = s.toCharArray();
char b[] = t.toCharArray();
int n = b.length;
for(int i = 0; i < n; i++)
{
if(a[i] == b[i])
count++;
}
return count;
}
public static void main(String [] args) throws Exception
{
Foster sc = new Foster();
PrintWriter p = new PrintWriter(out);
String s = sc.next();
String t = sc.next();
int n = s.length();
int n2 = t.length();
int maxMatch = matched(s, t);
for(int i = 0; i < n-n2; i++)
{
t = "?" + t;
maxMatch = Math.max(maxMatch, matched(s, t));
}
p.println(n2-maxMatch);
p.close();
}
/*
*/
/*
1. Check overflow in pow function or in general
2. Check indices of read array function
3. Think of an easier solution because the problems you solve are always easy
4. Check iterator of loop
5. If still doesn't work, then jump from the 729th floor 'coz "beta tumse na ho paayega"
Move to top!!
*/
static class Foster
{
BufferedReader br = new BufferedReader(new InputStreamReader(in));
StringTokenizer st = new StringTokenizer("");
String next()
{
while (!st.hasMoreTokens())
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());
}
int[] intArray(int n) // Check indices
{
int arr[] = new int[n];
for(int i = 0; i < n; i++)
{
arr[i] = nextInt();
}
return arr;
}
long[] longArray(int n) // Check indices
{
long arr[] = new long[n];
for(int i = 0; i < n; i++)
{
arr[i] = nextLong();
}
return arr;
}
int[] getBits(int n) //in Reverse Order
{
int a[] = new int[31];
for(int i = 0; i < 31; i++)
{
if(((1<<i) & n) != 0)
a[i] = 1;
}
return a;
}
static long pow(long... a)
{
long mod = Long.MAX_VALUE;
if(a.length == 3) mod = a[2];
long res = 1;
while(a[1] > 0)
{
if((a[1] & 1) == 1)
res = (res * a[0]) % mod;
a[1] /= 2;
a[0] = (a[0] * a[0]) % mod;
}
return res;
}
void print(Object... o)
{
for(Object next : o)
{
System.out.print(next + " ");
}
}
void println(Object... o)
{
for(Object next : o)
{
System.out.print(next + " ");
}
System.out.println();
}
void watch(Object...a) throws Exception
{
int i = 1;
for (Object o: a)
{
boolean found = false;
if (o.getClass().isArray())
{
String type = o.getClass().getName().toString();
switch (type)
{
case "[I":
{
int[] test = (int[]) o;
println(i + " : " + Arrays.toString(test));
break;
}
case "[[I":
{
int[][] obj = (int[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[J":
{
long[] obj = (long[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[J":
{
long[][] obj = (long[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[D":
{
double[] obj = (double[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[D":
{
double[][] obj = (double[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[Ljava.lang.String":
{
String[] obj = (String[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[Ljava.lang.String":
{
String[][] obj = (String[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[C":
{
char[] obj = (char[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[C":
{
char[][] obj = (char[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
default:
{
println(i + " : type not identified");
break;
}
}
found = true;
}
if (o.getClass() == ArrayList.class)
{
println(i + " : LIST = " + o);
found = true;
}
if (o.getClass() == TreeSet.class)
{
println(i + " : SET = " + o);
found = true;
}
if (o.getClass() == TreeMap.class)
{
println(i + " : MAP = " + o);
found = true;
}
if (o.getClass() == HashMap.class)
{
println(i + " : MAP = " + o);
found = true;
}
if (o.getClass() == LinkedList.class)
{
println(i + " : LIST = " + o);
found = true;
}
if (o.getClass() == PriorityQueue.class)
{
println(i + " : PQ = " + o);
found = true;
}
if (!found)
{
println(i + " = " + o);
}
i++;
}
}
}
} |
[
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,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
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
],
[
34,
35
],
[
35,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
32,
40
],
[
25,
41
],
[
41,
42
],
[
42,
43
],
[
25,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
49,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
69,
71
],
[
65,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
64,
76
],
[
76,
77
],
[
77,
78
],
[
45,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
81,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
8,
92
],
[
92,
93
],
[
93,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
]
| [
"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.next();\n String t = sc.next();\n int res = 10000;\n for (int i = 0; i < s.length() - t.length() + 1; i++) {\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }\n System.out.println(res);\n sc.close();\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 String t = sc.next();\n int res = 10000;\n for (int i = 0; i < s.length() - t.length() + 1; i++) {\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }\n System.out.println(res);\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 String t = sc.next();\n int res = 10000;\n for (int i = 0; i < s.length() - t.length() + 1; i++) {\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }\n System.out.println(res);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n int res = 10000;\n for (int i = 0; i < s.length() - t.length() + 1; i++) {\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }\n System.out.println(res);\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",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int res = 10000;",
"res",
"10000",
"for (int i = 0; i < s.length() - t.length() + 1; i++) {\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < s.length() - t.length() + 1",
"i",
"s.length() - t.length() + 1",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }",
"{\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }",
"int c = 0;",
"c",
"0",
"for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }",
"{\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }",
"if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }",
"s.charAt(i + j) != t.charAt(j)",
"s.charAt(i + j)",
"s.charAt",
"s",
"i + j",
"i",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n c++;\n }",
"c++",
"c",
"res = Math.min(res, c)",
"res",
"Math.min(res, c)",
"Math.min",
"Math",
"res",
"c",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"sc.close()",
"sc.close",
"sc",
"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 String t = sc.next();\n int res = 10000;\n for (int i = 0; i < s.length() - t.length() + 1; i++) {\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }\n System.out.println(res);\n sc.close();\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 String t = sc.next();\n int res = 10000;\n for (int i = 0; i < s.length() - t.length() + 1; i++) {\n int c = 0;\n for (int j = 0; j < t.length(); j++) {\n if (s.charAt(i + j) != t.charAt(j)) {\n c++;\n }\n }\n res = Math.min(res, c);\n }\n System.out.println(res);\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();
String t = sc.next();
int res = 10000;
for (int i = 0; i < s.length() - t.length() + 1; i++) {
int c = 0;
for (int j = 0; j < t.length(); j++) {
if (s.charAt(i + j) != t.charAt(j)) {
c++;
}
}
res = Math.min(res, c);
}
System.out.println(res);
sc.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
4,
18,
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
],
[
198,
8
],
[
198,
9
],
[
9,
10
],
[
198,
11
],
[
11,
12
],
[
11,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
13,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
13,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
13,
30
],
[
30,
31
],
[
30,
32
],
[
13,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
13,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
38,
52
],
[
52,
53
],
[
53,
54
],
[
38,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
57,
67
],
[
67,
68
],
[
68,
69
],
[
57,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
77,
79
],
[
73,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
72,
84
],
[
72,
85
],
[
85,
86
],
[
86,
87
],
[
56,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
90,
94
],
[
56,
95
],
[
95,
96
],
[
95,
97
],
[
13,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
13,
104
],
[
104,
105
],
[
105,
106
],
[
11,
107
],
[
107,
108
],
[
198,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
109,
113
],
[
113,
114
],
[
109,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
109,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
124,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
134,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
123,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
109,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
156,
157
],
[
109,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
162,
165
],
[
165,
166
],
[
109,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
171,
174
],
[
174,
175
],
[
109,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
182,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
178,
195
],
[
195,
196
],
[
0,
197
],
[
197,
198
],
[
197,
199
]
]
| [
"import java.io.*;\nimport java.util.*;\n\n\npublic class Main{\n\t\n\tpublic static void main(String[] args){\n\t\n\tMyScanner sc = new MyScanner();\n\tout = new PrintWriter(new BufferedOutputStream(System.out));\n\t\n\t/**/\n\n\tString s = sc.next();\n\tString t = sc.next();\n\tint counter = 0;\n\tint min = t.length();\n\t\n\tfor(int i = 0; i <= s.length() - t.length(); i++){\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}\n\t\n\tSystem.out.println(min);\n\t\n\t/**/\n\t \n\t out.close();\t\n\t}\n\t\n\t\n\t\n\tpublic static PrintWriter out;\n\t\n\tpublic static class MyScanner{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\t\t\n\t\tpublic MyScanner(){\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tString 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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\t\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\n\tMyScanner sc = new MyScanner();\n\tout = new PrintWriter(new BufferedOutputStream(System.out));\n\t\n\t/**/\n\n\tString s = sc.next();\n\tString t = sc.next();\n\tint counter = 0;\n\tint min = t.length();\n\t\n\tfor(int i = 0; i <= s.length() - t.length(); i++){\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}\n\t\n\tSystem.out.println(min);\n\t\n\t/**/\n\t \n\t out.close();\t\n\t}\n\t\n\t\n\t\n\tpublic static PrintWriter out;\n\t\n\tpublic static class MyScanner{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\t\t\n\t\tpublic MyScanner(){\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tString 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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\t\n}",
"Main",
"public static PrintWriter out;",
"out",
"public static void main(String[] args){\n\t\n\tMyScanner sc = new MyScanner();\n\tout = new PrintWriter(new BufferedOutputStream(System.out));\n\t\n\t/**/\n\n\tString s = sc.next();\n\tString t = sc.next();\n\tint counter = 0;\n\tint min = t.length();\n\t\n\tfor(int i = 0; i <= s.length() - t.length(); i++){\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}\n\t\n\tSystem.out.println(min);\n\t\n\t/**/\n\t \n\t out.close();\t\n\t}",
"main",
"{\n\t\n\tMyScanner sc = new MyScanner();\n\tout = new PrintWriter(new BufferedOutputStream(System.out));\n\t\n\t/**/\n\n\tString s = sc.next();\n\tString t = sc.next();\n\tint counter = 0;\n\tint min = t.length();\n\t\n\tfor(int i = 0; i <= s.length() - t.length(); i++){\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}\n\t\n\tSystem.out.println(min);\n\t\n\t/**/\n\t \n\t out.close();\t\n\t}",
"MyScanner sc = new MyScanner();",
"sc",
"new MyScanner()",
"out = new PrintWriter(new BufferedOutputStream(System.out))",
"out",
"new PrintWriter(new BufferedOutputStream(System.out))",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"int counter = 0;",
"counter",
"0",
"int min = t.length();",
"min",
"t.length()",
"t.length",
"t",
"for(int i = 0; i <= s.length() - t.length(); i++){\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}",
"{\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}",
"for(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}",
"int i2 = 0;",
"int i2 = 0;",
"i2",
"0",
"i2 < t.length()",
"i2",
"t.length()",
"t.length",
"t",
"i2++",
"i2++",
"i2",
"{\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}",
"if(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}",
"s.charAt(i + i2) == t.charAt(i2)",
"s.charAt(i + i2)",
"s.charAt",
"s",
"i + i2",
"i",
"i2",
"t.charAt(i2)",
"t.charAt",
"t",
"i2",
"{\n\t\t\t\t\n\t\t\t}",
"{\n\t\t\t\tcounter++;\n\t\t\t}",
"counter++",
"counter",
"min = Math.min(counter, min)",
"min",
"Math.min(counter, min)",
"Math.min",
"Math",
"counter",
"min",
"counter = 0",
"counter",
"0",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public static class MyScanner{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\t\t\n\t\tpublic MyScanner(){\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tString 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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }",
"MyScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public MyScanner(){\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"MyScanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new 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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }",
"nextLine",
"{\n String str = \"\";\n\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }",
"catch (IOException e) {\n\t e.printStackTrace();\n\t }",
"IOException e",
"{\n\t e.printStackTrace();\n\t }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t str = br.readLine();\n\t }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\n\tMyScanner sc = new MyScanner();\n\tout = new PrintWriter(new BufferedOutputStream(System.out));\n\t\n\t/**/\n\n\tString s = sc.next();\n\tString t = sc.next();\n\tint counter = 0;\n\tint min = t.length();\n\t\n\tfor(int i = 0; i <= s.length() - t.length(); i++){\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}\n\t\n\tSystem.out.println(min);\n\t\n\t/**/\n\t \n\t out.close();\t\n\t}\n\t\n\t\n\t\n\tpublic static PrintWriter out;\n\t\n\tpublic static class MyScanner{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\t\t\n\t\tpublic MyScanner(){\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tString 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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\t\n}",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\n\tMyScanner sc = new MyScanner();\n\tout = new PrintWriter(new BufferedOutputStream(System.out));\n\t\n\t/**/\n\n\tString s = sc.next();\n\tString t = sc.next();\n\tint counter = 0;\n\tint min = t.length();\n\t\n\tfor(int i = 0; i <= s.length() - t.length(); i++){\n\t\t\n\t\tfor(int i2 = 0; i2 < t.length(); i2++){\n\t\t\t\n\t\t\tif(s.charAt(i + i2) == t.charAt(i2)){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\tmin = Math.min(counter, min);\n\t\tcounter = 0;\n\t}\n\t\n\tSystem.out.println(min);\n\t\n\t/**/\n\t \n\t out.close();\t\n\t}\n\t\n\t\n\t\n\tpublic static PrintWriter out;\n\t\n\tpublic static class MyScanner{\n\t\t\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\t\t\n\t\tpublic MyScanner(){\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\t\t\n\t\tString 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\t try {\n\t str = br.readLine();\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t return str;\n }\n\n }\n\t\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args){
MyScanner sc = new MyScanner();
out = new PrintWriter(new BufferedOutputStream(System.out));
/**/
String s = sc.next();
String t = sc.next();
int counter = 0;
int min = t.length();
for(int i = 0; i <= s.length() - t.length(); i++){
for(int i2 = 0; i2 < t.length(); i2++){
if(s.charAt(i + i2) == t.charAt(i2)){
}else{
counter++;
}
}
min = Math.min(counter, min);
counter = 0;
}
System.out.println(min);
/**/
out.close();
}
public static PrintWriter out;
public static class MyScanner{
BufferedReader br;
StringTokenizer st;
public MyScanner(){
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,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
17,
41,
13,
17,
42,
2,
13,
4,
18,
13,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
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
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
27,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
45,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
52,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
60,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
59,
71
],
[
71,
72
],
[
72,
73
],
[
58,
74
],
[
74,
75
],
[
45,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
]
| [
"import java.util.Scanner;\n\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tint minChanges = Integer.MAX_VALUE;\n\t\tfor(int i = 0 ; i <= S.length() - T.length(); i++) {\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}\n\t\tSystem.out.println(minChanges);\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\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tint minChanges = Integer.MAX_VALUE;\n\t\tfor(int i = 0 ; i <= S.length() - T.length(); i++) {\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}\n\t\tSystem.out.println(minChanges);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tint minChanges = Integer.MAX_VALUE;\n\t\tfor(int i = 0 ; i <= S.length() - T.length(); i++) {\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}\n\t\tSystem.out.println(minChanges);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tint minChanges = Integer.MAX_VALUE;\n\t\tfor(int i = 0 ; i <= S.length() - T.length(); i++) {\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}\n\t\tSystem.out.println(minChanges);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"int minChanges = Integer.MAX_VALUE;",
"minChanges",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i = 0 ; i <= S.length() - T.length(); i++) {\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i <= S.length() - T.length()",
"i",
"S.length() - T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"i++",
"i++",
"i",
"{\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}",
"{\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}",
"int iter = 0;",
"iter",
"0",
"int temp = 0;",
"temp",
"0",
"while(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}",
"iter < T.length()",
"iter",
"T.length()",
"T.length",
"T",
"{\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}",
"if(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}",
"S.charAt(i+iter) != T.charAt(iter)",
"S.charAt(i+iter)",
"S.charAt",
"S",
"i+iter",
"i",
"iter",
"T.charAt(iter)",
"T.charAt",
"T",
"iter",
"{\n\t\t\t\t\ttemp++;\n\t\t\t\t}",
"temp++",
"temp",
"iter++",
"iter",
"minChanges = Math.min(temp, minChanges)",
"minChanges",
"Math.min(temp, minChanges)",
"Math.min",
"Math",
"temp",
"minChanges",
"System.out.println(minChanges)",
"System.out.println",
"System.out",
"System",
"System.out",
"minChanges",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tint minChanges = Integer.MAX_VALUE;\n\t\tfor(int i = 0 ; i <= S.length() - T.length(); i++) {\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}\n\t\tSystem.out.println(minChanges);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString S = sc.next();\n\t\tString T = sc.next();\n\t\tint minChanges = Integer.MAX_VALUE;\n\t\tfor(int i = 0 ; i <= S.length() - T.length(); i++) {\n\t\t\tint iter = 0;\n\t\t\tint temp = 0;\n\t\t\twhile(iter < T.length()) {\n\t\t\t\tif(S.charAt(i+iter) != T.charAt(iter)) {\n\t\t\t\t\ttemp++;\n\t\t\t\t}\n\t\t\t\titer++;\n\t\t\t}\n\t\t\tminChanges = Math.min(temp, minChanges);\n\t\t}\n\t\tSystem.out.println(minChanges);\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 T = sc.next();
int minChanges = Integer.MAX_VALUE;
for(int i = 0 ; i <= S.length() - T.length(); i++) {
int iter = 0;
int temp = 0;
while(iter < T.length()) {
if(S.charAt(i+iter) != T.charAt(iter)) {
temp++;
}
iter++;
}
minChanges = Math.min(temp, minChanges);
}
System.out.println(minChanges);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
4,
18,
18,
13,
13,
18,
13,
13,
40,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
136,
8
],
[
136,
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
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
36,
40
],
[
40,
41
],
[
41,
42
],
[
35,
43
],
[
28,
44
],
[
44,
45
],
[
45,
46
],
[
28,
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
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
62,
65
],
[
48,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
11,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
78,
82
],
[
9,
83
],
[
83,
84
],
[
136,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
87,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
87,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
103,
113
],
[
113,
114
],
[
114,
115
],
[
103,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
118,
127
],
[
127,
128
],
[
87,
129
],
[
129,
130
],
[
85,
131
],
[
131,
132
],
[
85,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n String subArray[] = sub.split(\"\");\n String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n String subArray[] = sub.split(\"\");\n String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int m_x = 0;",
"m_x",
"0",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()-t.length()+1",
"i",
"s.length()-t.length()+1",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"1",
"i++",
"i++",
"i",
"{\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }",
"{\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }",
"String sub = s.substring(i,i+t.length());",
"sub",
"s.substring(i,i+t.length())",
"s.substring",
"s",
"i",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"int c = monmo(sub,t);",
"c",
"monmo(sub,t)",
"monmo",
"sub",
"t",
"if(m_x < c)m_x = c;",
"m_x < c",
"m_x",
"c",
"m_x = c",
"m_x",
"c",
"System.out.println(t.length()-m_x)",
"System.out.println",
"System.out",
"System",
"System.out",
"t.length()-m_x",
"t.length()",
"t.length",
"t",
"m_x",
"String[] args",
"args",
"static int monmo(String sub,String t){\n int count=0;\n String subArray[] = sub.split(\"\");\n String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }\n \n return count;\n }",
"monmo",
"{\n int count=0;\n String subArray[] = sub.split(\"\");\n String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }\n \n return count;\n }",
"int count=0;",
"count",
"0",
"String subArray[] = sub.split(\"\");",
"subArray",
"sub.split(\"\")",
"sub.split",
"sub",
"\"\"",
"String tArray[] = t.split(\"\");",
"tArray",
"t.split(\"\")",
"t.split",
"t",
"\"\"",
"for(int i=0;i<t.length();i++){\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<t.length()",
"i",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }",
"{\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }",
"if(subArray[i].equals(tArray[i]))count++;",
"subArray[i].equals(tArray[i])",
"subArray[i].equals",
"subArray[i]",
"subArray",
"i",
"tArray[i]",
"tArray",
"i",
"count++",
"count",
"return count;",
"count",
"String sub",
"sub",
"String t",
"t",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n String subArray[] = sub.split(\"\");\n String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int m_x = 0;\n String s = sc.next();\n String t = sc.next();\n \n for(int i=0;i<s.length()-t.length()+1;i++){\n String sub = s.substring(i,i+t.length());\n int c = monmo(sub,t);\n if(m_x < c)m_x = c;\n }\n \n System.out.println(t.length()-m_x);\n }\n \n static int monmo(String sub,String t){\n int count=0;\n String subArray[] = sub.split(\"\");\n String tArray[] = t.split(\"\");\n for(int i=0;i<t.length();i++){\n //char subA = sub.charAt(i);\n //char tA = t.charAt(i);\n if(subArray[i].equals(tArray[i]))count++;\n //if(subA == tA)count++;\n }\n \n return count;\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int m_x = 0;
String s = sc.next();
String t = sc.next();
for(int i=0;i<s.length()-t.length()+1;i++){
String sub = s.substring(i,i+t.length());
int c = monmo(sub,t);
if(m_x < c)m_x = c;
}
System.out.println(t.length()-m_x);
}
static int monmo(String sub,String t){
int count=0;
String subArray[] = sub.split("");
String tArray[] = t.split("");
for(int i=0;i<t.length();i++){
//char subA = sub.charAt(i);
//char tA = t.charAt(i);
if(subArray[i].equals(tArray[i]))count++;
//if(subA == tA)count++;
}
return count;
}
}
|
[
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,
6,
13,
41,
13,
17,
41,
13,
2,
17,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
4,
18,
13,
4,
18,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
2,
13,
13,
4,
18,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
20,
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
],
[
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
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
34,
44
],
[
44,
45
],
[
44,
46
],
[
34,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
49,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
49,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
49,
66
],
[
66,
67
],
[
66,
68
],
[
49,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
76,
84
],
[
69,
85
],
[
85,
86
],
[
86,
87
],
[
69,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
93,
103
],
[
103,
104
],
[
104,
105
],
[
93,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
113,
114
],
[
113,
115
],
[
109,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
108,
120
],
[
120,
121
],
[
89,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
124,
128
],
[
49,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
34,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
135,
139
],
[
139,
140
]
]
| [
"import java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.Iterator;\nimport java.util.List;\nimport java.util.Map.Entry;\nimport java.util.PriorityQueue;\nimport java.util.Scanner;\n\nclass Main {\n static final int MOD = 1000000007;\n static final int INF = 1 << 30;\n static final int ALF = 26;\n\n Main() {\n Scanner sc = new Scanner(System.in);\n long ans = 0;\n String S = sc.next();\n String T = sc.next();\n int min = INF;\n for(int i=0;i<S.length()-T.length()+1;i++){\n int cnt = 0;\n for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }\n min = Math.min(min,cnt);\n }\n System.out.println(min);\n }\n\n public static void main(String[] args) {\n new Main();\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Comparator;",
"Comparator",
"java.util",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Iterator;",
"Iterator",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Map.Entry;",
"Entry",
"java.util.Map",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n static final int MOD = 1000000007;\n static final int INF = 1 << 30;\n static final int ALF = 26;\n\n Main() {\n Scanner sc = new Scanner(System.in);\n long ans = 0;\n String S = sc.next();\n String T = sc.next();\n int min = INF;\n for(int i=0;i<S.length()-T.length()+1;i++){\n int cnt = 0;\n for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }\n min = Math.min(min,cnt);\n }\n System.out.println(min);\n }\n\n public static void main(String[] args) {\n new Main();\n }\n}",
"Main",
"static final int MOD = 1000000007;",
"MOD",
"1000000007",
"static final int INF = 1 << 30;",
"INF",
"1 << 30",
"1",
"30",
"static final int ALF = 26;",
"ALF",
"26",
"Main() {\n Scanner sc = new Scanner(System.in);\n long ans = 0;\n String S = sc.next();\n String T = sc.next();\n int min = INF;\n for(int i=0;i<S.length()-T.length()+1;i++){\n int cnt = 0;\n for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }\n min = Math.min(min,cnt);\n }\n System.out.println(min);\n }",
"Main",
"{\n Scanner sc = new Scanner(System.in);\n long ans = 0;\n String S = sc.next();\n String T = sc.next();\n int min = INF;\n for(int i=0;i<S.length()-T.length()+1;i++){\n int cnt = 0;\n for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }\n min = Math.min(min,cnt);\n }\n System.out.println(min);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long ans = 0;",
"ans",
"0",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"int min = INF;",
"min",
"INF",
"for(int i=0;i<S.length()-T.length()+1;i++){\n int cnt = 0;\n for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }\n min = Math.min(min,cnt);\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<S.length()-T.length()+1",
"i",
"S.length()-T.length()+1",
"S.length()-T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"1",
"i++",
"i++",
"i",
"{\n int cnt = 0;\n for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }\n min = Math.min(min,cnt);\n }",
"{\n int cnt = 0;\n for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }\n min = Math.min(min,cnt);\n }",
"int cnt = 0;",
"cnt",
"0",
"for(int j=0;j<T.length();j++){\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<T.length()",
"j",
"T.length()",
"T.length",
"T",
"j++",
"j++",
"j",
"{\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }",
"{\n if(S.charAt(i+j)!=T.charAt(j))cnt++;\n }",
"if(S.charAt(i+j)!=T.charAt(j))cnt++;",
"S.charAt(i+j)!=T.charAt(j)",
"S.charAt(i+j)",
"S.charAt",
"S",
"i+j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"cnt++",
"cnt",
"min = Math.min(min,cnt)",
"min",
"Math.min(min,cnt)",
"Math.min",
"Math",
"min",
"cnt",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"public static void main(String[] args) {\n new Main();\n }",
"main",
"{\n new Main();\n }",
"new Main()",
"String[] args",
"args"
]
| import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import java.util.PriorityQueue;
import java.util.Scanner;
class Main {
static final int MOD = 1000000007;
static final int INF = 1 << 30;
static final int ALF = 26;
Main() {
Scanner sc = new Scanner(System.in);
long ans = 0;
String S = sc.next();
String T = sc.next();
int min = INF;
for(int i=0;i<S.length()-T.length()+1;i++){
int cnt = 0;
for(int j=0;j<T.length();j++){
if(S.charAt(i+j)!=T.charAt(j))cnt++;
}
min = Math.min(min,cnt);
}
System.out.println(min);
}
public static void main(String[] args) {
new Main();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
0,
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,
13,
40,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
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
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
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
],
[
60,
62
],
[
48,
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
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
79,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
78,
88
],
[
88,
89
],
[
48,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
8,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
6,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tString ss = s.nextLine();\n\t\tString t = s.nextLine();\n\t\t\n\t\tint minS = Integer.MAX_VALUE;\n\t\tint tmpS = 0;\n\t\t\n\t\tfor(int i = 0; i + t.length() <= ss.length(); i++) {\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(minS);\n\t\t\n\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 Auto-generated method stub\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tString ss = s.nextLine();\n\t\tString t = s.nextLine();\n\t\t\n\t\tint minS = Integer.MAX_VALUE;\n\t\tint tmpS = 0;\n\t\t\n\t\tfor(int i = 0; i + t.length() <= ss.length(); i++) {\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(minS);\n\t\t\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tString ss = s.nextLine();\n\t\tString t = s.nextLine();\n\t\t\n\t\tint minS = Integer.MAX_VALUE;\n\t\tint tmpS = 0;\n\t\t\n\t\tfor(int i = 0; i + t.length() <= ss.length(); i++) {\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(minS);\n\t\t\n\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tString ss = s.nextLine();\n\t\tString t = s.nextLine();\n\t\t\n\t\tint minS = Integer.MAX_VALUE;\n\t\tint tmpS = 0;\n\t\t\n\t\tfor(int i = 0; i + t.length() <= ss.length(); i++) {\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(minS);\n\t\t\n\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"String ss = s.nextLine();",
"ss",
"s.nextLine()",
"s.nextLine",
"s",
"String t = s.nextLine();",
"t",
"s.nextLine()",
"s.nextLine",
"s",
"int minS = Integer.MAX_VALUE;",
"minS",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"int tmpS = 0;",
"tmpS",
"0",
"for(int i = 0; i + t.length() <= ss.length(); i++) {\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + t.length() <= ss.length()",
"i + t.length()",
"i",
"t.length()",
"t.length",
"t",
"ss.length()",
"ss.length",
"ss",
"i++",
"i++",
"i",
"{\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}",
"String tmp = ss.substring(i, i + t.length());",
"tmp",
"ss.substring(i, i + t.length())",
"ss.substring",
"ss",
"i",
"i + t.length()",
"i",
"t.length()",
"t.length",
"t",
"tmpS = 0",
"tmpS",
"0",
"for(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < tmp.length()",
"j",
"tmp.length()",
"tmp.length",
"tmp",
"j++",
"j++",
"j",
"{\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}",
"if(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;",
"tmp.charAt(j) != t.charAt(j)",
"tmp.charAt(j)",
"tmp.charAt",
"tmp",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"tmpS++",
"tmpS",
"if(tmpS < minS)\n\t\t\t\tminS = tmpS;",
"tmpS < minS",
"tmpS",
"minS",
"minS = tmpS",
"minS",
"tmpS",
"System.out.println(minS)",
"System.out.println",
"System.out",
"System",
"System.out",
"minS",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tString ss = s.nextLine();\n\t\tString t = s.nextLine();\n\t\t\n\t\tint minS = Integer.MAX_VALUE;\n\t\tint tmpS = 0;\n\t\t\n\t\tfor(int i = 0; i + t.length() <= ss.length(); i++) {\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(minS);\n\t\t\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\tScanner s = new Scanner(System.in);\n\t\t\n\t\tString ss = s.nextLine();\n\t\tString t = s.nextLine();\n\t\t\n\t\tint minS = Integer.MAX_VALUE;\n\t\tint tmpS = 0;\n\t\t\n\t\tfor(int i = 0; i + t.length() <= ss.length(); i++) {\n\t\t\t\n\t\t\tString tmp = ss.substring(i, i + t.length());\n\t\t\ttmpS = 0;\n\t\t\t\n\t\t\tfor(int j = 0; j < tmp.length(); j++) {\n\t\t\t\t\n\t\t\t\tif(tmp.charAt(j) != t.charAt(j))\n\t\t\t\t\ttmpS++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(tmpS < minS)\n\t\t\t\tminS = tmpS;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(minS);\n\t\t\n\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s = new Scanner(System.in);
String ss = s.nextLine();
String t = s.nextLine();
int minS = Integer.MAX_VALUE;
int tmpS = 0;
for(int i = 0; i + t.length() <= ss.length(); i++) {
String tmp = ss.substring(i, i + t.length());
tmpS = 0;
for(int j = 0; j < tmp.length(); j++) {
if(tmp.charAt(j) != t.charAt(j))
tmpS++;
}
if(tmpS < minS)
minS = tmpS;
}
System.out.println(minS);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
41,
13,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
2,
13,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
13,
18,
13,
13,
40,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
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
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
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
],
[
49,
51
],
[
48,
52
],
[
41,
53
],
[
53,
54
],
[
54,
55
],
[
41,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
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
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
75,
81
],
[
81,
82
],
[
81,
83
],
[
74,
84
],
[
84,
85
],
[
57,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
8,
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.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n int slen = s.length;\n char[] t = sc.next().toCharArray();\n int tlen = t.length;\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < slen-tlen+1; i++) {\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n int slen = s.length;\n char[] t = sc.next().toCharArray();\n int tlen = t.length;\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < slen-tlen+1; i++) {\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n int slen = s.length;\n char[] t = sc.next().toCharArray();\n int tlen = t.length;\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < slen-tlen+1; i++) {\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }\n System.out.println(ans);\n sc.close();\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n int slen = s.length;\n char[] t = sc.next().toCharArray();\n int tlen = t.length;\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < slen-tlen+1; i++) {\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }\n System.out.println(ans);\n sc.close();\n\n }",
"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",
"int slen = s.length;",
"slen",
"s.length",
"s",
"s.length",
"char[] t = sc.next().toCharArray();",
"t",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"int tlen = t.length;",
"tlen",
"t.length",
"t",
"t.length",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for (int i = 0; i < slen-tlen+1; i++) {\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < slen-tlen+1",
"i",
"slen-tlen+1",
"slen-tlen",
"slen",
"tlen",
"1",
"i++",
"i++",
"i",
"{\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }",
"{\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }",
"int cnt = 0;",
"cnt",
"0",
"for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < tlen",
"j",
"tlen",
"j++",
"j++",
"j",
"{\n if(s[i+j] != t[j]) cnt++;\n }",
"{\n if(s[i+j] != t[j]) cnt++;\n }",
"if(s[i+j] != t[j]) cnt++;",
"s[i+j] != t[j]",
"s[i+j]",
"s",
"i+j",
"i",
"j",
"t[j]",
"t",
"j",
"cnt++",
"cnt",
"if(cnt < ans) ans = cnt;",
"cnt < ans",
"cnt",
"ans",
"ans = cnt",
"ans",
"cnt",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n int slen = s.length;\n char[] t = sc.next().toCharArray();\n int tlen = t.length;\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < slen-tlen+1; i++) {\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n char[] s = sc.next().toCharArray();\n int slen = s.length;\n char[] t = sc.next().toCharArray();\n int tlen = t.length;\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i < slen-tlen+1; i++) {\n int cnt = 0;\n for (int j = 0; j < tlen; j++) {\n if(s[i+j] != t[j]) cnt++;\n }\n if(cnt < ans) ans = cnt;\n }\n System.out.println(ans);\n sc.close();\n\n }\n\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
char[] s = sc.next().toCharArray();
int slen = s.length;
char[] t = sc.next().toCharArray();
int tlen = t.length;
int ans = Integer.MAX_VALUE;
for (int i = 0; i < slen-tlen+1; i++) {
int cnt = 0;
for (int j = 0; j < tlen; j++) {
if(s[i+j] != t[j]) cnt++;
}
if(cnt < ans) ans = cnt;
}
System.out.println(ans);
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
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,
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,
13,
40,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
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,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
40,
13,
14,
2,
13,
17,
30,
0,
13,
13,
30,
41,
13,
13,
42,
2,
18,
13,
13,
17,
30,
0,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
13,
42,
2,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
18,
13,
13,
17,
0,
13,
18,
13,
13,
4,
18,
18,
13,
13,
18,
13,
13,
12,
13,
30,
4,
18,
18,
13,
13,
2,
2,
13,
13,
17,
41,
13,
13,
42,
2,
2,
18,
13,
13,
17,
2,
40,
13,
17,
30,
0,
13,
18,
13,
13,
0,
18,
13,
13,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
391,
20
],
[
391,
21
],
[
21,
22
],
[
21,
23
],
[
391,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
26,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
42,
44
],
[
26,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
45,
59
],
[
59,
60
],
[
60,
61
],
[
45,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
63,
75
],
[
75,
76
],
[
75,
77
],
[
63,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
78,
88
],
[
88,
89
],
[
89,
90
],
[
78,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
94,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
93,
103
],
[
103,
104
],
[
63,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
26,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
24,
118
],
[
118,
119
],
[
391,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
122,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
128,
139
],
[
140,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
140,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
140,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
156,
157
],
[
156,
158
],
[
140,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
122,
164
],
[
164,
165
],
[
165,
166
],
[
164,
167
],
[
120,
168
],
[
168,
169
],
[
391,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
172,
174
],
[
170,
175
],
[
175,
176
],
[
175,
177
],
[
170,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
181,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
186,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
180,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
170,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
205,
208
],
[
208,
209
],
[
170,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
212,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
217,
222
],
[
222,
223
],
[
222,
224
],
[
217,
225
],
[
225,
226
],
[
226,
227
],
[
217,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
233,
234
],
[
212,
235
],
[
235,
236
],
[
210,
237
],
[
237,
238
],
[
170,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
243,
246
],
[
246,
247
],
[
0,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
248,
252
],
[
252,
253
],
[
248,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
261
],
[
254,
262
],
[
262,
263
],
[
0,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
264,
268
],
[
268,
269
],
[
268,
270
],
[
264,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
273,
277
],
[
277,
278
],
[
273,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
283,
284
],
[
284,
285
],
[
284,
286
],
[
279,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
292,
296
],
[
291,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
300,
302
],
[
287,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
271,
308
],
[
308,
309
],
[
264,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
312,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
317,
321
],
[
316,
322
],
[
322,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
323,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
322,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
335,
337
],
[
312,
338
],
[
338,
339
],
[
339,
340
],
[
340,
341
],
[
340,
342
],
[
338,
343
],
[
343,
344
],
[
343,
345
],
[
264,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
349,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
354,
358
],
[
348,
359
],
[
359,
360
],
[
359,
361
],
[
348,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
365,
366
],
[
365,
367
],
[
364,
368
],
[
363,
369
],
[
369,
370
],
[
370,
371
],
[
369,
372
],
[
362,
373
],
[
373,
374
],
[
374,
375
],
[
374,
376
],
[
376,
377
],
[
376,
378
],
[
348,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
379,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
383,
387
],
[
346,
388
],
[
388,
389
],
[
0,
390
],
[
390,
391
],
[
390,
392
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.Random;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs=new FastScanner();\n\t\tString s = fs.next();\n\t\tString t = fs.next();\n\t\tint min = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i = 0;i<=s.length()-t.length();i++) {\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(min);\n\t\t\n\t\t\n\t\t\n\t}\n\t\n\t\n\n\tstatic final Random random=new Random();\n\t\n\tstatic void ruffleSort(int[] a) {\n\t\tint n=a.length;//shuffle, then sort \n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}\n\n\nclass node{\n\tint data;\n\tnode next;\n\n\tnode(int data){\n\t\tthis.data=data;\n\t}\n}\n\nclass Methods{\n\tnode head;\n\tint size =0 ;\n\tvoid insert(int data) {\n\t\tnode n = new node(data);\n\t\tsize++;\n\t\tif(head==null) {\n\t\t\thead= n;\n\t\t}\n\t\telse {\n\t\t\tnode k = head;\n\t\t\twhile(k.next!=null) {\n\t\t\t\tk=k.next;\n\t\t\t}\n\t\t\t\n\t\t\tk.next=n;\n\t\t}\n\t\t\n\t}\n\n\tvoid print() {\n\t\tnode n = head;\n\t\twhile(n.next!=null) {\n\t\t\tSystem.out.print(n.data+\" \");\n\t\t\tn=n.next;\n\t\t}\n\t\tSystem.out.println(n.data);\n\t\t\n\t}\n\t\n\tvoid isLoop(int x) {\n\t\t\n\t\tSystem.out.println(size - x +1);\n\t\t\n\t\tnode n = head;\n\t\t\n\t\twhile(n.next!=null && x-->2 ) {\n\t\t\tn=n.next;\n\t\t}\n\t\t\n\t\tn.next=n.next.next;\n\t\t\n\t}\n\t\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",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Random;",
"Random",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs=new FastScanner();\n\t\tString s = fs.next();\n\t\tString t = fs.next();\n\t\tint min = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i = 0;i<=s.length()-t.length();i++) {\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(min);\n\t\t\n\t\t\n\t\t\n\t}\n\t\n\t\n\n\tstatic final Random random=new Random();\n\t\n\tstatic void ruffleSort(int[] a) {\n\t\tint n=a.length;//shuffle, then sort \n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}",
"Main",
"static final Random random=new Random();",
"random",
"new Random()",
"public static void main(String[] args) {\n\t\tFastScanner fs=new FastScanner();\n\t\tString s = fs.next();\n\t\tString t = fs.next();\n\t\tint min = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i = 0;i<=s.length()-t.length();i++) {\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(min);\n\t\t\n\t\t\n\t\t\n\t}",
"main",
"{\n\t\tFastScanner fs=new FastScanner();\n\t\tString s = fs.next();\n\t\tString t = fs.next();\n\t\tint min = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i = 0;i<=s.length()-t.length();i++) {\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(min);\n\t\t\n\t\t\n\t\t\n\t}",
"FastScanner fs=new FastScanner();",
"fs",
"new FastScanner()",
"String s = fs.next();",
"s",
"fs.next()",
"fs.next",
"fs",
"String t = fs.next();",
"t",
"fs.next()",
"fs.next",
"fs",
"int min = Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for(int i = 0;i<=s.length()-t.length();i++) {\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<=s.length()-t.length()",
"i",
"s.length()-t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}",
"{\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}",
"String k = s.substring(i,i+t.length());",
"k",
"s.substring(i,i+t.length())",
"s.substring",
"s",
"i",
"i+t.length()",
"i",
"t.length()",
"t.length",
"t",
"int count =0;",
"count",
"0",
"for(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}",
"int j =0 ;",
"int j =0 ;",
"j",
"0",
"j<t.length()",
"j",
"t.length()",
"t.length",
"t",
"j++",
"j++",
"j",
"{\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}",
"{\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}",
"if(t.charAt(j)!=k.charAt(j)) count++;",
"t.charAt(j)!=k.charAt(j)",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"k.charAt(j)",
"k.charAt",
"k",
"j",
"count++",
"count",
"if(min>count) min = count;",
"min>count",
"min",
"count",
"min = count",
"min",
"count",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"String[] args",
"args",
"static void ruffleSort(int[] a) {\n\t\tint n=a.length;//shuffle, then sort \n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}",
"ruffleSort",
"{\n\t\tint n=a.length;//shuffle, then sort \n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}",
"int n=a.length;",
"n",
"a.length",
"a",
"a.length",
"for (int i=0; i<n; i++) {\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}",
"{\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}",
"int oi=random.nextInt(n)",
"oi",
"random.nextInt(n)",
"random.nextInt",
"random",
"n",
"temp=a[oi];",
"temp",
"a[oi]",
"a",
"oi",
"a[oi]=a[i]",
"a[oi]",
"a",
"oi",
"a[i]",
"a",
"i",
"a[i]=temp",
"a[i]",
"a",
"i",
"temp",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int[] a",
"a",
"static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"class node{\n\tint data;\n\tnode next;\n\n\tnode(int data){\n\t\tthis.data=data;\n\t}\n}",
"node",
"int data;",
"data",
"node next;",
"next",
"node(int data){\n\t\tthis.data=data;\n\t}",
"node",
"{\n\t\tthis.data=data;\n\t}",
"this.data=data",
"this.data",
"this",
"this.data",
"data",
"int data",
"data",
"class Methods{\n\tnode head;\n\tint size =0 ;\n\tvoid insert(int data) {\n\t\tnode n = new node(data);\n\t\tsize++;\n\t\tif(head==null) {\n\t\t\thead= n;\n\t\t}\n\t\telse {\n\t\t\tnode k = head;\n\t\t\twhile(k.next!=null) {\n\t\t\t\tk=k.next;\n\t\t\t}\n\t\t\t\n\t\t\tk.next=n;\n\t\t}\n\t\t\n\t}\n\n\tvoid print() {\n\t\tnode n = head;\n\t\twhile(n.next!=null) {\n\t\t\tSystem.out.print(n.data+\" \");\n\t\t\tn=n.next;\n\t\t}\n\t\tSystem.out.println(n.data);\n\t\t\n\t}\n\t\n\tvoid isLoop(int x) {\n\t\t\n\t\tSystem.out.println(size - x +1);\n\t\t\n\t\tnode n = head;\n\t\t\n\t\twhile(n.next!=null && x-->2 ) {\n\t\t\tn=n.next;\n\t\t}\n\t\t\n\t\tn.next=n.next.next;\n\t\t\n\t}\n\t\n\t\n}",
"Methods",
"node head;",
"head",
"int size =0 ;",
"size",
"0",
"void insert(int data) {\n\t\tnode n = new node(data);\n\t\tsize++;\n\t\tif(head==null) {\n\t\t\thead= n;\n\t\t}\n\t\telse {\n\t\t\tnode k = head;\n\t\t\twhile(k.next!=null) {\n\t\t\t\tk=k.next;\n\t\t\t}\n\t\t\t\n\t\t\tk.next=n;\n\t\t}\n\t\t\n\t}",
"insert",
"{\n\t\tnode n = new node(data);\n\t\tsize++;\n\t\tif(head==null) {\n\t\t\thead= n;\n\t\t}\n\t\telse {\n\t\t\tnode k = head;\n\t\t\twhile(k.next!=null) {\n\t\t\t\tk=k.next;\n\t\t\t}\n\t\t\t\n\t\t\tk.next=n;\n\t\t}\n\t\t\n\t}",
"node n = new node(data);",
"n",
"new node(data)",
"size++",
"size",
"if(head==null) {\n\t\t\thead= n;\n\t\t}\n\t\telse {\n\t\t\tnode k = head;\n\t\t\twhile(k.next!=null) {\n\t\t\t\tk=k.next;\n\t\t\t}\n\t\t\t\n\t\t\tk.next=n;\n\t\t}",
"head==null",
"head",
"null",
"{\n\t\t\thead= n;\n\t\t}",
"head= n",
"head",
"n",
"{\n\t\t\tnode k = head;\n\t\t\twhile(k.next!=null) {\n\t\t\t\tk=k.next;\n\t\t\t}\n\t\t\t\n\t\t\tk.next=n;\n\t\t}",
"node k = head;",
"k",
"head",
"while(k.next!=null) {\n\t\t\t\tk=k.next;\n\t\t\t}",
"k.next!=null",
"k.next",
"k",
"k.next",
"null",
"{\n\t\t\t\tk=k.next;\n\t\t\t}",
"k=k.next",
"k",
"k.next",
"k",
"k.next",
"k.next=n",
"k.next",
"k",
"k.next",
"n",
"int data",
"data",
"void print() {\n\t\tnode n = head;\n\t\twhile(n.next!=null) {\n\t\t\tSystem.out.print(n.data+\" \");\n\t\t\tn=n.next;\n\t\t}\n\t\tSystem.out.println(n.data);\n\t\t\n\t}",
"print",
"{\n\t\tnode n = head;\n\t\twhile(n.next!=null) {\n\t\t\tSystem.out.print(n.data+\" \");\n\t\t\tn=n.next;\n\t\t}\n\t\tSystem.out.println(n.data);\n\t\t\n\t}",
"node n = head;",
"n",
"head",
"while(n.next!=null) {\n\t\t\tSystem.out.print(n.data+\" \");\n\t\t\tn=n.next;\n\t\t}",
"n.next!=null",
"n.next",
"n",
"n.next",
"null",
"{\n\t\t\tSystem.out.print(n.data+\" \");\n\t\t\tn=n.next;\n\t\t}",
"System.out.print(n.data+\" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"n.data+\" \"",
"n.data",
"n",
"n.data",
"\" \"",
"n=n.next",
"n",
"n.next",
"n",
"n.next",
"System.out.println(n.data)",
"System.out.println",
"System.out",
"System",
"System.out",
"n.data",
"n",
"n.data",
"void isLoop(int x) {\n\t\t\n\t\tSystem.out.println(size - x +1);\n\t\t\n\t\tnode n = head;\n\t\t\n\t\twhile(n.next!=null && x-->2 ) {\n\t\t\tn=n.next;\n\t\t}\n\t\t\n\t\tn.next=n.next.next;\n\t\t\n\t}",
"isLoop",
"{\n\t\t\n\t\tSystem.out.println(size - x +1);\n\t\t\n\t\tnode n = head;\n\t\t\n\t\twhile(n.next!=null && x-->2 ) {\n\t\t\tn=n.next;\n\t\t}\n\t\t\n\t\tn.next=n.next.next;\n\t\t\n\t}",
"System.out.println(size - x +1)",
"System.out.println",
"System.out",
"System",
"System.out",
"size - x +1",
"size - x",
"size",
"x",
"1",
"node n = head;",
"n",
"head",
"while(n.next!=null && x-->2 ) {\n\t\t\tn=n.next;\n\t\t}",
"n.next!=null && x-->2",
"n.next!=null",
"n.next",
"n",
"n.next",
"null",
"x-->2",
"x--",
"x",
"2",
"{\n\t\t\tn=n.next;\n\t\t}",
"n=n.next",
"n",
"n.next",
"n",
"n.next",
"n.next=n.next.next",
"n.next",
"n",
"n.next",
"n.next.next",
"n.next",
"n",
"n.next",
"n.next.next",
"int x",
"x",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs=new FastScanner();\n\t\tString s = fs.next();\n\t\tString t = fs.next();\n\t\tint min = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i = 0;i<=s.length()-t.length();i++) {\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(min);\n\t\t\n\t\t\n\t\t\n\t}\n\t\n\t\n\n\tstatic final Random random=new Random();\n\t\n\tstatic void ruffleSort(int[] a) {\n\t\tint n=a.length;//shuffle, then sort \n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs=new FastScanner();\n\t\tString s = fs.next();\n\t\tString t = fs.next();\n\t\tint min = Integer.MAX_VALUE;\n\t\t\n\t\tfor(int i = 0;i<=s.length()-t.length();i++) {\n\t\t\tString k = s.substring(i,i+t.length());\n\t\t\tint count =0;\n\t\t\tfor(int j =0 ;j<t.length();j++) {\n\t\t\t\tif(t.charAt(j)!=k.charAt(j)) count++;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(min>count) min = count;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(min);\n\t\t\n\t\t\n\t\t\n\t}\n\t\n\t\n\n\tstatic final Random random=new Random();\n\t\n\tstatic void ruffleSort(int[] a) {\n\t\tint n=a.length;//shuffle, then sort \n\t\tfor (int i=0; i<n; i++) {\n\t\t\tint oi=random.nextInt(n), temp=a[oi];\n\t\t\ta[oi]=a[i]; a[i]=temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\n\t\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Random;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
FastScanner fs=new FastScanner();
String s = fs.next();
String t = fs.next();
int min = Integer.MAX_VALUE;
for(int i = 0;i<=s.length()-t.length();i++) {
String k = s.substring(i,i+t.length());
int count =0;
for(int j =0 ;j<t.length();j++) {
if(t.charAt(j)!=k.charAt(j)) count++;
}
if(min>count) min = count;
}
System.out.println(min);
}
static final Random random=new Random();
static void ruffleSort(int[] a) {
int n=a.length;//shuffle, then sort
for (int i=0; i<n; i++) {
int oi=random.nextInt(n), temp=a[oi];
a[oi]=a[i]; a[i]=temp;
}
Arrays.sort(a);
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String next() {
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
long nextLong() {
return Long.parseLong(next());
}
}
}
class node{
int data;
node next;
node(int data){
this.data=data;
}
}
class Methods{
node head;
int size =0 ;
void insert(int data) {
node n = new node(data);
size++;
if(head==null) {
head= n;
}
else {
node k = head;
while(k.next!=null) {
k=k.next;
}
k.next=n;
}
}
void print() {
node n = head;
while(n.next!=null) {
System.out.print(n.data+" ");
n=n.next;
}
System.out.println(n.data);
}
void isLoop(int x) {
System.out.println(size - x +1);
node n = head;
while(n.next!=null && x-->2 ) {
n=n.next;
}
n.next=n.next.next;
}
}
|
[
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,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
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,
13,
4,
18,
13,
2,
13,
13,
30,
40,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
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
],
[
27,
28
],
[
28,
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
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
67,
79
],
[
79,
80
],
[
80,
81
],
[
48,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
]
| [
"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 T = sc.nextLine();\n String S = sc.nextLine();\n \n int count = 0;\n int store = S.length();\n \n for(int i = 0; i<=T.length()-S.length();i++){\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }\n System.out.println(store);\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 \n String T = sc.nextLine();\n String S = sc.nextLine();\n \n int count = 0;\n int store = S.length();\n \n for(int i = 0; i<=T.length()-S.length();i++){\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }\n System.out.println(store);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n String T = sc.nextLine();\n String S = sc.nextLine();\n \n int count = 0;\n int store = S.length();\n \n for(int i = 0; i<=T.length()-S.length();i++){\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }\n System.out.println(store);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n String T = sc.nextLine();\n String S = sc.nextLine();\n \n int count = 0;\n int store = S.length();\n \n for(int i = 0; i<=T.length()-S.length();i++){\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }\n System.out.println(store);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String T = sc.nextLine();",
"T",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String S = sc.nextLine();",
"S",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int count = 0;",
"count",
"0",
"int store = S.length();",
"store",
"S.length()",
"S.length",
"S",
"for(int i = 0; i<=T.length()-S.length();i++){\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<=T.length()-S.length()",
"i",
"T.length()-S.length()",
"T.length()",
"T.length",
"T",
"S.length()",
"S.length",
"S",
"i++",
"i++",
"i",
"{\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }",
"{\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }",
"count = 0",
"count",
"0",
"for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j<S.length()",
"j",
"S.length()",
"S.length",
"S",
"j++",
"j++",
"j",
"{\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }",
"{\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }",
"if(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}",
"S.charAt(j)!=T.charAt(i+j)",
"S.charAt(j)",
"S.charAt",
"S",
"j",
"T.charAt(i+j)",
"T.charAt",
"T",
"i+j",
"i",
"j",
"{\n \tcount++;\n \t}",
"count++",
"count",
"if (store>=count) store = count;",
"store>=count",
"store",
"count",
"store = count",
"store",
"count",
"System.out.println(store)",
"System.out.println",
"System.out",
"System",
"System.out",
"store",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n String T = sc.nextLine();\n String S = sc.nextLine();\n \n int count = 0;\n int store = S.length();\n \n for(int i = 0; i<=T.length()-S.length();i++){\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }\n System.out.println(store);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n \n String T = sc.nextLine();\n String S = sc.nextLine();\n \n int count = 0;\n int store = S.length();\n \n for(int i = 0; i<=T.length()-S.length();i++){\n count = 0;\n for(int j = 0;j<S.length();j++){\n \tif(S.charAt(j)!=T.charAt(i+j)){\n \tcount++;\n \t}\n }\n if (store>=count) store = count; \n }\n System.out.println(store);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String T = sc.nextLine();
String S = sc.nextLine();
int count = 0;
int store = S.length();
for(int i = 0; i<=T.length()-S.length();i++){
count = 0;
for(int j = 0;j<S.length();j++){
if(S.charAt(j)!=T.charAt(i+j)){
count++;
}
}
if (store>=count) store = count;
}
System.out.println(store);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
13,
18,
13,
13,
23,
13,
13,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
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,
2,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
37,
20,
29,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
10,
14
],
[
14,
15
],
[
10,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
18,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
16,
29
],
[
29,
30
],
[
16,
31
],
[
31,
32
],
[
10,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
33,
42
],
[
42,
43
],
[
10,
44
],
[
0,
45
],
[
388,
46
],
[
388,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
49,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
49,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
49,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
68,
82
],
[
82,
83
],
[
83,
84
],
[
68,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
92,
102
],
[
102,
103
],
[
103,
104
],
[
92,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
112,
114
],
[
108,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
107,
119
],
[
119,
120
],
[
120,
121
],
[
86,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
124,
128
],
[
49,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
47,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
137,
144
],
[
144,
145
],
[
144,
146
],
[
137,
148
],
[
148,
149
],
[
148,
150
],
[
137,
151
],
[
151,
152
],
[
151,
153
],
[
137,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
161,
162
],
[
162,
163
],
[
157,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
168,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
178,
181
],
[
164,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
187,
188
],
[
156,
189
],
[
189,
190
],
[
137,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
194,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
194,
202
],
[
202,
203
],
[
203,
204
],
[
137,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
213,
214
],
[
213,
215
],
[
205,
216
],
[
216,
217
],
[
137,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
222,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
228,
230
],
[
221,
231
],
[
231,
232
],
[
220,
233
],
[
233,
234
],
[
234,
235
],
[
137,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
239,
243
],
[
243,
244
],
[
238,
245
],
[
245,
246
],
[
245,
247
],
[
238,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
238,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
257,
260
],
[
256,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
238,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
137,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
272,
276
],
[
276,
277
],
[
271,
278
],
[
278,
279
],
[
278,
280
],
[
271,
281
],
[
281,
282
],
[
281,
283
],
[
271,
284
],
[
284,
285
],
[
284,
286
],
[
286,
287
],
[
271,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
288,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
292,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
271,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
301,
305
],
[
305,
306
],
[
305,
307
],
[
300,
308
],
[
308,
309
],
[
309,
310
],
[
271,
311
],
[
311,
312
],
[
311,
313
],
[
313,
314
],
[
314,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
315,
319
],
[
319,
320
],
[
319,
321
],
[
314,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
322,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
328,
330
],
[
314,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
332,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
331,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
345,
346
],
[
343,
347
],
[
331,
348
],
[
348,
349
],
[
349,
350
],
[
313,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
137,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
357,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
366,
368
],
[
363,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
371,
373
],
[
362,
374
],
[
374,
375
],
[
357,
376
],
[
376,
377
],
[
137,
378
],
[
378,
379
],
[
378,
380
],
[
380,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
382,
385
],
[
385,
386
],
[
0,
387
],
[
387,
388
],
[
387,
389
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.*;\n\nclass Pair implements Comparable<Pair> {\n public int first;\n public int second;\n\n public Pair(int first, int second) {\n this.first = first;\n this.second = second;\n }\n\n @Override\n public int compareTo(Pair o) {\n return second - o.second;\n }\n}\n\npublic class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n String S = fs.next();\n String T = fs.next();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i <= S.length()-T.length(); ++i) {\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }\n\n System.out.println(ans);\n }\n}\n\nclass FastScanner {\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() { return Double.parseDouble(next());}\n}\n\n",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.*;",
"util.*",
"java",
"class Pair implements Comparable<Pair> {\n public int first;\n public int second;\n\n public Pair(int first, int second) {\n this.first = first;\n this.second = second;\n }\n\n @Override\n public int compareTo(Pair o) {\n return second - o.second;\n }\n}",
"Pair",
"public int first;",
"first",
"public int second;",
"second",
"public Pair(int first, int second) {\n this.first = first;\n this.second = second;\n }",
"Pair",
"{\n this.first = first;\n this.second = second;\n }",
"this.first = first",
"this.first",
"this",
"this.first",
"first",
"this.second = second",
"this.second",
"this",
"this.second",
"second",
"int first",
"first",
"int second",
"second",
"@Override\n public int compareTo(Pair o) {\n return second - o.second;\n }",
"compareTo",
"{\n return second - o.second;\n }",
"return second - o.second;",
"second - o.second",
"second",
"o.second",
"o",
"o.second",
"Pair o",
"o",
"Comparable",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n String S = fs.next();\n String T = fs.next();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i <= S.length()-T.length(); ++i) {\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }\n\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n String S = fs.next();\n String T = fs.next();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i <= S.length()-T.length(); ++i) {\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }\n\n System.out.println(ans);\n }",
"main",
"{\n FastScanner fs = new FastScanner();\n String S = fs.next();\n String T = fs.next();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i <= S.length()-T.length(); ++i) {\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }\n\n System.out.println(ans);\n }",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"String S = fs.next();",
"S",
"fs.next()",
"fs.next",
"fs",
"String T = fs.next();",
"T",
"fs.next()",
"fs.next",
"fs",
"int ans = Integer.MAX_VALUE;",
"ans",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"for (int i = 0; i <= S.length()-T.length(); ++i) {\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= S.length()-T.length()",
"i",
"S.length()-T.length()",
"S.length()",
"S.length",
"S",
"T.length()",
"T.length",
"T",
"++i",
"++i",
"i",
"{\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }",
"{\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }",
"int cnt = T.length();",
"cnt",
"T.length()",
"T.length",
"T",
"for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < T.length()",
"j",
"T.length()",
"T.length",
"T",
"++j",
"++j",
"j",
"{\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }",
"{\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }",
"if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }",
"S.charAt(i+j) == T.charAt(j)",
"S.charAt(i+j)",
"S.charAt",
"S",
"i+j",
"i",
"j",
"T.charAt(j)",
"T.charAt",
"T",
"j",
"{\n --cnt;\n }",
"--cnt",
"cnt",
"ans = Math.min(ans, cnt)",
"ans",
"Math.min(ans, cnt)",
"Math.min",
"Math",
"ans",
"cnt",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"class FastScanner {\n private final InputStream in = System.in;\n private final byte[] buffer = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n\n private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }\n\n private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }\n\n public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }\n\n public double nextDouble() { return Double.parseDouble(next());}\n}",
"FastScanner",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"private boolean hasNextByte() {\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"hasNextByte",
"{\n if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }\n return true;\n }",
"if (ptr < buflen) {\n return true;\n }else{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr < buflen",
"ptr",
"buflen",
"{\n return true;\n }",
"return true;",
"true",
"{\n ptr = 0;\n try {\n buflen = in.read(buffer);\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (buflen <= 0) {\n return false;\n }\n }",
"ptr = 0",
"ptr",
"0",
"try {\n buflen = in.read(buffer);\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 buflen = in.read(buffer);\n }",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n return false;\n }",
"buflen <= 0",
"buflen",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"readByte",
"{ if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"if (hasNextByte()) return buffer[ptr++]; else return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}",
"isPrintableChar",
"{ return 33 <= c && c <= 126;}",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"hasNext",
"{ while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"ptr++",
"ptr",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"next",
"{\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while(isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n sb.appendCodePoint(b);\n b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"nextLong",
"{\n if (!hasNext()) throw new NoSuchElementException();\n long n = 0;\n boolean minus = false;\n int b = readByte();\n if (b == '-') {\n minus = true;\n b = readByte();\n }\n if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }\n while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }\n }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n throw new NumberFormatException();\n }",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while(true){\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"true",
"{\n if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }\n b = readByte();\n }",
"if ('0' <= b && b <= '9') {\n n *= 10;\n n += b - '0';\n }else if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n n *= 10;\n n += b - '0';\n }",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if(b == -1 || !isPrintableChar(b)){\n return minus ? -n : n;\n }else{\n throw new NumberFormatException();\n }",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n return minus ? -n : n;\n }",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }",
"nextInt",
"{\n long nl = nextLong();\n if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n return (int) nl;\n }",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public double nextDouble() { return Double.parseDouble(next());}",
"nextDouble",
"{ return Double.parseDouble(next());}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n String S = fs.next();\n String T = fs.next();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i <= S.length()-T.length(); ++i) {\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }\n\n System.out.println(ans);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n String S = fs.next();\n String T = fs.next();\n\n int ans = Integer.MAX_VALUE;\n for (int i = 0; i <= S.length()-T.length(); ++i) {\n int cnt = T.length();\n for (int j = 0; j < T.length(); ++j) {\n if (S.charAt(i+j) == T.charAt(j)) {\n --cnt;\n }\n }\n ans = Math.min(ans, cnt);\n }\n\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.util.*;
class Pair implements Comparable<Pair> {
public int first;
public int second;
public Pair(int first, int second) {
this.first = first;
this.second = second;
}
@Override
public int compareTo(Pair o) {
return second - o.second;
}
}
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
String S = fs.next();
String T = fs.next();
int ans = Integer.MAX_VALUE;
for (int i = 0; i <= S.length()-T.length(); ++i) {
int cnt = T.length();
for (int j = 0; j < T.length(); ++j) {
if (S.charAt(i+j) == T.charAt(j)) {
--cnt;
}
}
ans = Math.min(ans, cnt);
}
System.out.println(ans);
}
}
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
}else{
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while(isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while(true){
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
}else if(b == -1 || !isPrintableChar(b)){
return minus ? -n : n;
}else{
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) nl;
}
public double nextDouble() { return Double.parseDouble(next());}
}
|
[
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,
6,
13,
41,
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,
2,
4,
18,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
13,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
40,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
0,
13,
20,
4,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
18,
13,
13,
0,
13,
20,
13,
0,
13,
0,
13,
17,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
0,
13,
17,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
29,
40,
2,
2,
13,
17,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
42,
2,
2,
0,
13,
4,
13,
40,
17,
4,
13,
13,
29,
13,
12,
13,
30,
29,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
13,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
42,
2,
2,
0,
13,
4,
13,
40,
17,
40,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
42,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
2,
13,
17,
0,
13,
4,
13,
29,
8,
13,
40,
13,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
42,
2,
2,
0,
13,
4,
13,
40,
17,
40,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
42,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
2,
13,
17,
0,
13,
4,
13,
29,
8,
13,
40,
13,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
839,
26
],
[
839,
27
],
[
27,
28
],
[
839,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
31,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
31,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
31,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
50,
64
],
[
64,
65
],
[
65,
66
],
[
50,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
71,
74
],
[
71,
75
],
[
68,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
31,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
839,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
93,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
93,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
114,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
113,
123
],
[
123,
124
],
[
89,
125
],
[
125,
126
],
[
87,
127
],
[
127,
128
],
[
87,
129
],
[
129,
130
],
[
87,
131
],
[
131,
132
],
[
839,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
135,
141
],
[
141,
142
],
[
142,
143
],
[
133,
144
],
[
144,
145
],
[
839,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
151,
152
],
[
146,
153
],
[
153,
154
],
[
146,
155
],
[
155,
156
],
[
146,
157
],
[
157,
158
],
[
146,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
164,
166
],
[
161,
167
],
[
167,
168
],
[
167,
169
],
[
161,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
173,
175
],
[
146,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
182,
183
],
[
182,
184
],
[
178,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
188,
190
],
[
176,
191
],
[
191,
192
],
[
146,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
205,
206
],
[
201,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
211,
212
],
[
210,
213
],
[
200,
214
],
[
214,
215
],
[
214,
216
],
[
195,
217
],
[
217,
218
],
[
218,
219
],
[
218,
220
],
[
217,
221
],
[
221,
222
],
[
222,
223
],
[
195,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
146,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
234,
238
],
[
238,
239
],
[
238,
240
],
[
229,
241
],
[
241,
242
],
[
146,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
246,
247
],
[
245,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
250,
255
],
[
255,
256
],
[
249,
257
],
[
257,
258
],
[
257,
259
],
[
245,
260
],
[
260,
261
],
[
146,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
146,
268
],
[
268,
269
],
[
268,
270
],
[
270,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
272,
275
],
[
275,
276
],
[
146,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
279,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
287,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
293,
296
],
[
292,
297
],
[
297,
298
],
[
297,
299
],
[
299,
300
],
[
279,
301
],
[
301,
302
],
[
302,
303
],
[
303,
304
],
[
146,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
311,
313
],
[
307,
314
],
[
314,
315
],
[
307,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
321,
322
],
[
318,
323
],
[
323,
324
],
[
317,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
327,
331
],
[
331,
332
],
[
331,
333
],
[
326,
334
],
[
334,
335
],
[
334,
336
],
[
307,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
337,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
341,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
307,
349
],
[
349,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
350,
354
],
[
354,
355
],
[
354,
356
],
[
349,
357
],
[
357,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
364,
366
],
[
357,
367
],
[
367,
368
],
[
367,
369
],
[
369,
370
],
[
307,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
374,
375
],
[
372,
376
],
[
146,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
379,
383
],
[
383,
384
],
[
383,
385
],
[
379,
386
],
[
386,
387
],
[
379,
388
],
[
388,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
390,
395
],
[
395,
396
],
[
389,
397
],
[
397,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
399,
403
],
[
403,
404
],
[
403,
405
],
[
398,
406
],
[
406,
407
],
[
406,
408
],
[
379,
409
],
[
409,
410
],
[
410,
411
],
[
410,
412
],
[
409,
413
],
[
413,
414
],
[
414,
415
],
[
414,
416
],
[
413,
417
],
[
417,
418
],
[
417,
419
],
[
419,
420
],
[
379,
421
],
[
421,
422
],
[
422,
423
],
[
423,
424
],
[
423,
425
],
[
422,
426
],
[
426,
427
],
[
426,
428
],
[
421,
429
],
[
429,
430
],
[
430,
431
],
[
430,
432
],
[
432,
433
],
[
433,
434
],
[
433,
435
],
[
432,
436
],
[
436,
437
],
[
436,
438
],
[
429,
439
],
[
439,
440
],
[
439,
441
],
[
441,
442
],
[
379,
443
],
[
443,
444
],
[
444,
445
],
[
444,
446
],
[
446,
447
],
[
444,
448
],
[
146,
449
],
[
449,
450
],
[
449,
451
],
[
451,
452
],
[
452,
453
],
[
452,
454
],
[
451,
456
],
[
456,
457
],
[
457,
458
],
[
458,
459
],
[
458,
460
],
[
456,
461
],
[
461,
462
],
[
461,
463
],
[
456,
464
],
[
464,
465
],
[
465,
466
],
[
456,
467
],
[
467,
468
],
[
468,
469
],
[
469,
470
],
[
469,
471
],
[
468,
472
],
[
472,
473
],
[
451,
474
],
[
474,
475
],
[
449,
476
],
[
476,
477
],
[
146,
478
],
[
478,
479
],
[
478,
480
],
[
480,
481
],
[
481,
482
],
[
481,
483
],
[
480,
485
],
[
485,
486
],
[
486,
487
],
[
487,
488
],
[
487,
489
],
[
485,
490
],
[
490,
491
],
[
490,
492
],
[
485,
493
],
[
493,
494
],
[
494,
495
],
[
485,
496
],
[
496,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
497,
501
],
[
501,
502
],
[
480,
503
],
[
503,
504
],
[
478,
505
],
[
505,
506
],
[
146,
507
],
[
507,
508
],
[
507,
509
],
[
509,
510
],
[
510,
511
],
[
510,
512
],
[
509,
514
],
[
514,
515
],
[
515,
516
],
[
516,
517
],
[
516,
518
],
[
514,
519
],
[
519,
520
],
[
519,
521
],
[
514,
522
],
[
522,
523
],
[
523,
524
],
[
514,
525
],
[
525,
526
],
[
526,
527
],
[
527,
528
],
[
527,
529
],
[
526,
530
],
[
530,
531
],
[
509,
532
],
[
532,
533
],
[
507,
534
],
[
534,
535
],
[
146,
536
],
[
536,
537
],
[
536,
538
],
[
538,
539
],
[
539,
540
],
[
539,
541
],
[
538,
543
],
[
543,
544
],
[
544,
545
],
[
545,
546
],
[
545,
547
],
[
543,
548
],
[
548,
549
],
[
548,
550
],
[
543,
551
],
[
551,
552
],
[
552,
553
],
[
543,
554
],
[
554,
555
],
[
555,
556
],
[
556,
557
],
[
556,
558
],
[
555,
559
],
[
559,
560
],
[
538,
561
],
[
561,
562
],
[
536,
563
],
[
563,
564
],
[
146,
565
],
[
565,
566
],
[
565,
567
],
[
567,
568
],
[
568,
569
],
[
568,
570
],
[
567,
572
],
[
572,
573
],
[
573,
574
],
[
574,
575
],
[
574,
576
],
[
572,
577
],
[
577,
578
],
[
577,
579
],
[
572,
580
],
[
580,
581
],
[
581,
582
],
[
572,
583
],
[
583,
584
],
[
584,
585
],
[
585,
586
],
[
585,
587
],
[
584,
588
],
[
588,
589
],
[
567,
590
],
[
590,
591
],
[
565,
592
],
[
592,
593
],
[
146,
594
],
[
594,
595
],
[
594,
596
],
[
596,
597
],
[
597,
598
],
[
597,
599
],
[
596,
602
],
[
602,
603
],
[
603,
604
],
[
604,
605
],
[
604,
606
],
[
602,
607
],
[
607,
608
],
[
607,
609
],
[
602,
610
],
[
610,
611
],
[
611,
612
],
[
602,
613
],
[
613,
614
],
[
614,
615
],
[
615,
616
],
[
616,
617
],
[
616,
618
],
[
614,
619
],
[
619,
620
],
[
619,
621
],
[
614,
622
],
[
622,
623
],
[
623,
624
],
[
614,
625
],
[
625,
626
],
[
626,
627
],
[
627,
628
],
[
628,
629
],
[
628,
630
],
[
627,
631
],
[
626,
632
],
[
632,
633
],
[
596,
634
],
[
634,
635
],
[
594,
636
],
[
636,
637
],
[
594,
638
],
[
638,
639
],
[
146,
640
],
[
640,
641
],
[
640,
642
],
[
642,
643
],
[
643,
644
],
[
643,
645
],
[
642,
648
],
[
648,
649
],
[
649,
650
],
[
650,
651
],
[
650,
652
],
[
648,
653
],
[
653,
654
],
[
653,
655
],
[
648,
656
],
[
656,
657
],
[
657,
658
],
[
648,
659
],
[
659,
660
],
[
660,
661
],
[
661,
662
],
[
662,
663
],
[
662,
664
],
[
660,
665
],
[
665,
666
],
[
665,
667
],
[
660,
668
],
[
668,
669
],
[
669,
670
],
[
660,
671
],
[
671,
672
],
[
672,
673
],
[
673,
674
],
[
674,
675
],
[
674,
676
],
[
673,
677
],
[
672,
678
],
[
678,
679
],
[
642,
680
],
[
680,
681
],
[
640,
682
],
[
682,
683
],
[
640,
684
],
[
684,
685
],
[
146,
686
],
[
686,
687
],
[
686,
688
],
[
688,
689
],
[
689,
690
],
[
689,
691
],
[
688,
694
],
[
694,
695
],
[
695,
696
],
[
696,
697
],
[
696,
698
],
[
694,
699
],
[
699,
700
],
[
699,
701
],
[
694,
702
],
[
702,
703
],
[
703,
704
],
[
694,
705
],
[
705,
706
],
[
706,
707
],
[
707,
708
],
[
708,
709
],
[
708,
710
],
[
706,
711
],
[
711,
712
],
[
711,
713
],
[
706,
714
],
[
714,
715
],
[
715,
716
],
[
706,
717
],
[
717,
718
],
[
718,
719
],
[
719,
720
],
[
720,
721
],
[
720,
722
],
[
719,
723
],
[
718,
724
],
[
724,
725
],
[
688,
726
],
[
726,
727
],
[
686,
728
],
[
728,
729
],
[
686,
730
],
[
730,
731
],
[
146,
732
],
[
732,
733
],
[
732,
734
],
[
734,
735
],
[
735,
736
],
[
735,
737
],
[
734,
740
],
[
740,
741
],
[
741,
742
],
[
742,
743
],
[
742,
744
],
[
740,
745
],
[
745,
746
],
[
745,
747
],
[
740,
748
],
[
748,
749
],
[
749,
750
],
[
740,
751
],
[
751,
752
],
[
752,
753
],
[
753,
754
],
[
754,
755
],
[
754,
756
],
[
752,
757
],
[
757,
758
],
[
757,
759
],
[
752,
760
],
[
760,
761
],
[
761,
762
],
[
752,
763
],
[
763,
764
],
[
764,
765
],
[
765,
766
],
[
766,
767
],
[
766,
768
],
[
765,
769
],
[
764,
770
],
[
770,
771
],
[
734,
772
],
[
772,
773
],
[
732,
774
],
[
774,
775
],
[
732,
776
],
[
776,
777
],
[
146,
778
],
[
778,
779
],
[
778,
780
],
[
780,
781
],
[
781,
782
],
[
781,
783
],
[
780,
786
],
[
786,
787
],
[
787,
788
],
[
788,
789
],
[
788,
790
],
[
786,
791
],
[
791,
792
],
[
791,
793
],
[
786,
794
],
[
794,
795
],
[
795,
796
],
[
786,
797
],
[
797,
798
],
[
798,
799
],
[
799,
800
],
[
800,
801
],
[
800,
802
],
[
798,
803
],
[
803,
804
],
[
803,
805
],
[
798,
806
],
[
806,
807
],
[
807,
808
],
[
798,
809
],
[
809,
810
],
[
810,
811
],
[
811,
812
],
[
812,
813
],
[
812,
814
],
[
811,
815
],
[
810,
816
],
[
816,
817
],
[
780,
818
],
[
818,
819
],
[
778,
820
],
[
820,
821
],
[
778,
822
],
[
822,
823
],
[
146,
824
],
[
824,
825
],
[
824,
826
],
[
826,
827
],
[
827,
828
],
[
828,
829
],
[
829,
830
],
[
829,
831
],
[
827,
832
],
[
832,
833
],
[
833,
834
],
[
832,
835
],
[
824,
836
],
[
836,
837
],
[
0,
838
],
[
838,
839
],
[
838,
840
]
]
| [
"// package beginner00177;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\nimport java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\npublic class Main {\n\tprivate static PrintWriter out;\n\n\tpublic static void solve() {\n\t\tIn in = new In();\n\t\t// BEFORE SUBMISSION :: Change class name to Main and comment out package name\n\t\t// !!!\n\n\t\tString s = in.ns();\n\t\tString t = in.ns();\n\t\t\n\t\tint min = t.length();\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++ ) {\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}\n\t\tout.println(min);\n\n//\t\tStringBuilder regex = new StringBuilder();\n//\t\tfor (int i = 0; i < t.length(); i++) {\n//\t\t\tchar c = t.charAt(i);\n//\t\t\tregex.append(\"(\").append(c).append(\"|.)\");\n//\t\t}\n//\n//\t\tPattern p = Pattern.compile(regex.toString());\n//\t\tMatcher m = p.matcher(s);\n//\n//\t\tint min = t.length();\n//\t\twhile (m.find()) {\n//\t\t\tint pos = m.start();\n//\t\t\tint diff = diff(s, pos, t);\n//\t\t\tmin = Math.min(min, diff);\n//\t\t}\n//\t\tout.println(min);\n\t}\n\n\tstatic int diff(String s, int start, String t) {\n\t\tint diff = 0;\n\t\tfor (int i = start, j = 0; j < t.length(); i++, j++) {\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}\n\t\treturn diff;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// long start = System.nanoTime();\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t\t// System.out.println(\"Elapsed: \" + (System.nanoTime() - start) / 1000000 +\n\t\t// \"ns\");\n\t}\n\n\t@SuppressWarnings(\"unused\")\n\tprivate static class In {\n\t\tfinal private static int BUFFER_SIZE = 1024;\n\t\tprivate byte[] buf;\n\t\tprivate InputStream is;\n\t\tprivate int buflen;\n\t\tprivate int bufptr;\n\n\t\tpublic In() {\n\t\t\tis = System.in;\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic In(String input) {\n\t\t\tis = new ByteArrayInputStream(input.getBytes());\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic int readByte() {\n\t\t\tif (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}\n\t\t\tif (buflen <= 0)\n\t\t\t\treturn -1;\n\t\t\treturn buf[bufptr++];\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n\n\t\tpublic int skip() {\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;\n\t\t\treturn b;\n\t\t}\n\n\t\t/* Next character */\n\t\tpublic char nc() {\n\t\t\treturn (char) skip();\n\t\t}\n\n\t\t/* Next double */\n\t\tpublic double nd() {\n\t\t\treturn Double.parseDouble(ns());\n\t\t}\n\n\t\t/* Next string */\n\t\tpublic String ns() {\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tint b = skip();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\t/* Next integer */\n\t\tpublic int ni() {\n\t\t\tboolean minus = false;\n\t\t\tint num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next long */\n\t\tpublic long nl() {\n\t\t\tboolean minus = false;\n\t\t\tlong num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next integer 1D array */\n\t\tpublic int[] nia(int n) {\n\t\t\tfinal int[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long 1D array */\n\t\tpublic long[] nla(int n) {\n\t\t\tfinal long[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string 1D array */\n\t\tpublic String[] nsa(int n) {\n\t\t\tfinal String[] arr = new String[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char 1D array */\n\t\tpublic char[] nca(int n) {\n\t\t\tfinal char[] arr = new char[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double 1D array */\n\t\tpublic double[] nda(int n) {\n\t\t\tfinal double[] arr = new double[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next integer matrix */\n\t\tpublic int[][] nim(int n, int m) {\n\t\t\tfinal int[][] arr = new int[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long matrix */\n\t\tpublic long[][] nlm(int n, int m) {\n\t\t\tfinal long[][] arr = new long[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string matrix */\n\t\tpublic String[][] nsm(int n, int m) {\n\t\t\tfinal String[][] arr = new String[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char matrix */\n\t\tpublic char[][] ncm(int n, int m) {\n\t\t\tfinal char[][] arr = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double matrix */\n\t\tpublic double[][] ndm(int n, int m) {\n\t\t\tfinal double[][] arr = new double[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic static void log(Object... o) {\n\t\t\tSystem.out.println(Arrays.deepToString(o));\n\t\t}\n\t}\n\n}",
"import java.io.ByteArrayInputStream;",
"ByteArrayInputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.util.regex.Matcher;",
"Matcher",
"java.util.regex",
"import java.util.regex.Pattern;",
"Pattern",
"java.util.regex",
"public class Main {\n\tprivate static PrintWriter out;\n\n\tpublic static void solve() {\n\t\tIn in = new In();\n\t\t// BEFORE SUBMISSION :: Change class name to Main and comment out package name\n\t\t// !!!\n\n\t\tString s = in.ns();\n\t\tString t = in.ns();\n\t\t\n\t\tint min = t.length();\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++ ) {\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}\n\t\tout.println(min);\n\n//\t\tStringBuilder regex = new StringBuilder();\n//\t\tfor (int i = 0; i < t.length(); i++) {\n//\t\t\tchar c = t.charAt(i);\n//\t\t\tregex.append(\"(\").append(c).append(\"|.)\");\n//\t\t}\n//\n//\t\tPattern p = Pattern.compile(regex.toString());\n//\t\tMatcher m = p.matcher(s);\n//\n//\t\tint min = t.length();\n//\t\twhile (m.find()) {\n//\t\t\tint pos = m.start();\n//\t\t\tint diff = diff(s, pos, t);\n//\t\t\tmin = Math.min(min, diff);\n//\t\t}\n//\t\tout.println(min);\n\t}\n\n\tstatic int diff(String s, int start, String t) {\n\t\tint diff = 0;\n\t\tfor (int i = start, j = 0; j < t.length(); i++, j++) {\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}\n\t\treturn diff;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// long start = System.nanoTime();\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t\t// System.out.println(\"Elapsed: \" + (System.nanoTime() - start) / 1000000 +\n\t\t// \"ns\");\n\t}\n\n\t@SuppressWarnings(\"unused\")\n\tprivate static class In {\n\t\tfinal private static int BUFFER_SIZE = 1024;\n\t\tprivate byte[] buf;\n\t\tprivate InputStream is;\n\t\tprivate int buflen;\n\t\tprivate int bufptr;\n\n\t\tpublic In() {\n\t\t\tis = System.in;\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic In(String input) {\n\t\t\tis = new ByteArrayInputStream(input.getBytes());\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic int readByte() {\n\t\t\tif (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}\n\t\t\tif (buflen <= 0)\n\t\t\t\treturn -1;\n\t\t\treturn buf[bufptr++];\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n\n\t\tpublic int skip() {\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;\n\t\t\treturn b;\n\t\t}\n\n\t\t/* Next character */\n\t\tpublic char nc() {\n\t\t\treturn (char) skip();\n\t\t}\n\n\t\t/* Next double */\n\t\tpublic double nd() {\n\t\t\treturn Double.parseDouble(ns());\n\t\t}\n\n\t\t/* Next string */\n\t\tpublic String ns() {\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tint b = skip();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\t/* Next integer */\n\t\tpublic int ni() {\n\t\t\tboolean minus = false;\n\t\t\tint num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next long */\n\t\tpublic long nl() {\n\t\t\tboolean minus = false;\n\t\t\tlong num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next integer 1D array */\n\t\tpublic int[] nia(int n) {\n\t\t\tfinal int[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long 1D array */\n\t\tpublic long[] nla(int n) {\n\t\t\tfinal long[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string 1D array */\n\t\tpublic String[] nsa(int n) {\n\t\t\tfinal String[] arr = new String[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char 1D array */\n\t\tpublic char[] nca(int n) {\n\t\t\tfinal char[] arr = new char[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double 1D array */\n\t\tpublic double[] nda(int n) {\n\t\t\tfinal double[] arr = new double[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next integer matrix */\n\t\tpublic int[][] nim(int n, int m) {\n\t\t\tfinal int[][] arr = new int[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long matrix */\n\t\tpublic long[][] nlm(int n, int m) {\n\t\t\tfinal long[][] arr = new long[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string matrix */\n\t\tpublic String[][] nsm(int n, int m) {\n\t\t\tfinal String[][] arr = new String[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char matrix */\n\t\tpublic char[][] ncm(int n, int m) {\n\t\t\tfinal char[][] arr = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double matrix */\n\t\tpublic double[][] ndm(int n, int m) {\n\t\t\tfinal double[][] arr = new double[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic static void log(Object... o) {\n\t\t\tSystem.out.println(Arrays.deepToString(o));\n\t\t}\n\t}\n\n}",
"Main",
"private static PrintWriter out;",
"out",
"public static void solve() {\n\t\tIn in = new In();\n\t\t// BEFORE SUBMISSION :: Change class name to Main and comment out package name\n\t\t// !!!\n\n\t\tString s = in.ns();\n\t\tString t = in.ns();\n\t\t\n\t\tint min = t.length();\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++ ) {\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}\n\t\tout.println(min);\n\n//\t\tStringBuilder regex = new StringBuilder();\n//\t\tfor (int i = 0; i < t.length(); i++) {\n//\t\t\tchar c = t.charAt(i);\n//\t\t\tregex.append(\"(\").append(c).append(\"|.)\");\n//\t\t}\n//\n//\t\tPattern p = Pattern.compile(regex.toString());\n//\t\tMatcher m = p.matcher(s);\n//\n//\t\tint min = t.length();\n//\t\twhile (m.find()) {\n//\t\t\tint pos = m.start();\n//\t\t\tint diff = diff(s, pos, t);\n//\t\t\tmin = Math.min(min, diff);\n//\t\t}\n//\t\tout.println(min);\n\t}",
"solve",
"{\n\t\tIn in = new In();\n\t\t// BEFORE SUBMISSION :: Change class name to Main and comment out package name\n\t\t// !!!\n\n\t\tString s = in.ns();\n\t\tString t = in.ns();\n\t\t\n\t\tint min = t.length();\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++ ) {\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}\n\t\tout.println(min);\n\n//\t\tStringBuilder regex = new StringBuilder();\n//\t\tfor (int i = 0; i < t.length(); i++) {\n//\t\t\tchar c = t.charAt(i);\n//\t\t\tregex.append(\"(\").append(c).append(\"|.)\");\n//\t\t}\n//\n//\t\tPattern p = Pattern.compile(regex.toString());\n//\t\tMatcher m = p.matcher(s);\n//\n//\t\tint min = t.length();\n//\t\twhile (m.find()) {\n//\t\t\tint pos = m.start();\n//\t\t\tint diff = diff(s, pos, t);\n//\t\t\tmin = Math.min(min, diff);\n//\t\t}\n//\t\tout.println(min);\n\t}",
"In in = new In();",
"in",
"new In()",
"String s = in.ns();",
"s",
"in.ns()",
"in.ns",
"in",
"String t = in.ns();",
"t",
"in.ns()",
"in.ns",
"in",
"int min = t.length();",
"min",
"t.length()",
"t.length",
"t",
"for(int i = 0; i <= s.length() - t.length(); i++ ) {\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= s.length() - t.length()",
"i",
"s.length() - t.length()",
"s.length()",
"s.length",
"s",
"t.length()",
"t.length",
"t",
"i++",
"i++",
"i",
"{\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}",
"{\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}",
"int diff = diff(s, i, t);",
"diff",
"diff(s, i, t)",
"diff",
"s",
"i",
"t",
"min = Math.min(min, diff)",
"min",
"Math.min(min, diff)",
"Math.min",
"Math",
"min",
"diff",
"out.println(min)",
"out.println",
"out",
"min",
"static int diff(String s, int start, String t) {\n\t\tint diff = 0;\n\t\tfor (int i = start, j = 0; j < t.length(); i++, j++) {\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}\n\t\treturn diff;\n\t}",
"diff",
"{\n\t\tint diff = 0;\n\t\tfor (int i = start, j = 0; j < t.length(); i++, j++) {\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}\n\t\treturn diff;\n\t}",
"int diff = 0;",
"diff",
"0",
"for (int i = start, j = 0; j < t.length(); i++, j++) {\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}",
"int i = start, j = 0;",
"int i = start",
"i",
"start",
"j = 0;",
"j",
"0",
"j < t.length()",
"j",
"t.length()",
"t.length",
"t",
"i++, j++",
"i++",
"i",
"j++",
"j",
"{\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}",
"{\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}",
"if (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;",
"s.charAt(i) != t.charAt(j)",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"diff++",
"diff",
"return diff;",
"diff",
"String s",
"s",
"int start",
"start",
"String t",
"t",
"public static void main(String[] args) throws IOException {\n\t\t// long start = System.nanoTime();\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t\t// System.out.println(\"Elapsed: \" + (System.nanoTime() - start) / 1000000 +\n\t\t// \"ns\");\n\t}",
"main",
"{\n\t\t// long start = System.nanoTime();\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t\t// System.out.println(\"Elapsed: \" + (System.nanoTime() - start) / 1000000 +\n\t\t// \"ns\");\n\t}",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"private static class In {\n\t\tfinal private static int BUFFER_SIZE = 1024;\n\t\tprivate byte[] buf;\n\t\tprivate InputStream is;\n\t\tprivate int buflen;\n\t\tprivate int bufptr;\n\n\t\tpublic In() {\n\t\t\tis = System.in;\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic In(String input) {\n\t\t\tis = new ByteArrayInputStream(input.getBytes());\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic int readByte() {\n\t\t\tif (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}\n\t\t\tif (buflen <= 0)\n\t\t\t\treturn -1;\n\t\t\treturn buf[bufptr++];\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n\n\t\tpublic int skip() {\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;\n\t\t\treturn b;\n\t\t}\n\n\t\t/* Next character */\n\t\tpublic char nc() {\n\t\t\treturn (char) skip();\n\t\t}\n\n\t\t/* Next double */\n\t\tpublic double nd() {\n\t\t\treturn Double.parseDouble(ns());\n\t\t}\n\n\t\t/* Next string */\n\t\tpublic String ns() {\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tint b = skip();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\t/* Next integer */\n\t\tpublic int ni() {\n\t\t\tboolean minus = false;\n\t\t\tint num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next long */\n\t\tpublic long nl() {\n\t\t\tboolean minus = false;\n\t\t\tlong num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next integer 1D array */\n\t\tpublic int[] nia(int n) {\n\t\t\tfinal int[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long 1D array */\n\t\tpublic long[] nla(int n) {\n\t\t\tfinal long[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string 1D array */\n\t\tpublic String[] nsa(int n) {\n\t\t\tfinal String[] arr = new String[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char 1D array */\n\t\tpublic char[] nca(int n) {\n\t\t\tfinal char[] arr = new char[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double 1D array */\n\t\tpublic double[] nda(int n) {\n\t\t\tfinal double[] arr = new double[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next integer matrix */\n\t\tpublic int[][] nim(int n, int m) {\n\t\t\tfinal int[][] arr = new int[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long matrix */\n\t\tpublic long[][] nlm(int n, int m) {\n\t\t\tfinal long[][] arr = new long[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string matrix */\n\t\tpublic String[][] nsm(int n, int m) {\n\t\t\tfinal String[][] arr = new String[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char matrix */\n\t\tpublic char[][] ncm(int n, int m) {\n\t\t\tfinal char[][] arr = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double matrix */\n\t\tpublic double[][] ndm(int n, int m) {\n\t\t\tfinal double[][] arr = new double[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic static void log(Object... o) {\n\t\t\tSystem.out.println(Arrays.deepToString(o));\n\t\t}\n\t}",
"In",
"final private static int BUFFER_SIZE = 1024;",
"BUFFER_SIZE",
"1024",
"private byte[] buf;",
"buf",
"private InputStream is;",
"is",
"private int buflen;",
"buflen",
"private int bufptr;",
"bufptr",
"public In() {\n\t\t\tis = System.in;\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}",
"In",
"{\n\t\t\tis = System.in;\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}",
"is = System.in",
"is",
"System.in",
"System",
"System.in",
"buf = new byte[BUFFER_SIZE]",
"buf",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"buflen = bufptr = 0",
"buflen",
"bufptr = 0",
"bufptr",
"0",
"public In(String input) {\n\t\t\tis = new ByteArrayInputStream(input.getBytes());\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}",
"In",
"{\n\t\t\tis = new ByteArrayInputStream(input.getBytes());\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}",
"is = new ByteArrayInputStream(input.getBytes())",
"is",
"new ByteArrayInputStream(input.getBytes())",
"buf = new byte[BUFFER_SIZE]",
"buf",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"buflen = bufptr = 0",
"buflen",
"bufptr = 0",
"bufptr",
"0",
"String input",
"input",
"public int readByte() {\n\t\t\tif (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}\n\t\t\tif (buflen <= 0)\n\t\t\t\treturn -1;\n\t\t\treturn buf[bufptr++];\n\t\t}",
"readByte",
"{\n\t\t\tif (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}\n\t\t\tif (buflen <= 0)\n\t\t\t\treturn -1;\n\t\t\treturn buf[bufptr++];\n\t\t}",
"if (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}",
"bufptr >= buflen",
"bufptr",
"buflen",
"{\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}",
"try {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"IOException ioe",
"{\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t}",
"buflen = is.read(buf)",
"buflen",
"is.read(buf)",
"is.read",
"is",
"buf",
"bufptr = 0",
"bufptr",
"0",
"if (buflen <= 0)\n\t\t\t\treturn -1;",
"buflen <= 0",
"buflen",
"0",
"return -1;",
"-1",
"1",
"return buf[bufptr++];",
"buf[bufptr++]",
"buf",
"bufptr++",
"bufptr",
"public boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}",
"isSpaceChar",
"{\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}",
"return !(c >= 33 && c <= 126);",
"!(c >= 33 && c <= 126)",
"(c >= 33 && c <= 126)",
"c >= 33",
"c",
"33",
"c <= 126",
"c",
"126",
"int c",
"c",
"public int skip() {\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;\n\t\t\treturn b;\n\t\t}",
"skip",
"{\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;\n\t\t\treturn b;\n\t\t}",
"int b;",
"b",
"while ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;",
"(b = readByte()) != -1 && isSpaceChar(b)",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"isSpaceChar(b)",
"isSpaceChar",
"b",
"return b;",
"b",
"/* Next character */\n\t\tpublic char nc() {\n\t\t\treturn (char) skip();\n\t\t}",
"nc",
"{\n\t\t\treturn (char) skip();\n\t\t}",
"return (char) skip();",
"(char) skip()",
"skip",
"/* Next double */\n\t\tpublic double nd() {\n\t\t\treturn Double.parseDouble(ns());\n\t\t}",
"nd",
"{\n\t\t\treturn Double.parseDouble(ns());\n\t\t}",
"return Double.parseDouble(ns());",
"Double.parseDouble(ns())",
"Double.parseDouble",
"Double",
"ns()",
"ns",
"/* Next string */\n\t\tpublic String ns() {\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tint b = skip();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"ns",
"{\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tint b = skip();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"final StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = skip();",
"b",
"skip()",
"skip",
"while (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}",
"!isSpaceChar(b)",
"isSpaceChar(b)",
"isSpaceChar",
"b",
"{\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"/* Next integer */\n\t\tpublic int ni() {\n\t\t\tboolean minus = false;\n\t\t\tint num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}",
"ni",
"{\n\t\t\tboolean minus = false;\n\t\t\tint num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}",
"boolean minus = false;",
"minus",
"false",
"int num = 0;",
"num",
"0",
"int b;",
"b",
"while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;",
"(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"!((b >= '0' && b <= '9') || b == '-')",
"((b >= '0' && b <= '9') || b == '-')",
"(b >= '0' && b <= '9')",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"b == '-'",
"b",
"'-'",
"if (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"b == '-'",
"b",
"'-'",
"{\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"while (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"/* Next long */\n\t\tpublic long nl() {\n\t\t\tboolean minus = false;\n\t\t\tlong num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}",
"nl",
"{\n\t\t\tboolean minus = false;\n\t\t\tlong num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}",
"boolean minus = false;",
"minus",
"false",
"long num = 0;",
"num",
"0",
"int b;",
"b",
"while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;",
"(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"!((b >= '0' && b <= '9') || b == '-')",
"((b >= '0' && b <= '9') || b == '-')",
"(b >= '0' && b <= '9')",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"b == '-'",
"b",
"'-'",
"if (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"b == '-'",
"b",
"'-'",
"{\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"while (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"/* Next integer 1D array */\n\t\tpublic int[] nia(int n) {\n\t\t\tfinal int[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();\n\t\t\treturn arr;\n\t\t}",
"nia",
"{\n\t\t\tfinal int[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();\n\t\t\treturn arr;\n\t\t}",
"final int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = ni();",
"arr[i] = ni()",
"arr[i]",
"arr",
"i",
"ni()",
"ni",
"return arr;",
"arr",
"int n",
"n",
"/* Next long 1D array */\n\t\tpublic long[] nla(int n) {\n\t\t\tfinal long[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();\n\t\t\treturn arr;\n\t\t}",
"nla",
"{\n\t\t\tfinal long[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();\n\t\t\treturn arr;\n\t\t}",
"final long[] arr = new long[n];",
"arr",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = nl();",
"arr[i] = nl()",
"arr[i]",
"arr",
"i",
"nl()",
"nl",
"return arr;",
"arr",
"int n",
"n",
"/* Next string 1D array */\n\t\tpublic String[] nsa(int n) {\n\t\t\tfinal String[] arr = new String[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();\n\t\t\treturn arr;\n\t\t}",
"nsa",
"{\n\t\t\tfinal String[] arr = new String[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();\n\t\t\treturn arr;\n\t\t}",
"final String[] arr = new String[n];",
"arr",
"new String[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = ns();",
"arr[i] = ns()",
"arr[i]",
"arr",
"i",
"ns()",
"ns",
"return arr;",
"arr",
"int n",
"n",
"/* Next char 1D array */\n\t\tpublic char[] nca(int n) {\n\t\t\tfinal char[] arr = new char[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}",
"nca",
"{\n\t\t\tfinal char[] arr = new char[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}",
"final char[] arr = new char[n];",
"arr",
"new char[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = nc();",
"arr[i] = nc()",
"arr[i]",
"arr",
"i",
"nc()",
"nc",
"return arr;",
"arr",
"int n",
"n",
"/* Next double 1D array */\n\t\tpublic double[] nda(int n) {\n\t\t\tfinal double[] arr = new double[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}",
"nda",
"{\n\t\t\tfinal double[] arr = new double[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}",
"final double[] arr = new double[n];",
"arr",
"new double[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = nc();",
"arr[i] = nc()",
"arr[i]",
"arr",
"i",
"nc()",
"nc",
"return arr;",
"arr",
"int n",
"n",
"/* Next integer matrix */\n\t\tpublic int[][] nim(int n, int m) {\n\t\t\tfinal int[][] arr = new int[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();\n\t\t\treturn arr;\n\t\t}",
"nim",
"{\n\t\t\tfinal int[][] arr = new int[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();\n\t\t\treturn arr;\n\t\t}",
"final int[][] arr = new int[n][m];",
"arr",
"new int[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"arr[i][j] = ni();",
"arr[i][j] = ni()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"ni()",
"ni",
"return arr;",
"arr",
"int n",
"n",
"int m",
"m",
"/* Next long matrix */\n\t\tpublic long[][] nlm(int n, int m) {\n\t\t\tfinal long[][] arr = new long[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();\n\t\t\treturn arr;\n\t\t}",
"nlm",
"{\n\t\t\tfinal long[][] arr = new long[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();\n\t\t\treturn arr;\n\t\t}",
"final long[][] arr = new long[n][m];",
"arr",
"new long[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"arr[i][j] = nl();",
"arr[i][j] = nl()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"nl()",
"nl",
"return arr;",
"arr",
"int n",
"n",
"int m",
"m",
"/* Next string matrix */\n\t\tpublic String[][] nsm(int n, int m) {\n\t\t\tfinal String[][] arr = new String[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();\n\t\t\treturn arr;\n\t\t}",
"nsm",
"{\n\t\t\tfinal String[][] arr = new String[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();\n\t\t\treturn arr;\n\t\t}",
"final String[][] arr = new String[n][m];",
"arr",
"new String[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"arr[i][j] = ns();",
"arr[i][j] = ns()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"ns()",
"ns",
"return arr;",
"arr",
"int n",
"n",
"int m",
"m",
"/* Next char matrix */\n\t\tpublic char[][] ncm(int n, int m) {\n\t\t\tfinal char[][] arr = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();\n\t\t\treturn arr;\n\t\t}",
"ncm",
"{\n\t\t\tfinal char[][] arr = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();\n\t\t\treturn arr;\n\t\t}",
"final char[][] arr = new char[n][m];",
"arr",
"new char[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"arr[i][j] = nc();",
"arr[i][j] = nc()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"nc()",
"nc",
"return arr;",
"arr",
"int n",
"n",
"int m",
"m",
"/* Next double matrix */\n\t\tpublic double[][] ndm(int n, int m) {\n\t\t\tfinal double[][] arr = new double[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();\n\t\t\treturn arr;\n\t\t}",
"ndm",
"{\n\t\t\tfinal double[][] arr = new double[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();\n\t\t\treturn arr;\n\t\t}",
"final double[][] arr = new double[n][m];",
"arr",
"new double[n][m]",
"n",
"m",
"for (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();",
"for (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"arr[i][j] = nd();",
"arr[i][j] = nd()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"nd()",
"nd",
"return arr;",
"arr",
"int n",
"n",
"int m",
"m",
"public static void log(Object... o) {\n\t\t\tSystem.out.println(Arrays.deepToString(o));\n\t\t}",
"log",
"{\n\t\t\tSystem.out.println(Arrays.deepToString(o));\n\t\t}",
"System.out.println(Arrays.deepToString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.deepToString(o)",
"Arrays.deepToString",
"Arrays",
"o",
"Object... o",
"o",
"public class Main {\n\tprivate static PrintWriter out;\n\n\tpublic static void solve() {\n\t\tIn in = new In();\n\t\t// BEFORE SUBMISSION :: Change class name to Main and comment out package name\n\t\t// !!!\n\n\t\tString s = in.ns();\n\t\tString t = in.ns();\n\t\t\n\t\tint min = t.length();\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++ ) {\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}\n\t\tout.println(min);\n\n//\t\tStringBuilder regex = new StringBuilder();\n//\t\tfor (int i = 0; i < t.length(); i++) {\n//\t\t\tchar c = t.charAt(i);\n//\t\t\tregex.append(\"(\").append(c).append(\"|.)\");\n//\t\t}\n//\n//\t\tPattern p = Pattern.compile(regex.toString());\n//\t\tMatcher m = p.matcher(s);\n//\n//\t\tint min = t.length();\n//\t\twhile (m.find()) {\n//\t\t\tint pos = m.start();\n//\t\t\tint diff = diff(s, pos, t);\n//\t\t\tmin = Math.min(min, diff);\n//\t\t}\n//\t\tout.println(min);\n\t}\n\n\tstatic int diff(String s, int start, String t) {\n\t\tint diff = 0;\n\t\tfor (int i = start, j = 0; j < t.length(); i++, j++) {\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}\n\t\treturn diff;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// long start = System.nanoTime();\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t\t// System.out.println(\"Elapsed: \" + (System.nanoTime() - start) / 1000000 +\n\t\t// \"ns\");\n\t}\n\n\t@SuppressWarnings(\"unused\")\n\tprivate static class In {\n\t\tfinal private static int BUFFER_SIZE = 1024;\n\t\tprivate byte[] buf;\n\t\tprivate InputStream is;\n\t\tprivate int buflen;\n\t\tprivate int bufptr;\n\n\t\tpublic In() {\n\t\t\tis = System.in;\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic In(String input) {\n\t\t\tis = new ByteArrayInputStream(input.getBytes());\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic int readByte() {\n\t\t\tif (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}\n\t\t\tif (buflen <= 0)\n\t\t\t\treturn -1;\n\t\t\treturn buf[bufptr++];\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n\n\t\tpublic int skip() {\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;\n\t\t\treturn b;\n\t\t}\n\n\t\t/* Next character */\n\t\tpublic char nc() {\n\t\t\treturn (char) skip();\n\t\t}\n\n\t\t/* Next double */\n\t\tpublic double nd() {\n\t\t\treturn Double.parseDouble(ns());\n\t\t}\n\n\t\t/* Next string */\n\t\tpublic String ns() {\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tint b = skip();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\t/* Next integer */\n\t\tpublic int ni() {\n\t\t\tboolean minus = false;\n\t\t\tint num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next long */\n\t\tpublic long nl() {\n\t\t\tboolean minus = false;\n\t\t\tlong num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next integer 1D array */\n\t\tpublic int[] nia(int n) {\n\t\t\tfinal int[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long 1D array */\n\t\tpublic long[] nla(int n) {\n\t\t\tfinal long[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string 1D array */\n\t\tpublic String[] nsa(int n) {\n\t\t\tfinal String[] arr = new String[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char 1D array */\n\t\tpublic char[] nca(int n) {\n\t\t\tfinal char[] arr = new char[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double 1D array */\n\t\tpublic double[] nda(int n) {\n\t\t\tfinal double[] arr = new double[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next integer matrix */\n\t\tpublic int[][] nim(int n, int m) {\n\t\t\tfinal int[][] arr = new int[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long matrix */\n\t\tpublic long[][] nlm(int n, int m) {\n\t\t\tfinal long[][] arr = new long[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string matrix */\n\t\tpublic String[][] nsm(int n, int m) {\n\t\t\tfinal String[][] arr = new String[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char matrix */\n\t\tpublic char[][] ncm(int n, int m) {\n\t\t\tfinal char[][] arr = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double matrix */\n\t\tpublic double[][] ndm(int n, int m) {\n\t\t\tfinal double[][] arr = new double[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic static void log(Object... o) {\n\t\t\tSystem.out.println(Arrays.deepToString(o));\n\t\t}\n\t}\n\n}",
"public class Main {\n\tprivate static PrintWriter out;\n\n\tpublic static void solve() {\n\t\tIn in = new In();\n\t\t// BEFORE SUBMISSION :: Change class name to Main and comment out package name\n\t\t// !!!\n\n\t\tString s = in.ns();\n\t\tString t = in.ns();\n\t\t\n\t\tint min = t.length();\n\t\tfor(int i = 0; i <= s.length() - t.length(); i++ ) {\n\t\t\tint diff = diff(s, i, t);\n\t\t\tmin = Math.min(min, diff);\n\t\t}\n\t\tout.println(min);\n\n//\t\tStringBuilder regex = new StringBuilder();\n//\t\tfor (int i = 0; i < t.length(); i++) {\n//\t\t\tchar c = t.charAt(i);\n//\t\t\tregex.append(\"(\").append(c).append(\"|.)\");\n//\t\t}\n//\n//\t\tPattern p = Pattern.compile(regex.toString());\n//\t\tMatcher m = p.matcher(s);\n//\n//\t\tint min = t.length();\n//\t\twhile (m.find()) {\n//\t\t\tint pos = m.start();\n//\t\t\tint diff = diff(s, pos, t);\n//\t\t\tmin = Math.min(min, diff);\n//\t\t}\n//\t\tout.println(min);\n\t}\n\n\tstatic int diff(String s, int start, String t) {\n\t\tint diff = 0;\n\t\tfor (int i = start, j = 0; j < t.length(); i++, j++) {\n\t\t\tif (s.charAt(i) != t.charAt(j))\n\t\t\t\tdiff++;\n\t\t}\n\t\treturn diff;\n\t}\n\n\tpublic static void main(String[] args) throws IOException {\n\t\t// long start = System.nanoTime();\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t\t// System.out.println(\"Elapsed: \" + (System.nanoTime() - start) / 1000000 +\n\t\t// \"ns\");\n\t}\n\n\t@SuppressWarnings(\"unused\")\n\tprivate static class In {\n\t\tfinal private static int BUFFER_SIZE = 1024;\n\t\tprivate byte[] buf;\n\t\tprivate InputStream is;\n\t\tprivate int buflen;\n\t\tprivate int bufptr;\n\n\t\tpublic In() {\n\t\t\tis = System.in;\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic In(String input) {\n\t\t\tis = new ByteArrayInputStream(input.getBytes());\n\t\t\tbuf = new byte[BUFFER_SIZE];\n\t\t\tbuflen = bufptr = 0;\n\t\t}\n\n\t\tpublic int readByte() {\n\t\t\tif (bufptr >= buflen) {\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = is.read(buf);\n\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tbufptr = 0;\n\t\t\t}\n\t\t\tif (buflen <= 0)\n\t\t\t\treturn -1;\n\t\t\treturn buf[bufptr++];\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\treturn !(c >= 33 && c <= 126);\n\t\t}\n\n\t\tpublic int skip() {\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t\t;\n\t\t\treturn b;\n\t\t}\n\n\t\t/* Next character */\n\t\tpublic char nc() {\n\t\t\treturn (char) skip();\n\t\t}\n\n\t\t/* Next double */\n\t\tpublic double nd() {\n\t\t\treturn Double.parseDouble(ns());\n\t\t}\n\n\t\t/* Next string */\n\t\tpublic String ns() {\n\t\t\tfinal StringBuilder sb = new StringBuilder();\n\t\t\tint b = skip();\n\t\t\twhile (!isSpaceChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\t/* Next integer */\n\t\tpublic int ni() {\n\t\t\tboolean minus = false;\n\t\t\tint num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next long */\n\t\tpublic long nl() {\n\t\t\tboolean minus = false;\n\t\t\tlong num = 0;\n\t\t\tint b;\n\t\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t\t;\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\twhile (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn minus ? -num : num;\n\t\t}\n\n\t\t/* Next integer 1D array */\n\t\tpublic int[] nia(int n) {\n\t\t\tfinal int[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long 1D array */\n\t\tpublic long[] nla(int n) {\n\t\t\tfinal long[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string 1D array */\n\t\tpublic String[] nsa(int n) {\n\t\t\tfinal String[] arr = new String[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char 1D array */\n\t\tpublic char[] nca(int n) {\n\t\t\tfinal char[] arr = new char[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double 1D array */\n\t\tpublic double[] nda(int n) {\n\t\t\tfinal double[] arr = new double[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tarr[i] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next integer matrix */\n\t\tpublic int[][] nim(int n, int m) {\n\t\t\tfinal int[][] arr = new int[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ni();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next long matrix */\n\t\tpublic long[][] nlm(int n, int m) {\n\t\t\tfinal long[][] arr = new long[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nl();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next string matrix */\n\t\tpublic String[][] nsm(int n, int m) {\n\t\t\tfinal String[][] arr = new String[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = ns();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next char matrix */\n\t\tpublic char[][] ncm(int n, int m) {\n\t\t\tfinal char[][] arr = new char[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nc();\n\t\t\treturn arr;\n\t\t}\n\n\t\t/* Next double matrix */\n\t\tpublic double[][] ndm(int n, int m) {\n\t\t\tfinal double[][] arr = new double[n][m];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\tfor (int j = 0; j < m; j++)\n\t\t\t\t\tarr[i][j] = nd();\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic static void log(Object... o) {\n\t\t\tSystem.out.println(Arrays.deepToString(o));\n\t\t}\n\t}\n\n}",
"Main"
]
| // package beginner00177;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
private static PrintWriter out;
public static void solve() {
In in = new In();
// BEFORE SUBMISSION :: Change class name to Main and comment out package name
// !!!
String s = in.ns();
String t = in.ns();
int min = t.length();
for(int i = 0; i <= s.length() - t.length(); i++ ) {
int diff = diff(s, i, t);
min = Math.min(min, diff);
}
out.println(min);
// StringBuilder regex = new StringBuilder();
// for (int i = 0; i < t.length(); i++) {
// char c = t.charAt(i);
// regex.append("(").append(c).append("|.)");
// }
//
// Pattern p = Pattern.compile(regex.toString());
// Matcher m = p.matcher(s);
//
// int min = t.length();
// while (m.find()) {
// int pos = m.start();
// int diff = diff(s, pos, t);
// min = Math.min(min, diff);
// }
// out.println(min);
}
static int diff(String s, int start, String t) {
int diff = 0;
for (int i = start, j = 0; j < t.length(); i++, j++) {
if (s.charAt(i) != t.charAt(j))
diff++;
}
return diff;
}
public static void main(String[] args) throws IOException {
// long start = System.nanoTime();
out = new PrintWriter(System.out);
solve();
out.flush();
// System.out.println("Elapsed: " + (System.nanoTime() - start) / 1000000 +
// "ns");
}
@SuppressWarnings("unused")
private static class In {
final private static int BUFFER_SIZE = 1024;
private byte[] buf;
private InputStream is;
private int buflen;
private int bufptr;
public In() {
is = System.in;
buf = new byte[BUFFER_SIZE];
buflen = bufptr = 0;
}
public In(String input) {
is = new ByteArrayInputStream(input.getBytes());
buf = new byte[BUFFER_SIZE];
buflen = bufptr = 0;
}
public int readByte() {
if (bufptr >= buflen) {
try {
buflen = is.read(buf);
} catch (IOException ioe) {
throw new InputMismatchException();
}
bufptr = 0;
}
if (buflen <= 0)
return -1;
return buf[bufptr++];
}
public boolean isSpaceChar(int c) {
return !(c >= 33 && c <= 126);
}
public int skip() {
int b;
while ((b = readByte()) != -1 && isSpaceChar(b))
;
return b;
}
/* Next character */
public char nc() {
return (char) skip();
}
/* Next double */
public double nd() {
return Double.parseDouble(ns());
}
/* Next string */
public String ns() {
final StringBuilder sb = new StringBuilder();
int b = skip();
while (!isSpaceChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
/* Next integer */
public int ni() {
boolean minus = false;
int num = 0;
int b;
while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
;
if (b == '-') {
minus = true;
b = readByte();
}
while (b >= '0' && b <= '9') {
num = num * 10 + (b - '0');
b = readByte();
}
return minus ? -num : num;
}
/* Next long */
public long nl() {
boolean minus = false;
long num = 0;
int b;
while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
;
if (b == '-') {
minus = true;
b = readByte();
}
while (b >= '0' && b <= '9') {
num = num * 10 + (b - '0');
b = readByte();
}
return minus ? -num : num;
}
/* Next integer 1D array */
public int[] nia(int n) {
final int[] arr = new int[n];
for (int i = 0; i < n; i++)
arr[i] = ni();
return arr;
}
/* Next long 1D array */
public long[] nla(int n) {
final long[] arr = new long[n];
for (int i = 0; i < n; i++)
arr[i] = nl();
return arr;
}
/* Next string 1D array */
public String[] nsa(int n) {
final String[] arr = new String[n];
for (int i = 0; i < n; i++)
arr[i] = ns();
return arr;
}
/* Next char 1D array */
public char[] nca(int n) {
final char[] arr = new char[n];
for (int i = 0; i < n; i++)
arr[i] = nc();
return arr;
}
/* Next double 1D array */
public double[] nda(int n) {
final double[] arr = new double[n];
for (int i = 0; i < n; i++)
arr[i] = nc();
return arr;
}
/* Next integer matrix */
public int[][] nim(int n, int m) {
final int[][] arr = new int[n][m];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
arr[i][j] = ni();
return arr;
}
/* Next long matrix */
public long[][] nlm(int n, int m) {
final long[][] arr = new long[n][m];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
arr[i][j] = nl();
return arr;
}
/* Next string matrix */
public String[][] nsm(int n, int m) {
final String[][] arr = new String[n][m];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
arr[i][j] = ns();
return arr;
}
/* Next char matrix */
public char[][] ncm(int n, int m) {
final char[][] arr = new char[n][m];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
arr[i][j] = nc();
return arr;
}
/* Next double matrix */
public double[][] ndm(int n, int m) {
final double[][] arr = new double[n][m];
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
arr[i][j] = nd();
return arr;
}
public static void log(Object... o) {
System.out.println(Arrays.deepToString(o));
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
0,
13,
4,
18,
4,
18,
13,
0,
13,
4,
18,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
13,
30,
40,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
18,
13,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
4,
13,
13,
4,
18,
18,
13,
13,
13,
12,
13,
30,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
146,
11
],
[
146,
12
],
[
12,
13
],
[
146,
14
],
[
14,
15
],
[
146,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
22,
24
],
[
18,
25
],
[
25,
26
],
[
25,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
18,
31
],
[
31,
32
],
[
32,
33
],
[
16,
34
],
[
34,
35
],
[
146,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
36,
53
],
[
53,
54
],
[
146,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
63,
64
],
[
63,
65
],
[
57,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
66,
76
],
[
76,
77
],
[
77,
78
],
[
66,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
81,
91
],
[
91,
92
],
[
92,
93
],
[
57,
94
],
[
94,
95
],
[
55,
96
],
[
96,
97
],
[
146,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
108,
122
],
[
122,
123
],
[
123,
124
],
[
108,
125
],
[
126,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
129,
133
],
[
133,
134
],
[
133,
135
],
[
100,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
136,
141
],
[
146,
142
],
[
142,
143
],
[
142,
144
],
[
0,
145
],
[
145,
146
],
[
145,
147
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.nio.charset.StandardCharsets;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tchar[] S, T;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tS = in.readLine().toCharArray();\n\t\tT = in.readLine().toCharArray();\n\t}\n\n\tint diff(int sStart) {\n\t\tint len = T.length;\n\t\tint result = 0;\n\t\tfor (int i = sStart; i < sStart + len; ++i) {\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tvoid calc() {\n\t\tint min = Integer.MAX_VALUE / 2;\n\t\tfor (int i = 0; i + T.length <= S.length; ++i) {\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.nio.charset.StandardCharsets;",
"StandardCharsets",
"java.nio.charset",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tchar[] S, T;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tS = in.readLine().toCharArray();\n\t\tT = in.readLine().toCharArray();\n\t}\n\n\tint diff(int sStart) {\n\t\tint len = T.length;\n\t\tint result = 0;\n\t\tfor (int i = sStart; i < sStart + len; ++i) {\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tvoid calc() {\n\t\tint min = Integer.MAX_VALUE / 2;\n\t\tfor (int i = 0; i + T.length <= S.length; ++i) {\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"Main",
"char[] S",
"S",
"T;",
"T",
"public static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}",
"main",
"{\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}",
"InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);",
"reader",
"new InputStreamReader(System.in, StandardCharsets.UTF_8)",
"BufferedReader in = new BufferedReader(reader);",
"in",
"new BufferedReader(reader)",
"Main ins = new Main(in);",
"ins",
"new Main(in)",
"ins.calc()",
"ins.calc",
"ins",
"ins.showResult()",
"ins.showResult",
"ins",
"String[] args",
"args",
"Main(BufferedReader in) throws IOException {\n\t\tS = in.readLine().toCharArray();\n\t\tT = in.readLine().toCharArray();\n\t}",
"Main",
"{\n\t\tS = in.readLine().toCharArray();\n\t\tT = in.readLine().toCharArray();\n\t}",
"S = in.readLine().toCharArray()",
"S",
"in.readLine().toCharArray()",
"in.readLine().toCharArray",
"in.readLine()",
"in.readLine",
"in",
"T = in.readLine().toCharArray()",
"T",
"in.readLine().toCharArray()",
"in.readLine().toCharArray",
"in.readLine()",
"in.readLine",
"in",
"BufferedReader in",
"in",
"int diff(int sStart) {\n\t\tint len = T.length;\n\t\tint result = 0;\n\t\tfor (int i = sStart; i < sStart + len; ++i) {\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"diff",
"{\n\t\tint len = T.length;\n\t\tint result = 0;\n\t\tfor (int i = sStart; i < sStart + len; ++i) {\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"int len = T.length;",
"len",
"T.length",
"T",
"T.length",
"int result = 0;",
"result",
"0",
"for (int i = sStart; i < sStart + len; ++i) {\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}",
"int i = sStart;",
"int i = sStart;",
"i",
"sStart",
"i < sStart + len",
"i",
"sStart + len",
"sStart",
"len",
"++i",
"++i",
"i",
"{\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}",
"if (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}",
"S[i] != T[i - sStart]",
"S[i]",
"S",
"i",
"T[i - sStart]",
"T",
"i - sStart",
"i",
"sStart",
"{\n\t\t\t\t++result;\n\t\t\t}",
"++result",
"result",
"return result;",
"result",
"int sStart",
"sStart",
"void calc() {\n\t\tint min = Integer.MAX_VALUE / 2;\n\t\tfor (int i = 0; i + T.length <= S.length; ++i) {\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"calc",
"{\n\t\tint min = Integer.MAX_VALUE / 2;\n\t\tfor (int i = 0; i + T.length <= S.length; ++i) {\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}\n\t\tSystem.out.println(min);\n\t}",
"int min = Integer.MAX_VALUE / 2;",
"min",
"Integer.MAX_VALUE / 2",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"2",
"for (int i = 0; i + T.length <= S.length; ++i) {\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + T.length <= S.length",
"i + T.length",
"i",
"T.length",
"T",
"T.length",
"S.length",
"S",
"S.length",
"++i",
"++i",
"i",
"{\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}",
"{\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}",
"min = Math.min(min, diff(i))",
"min",
"Math.min(min, diff(i))",
"Math.min",
"Math",
"min",
"diff(i)",
"diff",
"i",
"System.out.println(min)",
"System.out.println",
"System.out",
"System",
"System.out",
"min",
"void showResult() {\n\t}",
"showResult",
"{\n\t}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tchar[] S, T;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tS = in.readLine().toCharArray();\n\t\tT = in.readLine().toCharArray();\n\t}\n\n\tint diff(int sStart) {\n\t\tint len = T.length;\n\t\tint result = 0;\n\t\tfor (int i = sStart; i < sStart + len; ++i) {\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tvoid calc() {\n\t\tint min = Integer.MAX_VALUE / 2;\n\t\tfor (int i = 0; i + T.length <= S.length; ++i) {\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tchar[] S, T;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tS = in.readLine().toCharArray();\n\t\tT = in.readLine().toCharArray();\n\t}\n\n\tint diff(int sStart) {\n\t\tint len = T.length;\n\t\tint result = 0;\n\t\tfor (int i = sStart; i < sStart + len; ++i) {\n\t\t\tif (S[i] != T[i - sStart]) {\n\t\t\t\t++result;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tvoid calc() {\n\t\tint min = Integer.MAX_VALUE / 2;\n\t\tfor (int i = 0; i + T.length <= S.length; ++i) {\n\t\t\tmin = Math.min(min, diff(i));\n\t\t}\n\t\tSystem.out.println(min);\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) throws IOException {
InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
BufferedReader in = new BufferedReader(reader);
Main ins = new Main(in);
ins.calc();
ins.showResult();
}
char[] S, T;
Main(BufferedReader in) throws IOException {
S = in.readLine().toCharArray();
T = in.readLine().toCharArray();
}
int diff(int sStart) {
int len = T.length;
int result = 0;
for (int i = sStart; i < sStart + len; ++i) {
if (S[i] != T[i - sStart]) {
++result;
}
}
return result;
}
void calc() {
int min = Integer.MAX_VALUE / 2;
for (int i = 0; i + T.length <= S.length; ++i) {
min = Math.min(min, diff(i));
}
System.out.println(min);
}
void showResult() {
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
0,
13,
17,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
13,
18,
13,
13,
23,
13,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
41,
13,
18,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
2,
13,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
41,
13,
18,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
4,
18,
13,
2,
13,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
598,
8
],
[
598,
9
],
[
9,
10
],
[
9,
11
],
[
598,
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
],
[
29,
30
],
[
28,
31
],
[
27,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
32,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
32,
53
],
[
53,
54
],
[
53,
55
],
[
32,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
63,
67
],
[
56,
68
],
[
68,
69
],
[
69,
70
],
[
56,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
72,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
82,
92
],
[
92,
93
],
[
93,
94
],
[
82,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
98,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
97,
107
],
[
107,
108
],
[
108,
109
],
[
72,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
112,
116
],
[
72,
117
],
[
117,
118
],
[
117,
119
],
[
32,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
14,
124
],
[
124,
125
],
[
125,
126
],
[
14,
127
],
[
127,
128
],
[
128,
129
],
[
12,
130
],
[
130,
131
],
[
598,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
132,
136
],
[
136,
137
],
[
132,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
144,
146
],
[
138,
147
],
[
147,
148
],
[
138,
149
],
[
149,
150
],
[
132,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
157,
159
],
[
151,
160
],
[
160,
161
],
[
132,
162
],
[
598,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
163,
171
],
[
171,
172
],
[
163,
173
],
[
173,
174
],
[
163,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
175,
183
],
[
183,
184
],
[
163,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
188,
193
],
[
193,
194
],
[
187,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
199,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
203,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
212,
215
],
[
199,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
220,
221
],
[
221,
222
],
[
187,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
163,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
230,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
242,
243
],
[
230,
244
],
[
244,
245
],
[
244,
246
],
[
230,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
247,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
251,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
230,
260
],
[
260,
261
],
[
260,
262
],
[
230,
263
],
[
263,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
263,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
268,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
274,
276
],
[
268,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
230,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
163,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
287,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
292,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
299,
300
],
[
287,
301
],
[
301,
302
],
[
301,
303
],
[
287,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
304,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
308,
313
],
[
313,
314
],
[
313,
315
],
[
315,
316
],
[
287,
317
],
[
317,
318
],
[
317,
319
],
[
287,
320
],
[
320,
321
],
[
321,
322
],
[
322,
323
],
[
322,
324
],
[
320,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
325,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
331,
333
],
[
325,
334
],
[
334,
335
],
[
334,
336
],
[
336,
337
],
[
287,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
163,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
344,
349
],
[
349,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
349,
354
],
[
354,
355
],
[
354,
356
],
[
349,
357
],
[
357,
358
],
[
358,
359
],
[
349,
360
],
[
361,
361
],
[
361,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
362,
366
],
[
366,
367
],
[
344,
368
],
[
368,
369
],
[
342,
370
],
[
370,
371
],
[
163,
372
],
[
372,
373
],
[
372,
374
],
[
374,
375
],
[
375,
376
],
[
376,
377
],
[
377,
378
],
[
377,
379
],
[
376,
380
],
[
380,
381
],
[
380,
382
],
[
382,
383
],
[
382,
384
],
[
375,
385
],
[
385,
386
],
[
385,
387
],
[
375,
388
],
[
388,
389
],
[
389,
390
],
[
375,
391
],
[
392,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
396,
399
],
[
399,
400
],
[
399,
401
],
[
395,
402
],
[
392,
403
],
[
403,
404
],
[
403,
405
],
[
405,
406
],
[
405,
407
],
[
392,
408
],
[
408,
409
],
[
409,
410
],
[
409,
411
],
[
408,
412
],
[
412,
413
],
[
412,
414
],
[
392,
415
],
[
415,
416
],
[
416,
417
],
[
416,
418
],
[
415,
419
],
[
374,
420
],
[
420,
421
],
[
372,
422
],
[
422,
423
],
[
372,
424
],
[
424,
425
],
[
163,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
430,
434
],
[
434,
435
],
[
434,
436
],
[
436,
437
],
[
436,
438
],
[
429,
439
],
[
439,
440
],
[
439,
441
],
[
429,
442
],
[
442,
443
],
[
443,
444
],
[
429,
445
],
[
446,
446
],
[
446,
447
],
[
447,
448
],
[
447,
449
],
[
449,
450
],
[
450,
451
],
[
451,
452
],
[
450,
453
],
[
453,
454
],
[
453,
455
],
[
449,
456
],
[
446,
457
],
[
457,
458
],
[
457,
459
],
[
459,
460
],
[
459,
461
],
[
446,
462
],
[
462,
463
],
[
463,
464
],
[
463,
465
],
[
462,
466
],
[
466,
467
],
[
466,
468
],
[
446,
469
],
[
469,
470
],
[
470,
471
],
[
470,
472
],
[
469,
473
],
[
428,
474
],
[
474,
475
],
[
426,
476
],
[
476,
477
],
[
426,
478
],
[
478,
479
],
[
163,
480
],
[
480,
481
],
[
480,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
485,
486
],
[
482,
487
],
[
487,
488
],
[
488,
489
],
[
488,
490
],
[
487,
491
],
[
491,
492
],
[
492,
493
],
[
492,
494
],
[
494,
495
],
[
482,
496
],
[
496,
497
],
[
496,
498
],
[
482,
499
],
[
499,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
499,
504
],
[
504,
505
],
[
505,
506
],
[
506,
507
],
[
505,
508
],
[
504,
509
],
[
509,
510
],
[
509,
511
],
[
511,
512
],
[
482,
513
],
[
513,
514
],
[
514,
515
],
[
515,
516
],
[
163,
517
],
[
517,
518
],
[
517,
519
],
[
519,
520
],
[
520,
521
],
[
520,
522
],
[
522,
523
],
[
519,
524
],
[
524,
525
],
[
525,
526
],
[
525,
527
],
[
524,
528
],
[
528,
529
],
[
528,
530
],
[
530,
531
],
[
519,
532
],
[
532,
533
],
[
532,
534
],
[
519,
535
],
[
535,
536
],
[
536,
537
],
[
537,
538
],
[
537,
539
],
[
535,
540
],
[
540,
541
],
[
541,
542
],
[
542,
543
],
[
541,
544
],
[
540,
545
],
[
545,
546
],
[
545,
547
],
[
547,
548
],
[
519,
549
],
[
549,
550
],
[
550,
551
],
[
551,
552
],
[
163,
553
],
[
553,
554
],
[
553,
555
],
[
555,
556
],
[
556,
557
],
[
560,
558
],
[
570,
559
],
[
567,
560
],
[
560,
561
],
[
561,
562
],
[
561,
563
],
[
560,
564
],
[
564,
565
],
[
564,
566
],
[
567,
567
],
[
567,
568
],
[
567,
569
],
[
570,
570
],
[
570,
571
],
[
570,
572
],
[
560,
573
],
[
573,
574
],
[
573,
575
],
[
575,
576
],
[
553,
577
],
[
577,
578
],
[
163,
579
],
[
579,
580
],
[
579,
581
],
[
581,
582
],
[
582,
583
],
[
584,
584
],
[
584,
585
],
[
585,
586
],
[
585,
587
],
[
584,
588
],
[
588,
589
],
[
588,
590
],
[
584,
591
],
[
591,
592
],
[
591,
593
],
[
593,
594
],
[
579,
595
],
[
595,
596
],
[
0,
597
],
[
597,
598
],
[
597,
599
]
]
| [
"import java.io.*;\nimport java.util.*;\npublic class Main {\n final static long mod = 1000000007;\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }\n pw.flush();\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class Data implements Comparable<Data>{\n int x;\n int y;\n\n public Data (int m, int n) {\n x = m;\n y = n;\n }\n @Override\n public int compareTo(Data o) {\n return y - o.y;\n }\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n public static char[] shuffle(char[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n final static long mod = 1000000007;\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }\n pw.flush();\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class Data implements Comparable<Data>{\n int x;\n int y;\n\n public Data (int m, int n) {\n x = m;\n y = n;\n }\n @Override\n public int compareTo(Data o) {\n return y - o.y;\n }\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n public static char[] shuffle(char[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"Main",
"final static long mod = 1000000007;",
"mod",
"1000000007",
"public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }\n pw.flush();\n pw.close();\n\n }",
"main",
"{\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }\n pw.flush();\n pw.close();\n\n }",
"InputReader sc = new InputReader(System.in);",
"sc",
"new InputReader(System.in)",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"Random gen = new Random();",
"gen",
"new Random()",
"int test = 1;",
"test",
"1",
"while(test-->0) {\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }",
"test-->0",
"test--",
"test",
"0",
"{\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }",
"String s = sc.nextLine();",
"s",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String t = sc.nextLine();",
"t",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int l = t.length();",
"l",
"t.length()",
"t.length",
"t",
"int min = Integer.MAX_VALUE;",
"min",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"int c = 0;",
"c",
"0",
"for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=s.length()-l",
"i",
"s.length()-l",
"s.length()",
"s.length",
"s",
"l",
"i++",
"i++",
"i",
"{\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }",
"{\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }",
"String str = s.substring(i,i+l);",
"str",
"s.substring(i,i+l)",
"s.substring",
"s",
"i",
"i+l",
"i",
"l",
"for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<str.length()",
"j",
"str.length()",
"str.length",
"str",
"j++",
"j++",
"j",
"{\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }",
"{\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }",
"if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }",
"str.charAt(j)!=t.charAt(j)",
"str.charAt(j)",
"str.charAt",
"str",
"j",
"t.charAt(j)",
"t.charAt",
"t",
"j",
"{\n c++;\n }",
"c++",
"c",
"min = Math.min(min,c)",
"min",
"Math.min(min,c)",
"Math.min",
"Math",
"min",
"c",
"c = 0",
"c",
"0",
"pw.println(min)",
"pw.println",
"pw",
"min",
"pw.flush()",
"pw.flush",
"pw",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"static class Data implements Comparable<Data>{\n int x;\n int y;\n\n public Data (int m, int n) {\n x = m;\n y = n;\n }\n @Override\n public int compareTo(Data o) {\n return y - o.y;\n }\n }",
"Data",
"int x;",
"x",
"int y;",
"y",
"public Data (int m, int n) {\n x = m;\n y = n;\n }",
"Data",
"{\n x = m;\n y = n;\n }",
"x = m",
"x",
"m",
"y = n",
"y",
"n",
"int m",
"m",
"int n",
"n",
"@Override\n public int compareTo(Data o) {\n return y - o.y;\n }",
"compareTo",
"{\n return y - o.y;\n }",
"return y - o.y;",
"y - o.y",
"y",
"o.y",
"o",
"o.y",
"Data o",
"o",
"Comparable",
"static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n public static char[] shuffle(char[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }",
"InputReader",
"private final InputStream stream;",
"stream",
"private final byte[] buf = new byte[8192];",
"buf",
"new byte[8192]",
"8192",
"private int curChar",
"curChar",
"snumChars;",
"snumChars",
"public InputReader(InputStream st) {\n this.stream = st;\n }",
"InputReader",
"{\n this.stream = st;\n }",
"this.stream = st",
"this.stream",
"this",
"this.stream",
"st",
"InputStream st",
"st",
"public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"read",
"{\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (snumChars == -1)\n throw new InputMismatchException();",
"snumChars == -1",
"snumChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar >= snumChars",
"curChar",
"snumChars",
"{\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n snumChars = stream.read(buf);\n }",
"snumChars = stream.read(buf)",
"snumChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (snumChars <= 0)\n return -1;",
"snumChars <= 0",
"snumChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = read();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = read();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"int res = 0;",
"res",
"0",
"do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res *= 10;\n res += c - '0';\n c = read();\n }",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextLong",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = read();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = read();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"long res = 0;",
"res",
"0",
"do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res *= 10;\n res += c - '0';\n c = read();\n }",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"nextIntArray",
"{\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"int [] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nextInt();\n }",
"{\n a[i] = nextInt();\n }",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }",
"shuffle",
"{ for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }",
"for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"int i = 0, n = a.length;",
"int i = 0",
"i",
"0",
"n = a.length;",
"n",
"a.length",
"a",
"a.length",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{ int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"{ int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"int ind = gen.nextInt(n-i)+i;",
"ind",
"gen.nextInt(n-i)+i",
"gen.nextInt(n-i)",
"gen.nextInt",
"gen",
"n-i",
"n",
"i",
"i",
"int d = a[i];",
"d",
"a[i]",
"a",
"i",
"a[i] = a[ind]",
"a[i]",
"a",
"i",
"a[ind]",
"a",
"ind",
"a[ind] = d",
"a[ind]",
"a",
"ind",
"d",
"return a;",
"a",
"int[] a",
"a",
"Random gen",
"gen",
"public static char[] shuffle(char[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }",
"shuffle",
"{ for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }",
"for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"int i = 0, n = a.length;",
"int i = 0",
"i",
"0",
"n = a.length;",
"n",
"a.length",
"a",
"a.length",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{ int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"{ int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }",
"int ind = gen.nextInt(n-i)+i;",
"ind",
"gen.nextInt(n-i)+i",
"gen.nextInt(n-i)",
"gen.nextInt",
"gen",
"n-i",
"n",
"i",
"i",
"char d = a[i];",
"d",
"a[i]",
"a",
"i",
"a[i] = a[ind]",
"a[i]",
"a",
"i",
"a[ind]",
"a",
"ind",
"a[ind] = d",
"a[ind]",
"a",
"ind",
"d",
"return a;",
"a",
"char[] a",
"a",
"Random gen",
"gen",
"public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"readString",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"nextLine",
"{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));",
"!isEndOfLine(c)",
"isEndOfLine(c)",
"isEndOfLine",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"isEndOfLine",
"{\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"return c == '\\n' || c == '\\r' || c == -1;",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public class Main {\n final static long mod = 1000000007;\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }\n pw.flush();\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class Data implements Comparable<Data>{\n int x;\n int y;\n\n public Data (int m, int n) {\n x = m;\n y = n;\n }\n @Override\n public int compareTo(Data o) {\n return y - o.y;\n }\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n public static char[] shuffle(char[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"public class Main {\n final static long mod = 1000000007;\n\n public static void main(String[] args) {\n InputReader sc = new InputReader(System.in);\n PrintWriter pw = new PrintWriter(System.out);\n Random gen = new Random();\n int test = 1;//sc.nextInt();\n while(test-->0) {\n String s = sc.nextLine();\n String t = sc.nextLine();\n int l = t.length();\n int min = Integer.MAX_VALUE;\n int c = 0;\n for(int i=0;i<=s.length()-l;i++)\n {\n String str = s.substring(i,i+l);\n // pw.println(str);\n for(int j=0;j<str.length();j++)\n {\n\n if(str.charAt(j)!=t.charAt(j))\n {\n c++;\n }\n }\n min = Math.min(min,c);\n c = 0;\n }\n pw.println(min);\n\n\n\n\n\n\n\n\n\n }\n pw.flush();\n pw.close();\n\n }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n static class Data implements Comparable<Data>{\n int x;\n int y;\n\n public Data (int m, int n) {\n x = m;\n y = n;\n }\n @Override\n public int compareTo(Data o) {\n return y - o.y;\n }\n }\n\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n\n public InputReader(InputStream st) {\n this.stream = st;\n }\n\n public int read() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n long res = 0;\n do {\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public int[] nextIntArray(int n) {\n int [] a = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }\n\n public static int[] shuffle(int[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n int d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n public static char[] shuffle(char[] a, Random gen)\n { for(int i = 0, n = a.length;i < n;i++)\n { int ind = gen.nextInt(n-i)+i;\n char d = a[i];\n a[i] = a[ind];\n a[ind] = d;\n\n }\n return a;\n }\n\n\n public String readString() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = read();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n }\n\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
final static long mod = 1000000007;
public static void main(String[] args) {
InputReader sc = new InputReader(System.in);
PrintWriter pw = new PrintWriter(System.out);
Random gen = new Random();
int test = 1;//sc.nextInt();
while(test-->0) {
String s = sc.nextLine();
String t = sc.nextLine();
int l = t.length();
int min = Integer.MAX_VALUE;
int c = 0;
for(int i=0;i<=s.length()-l;i++)
{
String str = s.substring(i,i+l);
// pw.println(str);
for(int j=0;j<str.length();j++)
{
if(str.charAt(j)!=t.charAt(j))
{
c++;
}
}
min = Math.min(min,c);
c = 0;
}
pw.println(min);
}
pw.flush();
pw.close();
}
static class Data implements Comparable<Data>{
int x;
int y;
public Data (int m, int n) {
x = m;
y = n;
}
@Override
public int compareTo(Data o) {
return y - o.y;
}
}
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
public InputReader(InputStream st) {
this.stream = st;
}
public int read() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0)
return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int [] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public static int[] shuffle(int[] a, Random gen)
{ for(int i = 0, n = a.length;i < n;i++)
{ int ind = gen.nextInt(n-i)+i;
int d = a[i];
a[i] = a[ind];
a[ind] = d;
}
return a;
}
public static char[] shuffle(char[] a, Random gen)
{ for(int i = 0, n = a.length;i < n;i++)
{ int ind = gen.nextInt(n-i)+i;
char d = a[i];
a[i] = a[ind];
a[ind] = d;
}
return a;
}
public String readString() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
2,
17,
17,
41,
13,
17,
41,
13,
17,
41,
13,
2,
17,
17,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
4,
18,
4,
13,
41,
13,
4,
18,
4,
13,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
13,
40,
13,
0,
13,
4,
18,
13,
13,
13,
4,
13,
13,
23,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
29,
17,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
0,
13,
8,
4,
18,
13,
18,
13,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
8,
13,
4,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
13,
13,
4,
18,
13,
14,
40,
4,
18,
13,
4,
13,
2,
2,
4,
18,
13,
13,
17,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
17,
42,
2,
2,
0,
13,
4,
13,
40,
17,
40,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
42,
17,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
2,
13,
17,
30,
29,
8,
13,
40,
13,
13,
0,
13,
4,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
17,
42,
2,
2,
0,
13,
4,
13,
40,
17,
40,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
42,
17,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
2,
13,
17,
30,
29,
8,
13,
40,
13,
13,
0,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
29,
40,
2,
2,
13,
17,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
42,
2,
2,
0,
13,
4,
13,
40,
17,
4,
13,
13,
29,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
41,
13,
4,
13,
41,
13,
17,
42,
2,
2,
13,
13,
40,
4,
13,
13,
30,
0,
18,
13,
40,
13,
13,
0,
13,
4,
13,
29,
8,
2,
13,
13,
13,
4,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
4,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
704,
8
],
[
704,
9
],
[
9,
10
],
[
704,
11
],
[
11,
12
],
[
704,
13
],
[
13,
14
],
[
13,
15
],
[
704,
16
],
[
16,
17
],
[
16,
18
],
[
704,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
704,
24
],
[
24,
25
],
[
24,
26
],
[
704,
27
],
[
27,
28
],
[
27,
29
],
[
704,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
704,
35
],
[
35,
36
],
[
35,
37
],
[
704,
39
],
[
39,
40
],
[
39,
41
],
[
704,
42
],
[
42,
43
],
[
42,
44
],
[
704,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
47,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
47,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
47,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
47,
70
],
[
70,
71
],
[
70,
72
],
[
47,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
73,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
91,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
103,
113
],
[
113,
114
],
[
87,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
117,
121
],
[
47,
122
],
[
122,
123
],
[
122,
124
],
[
45,
125
],
[
125,
126
],
[
704,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
127,
133
],
[
133,
134
],
[
704,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
143,
145
],
[
138,
146
],
[
146,
147
],
[
137,
148
],
[
148,
149
],
[
148,
150
],
[
137,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
151,
156
],
[
156,
157
],
[
156,
158
],
[
151,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
151,
163
],
[
164,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
165,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
164,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
137,
185
],
[
185,
186
],
[
135,
187
],
[
187,
188
],
[
135,
189
],
[
189,
190
],
[
704,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
193,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
201,
203
],
[
197,
204
],
[
204,
205
],
[
204,
206
],
[
197,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
197,
211
],
[
212,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
214,
218
],
[
213,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
212,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
193,
233
],
[
233,
234
],
[
191,
235
],
[
235,
236
],
[
704,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
241,
245
],
[
241,
246
],
[
246,
247
],
[
246,
248
],
[
246,
249
],
[
249,
250
],
[
249,
251
],
[
237,
252
],
[
252,
253
],
[
237,
254
],
[
254,
255
],
[
704,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
260,
264
],
[
260,
265
],
[
265,
266
],
[
265,
267
],
[
265,
268
],
[
268,
269
],
[
268,
270
],
[
256,
271
],
[
271,
272
],
[
256,
273
],
[
273,
274
],
[
704,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
280,
281
],
[
281,
282
],
[
282,
283
],
[
280,
284
],
[
284,
285
],
[
284,
286
],
[
280,
287
],
[
277,
288
],
[
288,
289
],
[
288,
290
],
[
277,
291
],
[
291,
292
],
[
291,
293
],
[
293,
294
],
[
294,
295
],
[
277,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
298,
302
],
[
277,
303
],
[
303,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
303,
308
],
[
308,
309
],
[
308,
310
],
[
303,
311
],
[
311,
312
],
[
312,
313
],
[
303,
314
],
[
314,
315
],
[
315,
316
],
[
315,
317
],
[
277,
318
],
[
318,
319
],
[
319,
320
],
[
277,
321
],
[
321,
322
],
[
322,
323
],
[
323,
324
],
[
324,
325
],
[
321,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
329,
330
],
[
330,
331
],
[
331,
332
],
[
329,
333
],
[
328,
334
],
[
704,
335
],
[
335,
336
],
[
335,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
338,
341
],
[
335,
342
],
[
342,
343
],
[
704,
344
],
[
344,
345
],
[
344,
346
],
[
346,
347
],
[
347,
348
],
[
348,
349
],
[
347,
350
],
[
344,
351
],
[
351,
352
],
[
704,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
356,
357
],
[
357,
358
],
[
356,
359
],
[
355,
360
],
[
360,
361
],
[
361,
362
],
[
353,
363
],
[
363,
364
],
[
704,
365
],
[
365,
366
],
[
365,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
367,
371
],
[
371,
372
],
[
367,
373
],
[
373,
374
],
[
373,
375
],
[
367,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
378,
383
],
[
383,
384
],
[
377,
385
],
[
385,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
387,
391
],
[
391,
392
],
[
391,
393
],
[
386,
394
],
[
394,
395
],
[
394,
396
],
[
367,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
397,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
401,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
367,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
414,
415
],
[
414,
416
],
[
413,
417
],
[
417,
418
],
[
417,
419
],
[
412,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
423,
424
],
[
424,
425
],
[
424,
426
],
[
423,
427
],
[
427,
428
],
[
427,
429
],
[
412,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
432,
436
],
[
411,
437
],
[
437,
438
],
[
437,
439
],
[
439,
440
],
[
704,
441
],
[
441,
442
],
[
441,
443
],
[
443,
444
],
[
444,
445
],
[
444,
446
],
[
443,
447
],
[
447,
448
],
[
443,
449
],
[
449,
450
],
[
449,
451
],
[
443,
452
],
[
452,
453
],
[
453,
454
],
[
454,
455
],
[
455,
456
],
[
455,
457
],
[
457,
458
],
[
454,
459
],
[
459,
460
],
[
453,
461
],
[
461,
462
],
[
462,
463
],
[
463,
464
],
[
464,
465
],
[
464,
466
],
[
463,
467
],
[
467,
468
],
[
467,
469
],
[
462,
470
],
[
470,
471
],
[
470,
472
],
[
443,
473
],
[
473,
474
],
[
474,
475
],
[
474,
476
],
[
473,
477
],
[
477,
478
],
[
478,
479
],
[
478,
480
],
[
477,
481
],
[
481,
482
],
[
481,
483
],
[
483,
484
],
[
443,
485
],
[
485,
486
],
[
485,
487
],
[
487,
488
],
[
488,
489
],
[
489,
490
],
[
490,
491
],
[
490,
492
],
[
489,
493
],
[
493,
494
],
[
493,
495
],
[
488,
496
],
[
496,
497
],
[
497,
498
],
[
497,
499
],
[
499,
500
],
[
500,
501
],
[
500,
502
],
[
499,
503
],
[
503,
504
],
[
503,
505
],
[
488,
506
],
[
506,
507
],
[
507,
508
],
[
508,
509
],
[
508,
510
],
[
510,
511
],
[
508,
512
],
[
487,
513
],
[
513,
514
],
[
513,
515
],
[
515,
516
],
[
704,
517
],
[
517,
518
],
[
517,
519
],
[
519,
520
],
[
520,
521
],
[
521,
522
],
[
522,
523
],
[
521,
524
],
[
524,
525
],
[
704,
526
],
[
526,
527
],
[
526,
528
],
[
528,
529
],
[
529,
530
],
[
530,
531
],
[
704,
532
],
[
532,
533
],
[
532,
534
],
[
534,
535
],
[
535,
536
],
[
536,
537
],
[
536,
538
],
[
538,
539
],
[
535,
540
],
[
540,
541
],
[
534,
542
],
[
542,
543
],
[
543,
544
],
[
543,
545
],
[
542,
546
],
[
546,
547
],
[
547,
548
],
[
547,
549
],
[
546,
550
],
[
550,
551
],
[
551,
552
],
[
551,
553
],
[
553,
554
],
[
554,
555
],
[
550,
556
],
[
556,
557
],
[
557,
558
],
[
557,
559
],
[
559,
560
],
[
560,
561
],
[
559,
562
],
[
546,
563
],
[
563,
564
],
[
564,
565
],
[
564,
566
],
[
563,
567
],
[
567,
568
],
[
568,
569
],
[
534,
570
],
[
570,
571
],
[
571,
572
],
[
571,
573
],
[
573,
574
],
[
704,
575
],
[
575,
576
],
[
575,
577
],
[
577,
578
],
[
578,
579
],
[
579,
580
],
[
580,
581
],
[
581,
582
],
[
581,
583
],
[
580,
584
],
[
584,
585
],
[
584,
586
],
[
575,
587
],
[
587,
588
],
[
704,
589
],
[
589,
590
],
[
589,
591
],
[
591,
592
],
[
592,
593
],
[
591,
594
],
[
594,
595
],
[
595,
596
],
[
596,
597
],
[
597,
598
],
[
597,
599
],
[
599,
600
],
[
596,
601
],
[
601,
602
],
[
595,
603
],
[
603,
604
],
[
603,
605
],
[
591,
606
],
[
606,
607
],
[
704,
608
],
[
608,
609
],
[
608,
610
],
[
610,
611
],
[
611,
612
],
[
611,
613
],
[
613,
614
],
[
610,
615
],
[
615,
616
],
[
615,
617
],
[
610,
618
],
[
618,
619
],
[
619,
620
],
[
620,
621
],
[
620,
622
],
[
618,
623
],
[
623,
624
],
[
624,
625
],
[
625,
626
],
[
624,
627
],
[
623,
628
],
[
628,
629
],
[
628,
630
],
[
630,
631
],
[
610,
632
],
[
632,
633
],
[
633,
634
],
[
634,
635
],
[
704,
636
],
[
636,
637
],
[
636,
638
],
[
638,
639
],
[
639,
640
],
[
639,
641
],
[
638,
643
],
[
643,
644
],
[
643,
645
],
[
645,
646
],
[
638,
647
],
[
647,
648
],
[
647,
649
],
[
638,
650
],
[
650,
651
],
[
651,
652
],
[
652,
653
],
[
652,
654
],
[
651,
655
],
[
655,
656
],
[
656,
657
],
[
656,
658
],
[
650,
659
],
[
659,
660
],
[
660,
661
],
[
661,
662
],
[
661,
663
],
[
663,
664
],
[
660,
665
],
[
659,
666
],
[
666,
667
],
[
666,
668
],
[
668,
669
],
[
638,
670
],
[
670,
671
],
[
671,
672
],
[
672,
673
],
[
672,
674
],
[
671,
675
],
[
671,
676
],
[
676,
677
],
[
677,
678
],
[
676,
679
],
[
676,
680
],
[
636,
681
],
[
681,
682
],
[
704,
683
],
[
683,
684
],
[
683,
685
],
[
685,
686
],
[
686,
687
],
[
687,
688
],
[
688,
689
],
[
689,
690
],
[
687,
691
],
[
686,
692
],
[
692,
693
],
[
693,
694
],
[
694,
695
],
[
694,
696
],
[
692,
697
],
[
697,
698
],
[
698,
699
],
[
697,
700
],
[
683,
701
],
[
701,
702
],
[
0,
703
],
[
703,
704
],
[
703,
705
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n int MAX = (int) 1e5, MOD = (int)1e9+7;\n \n void solve(int TC) {\n \tchar[] s = ns().toCharArray();\n \tchar[] t = ns().toCharArray();\n \tint n = s.length;\n \tint m = t.length;\n \tint ans = m;\n \tfor(int i = 0; i <= n-m; i++) {\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}\n \tpn(ans);\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n long pow(long a, long b) { // return pow(a,b) % MOD\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) { // return Modular Inverse of x\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8; // 1 MB is 1024*1024\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) { // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n int MAX = (int) 1e5, MOD = (int)1e9+7;\n \n void solve(int TC) {\n \tchar[] s = ns().toCharArray();\n \tchar[] t = ns().toCharArray();\n \tint n = s.length;\n \tint m = t.length;\n \tint ans = m;\n \tfor(int i = 0; i <= n-m; i++) {\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}\n \tpn(ans);\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n long pow(long a, long b) { // return pow(a,b) % MOD\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) { // return Modular Inverse of x\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8; // 1 MB is 1024*1024\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) { // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"Main",
"InputStream is;",
"is",
"PrintWriter out;",
"out",
"String INPUT = \"\";",
"INPUT",
"\"\"",
"int MAX = (int) 1e5",
"MAX",
"(int) 1e5",
"MOD = (int)1e9+7;",
"MOD",
"(int)1e9+7",
"(int)1e9",
"7",
"boolean TestCases = false;",
"TestCases",
"false",
"double PI = 3.141592653589793238462643383279502884197169399;",
"PI",
"3.141592653589793238462643383279502884197169399",
"int BUF_SIZE = 1024 * 8; // 1 MB is 1024*1024",
"BUF_SIZE",
"1024 * 8",
"1024",
"8",
"byte[] inbuf = new byte[BUF_SIZE];",
"inbuf",
"new byte[BUF_SIZE]",
"BUF_SIZE",
"int lenbuf = 0",
"lenbuf",
"0",
"ptrbuf = 0;",
"ptrbuf",
"0",
"void solve(int TC) {\n \tchar[] s = ns().toCharArray();\n \tchar[] t = ns().toCharArray();\n \tint n = s.length;\n \tint m = t.length;\n \tint ans = m;\n \tfor(int i = 0; i <= n-m; i++) {\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}\n \tpn(ans);\n }",
"solve",
"{\n \tchar[] s = ns().toCharArray();\n \tchar[] t = ns().toCharArray();\n \tint n = s.length;\n \tint m = t.length;\n \tint ans = m;\n \tfor(int i = 0; i <= n-m; i++) {\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}\n \tpn(ans);\n }",
"char[] s = ns().toCharArray();",
"s",
"ns().toCharArray()",
"ns().toCharArray",
"ns()",
"ns",
"char[] t = ns().toCharArray();",
"t",
"ns().toCharArray()",
"ns().toCharArray",
"ns()",
"ns",
"int n = s.length;",
"n",
"s.length",
"s",
"s.length",
"int m = t.length;",
"m",
"t.length",
"t",
"t.length",
"int ans = m;",
"ans",
"m",
"for(int i = 0; i <= n-m; i++) {\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i <= n-m",
"i",
"n-m",
"n",
"m",
"i++",
"i++",
"i",
"{\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}",
"{\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}",
"int cnt = 0;",
"cnt",
"0",
"for(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"if(t[j] != s[i+j]) ++cnt;",
"if(t[j] != s[i+j]) ++cnt;",
"t[j] != s[i+j]",
"t[j]",
"t",
"j",
"s[i+j]",
"s",
"i+j",
"i",
"j",
"++cnt",
"cnt",
"ans = Math.min(ans, cnt)",
"ans",
"Math.min(ans, cnt)",
"Math.min",
"Math",
"ans",
"cnt",
"pn(ans)",
"pn",
"ans",
"int TC",
"TC",
"public static void main(String[] args) throws Exception { new Main().run(); }",
"main",
"{ new Main().run(); }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"long pow(long a, long b) { // return pow(a,b) % MOD\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }",
"pow",
"{ // return pow(a,b) % MOD\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }",
"if(b==0 || a==1) return 1;",
"b==0 || a==1",
"b==0",
"b",
"0",
"a==1",
"a",
"1",
"return 1;",
"1",
"long o = 1;",
"o",
"1",
"for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n }",
"long p = b;",
"long p = b;",
"p",
"b",
"p > 0",
"p",
"0",
"p>>=1",
"p>>=1",
"p",
"1",
"{\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n }",
"{\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n }",
"if((p&1)==1) o = (o*a) % MOD;",
"(p&1)==1",
"(p&1)",
"p",
"1",
"1",
"o = (o*a) % MOD",
"o",
"(o*a) % MOD",
"(o*a)",
"o",
"a",
"MOD",
"a = (a*a) % MOD",
"a",
"(a*a) % MOD",
"(a*a)",
"a",
"a",
"MOD",
"return o;",
"o",
"long a",
"a",
"long b",
"b",
"long inv(long x) { // return Modular Inverse of x\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }",
"inv",
"{ // return Modular Inverse of x\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }",
"long o = 1;",
"o",
"1",
"for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n }",
"long p = MOD-2;",
"long p = MOD-2;",
"p",
"MOD-2",
"MOD",
"2",
"p > 0",
"p",
"0",
"p>>=1",
"p>>=1",
"p",
"1",
"{\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n }",
"{\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n }",
"if((p&1)==1)o = (o*x)%MOD;",
"(p&1)==1",
"(p&1)",
"p",
"1",
"1",
"o = (o*x)%MOD",
"o",
"(o*x)%MOD",
"(o*x)",
"o",
"x",
"MOD",
"x = (x*x)%MOD",
"x",
"(x*x)%MOD",
"(x*x)",
"x",
"x",
"MOD",
"return o;",
"o",
"long x",
"x",
"long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }",
"gcd",
"{ return (b==0) ? a : gcd(b,a%b); }",
"return (b==0) ? a : gcd(b,a%b);",
"(b==0) ? a : gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }",
"gcd",
"{ return (b==0) ? a : gcd(b,a%b); }",
"return (b==0) ? a : gcd(b,a%b);",
"(b==0) ? a : gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }",
"run",
"{\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }",
"is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())",
"is",
"INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())",
"INPUT.isEmpty()",
"INPUT.isEmpty",
"INPUT",
"System.in",
"System",
"System.in",
"new ByteArrayInputStream(INPUT.getBytes())",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"long s = System.currentTimeMillis();",
"s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"int T = TestCases ? ni() : 1;",
"T",
"TestCases ? ni() : 1",
"TestCases",
"ni()",
"ni",
"1",
"for(int t=1;t<=T;t++) solve(t);",
"int t=1;",
"int t=1;",
"t",
"1",
"t<=T",
"t",
"T",
"t++",
"t++",
"t",
"solve(t);",
"solve(t)",
"solve",
"t",
"out.flush()",
"out.flush",
"out",
"if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");",
"!INPUT.isEmpty()",
"INPUT.isEmpty()",
"INPUT.isEmpty",
"INPUT",
"tr(System.currentTimeMillis()-s+\"ms\")",
"tr",
"System.currentTimeMillis()-s+\"ms\"",
"System.currentTimeMillis()-s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"s",
"\"ms\"",
"void p(Object o) { out.print(o); }",
"p",
"{ out.print(o); }",
"out.print(o)",
"out.print",
"out",
"o",
"Object o",
"o",
"void pn(Object o) { out.println(o); }",
"pn",
"{ out.println(o); }",
"out.println(o)",
"out.println",
"out",
"o",
"Object o",
"o",
"void pni(Object o) { out.println(o);out.flush(); }",
"pni",
"{ out.println(o);out.flush(); }",
"out.println(o)",
"out.println",
"out",
"o",
"out.flush()",
"out.flush",
"out",
"Object o",
"o",
"int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"ni",
"{\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"int num = 0",
"num",
"0",
"b;",
"b",
"boolean minus = false;",
"minus",
"false",
"while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));",
"(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"!((b >= '0' && b <= '9') || b == '-')",
"((b >= '0' && b <= '9') || b == '-')",
"(b >= '0' && b <= '9')",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"b == '-'",
"b",
"'-'",
"if(b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"true",
"{\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n num = num * 10 + (b - '0');\n }",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"{\n return minus ? -num : num;\n }",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"b = readByte()",
"b",
"readByte()",
"readByte",
"long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"nl",
"{\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"long num = 0;",
"num",
"0",
"int b;",
"b",
"boolean minus = false;",
"minus",
"false",
"while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));",
"(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"!((b >= '0' && b <= '9') || b == '-')",
"((b >= '0' && b <= '9') || b == '-')",
"(b >= '0' && b <= '9')",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"b == '-'",
"b",
"'-'",
"if(b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"true",
"{\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n num = num * 10 + (b - '0');\n }",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"{\n return minus ? -num : num;\n }",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"b = readByte()",
"b",
"readByte()",
"readByte",
"double nd() { return Double.parseDouble(ns()); }",
"nd",
"{ return Double.parseDouble(ns()); }",
"return Double.parseDouble(ns());",
"Double.parseDouble(ns())",
"Double.parseDouble",
"Double",
"ns()",
"ns",
"char nc() { return (char)skip(); }",
"nc",
"{ return (char)skip(); }",
"return (char)skip();",
"(char)skip()",
"skip",
"int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }",
"readByte",
"{\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }",
"if(lenbuf == -1)throw new InputMismatchException();",
"lenbuf == -1",
"lenbuf",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n }",
"ptrbuf >= lenbuf",
"ptrbuf",
"lenbuf",
"{\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n }",
"ptrbuf = 0",
"ptrbuf",
"0",
"try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }",
"catch (IOException e) { throw new InputMismatchException(); }",
"IOException e",
"{ throw new InputMismatchException(); }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{ lenbuf = is.read(inbuf); }",
"lenbuf = is.read(inbuf)",
"lenbuf",
"is.read(inbuf)",
"is.read",
"is",
"inbuf",
"if(lenbuf <= 0)return -1;",
"lenbuf <= 0",
"lenbuf",
"0",
"return -1;",
"-1",
"1",
"return inbuf[ptrbuf++];",
"inbuf[ptrbuf++]",
"inbuf",
"ptrbuf++",
"ptrbuf",
"boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }",
"isSpaceChar",
"{ return !(c >= 33 && c <= 126); }",
"return !(c >= 33 && c <= 126);",
"!(c >= 33 && c <= 126)",
"(c >= 33 && c <= 126)",
"c >= 33",
"c",
"33",
"c <= 126",
"c",
"126",
"int c",
"c",
"int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }",
"skip",
"{ int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }",
"int b;",
"b",
"while((b = readByte()) != -1 && isSpaceChar(b));",
"(b = readByte()) != -1 && isSpaceChar(b)",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"isSpaceChar(b)",
"isSpaceChar",
"b",
"return b;",
"b",
"String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) { // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }",
"ns",
"{\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) { // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }",
"int b = skip();",
"b",
"skip()",
"skip",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while(!(isSpaceChar(b))) { // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n }",
"!(isSpaceChar(b))",
"(isSpaceChar(b))",
"isSpaceChar",
"b",
"{ // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }",
"ns",
"{\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }",
"char[] buf = new char[n];",
"buf",
"new char[n]",
"n",
"int b = skip()",
"b",
"skip()",
"skip",
"p = 0;",
"p",
"0",
"while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n }",
"p < n && !(isSpaceChar(b))",
"p < n",
"p",
"n",
"!(isSpaceChar(b))",
"(isSpaceChar(b))",
"isSpaceChar",
"b",
"{\n buf[p++] = (char)b;\n b = readByte();\n }",
"buf[p++] = (char)b",
"buf[p++]",
"buf",
"p++",
"p",
"(char)b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return n == p ? buf : Arrays.copyOf(buf, p);",
"n == p ? buf : Arrays.copyOf(buf, p)",
"n == p",
"n",
"p",
"buf",
"Arrays.copyOf(buf, p)",
"Arrays.copyOf",
"Arrays",
"buf",
"p",
"int n",
"n",
"void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }",
"tr",
"{ if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }",
"if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o));",
"INPUT.length() > 0",
"INPUT.length()",
"INPUT.length",
"INPUT",
"0",
"System.out.println(Arrays.deepToString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.deepToString(o)",
"Arrays.deepToString",
"Arrays",
"o",
"Object... o",
"o",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n int MAX = (int) 1e5, MOD = (int)1e9+7;\n \n void solve(int TC) {\n \tchar[] s = ns().toCharArray();\n \tchar[] t = ns().toCharArray();\n \tint n = s.length;\n \tint m = t.length;\n \tint ans = m;\n \tfor(int i = 0; i <= n-m; i++) {\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}\n \tpn(ans);\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n long pow(long a, long b) { // return pow(a,b) % MOD\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) { // return Modular Inverse of x\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8; // 1 MB is 1024*1024\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) { // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n int MAX = (int) 1e5, MOD = (int)1e9+7;\n \n void solve(int TC) {\n \tchar[] s = ns().toCharArray();\n \tchar[] t = ns().toCharArray();\n \tint n = s.length;\n \tint m = t.length;\n \tint ans = m;\n \tfor(int i = 0; i <= n-m; i++) {\n \t\tint cnt = 0;\n \t\tfor(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;\n \t\tans = Math.min(ans, cnt);\n \t}\n \tpn(ans);\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n long pow(long a, long b) { // return pow(a,b) % MOD\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) { // return Modular Inverse of x\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8; // 1 MB is 1024*1024\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) { // when nextLine, (b != '\\n')\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
InputStream is;
PrintWriter out;
String INPUT = "";
int MAX = (int) 1e5, MOD = (int)1e9+7;
void solve(int TC) {
char[] s = ns().toCharArray();
char[] t = ns().toCharArray();
int n = s.length;
int m = t.length;
int ans = m;
for(int i = 0; i <= n-m; i++) {
int cnt = 0;
for(int j = 0; j < m; j++) if(t[j] != s[i+j]) ++cnt;
ans = Math.min(ans, cnt);
}
pn(ans);
}
boolean TestCases = false;
public static void main(String[] args) throws Exception { new Main().run(); }
long pow(long a, long b) { // return pow(a,b) % MOD
if(b==0 || a==1) return 1;
long o = 1;
for(long p = b; p > 0; p>>=1) {
if((p&1)==1) o = (o*a) % MOD;
a = (a*a) % MOD;
} return o;
}
long inv(long x) { // return Modular Inverse of x
long o = 1;
for(long p = MOD-2; p > 0; p>>=1) {
if((p&1)==1)o = (o*x)%MOD;
x = (x*x)%MOD;
} return o;
}
long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }
int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }
void run() throws Exception {
is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
out = new PrintWriter(System.out);
long s = System.currentTimeMillis();
int T = TestCases ? ni() : 1;
for(int t=1;t<=T;t++) solve(t);
out.flush();
if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
}
void p(Object o) { out.print(o); }
void pn(Object o) { out.println(o); }
void pni(Object o) { out.println(o);out.flush(); }
double PI = 3.141592653589793238462643383279502884197169399;
int ni() {
int num = 0, b;
boolean minus = false;
while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
if(b == '-') {
minus = true;
b = readByte();
}
while(true) {
if(b >= '0' && b <= '9'){
num = num * 10 + (b - '0');
} else {
return minus ? -num : num;
}
b = readByte();
}
}
long nl() {
long num = 0;
int b;
boolean minus = false;
while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
if(b == '-') {
minus = true;
b = readByte();
}
while(true) {
if(b >= '0' && b <= '9') {
num = num * 10 + (b - '0');
} else {
return minus ? -num : num;
}
b = readByte();
}
}
double nd() { return Double.parseDouble(ns()); }
char nc() { return (char)skip(); }
int BUF_SIZE = 1024 * 8; // 1 MB is 1024*1024
byte[] inbuf = new byte[BUF_SIZE];
int lenbuf = 0, ptrbuf = 0;
int readByte() {
if(lenbuf == -1)throw new InputMismatchException();
if(ptrbuf >= lenbuf){
ptrbuf = 0;
try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
if(lenbuf <= 0)return -1;
} return inbuf[ptrbuf++];
}
boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
String ns() {
int b = skip();
StringBuilder sb = new StringBuilder();
while(!(isSpaceChar(b))) { // when nextLine, (b != '\n')
sb.appendCodePoint(b); b = readByte();
} return sb.toString();
}
char[] ns(int n) {
char[] buf = new char[n];
int b = skip(), p = 0;
while(p < n && !(isSpaceChar(b))){
buf[p++] = (char)b;
b = readByte();
} return n == p ? buf : Arrays.copyOf(buf, p);
}
void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.