buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a, int b) {
if ((a % b) * 2 >= b) {
return (a / b) + 1;
}
return a / b;
}
int gcd(int a, int b) {
int c;
while (b != 0) {
c = a... | #include <bits/stdc++.h>
using namespace std;
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int round(int a, int b) {
if ((a % b) * 2 >= b) {
return (a / b) + 1;
}
return a / b;
}
int gcd(int a, int b) {
int c;
while (b != 0) {
c = a... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 39, 78], ["-", 0, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 2, ... | 1 | 1,438 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string str, bstr;
cin >> str >> bstr;
int count = 0, mxi = -1;
;
for (int i = 0; i < bstr.size(); i++) {
count = 0;
for (int j = i; j <= str.size() - bstr.size() + i; j++) {
count = 0;
if (str[j] == bstr[i]) {
... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
string str, bstr;
cin >> str >> bstr;
int count = 0, mxi = 0;
;
for (int i = 0; i < bstr.size(); i++) {
count = 0;
for (int j = i; j <= str.size() - bstr.size() + i; j++) {
count = 0;
if (str[j] == bstr[i]) {
... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 166 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int sl = s.length();
int tl = t.length();
int i, j;
int count = 0, countMax = 1001;
for (i = 0; i < sl - tl; i++) {
count = 0;
for (j = 0; j < tl; j++) {
if (s[i + j] != t[j])
count++;
}
if... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int sl = s.length();
int tl = t.length();
int i, j;
int count = 0, countMax = 1001;
for (i = 0; i <= sl - tl; i++) {
count = 0;
for (j = 0; j < tl; j++) {
if (s[i + j] != t[j])
count++;
}
i... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 127 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int lol(string &s, string &t, int &x) {
int tmp = 0;
for (int i = x; i < x + t.length(); i++) {
if (s[i] == t[i - x])
tmp++;
}
return tmp;
... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
int lol(string &s, string &t, int &x) {
int tmp = 0;
for (int i = x; i < x + t.length(); i++) {
if (s[i] == t[i - x])
tmp++;
}
return tmp;
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 158 |
S = input()
T = input()
N = len(T)
count = 0
count_list = []
index_list = []
if len(S)-len(T) != 0:
for i in range(len(S)-N):
index_list.append(S[0+i:N+i])
for i in range(len(index_list)):
count = 0
for j in range(N):
if index_list[i][j] == T[j]:
count +=1... | S = input()
T = input()
N = len(T)
count = 0
count_list = []
index_list = []
if len(S)-len(T) != 0:
for i in range(len(S)-N+1):
index_list.append(S[0+i:N+i])
for i in range(len(index_list)):
count = 0
for j in range(N):
if index_list[i][j] == T[j]:
count +=... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 152 |
#include <iostream>
#include <string>
using namespace std;
int sameCount(string s, string t) {
int count = 0;
for (int i = 0; i < t.length(); ++i) {
if (s[i] == t[i])
++count;
}
return count;
}
int main() {
string s, t;
cin >> s;
cin >> t;
int count = 0;
for (int i = 0; i < s.length() -... | #include <iostream>
#include <string>
using namespace std;
int sameCount(string s, string t) {
int count = 0;
for (int i = 0; i < t.length(); ++i) {
if (s[i] == t[i])
++count;
}
return count;
}
int main() {
string s, t;
cin >> s;
cin >> t;
int count = 0;
for (int i = 0; i <= s.length() ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 155 |
def check(a,b):
cnt=0
for x in range(len(a)):
if a[x]!=b[x]:
cnt+=1
return cnt
s=input()
t=input()
k=len(t)
ans=k
for x in range(len(s)-len(t)):
ans=min(ans,check(s[x:x+k],t))
print(ans)
| def check(a,b):
cnt=0
for x in range(len(a)):
if a[x]!=b[x]:
cnt+=1
return cnt
s=input()
t=input()
k=len(t)
ans=k
for x in range(len(s)-len(t)+1):
ans=min(ans,check(s[x:x+k],t))
print(ans)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 97 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#define ll long long
#define lson (rt << 1)
#define rson (rt << 1 | 1)
#define gmid ((l + r) >> 1)
using namespace std;
const int maxn = 20000050;
string s1, s2;
int main() {
cin >> s1;
cin >> s2;
ll ans = maxn;
int n = s1.length(), m ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#define ll long long
#define lson (rt << 1)
#define rson (rt << 1 | 1)
#define gmid ((l + r) >> 1)
using namespace std;
const int maxn = 20000050;
string s1, s2;
int main() {
cin >> s1;
cin >> s2;
ll ans = maxn;
int n = s1.length(), m ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["-", 0, 7, 8, 9, 0, 57, 64, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 22]] | 1 | 151 |
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()); i++) {
for (int j = 0; ... | 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 =... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 164 |
#include <bits/stdc++.h>
using namespace std;
#define me(a) memset(a, 0, sizeof(a));
typedef long long ll;
int main() {
string s, t;
s.clear();
t.clear();
cin >> s >> t;
int len1 = s.length();
int len2 = t.length();
int ans = 2000;
for (int i = 0; i < len1 - len2; i++) {
int tmp = 0;
for (int j... | #include <bits/stdc++.h>
using namespace std;
#define me(a) memset(a, 0, sizeof(a));
typedef long long ll;
int main() {
string s, t;
s.clear();
t.clear();
cin >> s >> t;
int len1 = s.length();
int len2 = t.length();
int ans = 2000;
for (int i = 0; i <= len1 - len2; i++) {
int tmp = 0;
for (int ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 147 |
#include "bits/stdc++.h"
using namespace std;
#ifdef LOCAL
#include "debug.h"
#define input \
freopen("input.txt", "r", stdin); \
freopen("output.txt", "w", stdout);
#else
#define debug(...) 4
#define input ... | #include "bits/stdc++.h"
using namespace std;
#ifdef LOCAL
#include "debug.h"
#define input \
freopen("input.txt", "r", stdin); \
freopen("output.txt", "w", stdout);
#else
#define debug(...) 4
#define input ... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 184 |
package main
import (
"fmt"
"strings"
)
func main() {
var s string
fmt.Scan(&s)
var t string
fmt.Scan(&t)
s1 := strings.Split(s, "")
s2 := strings.Split(t, "")
length1 := len(s1)
length2 := len(s2)
length := length1 - length2
var count int
max := 0
for i := 0; i < length; i++ {
count = 0
for j :... | package main
import (
"fmt"
"strings"
)
func main() {
var s string
fmt.Scan(&s)
var t string
fmt.Scan(&t)
s1 := strings.Split(s, "")
s2 := strings.Split(t, "")
length1 := len(s1)
length2 := len(s2)
length := length1 - length2
var count int
max := 0
for i := 0; i <= length; i++ {
count = 0
for j ... | [["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]] | 7 | 172 |
#include <bits/stdc++.h>
using namespace std;
// def
#define debug(x) cout << #x << ": " << x << '\n'
#define out(x) cout << x << '\n'
#define repeat(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define revrepeat(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)
#define rep(i, n) for (int i = 0; i < (int)(n)... | #include <bits/stdc++.h>
using namespace std;
// def
#define debug(x) cout << #x << ": " << x << '\n'
#define out(x) cout << x << '\n'
#define repeat(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define revrepeat(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)
#define rep(i, n) for (int i = 0; i < (int)(n)... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 363 |
#include <cstdio>
#include <iostream>
using namespace std;
string s1, t;
int ans;
int fzx_min(int x, int y) { return x < y ? x : y; }
signed main() {
cin >> s1 >> t;
ans = 2147483647;
int len = s1.size() - t.size();
for (int i = 0; i <= len; i++) {
int sum = 0, len1 = t.size();
for (int j = i; j <= i + ... | #include <cstdio>
#include <iostream>
using namespace std;
string s1, t;
int ans;
int fzx_min(int x, int y) { return x < y ? x : y; }
signed main() {
cin >> s1 >> t;
ans = 2147483647;
int len = s1.size() - t.size();
for (int i = 0; i <= len; i++) {
int sum = 0, len1 = t.size();
for (int j = i; j < i + l... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 149 |
import math
min = math.inf
S = input()
T = input()
len_t = len(T)
for s in range(0,len(S)-len_t):
sub = S[s: s+len_t]
diff = 0
for i in range(len_t):
if sub[i] != T[i]:
diff += 1
if diff > min:
break
else:
if diff < min:
min = diff
pri... | import math
min = math.inf
S = input()
T = input()
len_t = len(T)
for s in range(0,len(S)-len_t+1):
sub = S[s: s+len_t]
diff = 0
for i in range(len_t):
if sub[i] != T[i]:
diff += 1
if diff > min:
break
else:
if diff < min:
min = diff
p... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 93 |
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.... | 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.... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 177 |
s = input()
t = input()
ans = 0
max = 0
if t in s:
print(ans)
else:
for i in range(len(s) - len(t)):
for j in range(len(t)):
if t[j] == s[i]:
ans += 1
else:
if max < ans:
max = ans
ans = 0
print(len(t) - max) | s = input()
t = input()
ans = 0
max = 0
if t in s:
print(ans)
else:
for i in range(len(s) - len(t) + 1):
for j in range(len(t)):
if t[j] == s[j + i]:
ans += 1
if max < ans:
max = ans
ans = 0
print(len(t) - max)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 206, 206, 657, 31, 22], ["+", 0, 57, 15, 666, 0, 206, 206, 657, 17, 72], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102]] | 5 | 90 |
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
// import java.text.DecimalFormat;
// import java.text.DecimalFormatSymbols;
/*
caba
abc
*/
public class Main {
public static void main(String args[]) throws Exception {
PrintWriter pw = new PrintWriter(System.out);
FastScanner... | import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;
// import java.text.DecimalFormat;
// import java.text.DecimalFormatSymbols;
/*
caba
abc
*/
public class Main {
public static void main(String args[]) throws Exception {
PrintWriter pw = new PrintWriter(System.out);
FastScanner... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72]] | 3 | 399 |
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 min = t.length();
for (int i = 0; i < s.length() - t.length(); i++) {
String ss = s.substring(i, i + t.length());
... | 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 min = t.length();
for (int i = 0; i <= s.length() - t.length(); i++) {
String ss = s.substring(i, i + t.length());
... | [["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 172 |
#include <stdio.h>
#include <string.h>
int main() {
char S[1001] = {'\0'};
char T[1001] = {'\0'};
int count = 0, min = 1000;
int len_S = 0;
int len_T = 0;
gets(S);
gets(T);
len_S = strlen(S);
len_T = strlen(T);
for (int i = 0; i + len_T < len_S; i++) {
count = 0;
for (int j = 0; j < len_... | #include <stdio.h>
#include <string.h>
int main() {
char S[1001] = {'\0'};
char T[1001] = {'\0'};
int count = 0, min = 1000;
int len_S = 0;
int len_T = 0;
gets(S);
gets(T);
len_S = strlen(S);
len_T = strlen(T);
for (int i = 0; i + len_T <= len_S; i++) {
count = 0;
for (int j = 0; j < len... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 158 |
S = gets.chomp
T = gets.chomp
m = T.size
(0 .. S.size - T.size).each do |i|
c = 0
(0..T.size).each do |j|
if T[j]!=S[i+j]
c += 1
break if c > m
end
end
m = c if c < m
end
puts m | S = gets.chomp
T = gets.chomp
m = T.size
(0 .. S.size - T.size).each do |i|
c = 0
(0...T.size).each do |j|
if T[j]!=S[i+j]
c += 1
break if c > m
end
end
m = c if c < m
end
puts m | [["-", 8, 736, 0, 652, 486, 739, 0, 475, 17, 757], ["+", 8, 736, 0, 652, 486, 739, 0, 475, 17, 389]] | 4 | 80 |
//ヘッダー
#include <bits/stdc++.h>
using namespace std;
//型定義
typedef long long ll;
//定数
const ll INF = 1e+18;
const int MOD = 1e+9 + 7;
// REPマクロ
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define REP2(i, a, b) for (ll i = a; i < (ll)(b); i++)
#define REPD2(i,... | //ヘッダー
#include <bits/stdc++.h>
using namespace std;
//型定義
typedef long long ll;
//定数
const ll INF = 1e+18;
const int MOD = 1e+9 + 7;
// REPマクロ
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define REP2(i, a, b) for (ll i = a; i < (ll)(b); i++)
#define REPD2(i,... | [["+", 0, 9, 0, 1, 0, 11, 12, 2, 63, 22]] | 1 | 340 |
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 29 20:26:17 2020
@author: wiste
"""
S = list(input())
T = list(input())
cm = 0
for i in range(len(S) - len(T)):
c =0
for j in range(len(T)):
if S[i+j] == T[j]:
c += 1
cm = max(cm, c)
ans = len(T) - cm
print(ans) | # -*- coding: utf-8 -*-
"""
Created on Sat Aug 29 20:26:17 2020
@author: wiste
"""
S = list(input())
T = list(input())
cm = 0
for i in range(len(S) - len(T) + 1):
c =0
for j in range(len(T)):
if S[i+j] == T[j]:
c += 1
cm = max(cm, c)
ans = len(T) - cm
print(ans) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 89 |
import sys
import re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_... | import sys
import re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 384 |
# def Substring(S, T):
# n = len(S)
# m = len(T)
# dic = {}
#
# def traverse(i, j):
# if i != n and j == m:
# return 0
# elif (i, j) in dic:
# return dic[(i, j)]
# else:
# if S[i] == T[j]:
# ans = traverse(i + 1, j + 1)
# ... |
def char_match(s,t,m):
match = 0
for i in range(m):
if s[i] == t[i]:
match += 1
return match
def substring(S,T):
m = len(T)
char_mismatch = m
for i in range(0,(len(S)-m) +1):
char_mismatch = min(char_mismatch, m - char_match(S[i:i+m],T, m))
return char_mismatch
... | [["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 24], ["+", 12, 652, 3, 4, 0, 657, 31, 23, 0, 25], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 141 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
string str1;
int ans = 0;
for (int i = 0; i < s.size() - t.size(); i++) {
str1 = s.substr(i, t.size());
int cnt = 0;
for (int j = 0; j < t.size(); j++) {
if (t[j] == str1[j])
cnt++;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
string str1;
int ans = 0;
for (int i = 0; i <= s.size() - t.size(); i++) {
str1 = s.substr(i, t.size());
int cnt = 0;
for (int j = 0; j < t.size(); j++) {
if (t[j] == str1[j])
cnt++;
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 138 |
s = input()
t = input()
t_len = len(t)
s_len = len(s)
max_ = 0
temp = 0
for i in range(s_len - t_len):
for j in range(t_len):
if s[i + j] == t[j]:
temp += 1
if max_ < temp:
max_ = temp
temp = 0
print(t_len - max_) | s = input()
t = input()
t_len = len(t)
s_len = len(s)
max_ = 0
temp = 0
for i in range(s_len - t_len + 1):
for j in range(t_len):
if s[i + j] == t[j]:
temp += 1
if max_ < temp:
max_ = temp
temp = 0
print(t_len - max_) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 79 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define mp make_pair
// GCD inbuilt func: __gcd(a,b)
// LCM formula: (a*b)/__gcd(a,b)
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
// CODE goes here
string s, t;
cin >> s >> t;
int maxi =... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define mp make_pair
// GCD inbuilt func: __gcd(a,b)
// LCM formula: (a*b)/__gcd(a,b)
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
// CODE goes here
string s, t;
cin >> s >> t;
int maxi =... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72]] | 1 | 165 |
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>
#define endl "\n"
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pll pair<long long, long long>
#defin... |
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>
#define endl "\n"
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pll pair<long long, long long>
#defin... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 22]] | 1 | 196 |
S=str(input())
T=str(input())
ls = []
cnt = 0
for i in range(len(S)-len(T)):
cnt = 0
for j in range(len(T)):
if T[j] != S[j+i]:
cnt += 1
ls.append(cnt)
print(min(ls))
| S=str(input())
T=str(input())
ls = []
cnt = 0
for i in range(len(S)-len(T)+1):
cnt = 0
for j in range(len(T)):
#print(i,j)
if T[j] != S[j+i]:
#print(T[j],S[j+i])
cnt += 1
ls.append(cnt)
#print(ls)
print(min(ls))
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 82 |
s = input()
t = input()
n = len(t)
ans = float('inf')
for i in range(len(s)-n):
tmp = 0
for j in range(n):
if t[j]!=s[i+j]:
tmp += 1
ans = min(ans,tmp)
print(ans if ans != float('inf') else 0) | s = input()
t = input()
n = len(t)
ans = float('inf')
for i in range(len(s)-n+1):
tmp = 0
for j in range(n):
if t[j]!=s[i+j]:
tmp += 1
ans = min(ans,tmp)
print(ans if ans != float('inf') else 0) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 87 |
package main
import (
"fmt"
)
func main() {
var s, t string
fmt.Scan(&s)
fmt.Scan(&t)
var maxMatch int
for i := 0; i < len(s)-len(t); i++ {
matched := matchCount(t, s[i:i+len(t)])
if matched > maxMatch{
maxMatch = matched
}
}
fmt.Println(len(t) - maxMatch)
}
func matchCount(a, b string) int {
coun... | package main
import (
"fmt"
)
func main() {
var s, t string
fmt.Scan(&s)
fmt.Scan(&t)
var maxMatch int
for i := 0; i <= len(s)-len(t); i++ {
matched := matchCount(t, s[i:i+len(t)])
if matched > maxMatch{
maxMatch = matched
}
}
fmt.Println(len(t) - maxMatch)
}
func matchCount(a, b string) int {
cou... | [["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]] | 7 | 153 |
S = input()
T = input()
max = 0
max_i = 0
ans = len(T)
for i in range(len(S) - len(T)):
cnt = 0
for j in range(len(T)):
if S[i + j] == T[j]:
cnt += 1
if cnt > max:
max = cnt
max_i = i
ans = len(T) - max
print(ans) | S = input()
T = input()
max = 0
max_i = 0
ans = len(T)
for i in range(len(S) - len(T) + 1):
cnt = 0
for j in range(len(T)):
if S[i + j] == T[j]:
cnt += 1
if cnt > max:
max = cnt
max_i = i
ans = len(T) - max
print(ans)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 91 |
s=input()
t=input()
a=float('inf')
n=0
for i in range(len(s)-len(t)):
n=0
for ss,tt in zip(s[i:i+len(t)] , t):
if ss != tt:
n+=1
a=min(a,n)
print(a) | s=input()
t=input()
a=float('inf')
n=0
for i in range(len(s)-len(t)+1):
n=0
for ss,tt in zip(s[i:i+len(t)] , t):
if ss != tt:
n+=1
a=min(a,n)
print(a) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 82 |
s = input()
t = input()
n, m = len(s), len(t)
ma = 0
for i in range(n-m):
tmp = 0
s_sub = s[i:i+m]
for j in range(m):
if s_sub[j] == t[j]:
tmp += 1
ma = max(ma, tmp)
print(m - ma) | s = input()
t = input()
n, m = len(s), len(t)
ma = 0
for i in range(n-m+1):
tmp = 0
s_sub = s[i:i+m]
for j in range(m):
if s_sub[j] == t[j]:
tmp += 1
ma = max(ma, tmp)
print(m - ma) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 85 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int len1 = S.length();
int len2 = T.length();
int num = INT_MAX;
for (int i = 0; i < len1 - len2; i = i + 1) {
int diff = 0;
for (int j = 0, k = i; j < len2 && k < i + len2; j = j + 1, k = k + 1) {
if (T[j] ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
int len1 = S.length();
int len2 = T.length();
int num = INT_MAX;
for (int i = 0; i <= len1 - len2; i = i + 1) {
int diff = 0;
for (int j = 0, k = i; j < len2 && k < i + len2; j = j + 1, k = k + 1) {
if (T[j]... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 141 |
#include <stdio.h>
#include <string.h>
int main(void) {
char s[1000], t[1000];
scanf("%s%s", s, t);
int len = strlen(t), i, j, cnt, min = len;
for (i = 0; s[i + len + 1] != '\0'; i++) {
cnt = 0;
for (j = 0; t[j] != '\0'; j++) {
if (s[i + j] != t[j]) {
cnt++;
}
}
min = cnt < m... | #include <stdio.h>
#include <string.h>
int main(void) {
char s[1000], t[1000];
scanf("%s%s", s, t);
int len = strlen(t), i, j, cnt, min = len;
for (i = 0; s[i + len - 1] != '\0'; i++) {
cnt = 0;
for (j = 0; t[j] != '\0'; j++) {
if (s[i + j] != t[j]) {
cnt++;
}
}
min = cnt < m... | [["-", 0, 7, 15, 16, 31, 69, 71, 16, 17, 72], ["+", 0, 7, 15, 16, 31, 69, 71, 16, 17, 33]] | 0 | 140 |
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;
... | 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;
... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 176 |
s = list(input())
t = list(input())
mx = 0
for i in range(len(s)-len(t)):
count = 0
for j in range(len(t)):
if s[j+i] == t[j]:
count += 1
if mx < count:
mx = count
print(len(t)-mx)
| s = list(input())
t = list(input())
mx = 0
for i in range(len(s)-len(t)+1):
count = 0
for j in range(len(t)):
if s[j+i] == t[j]:
count += 1
if mx < count:
mx = count
print(len(t)-mx)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 82 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int minChange = 10000;
for (int i = 0; i < s.size() - t.size(); i++) {
int change = 0;
for (int j = 0; j < t.size(); j++) {
if (s.at(i + j) != t.at(j))
change++;
}
if (change < minChange)
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int minChange = 10000;
for (int i = 0; i <= s.size() - t.size(); i++) {
int change = 0;
for (int j = 0; j < t.size(); j++) {
if (s.at(i + j) != t.at(j))
change++;
}
if (change < minChange)
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 116 |
#!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(... | #!/usr/bin/env python3
# N,M = map(int,sys.stdin.readline().split())
# a = tuple(map(int,sys.stdin.readline().split())) # single line with multi param
# a = tuple(int(sys.stdin.readline()) for _ in range(N)) # multi line with single param
# a = tuple(tuple(map(int,sys.stdin.readline().rstrip().split())) for _ in range(... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 104 |
#ifdef _DEBUG
#include "../../library/library/debug_template.cpp"
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else
#define DMP(...) ((void)0)
#endif
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>... | #ifdef _DEBUG
#include "../../library/library/debug_template.cpp"
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else
#define DMP(...) ((void)0)
#endif
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 248 |
s = gets.chomp.split("")
t = gets.chomp.split("")
maxfit = []
s.length.times do |si|
tempcnt = 0
break if s.length < si+1 + t.length
t.length.times do |ti|
break if si >= s.length
if s[si] == t[ti]
tempcnt += 1
end
si += 1
end
maxfit.push(tempcnt)
end
p t.length - maxfit.max | s = gets.chomp.split("")
t = gets.chomp.split("")
maxfit = [0]
s.length.times do |si|
tempcnt = 0
break if s.length < si + t.length
t.length.times do |ti|
break if si >= s.length
if s[si] == t[ti]
tempcnt += 1
end
si += 1
end
maxfit.push(tempcnt)
end
p t.length - maxfit.max | [["+", 36, 36, 0, 493, 0, 662, 12, 516, 0, 612], ["-", 0, 751, 15, 738, 12, 738, 31, 738, 17, 72], ["-", 0, 751, 15, 738, 12, 738, 31, 738, 12, 612]] | 4 | 100 |
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 max = 0;
for (int i = 0; i < s.length() - t.length(); i++) {
String a = s.substring(i, t.length() + i);
int cnt... | 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 max = 0;
for (int i = 0; i < s.length() - t.length() + 1; i++) {
String a = s.substring(i, t.length() + i);
int... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 178 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define deb(x) cout << #x << " " << x << endl;
#define debtwo(x, y) cout << #x << " " << x << ", " << #y << " " << y << endl;
#define mod 100000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s, t;
cin >> s >> t;... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define deb(x) cout << #x << " " << x << endl;
#define debtwo(x, y) cout << #x << " " << x << ", " << #y << " " << y << endl;
#define mod 100000007
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
string s, t;
cin >> s >> t;... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 200 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
long long len_S, len_T;
len_S = S.length();
len_T = T.length();
long count_tmp = 0;
long count = 0;
for (long i = 0; i < len_S; i++) {
for (long j = 0; j < len_T; j++) {
if (S[i + j] == T[j]) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S, T;
cin >> S >> T;
long long len_S, len_T;
len_S = S.length();
len_T = T.length();
long count_tmp = 0;
long count = 0;
for (long i = 0; i < len_S - len_T + 1; i++) {
for (long j = 0; j < len_T; j++) {
if (S[i + j] == T[j]... | [["+", 0, 7, 15, 16, 12, 16, 31, 16, 17, 33], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 128 |
#include <bits/stdc++.h>
#define watch(x) cout << #x << " -> " << x << endl
#define ALL(x) x.begin(), x.end()
#define INF 100000
typedef long long ll;
using namespace std;
string s;
string s1;
int check(int l, int r) {
int cnt = 0, j = 0;
for (int i = l; i < r; i++) {
if (s[i] != s1[j])
cnt++;
j++;
... | #include <bits/stdc++.h>
#define watch(x) cout << #x << " -> " << x << endl
#define ALL(x) x.begin(), x.end()
#define INF 100000
typedef long long ll;
using namespace std;
string s;
string s1;
int check(int l, int r) {
int cnt = 0, j = 0;
for (int i = l; i < r; i++) {
if (s[i] != s1[j])
cnt++;
j++;
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 173 |
S = input()
T = input()
ss = len(S)
tt = len(T)
count = 0
res = []
for i in range(ss-tt+1):
for j in range(tt):
if S[i+j] != T[j]:
count += 1
res.append(count)
count = 0
print(res)
print(min(res)) | S = input()
T = input()
ss = len(S)
tt = len(T)
count = 0
res = []
for i in range(ss-tt+1):
for j in range(tt):
if S[i+j] != T[j]:
count += 1
res.append(count)
count = 0
print(min(res)) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 85 |
import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline
def array(size, init=0):
return [[init for j in range(size[1])] for i in range(size[0])]
def acinput():
return list(map(int, input().split(" ")))
def II():
return int(input())
def nitti(x,... |
import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline
def array(size, init=0):
return [[init for j in range(size[1])] for i in range(size[0])]
def acinput():
return list(map(int, input().split(" ")))
def II():
return int(input())
def nitti(x,... | [["+", 0, 206, 206, 663, 0, 23, 0, 657, 17, 33], ["+", 0, 206, 206, 663, 0, 23, 0, 657, 12, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 200 |
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
string t;
cin >> t;
int m = t.size();
int minCost = 10000;
for (int i = 0; i < (n - m); i++) {
int cost = 0;
for (int j = 0; j < m; j++) {
if (s[i + j] != t[j]) {
cost++;
}
}
i... | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
string t;
cin >> t;
int m = t.size();
int minCost = 10000;
for (int i = 0; i <= (n - m); i++) {
int cost = 0;
for (int j = 0; j < m; j++) {
if (s[i + j] != t[j]) {
cost++;
}
}
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 127 |
def resolve():
S = input()
T = input()
mincnt = float("inf")
for ptr in range(len(S)-len(T)):
cnt = 0
for i in range(len(T)):
sptr = ptr + i
if S[sptr] != T[i]:
cnt += 1
mincnt = min(cnt, mincnt)
print(mincnt)
if '__main__' == _... | def resolve():
S = input()
T = input()
mincnt = float("inf")
for ptr in range(len(S)-len(T)+1):
cnt = 0
for i in range(len(T)):
sptr = ptr + i
if S[sptr] != T[i]:
cnt += 1
mincnt = min(cnt, mincnt)
print(mincnt)
if '__main__' ==... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 94 |
s=input()
t=input()
ans=10*3+1
for i in range(len(s)-len(t)):
tmp=0
for j in range(len(t)):
if s[i+j]!=t[j]:
tmp+=1
ans=min(ans,tmp)
print(ans)
| s=input()
t=input()
ans=10**3+1
for i in range(len(s)-len(t)+1):
tmp=0
for j in range(len(t)):
# print(s[i+j],t[j])
if s[i+j]!=t[j]:
tmp+=1
ans=min(ans,tmp)
# print(ans,tmp)
# print("-"*10)
print(ans)
| [["-", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 578], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 75 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int ns = s.size();
int nt = t.size();
int res;
int min = 2000;
for (int i = 0; i < ns - nt + 1; ++i) {
res = 0;
string sub = s.substr(i, i + nt - 1);
for (int j = 0; j < nt; ++j) {
if (sub[j] != t[j])
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int ns = s.size();
int nt = t.size();
int res;
int min = 2000;
for (int i = 0; i < ns - nt + 1; ++i) {
res = 0;
string sub = s.substr(i, nt);
for (int j = 0; j < nt; ++j) {
if (sub[j] != t[j])
... | [["-", 51, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["-", 51, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 144 |
import java.util.Scanner;
public class Main {
static int solve(String s, String t) {
int min = 1001;
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++;
}
if (count <... | import java.util.Scanner;
public class Main {
static int solve(String s, String t) {
int min = 1001;
for (int i = 0; i < s.length() - t.length() + 1; i++) {
int count = 0;
for (int j = 0; j < t.length(); j++) {
if (s.charAt(i + j) != t.charAt(j))
count++;
}
if (cou... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 183 |
#B
s = input()
t = input()
Min = len(t)
for i in range(len(s)-len(t)):
cont = len(t)
for j in range(len(t)):
if s[i+j] == t[j]:
cont -= 1
if cont < Min:
Min = cont
print(Min)
| #B
s = input()
t = input()
Min = len(t)
for i in range(len(s)-len(t)+1):
cont = len(t)
for j in range(len(t)):
if s[i+j] == t[j]:
cont -= 1
if cont < Min:
Min = cont
print(Min)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 78 |
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 ans = t.length();
String[] as = s.split("");
String[] at = t.split("");
for (int i = 0; i < as.length - a... | 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 ans = t.length();
String[] as = s.split("");
String[] at = t.split("");
for (int i = 0; i < as.length - a... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 184 |
/*
Hey , lakshay 05
while( ! ( succeed == try)); // Follow this
Don't compare yourself with anyone in the world,if you do so it means you are
insulting yourself -> Bill Gates
*/
#include <bits/stdc++.h>
#define ll long long
#define RUNFAST \
ios... | /*
Hey , lakshay 05
while( ! ( succeed == try)); // Follow this
Don't compare yourself with anyone in the world,if you do so it means you are
insulting yourself -> Bill Gates
*/
#include <bits/stdc++.h>
#define ll long long
#define RUNFAST \
ios... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 906 |
S = list(input())
T = list(input())
T_length = len(T)
max_count = 0
for i in range(len(S)-T_length+1):
count = 0
for j in range(T_length):
if S[i:i + T_length][j] == T[j]:
count += 1
else:
if max_count > count:
max_count = count
print(T_length - max_count)
| S = list(input())
T = list(input())
T_length = len(T)
max_count = 0
for i in range(len(S)-T_length+1):
count = 0
for j in range(T_length):
if S[i:i + T_length][j] == T[j]:
count += 1
else:
if max_count < count:
max_count = count
print(T_length - max_count)
| [["-", 75, 76, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 667, 18]] | 5 | 88 |
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define rep(i, p) for (long long int i = 0; i < p; i++)
#define reep(i, p) for (long long int i = 1; i <= p; i++)
#define ll long long
using namespace std;
int main() {
... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define rep(i, p) for (long long int i = 0; i < p; i++)
#define reep(i, p) for (long long int i = 1; i <= p; i++)
#define ll long long
using namespace std;
int main() {
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 230 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef long double ld;
typedef pair<ld, ld> LDP;
typedef vector<vector<ll>> mat;
typedef vector<ll> vec;
#define rep(i, n) for (int i = 0; i <... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef long double ld;
typedef pair<ld, ld> LDP;
typedef vector<vector<ll>> mat;
typedef vector<ll> vec;
#define rep(i, n) for (int i = 0; i <... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 1,353 |
#include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define ll long long
int main() {
string s, t;
cin >> s >> t;
ll maxi = INT_MAX;
for (int i = 0; i <= (s.size() - t.size()); i++) {
ll c = 0;
s... | #include <bitset>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define ll long long
int main() {
string s, t;
cin >> s >> t;
ll maxi = INT_MAX;
for (int i = 0; i <= (s.size() - t.size()); i++) {
ll c = 0;
s... | [["-", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 154 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int ans = 2147483647;
for (int i = 0; i <= s1.size() - s2.size(); i++) {
int cnt = 0;
for (int j = 0; j <= s2.size(); j++) {
if (s1[i + j] != s2[j])
cnt++;
}
ans = min(ans, cnt);
}
cout <... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s1, s2;
cin >> s1 >> s2;
int ans = 2147483647;
for (int i = 0; i <= s1.size() - s2.size(); i++) {
int cnt = 0;
for (int j = 0; j < s2.size(); j++) {
if (s1[i + j] != s2[j])
cnt++;
}
ans = min(ans, cnt);
}
cout <<... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18]] | 1 | 114 |
S=input().strip()
T=input().strip()
ls = len(S)
lt = len(T)
x = lt
for i in range(0,ls-lt):
m = 0
for j in range(lt):
if T[j] != S[i+j]:
m += 1
x = min(x,m)
print(x)
| S=input().strip()
T=input().strip()
ls = len(S)
lt = len(T)
x = lt
for i in range(0,ls-lt+1):
m = 0
for j in range(lt):
if T[j] != S[i+j]:
m += 1
x = min(x,m)
print(x)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 84 |
S=input()
T=input()
best_num_char=0
for i in range(len(S)-len(T)):
# print(T[i:])
num_char=0
for j in range(len(T)):
num_char+=1 if S[i+j]==T[j] else 0
# print(num_char,S[i + j])
if best_num_char<num_char:
best_num_char=num_char
# print(len(T))
print(len(T)-best_num_char) | S=input()
T=input()
best_num_char=0
for i in range(len(S)-len(T)+1):
# print(T[i:])
num_char=0
for j in range(len(T)):
num_char+=1 if S[i+j]==T[j] else 0
# print(num_char,S[i + j])
if best_num_char<num_char:
best_num_char=num_char
# print(len(T))
print(len(T)-best_num_char) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mk make_pair
#define pb push_back
#define mod 1000000007
int main() {
string s, t;
cin >> s >> t;
int f = t.length();
for (int i = 0; i < s.length(); i++) {
int temp = 0;
if (i + t.length() < s.length()) {
int l = i;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mk make_pair
#define pb push_back
#define mod 1000000007
int main() {
string s, t;
cin >> s >> t;
int f = t.length();
for (int i = 0; i < s.length(); i++) {
int temp = 0;
if (i + t.length() - 1 < s.length()) {
int l = i;
... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 156 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s, t;
cin >> s >> t;
int ans = 1e8;
for (int i = 0; i < s.size() - t.size(); i++) {
int cnt = 0;
for (int j = 0; j < t.size(); j++) {
if (s[i + j] != t[j]) {
cnt++;
}
}
ans = min(ans, c... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s, t;
cin >> s >> t;
int ans = 1e8;
for (int i = 0; i < s.size() - t.size() + 1; i++) {
int cnt = 0;
for (int j = 0; j < t.size(); j++) {
// cout<<s[i+j]<<" "<<t[j]<<endl;
if (s[i + j] != t[j]) {
... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 121 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int cnt = 0;
string S, T;
cin >> S >> T;
for (int i = 0; i < S.length() - T.length(); i++) {
int tmp = 0;
for (int j = 0; j < T.length(); j++) {
if (S[i + j] == T[j]) {
tmp++;
}
}
if (cnt < tmp) {
cnt = tmp;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int cnt = 0;
string S, T;
cin >> S >> T;
for (int i = 0; i < S.length() - T.length() + 1; i++) {
int tmp = 0;
for (int j = 0; j < T.length(); j++) {
if (S[i + j] == T[j]) {
tmp++;
}
}
if (cnt < tmp) {
cnt = tm... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 122 |
// Sky's the limit :)
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int T = 1;
// cin >> T;
while (T--) {
string s, t;
cin >> s >> t;
int mn = t.size();
for (int i = 0; i + t.size() < s.size(); i++) {
... | // Sky's the limit :)
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int T = 1;
// cin >> T;
while (T--) {
string s, t;
cin >> s >> t;
int mn = t.size();
for (int i = 0; i + t.size() <= s.size(); i++) {... | [["-", 0, 52, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 52, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 163 |
#include <stdio.h>
#include <string.h>
int main(void) {
char s[1001], t[1001];
int a, b, i, j, cnt = 0, max = -1;
scanf("%s %s", s, t);
a = strlen(s);
b = strlen(t);
for (i = 0; i < a - b; i++) {
for (j = 0; j < b; j++) {
if (s[i + j] == t[j]) {
cnt++;
}
}
if (max <= cnt) {
... | #include <stdio.h>
#include <string.h>
int main(void) {
char s[1001], t[1001];
int a, b, i, j, cnt = 0, max = 0;
scanf("%s %s", s, t);
a = strlen(s);
b = strlen(t);
for (i = 0; i <= a - b; i++) {
for (j = 0; j < b; j++) {
if (s[i + j] == t[j]) {
cnt++;
}
}
// printf("cnt=%d\n... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 146 |
#B - Substring
S = input()
T = input()
ans = 10**9
for i in range(len(S)-len(T)):
count = 0
for j in range(len(T)):
if S[i+j] != T[j]:
count += 1
else:
pass
if ans >= count:
ans = count
else:
pass
print(ans) | #B - Substring
S = input()
T = input()
ans = 10**9
for i in range(len(S)-len(T)+1):
count = 0
for j in range(len(T)):
if S[i+j] != T[j]:
count += 1
else:
pass
if ans >= count:
ans = count
else:
pass
print(ans) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 80 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define all(v) v.begin(), v.end()
const ll mod = 1000000007;
ll countBits(ll in) {
int res = 0;
for (; in > 0; in >>= 1) {
if ((in & 0x01) != 0) {
res++;
}
}
return res;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
#define all(v) v.begin(), v.end()
const ll mod = 1000000007;
ll countBits(ll in) {
int res = 0;
for (; in > 0; in >>= 1) {
if ((in & 0x01) != 0) {
res++;
}
}
return res;... | [["+", 51, 16, 31, 69, 341, 342, 0, 16, 31, 22], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 72]] | 1 | 702 |
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
S,T = [S() for _... | import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
S,T = [S() for _... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 201 |
#include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define looplt(i, x) for (i = 0; i < x; ++i)
#define bsrch(v, x) binary_search(v.begin(), v.end(), x)
#define vecl vector<long long int>
#define pb(x) push_back(x)
const long long int MAX_INT = 10e+10;
typedef long long int ll;
void pvec(vector<ll> &inp)... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define looplt(i, x) for (i = 0; i < x; ++i)
#define bsrch(v, x) binary_search(v.begin(), v.end(), x)
#define vecl vector<long long int>
#define pb(x) push_back(x)
const long long int MAX_INT = 10e+10;
typedef long long int ll;
void pvec(vector<ll> &inp)... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 393 |
import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.NoSuchElementException;
import javax.swing.plaf.metal.MetalBorders.InternalFrameBorder;
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
p... | import java.io.IOException;
import java.io.InputStream;
import java.util.*;
import java.util.NoSuchElementException;
import javax.swing.plaf.metal.MetalBorders.InternalFrameBorder;
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
p... | [["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 499]] | 3 | 946 |
#include <bits/stdc++.h>
#include <cmath>
#define ll long long
#define PI 3.14159265358979323846
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
#include <cmath>
#define ll long long
#define PI 3.14159265358979323846
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); ... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 221 |
#include <bits/stdc++.h>
#define FAST_IO ios_base::sync_with_stdio(false), cin.tie(nullptr)
#define setIO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout)
#define trav(e, x) for (auto &(e) : (x))
#define pb(x) push_back(x)
#define eb(x...) emplace_back(x)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(... | #include <bits/stdc++.h>
#define FAST_IO ios_base::sync_with_stdio(false), cin.tie(nullptr)
#define setIO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout)
#define trav(e, x) for (auto &(e) : (x))
#define pb(x) push_back(x)
#define eb(x...) emplace_back(x)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 211 |
S = input()
T = input()
d = len(S) - len(T)
print(len(T) - max(sum(t == s for t, s in zip(T, S[i : i + d + 1])) for i in range(d + 1))) | S = input()
T = input()
d = len(S) - len(T)
print(len(T) - max(sum(t == s for t, s in zip(T, S[i : i + len(T) + 1])) for i in range(d + 1))) | [["-", 0, 206, 206, 663, 0, 657, 31, 657, 12, 22], ["+", 206, 663, 0, 657, 31, 657, 12, 652, 63, 22], ["+", 0, 657, 31, 657, 12, 652, 3, 4, 0, 24], ["+", 0, 657, 31, 657, 12, 652, 3, 4, 0, 22], ["+", 0, 657, 31, 657, 12, 652, 3, 4, 0, 25]] | 5 | 67 |
S = input()
T = input()
maxtmp = 0
if len(S) == 1:
if T in S:
print(0)
else:
print(1)
else:
for i in range(len(S)- len(T)):
tmp = 0
for j in range(len(T)):
if S[i+j] == T[j]:
tmp += 1
if maxtmp < tmp:
maxtmp = tmp
print(len... | S = input()
T = input()
maxtmp = 0
if len(S) == 1:
if T in S:
print(0)
else:
print(1)
else:
for i in range(len(S)- len(T)+1):
tmp = 0
for j in range(len(T)):
if S[i+j] == T[j]:
tmp += 1
if maxtmp < tmp:
maxtmp = tmp
print(l... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 101 |
s = input()
t = input()
minr = len(t)
s_t_d = len(s) - len(t)
for i in range(s_t_d):
cnt = 0
for ss, ts in zip(s[i:i + len(t)], t):
if ss != ts:
cnt += 1
minr = min(minr, cnt)
print(minr) | s = input()
t = input()
minr = len(t)
s_t_d = len(s) - len(t)
for i in range(s_t_d + 1):
cnt = 0
for ss, ts in zip(s[i:i + len(t)], t):
if ss != ts:
cnt += 1
minr = min(minr, cnt)
print(minr)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 80 |
s = list(input())
t = list(input())
m = 0
for i in range(len(s)-len(t)):
x = 0
for j in range(len(t)):
if t[j] == s[i+j]:
x+=1
if x > m:
m = x
ans = len(t)-m
print(ans) | s = list(input())
t = list(input())
m = 0
for i in range(len(s)-len(t)+1):
x = 0
for j in range(len(t)):
if t[j] == s[i+j]:
x+=1
if x > m:
m = x
ans = len(t)-m
print(ans) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 85 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll, ll>;
#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846
#define REP(i, m, n) for (ll(i) = (m), (i_len) = (n); (i) < (i_len); ++(i))
#define FORR(i, v... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll, ll>;
#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846
#define REP(i, m, n) for (ll(i) = (m), (i_len) = (n); (i) < (i_len); ++(i))
#define FORR(i, v... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 236 |
s=list(input())
t=list(input())
r=len(t)
for ii in range(len(s)-len(t)+1):
rr=0
for jj in range(len(t)):
if s[ii+jj]!=t[jj]:
rr+=1
if rr<r:
r=rr
print(rr) | s=list(input())
t=list(input())
r=len(t)
for ii in range(len(s)-len(t)+1):
rr=0
for jj in range(len(t)):
if s[ii+jj]!=t[jj]:
rr+=1
if rr<r:
r=rr
print(r) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 82 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, N) for (int i = 0; i < (N); i++)
#define erep(i, N) for (int i = N - 1; i >= 0; i--)
const ll INF = 1000000000;
const ll MOD = 1000000007;
const ld PI = (acos(-1));
using Graph = vector<vector<int>>;
template <cla... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, N) for (int i = 0; i < (N); i++)
#define erep(i, N) for (int i = N - 1; i >= 0; i--)
const ll INF = 1000000000;
const ll MOD = 1000000007;
const ld PI = (acos(-1));
using Graph = vector<vector<int>>;
template <cla... | [["+", 51, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 51, 16, 12, 2, 3, 4, 0, 16, 12, 22]] | 1 | 545 |
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ull = unsigned long long int;
using ll = long long int;
int main() {
string s, t;
cin >> s >> t;
int max = 0;
for (int i = 0; i < s.size() - t.size(); i++) {
str... | #include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ull = unsigned long long int;
using ll = long long int;
int main() {
string s, t;
cin >> s >> t;
int max = 0;
for (int i = 0; i <= s.size() - t.size(); i++) {
st... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 162 |
#include <bits/stdc++.h>
#define tmp(x) std::cout << "& " << (x) << " &\n"
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)
#define mp make_pair
#define pii pair<int, int>
typedef long long ll;
using namespace std;
const int maxn = 2e5 + 100;
int main() {
st... | #include <bits/stdc++.h>
#define tmp(x) std::cout << "& " << (x) << " &\n"
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)
#define mp make_pair
#define pii pair<int, int>
typedef long long ll;
using namespace std;
const int maxn = 2e5 + 100;
int main() {
st... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 179 |
#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#define lli long long int
#define mod 1000000007
#define pb push_back
#define mk make_pair
#define fastio \
ios_base::sync_with_stdio(false); \
co... | #include <bits/stdc++.h>
#include <iostream>
#include <vector>
#define lli long long int
#define mod 1000000007
#define pb push_back
#define mk make_pair
#define fastio \
ios_base::sync_with_stdio(false); \
co... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 149 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int max = 0;
for (int i = 0; i < s.length() - t.length(); i++) {
int bufmax = 0;
int buf = 0;
for (int j = 0; j < t.length(); j++) {
if (s[i + j] == t[j]) {
buf++;
if (bufmax <... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s, t;
cin >> s >> t;
int max = 0;
for (int i = 0; i <= s.length() - t.length(); i++) {
int bufmax = 0;
int buf = 0;
for (int j = 0; j < t.length(); j++) {
if (s[i + j] == t[j]) {
buf++;
if (bufmax ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 139 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define max3(a, b, c) max(a, max(b, c))
#define max4(a, b, c, d) max(a, max(b, max(c, d)))
#define min3(a, b, c) min(a, min(b, c))
#define min4(a, b, c, d) min(a, min(b, min(c, d)))
#define yes cout << "YES" << nl
#defin... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define max3(a, b, c) max(a, max(b, c))
#define max4(a, b, c, d) max(a, max(b, max(c, d)))
#define min3(a, b, c) min(a, min(b, c))
#define min4(a, b, c, d) min(a, min(b, min(c, d)))
#define yes cout << "YES" << nl
#defin... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 22]] | 1 | 338 |
S=input()
T=input()
count=0
min=1000000
for i in range(len(S)):
count = 0
if i + len(T) < len(S):
for j in range(len(T)):
if T[j] != S[i + j]:
count += 1
else:
break
if count<min:
min=count
print(min) | S=input()
T=input()
count=0
min=1000000
for i in range(len(S)):
count = 0
if i + len(T) <= len(S):
for j in range(len(T)):
if T[j] != S[i + j]:
count += 1
else:
break
if count<min:
min=count
print(min) | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 85 |
s = input()
t = input()
mini = -1
for i in range(len(s) - len(t)+1):
temp = 0
for j in range(len(t)):
if(s[j + i] != t[j]):
temp+=1
if(mini == -1 or temp < mini):
mini = temp
print(temp) | s = input()
t = input()
mini = -1
for i in range(len(s) - len(t)+1):
temp = 0
for j in range(len(t)):
if(s[j + i] != t[j]):
temp+=1
if(mini == -1 or temp < mini):
mini = temp
print(mini) | [["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 83 |
#include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
#include <algorithm>
#include <map>
#include <math.h>
#include <queue>
#include <set>
int main() {
string s, t;
cin >> s >> t;
int ss = s.size();
int tt = t... | #include <iostream>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
#include <algorithm>
#include <map>
#include <math.h>
#include <queue>
#include <set>
int main() {
string s, t;
cin >> s >> t;
int ss = s.size();
int tt = t... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 159 |
from collections import defaultdict, Counter
from itertools import product, permutations, combinations, accumulate
from bisect import bisect_left, bisect
from heapq import heappop, heappush
from math import gcd
from math import ceil, floor
def input_list():
return list(map(int, input().split()))
def input_int()... | from collections import defaultdict, Counter
from itertools import product, permutations, combinations, accumulate
from bisect import bisect_left, bisect
from heapq import heappop, heappush
from math import gcd
from math import ceil, floor
def input_list():
return list(map(int, input().split()))
def input_int()... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 147 |
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define ll long long int
#define mod 1000000007
#define vec vector<long long int>
#define fi first
#define se second
#define pb push_back
int main() {
string a, b;
cin >> a >> b;
int n = a.length();
int m = b.length();
int mi = 0;
for (int i ... | #include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define ll long long int
#define mod 1000000007
#define vec vector<long long int>
#define fi first
#define se second
#define pb push_back
int main() {
string a, b;
cin >> a >> b;
int n = a.length();
int m = b.length();
int mi = 0;
for (int i ... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72]] | 1 | 143 |
#include <bits/stdc++.h>
#define lli long long int
#define pb push_back
#define FORA(i, s, e) for (int i = s; i < e; i++)
#define FORB(i, s, e) for (int i = s; i <= e; i++)
using namespace std;
int main(void) {
string s;
cin >> s;
string t;
cin >> t;
int maxi = -1;
int cnt = 0;
int len1 = s.size(), len2... | #include <bits/stdc++.h>
#define lli long long int
#define pb push_back
#define FORA(i, s, e) for (int i = s; i < e; i++)
#define FORB(i, s, e) for (int i = s; i <= e; i++)
using namespace std;
int main(void) {
string s;
cin >> s;
string t;
cin >> t;
int maxi = -1;
int cnt = 0;
int len1 = s.size(), len2... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 173 |
s = input()
t = input()
s_l = len(s)
t_l = len(t)
max_count = 0
for i in range(0, s_l - t_l):
count = 0
for j in range(0, t_l):
if s[i+j] == t[j]:
count += 1
if count > max_count:
max_count = count
diff = t_l - max_count
print(diff) | s = input()
t = input()
s_l = len(s)
t_l = len(t)
max_count = 0
for i in range(0, s_l - t_l + 1):
count = 0
for j in range(0, t_l):
if s[i+j] == t[j]:
count += 1
if count > max_count:
max_count = count
diff = t_l - max_count
print(diff)
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve() {
string s;
string t;
cin >> s >> t;
int m = s.length();
int n = t.length();
int max_same = 0;
for (int i = 0; i + n < m; i++) {
string temp = s.substr(i, n);
int same = 0;
for (int j = 0; j < n; j++) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve() {
string s;
string t;
cin >> s >> t;
int m = s.length();
int n = t.length();
int max_same = 0;
for (int i = 0; i + n - 1 < m; i++) {
string temp = s.substr(i, n);
int same = 0;
for (int j = 0; j < n; j++)... | [["+", 8, 9, 0, 7, 15, 16, 31, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 31, 16, 12, 13]] | 1 | 161 |
#include <bits/stdc++.h>
#define ll long long
#define pii pair<ll int, ll int>
#define PI 2 * acos(0)
#define INF 1e8
#define mx 1000006
using namespace std;
const ll int p = 1000000007;
// vector<ll > prime;
// bool mark[mx];
ll int mod(ll int a, ll int b) {
ll int m = a % b;
if (m < 0)
m = (b < 0) ? (m - b) :... | #include <bits/stdc++.h>
#define ll long long
#define pii pair<ll int, ll int>
#define PI 2 * acos(0)
#define INF 1e8
#define mx 1000006
using namespace std;
const ll int p = 1000000007;
// vector<ll > prime;
// bool mark[mx];
ll int mod(ll int a, ll int b) {
ll int m = a % b;
if (m < 0)
m = (b < 0) ? (m - b) :... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 467 |
#include <algorithm>
#include <cmath> // circle math ( sin, con, sinh
#include <iomanip> // input output manipulation
#include <iostream> // input output stream, cin cout( console in console out)
#include <stdio.h> // standard input output
#include <string>
#include <vector>
using namespace std;
#define rep(i, n)... | #include <algorithm>
#include <cmath> // circle math ( sin, con, sinh
#include <iomanip> // input output manipulation
#include <iostream> // input output stream, cin cout( console in console out)
#include <stdio.h> // standard input output
#include <string>
#include <vector>
using namespace std;
#define rep(i, n)... | [["+", 51, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 51, 16, 31, 2, 3, 4, 0, 16, 12, 22]] | 1 | 220 |
#d,t,s=map(int,input().split())
s=str(input())
t=str(input())
cans=10000
for i in range(len(s)-len(t)):
ans=0
for j in range(len(t)):
if s[i]!=t[j]:
ans+=1
i+=1
cans=min(ans,cans)
print(cans) | #d,t,s=map(int,input().split())
s=str(input())
t=str(input())
cans=10000
for i in range(len(s)-len(t)+1):
ans=0
for j in range(len(t)):
if s[i]!=t[j]:
ans+=1
i+=1
cans=min(ans,cans)
print(cans) | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 79 |
def main():
S = input("")
T = input("")
length = len(T)
S_sub_T = len(S) - length
max_match = 0
S_offset = 0
for i in range(S_sub_T):
match = 0
for j in range(length):
if(S[i + j] == T[j]):
match += 1
if(max_match < match):
max_match = match
need_replace = length -... | def main():
S = input("")
T = input("")
length = len(T)
S_sub_T = len(S) - length
max_match = 0
S_offset = 0
for i in range(S_sub_T+1):
match = 0
for j in range(length):
if(S[i + j] == T[j]):
match += 1
if(max_match < match):
max_match = match
need_replace = length... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 105 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.