Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
⌀
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
8 values
p02571
#include <algorithm> #include <assert.h> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include ...
#include <algorithm> #include <assert.h> #include <bitset> #include <climits> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,888
261,889
u887297287
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define rep(i, from, to) for (int i = from; i < (to); ++i) #define mp(x, y) make_pair(x, y) #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() #define pb push_back using ll = long long; using vin = vector<int>; using vll = vector<ll>;...
#include <bits/stdc++.h> using namespace std; #define _GLIBCXX_DEBUG #define rep(i, from, to) for (int i = from; i < (to); ++i) #define mp(x, y) make_pair(x, y) #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() #define pb push_back using ll = long long; using vin = vector<int>; using vll = vector<ll>;...
[ "expression.operation.binary.add" ]
261,896
261,897
u531461815
cpp
p02571
#include <bits/stdc++.h> using namespace std; using s64 = signed long long; using u64 = unsigned long long; using f128 = long double; int main() { string s, t; cin >> s; cin >> t; s64 minCount = t.size(); for (s64 i = 0; i < s.size() - t.size(); i++) { string subS = s.substr(i, t.size()); s64 count ...
#include <bits/stdc++.h> using namespace std; using s64 = signed long long; using u64 = unsigned long long; using f128 = long double; int main() { string s, t; cin >> s; cin >> t; s64 minCount = t.size(); for (s64 i = 0; i <= s.size() - t.size(); i++) { string subS = s.substr(i, t.size()); s64 count...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,902
261,903
u788173968
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string S, T; int s, t, ans; ans = 10000; cin >> S >> T; s = S.size(), t = T.size(); for (int i = 0; i + t < s; i++) { int tot = t; for (int j = 0; j < t; j++) { if (S[i + j] == T[i + j]) tot--; } if (tot < ans) an...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; int s, t, ans; ans = 10000; cin >> S >> T; s = S.size(), t = T.size(); for (int i = 0; i + t <= s; i++) { int tot = t; for (int j = 0; j < t; j++) { if (S[i + j] == T[j]) { tot--; } } if (tot < ans) ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "expression.operation.binary.remove" ]
261,908
261,909
u118789292
cpp
p02571
#include <bits/stdc++.h> using namespace std; /*void mayank() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ONLINE_JUDGE freopen("Input.txt", "r", stdin); freopen("Output.txt", "w", stdout); #endif }*/ #define ll long long #define inf 1e9 const int mxN = 1e6; ll a[mxN + 10], b...
#include <bits/stdc++.h> using namespace std; /*void mayank() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #ifndef ONLINE_JUDGE freopen("Input.txt", "r", stdin); freopen("Output.txt", "w", stdout); #endif }*/ #define ll long long #define inf 1e9 const int mxN = 1e6; ll a[mxN + 10], b...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,916
261,917
u709070698
cpp
p02571
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { string s, t; cin >> s; cin >> t; int mindiff = 1000; for (int i = 0; i < (int)(s.size() - t.size()); i++) { int diff = 0; for (int j = 0; j < (int)t.size(); j++) { if (s[i + j] != t[j]) diff++...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { string s, t; cin >> s; cin >> t; int mindiff = 1000; for (int i = 0; i <= (int)(s.size() - t.size()); i++) { int diff = 0; for (int j = 0; j < (int)t.size(); j++) { if (s[i + j] != t[j]) diff+...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,918
261,919
u736149053
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, max = 0, count; string S, T; cin >> S >> T; for (i = 0; i < S.size() - T.size(); i++) { count = 0; for (j = 0; j < T.size(); j++) { if (S.at(i + j) == T.at(j)) { count += 1; } } if (max < count) ...
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, max = 0, count; string S, T; cin >> S >> T; for (i = 0; i < S.size() - T.size() + 1; i++) { count = 0; for (j = 0; j < T.size(); j++) { if (S.at(i + j) == T.at(j)) { count += 1; } } if (max < count)...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
261,925
261,926
u323005067
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, max, count; string S, T; cin >> S >> T; for (i = 0; i < S.size() - T.size(); i++) { count = 0; for (j = 0; j < T.size(); j++) { if (S.at(i + j) == T.at(j)) { count += 1; } } if (max < count) m...
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, max = 0, count; string S, T; cin >> S >> T; for (i = 0; i < S.size() - T.size() + 1; i++) { count = 0; for (j = 0; j < T.size(); j++) { if (S.at(i + j) == T.at(j)) { count += 1; } } if (max < count)...
[ "variable_declaration.value.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
261,927
261,926
u323005067
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { int i, j, max, count; string S, T; cin >> S >> T; for (i = 0; i < S.size() - T.size(); i++) { count = 0; for (j = 0; j < T.size(); j++) { if (S.at(i + j) == T.at(j)) { count += 1; } } if (max < count) max = c...
#include <bits/stdc++.h> using namespace std; int main() { long long i, j, max = 0, count; string S, T; cin >> S >> T; for (i = 0; i < S.size() - T.size() + 1; i++) { count = 0; for (j = 0; j < T.size(); j++) { if (S.at(i + j) == T.at(j)) { count += 1; } } if (max < count)...
[ "variable_declaration.type.primitive.change", "variable_declaration.type.widen.change", "variable_declaration.value.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
261,928
261,926
u323005067
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { string s, s1; cin >> s >> s1; int c1; ll k = s.size(); ll kk = s1.size(); // int c1; int mx = INT_MIN; for (ll i = 0; i < s.size() - s1.size() + 1; i++) { c1 = 0; for (ll j = i, c = 0; c < kk; c++, j++) { ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { string s, s1; cin >> s >> s1; int c1; ll k = s.size(); ll kk = s1.size(); // int c1; int mx = INT_MIN; for (ll i = 0; i < s.size() - s1.size() + 1; i++) { c1 = 0; for (ll j = i, c = 0; c < kk; c++, j++) { ...
[ "identifier.change", "io.output.change" ]
261,931
261,932
u852076590
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<double> vd; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> pii; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typedef vector<pi...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector<double> vd; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> pii; typedef pair<double, double> pdd; typedef pair<ll, ll> pll; typedef vector<pi...
[ "expression.operation.binary.add" ]
261,933
261,934
u789323170
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s, t; cin >> s >> t; int n = t.size(), m = s.size(); int cnt = n; for (int i = 0; i < m - n; i++) { int k = 0; for (int j = 0; j < n; j++) { if (t.at(j) != s.at(i + j)) k++; } cnt = min(cnt,...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s, t; cin >> s >> t; int n = t.size(), m = s.size(); int cnt = n; for (int i = 0; i <= m - n; i++) { int k = 0; for (int j = 0; j < n; j++) { if (t.at(j) != s.at(i + j)) k++; } cnt = min(cnt...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,937
261,938
u646051775
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { char a[1010], b[1010]; scanf(" %s %s", a, b); int ln = strlen(b), mn = ln; for (int i = 0; a[i + ln]; i++) { int r = ln; for (int j = 0; b[j] && a[i + j]; j++) { if (a[i + j] == b[j]) r--; } mn = min(mn, r); } co...
#include <bits/stdc++.h> using namespace std; int main() { char a[1010], b[1010]; scanf(" %s %s", a, b); int ln = strlen(b), mn = ln; for (int i = 0; a[i + ln - 1]; i++) { int r = ln; for (int j = 0; b[j] && a[i + j]; j++) { if (a[i + j] == b[j]) r--; } mn = min(mn, r); } ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
261,943
261,944
u009341670
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { char a[1010], b[1010]; scanf(" %s %s", a, b); int ln = strlen(b), mn = ln; for (int i = 0; a[i]; i++) { int r = ln; for (int j = 0; b[j] && a[i + j]; j++) { if (a[i + j] == b[j]) r--; } mn = min(mn, r); } cout <<...
#include <bits/stdc++.h> using namespace std; int main() { char a[1010], b[1010]; scanf(" %s %s", a, b); int ln = strlen(b), mn = ln; for (int i = 0; a[i + ln - 1]; i++) { int r = ln; for (int j = 0; b[j] && a[i + j]; j++) { if (a[i + j] == b[j]) r--; } mn = min(mn, r); } ...
[ "control_flow.loop.for.condition.change" ]
261,945
261,944
u009341670
cpp
p02571
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { string s; string t; cin >> s >> t; int maxx = 0; int a = 0; int b = 0; int c = 0; int w; for (int i = 0; i < (s.size() - t.size()); i++) { c += a; b = 0; for (int j = 0; j < t.size(); j++) { if (s[c] == ...
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { string s; string t; cin >> s >> t; int maxx = 0; int a = 0; int b = 0; int c = 0; int w; for (int i = 0; i <= (s.size() - t.size()); i++) { c += a; b = 0; for (int j = 0; j < t.size(); j++) { if (s[c] ==...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,956
261,957
u896053584
cpp
p02571
/*ॐ नमो भगवते वासुदेवाय नमः*/ #include <bits/stdc++.h> using namespace std; #define int long long #define F first #define S second #define all(x) (x).begin(), (x).end() #define allrev(x) (x).rbegin(), (x).rend() #define pb push_back #define pf push_front #define fori(i, a, n) for (int i = a; i < n; ++i) #define MAX(x)...
/*ॐ नमो भगवते वासुदेवाय नमः*/ #include <bits/stdc++.h> using namespace std; #define int long long #define F first #define S second #define all(x) (x).begin(), (x).end() #define allrev(x) (x).rbegin(), (x).rend() #define pb push_back #define pf push_front #define fori(i, a, n) for (int i = a; i < n; ++i) #define MAX(x)...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
261,964
261,965
u506535717
cpp
p02571
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { string S, T; cin >> S >> T; int ans = T.size(); for (int i = 0; i < S.size() - T.size(); i++) { int diff = 0; for (int j = 0; j < T.size(); j++) { if (S[i + j] != T[j]) diff++; } ans = m...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { string S, T; cin >> S >> T; int ans = T.size(); for (int i = 0; i < S.size() - T.size() + 1; i++) { int diff = 0; for (int j = 0; j < T.size(); j++) { if (S[i + j] != T[j]) diff++; } ans...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
261,966
261,967
u060520259
cpp
p02571
#include "algorithm" #include "bitset" #include "chrono" #include "cstring" #include "ctime" #include "iomanip" #include "iostream" #include "map" #include "math.h" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "string" #include "vector" #include "ext/pb_ds/assoc_contai...
#include "algorithm" #include "bitset" #include "chrono" #include "cstring" #include "ctime" #include "iomanip" #include "iostream" #include "map" #include "math.h" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "string" #include "vector" #include "ext/pb_ds/assoc_contai...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
261,971
261,972
u519398162
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int L = S.size(); int l = T.size(); int ans = l; for (int i = 0; i < L - l; i++) { int count = 0; for (int j = 0; j < l; j++) { if (S.at(i + j) != T.at(j)) { count++; } } ans = min...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int L = S.size(); int l = T.size(); int ans = l; for (int i = 0; i <= L - l; i++) { int count = 0; for (int j = 0; j < l; j++) { if (S.at(i + j) != T.at(j)) { count++; } } ans = min...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,973
261,974
u230142523
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s, t; s = S.size(); t = T.size(); int count = 0, sum = t; for (int i = 0; i < s - t; i++) { count = 0; for (int j = 0; j < t; j++) { if (S.at(i + j) != T.at(j)) { count++; } } if ...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s, t; s = S.size(); t = T.size(); int count = 0, sum = t; for (int i = 0; i <= s - t; i++) { count = 0; for (int j = 0; j < t; j++) { if (S.at(i + j) != T.at(j)) { count++; } } if...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,979
261,980
u385650604
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; int main() { string s, t; cin >> s >> t; ll sizes = s.size(), sizet = t.size(); ll ch = 0, now = 0; for (ll i = 0; i < sizes - sizet; i++) { ll sum = 0; for (ll j = 0; j < sizet; j++) { if (s[i + j] == t[...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; int main() { string s, t; cin >> s >> t; ll sizes = s.size(), sizet = t.size(); ll now = 0; for (ll i = 0; i <= sizes - sizet; i++) { ll sum = 0; for (ll j = 0; j < sizet; j++) { if (s[i + j] == t[j]) { ...
[ "variable_declaration.remove", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
261,981
261,982
u191114518
cpp
p02571
#include <stdio.h> #include <string.h> #define rep(i, N) for (int i = 0; i < (int)N; i++) int main(void) { char S[1001], T[1001]; int diff = 1000; if (!scanf("%s %s", S, T)) return -1; rep(i, (int)strlen(S) - (int)strlen(T)) { int change = strlen(T); rep(j, (int)strlen(T)) { if (S[i + j] == T[...
#include <stdio.h> #include <string.h> #define rep(i, N) for (int i = 0; i < (int)N; i++) int main(void) { char S[1001], T[1001]; int diff = 1000; if (!scanf("%s %s", S, T)) return -1; rep(i, (int)strlen(S) - (int)strlen(T) + 1) { int change = strlen(T); rep(j, (int)strlen(T)) { if (S[i + j] =...
[ "expression.operation.binary.add" ]
261,983
261,984
u571152872
cpp
p02571
#include <stdio.h> #include <string.h> #define rep(i, N) for (int i = 0; i < (int)N; i++) int main(void) { char S[1001], T[1001]; if (!scanf("%s %s", S, T)) { return -1; } int change = strlen(T); rep(i, (int)strlen(S) - (int)strlen(T)) { int diff = 0; rep(j, (int)strlen(T)) { if (S[i + j] !=...
#include <stdio.h> #include <string.h> #define rep(i, N) for (int i = 0; i < (int)N; i++) int main(void) { char S[1001], T[1001]; if (!scanf("%s %s", S, T)) { return -1; } int change = strlen(T); rep(i, (int)strlen(S) - (int)strlen(T) + 1) { int diff = 0; rep(j, (int)strlen(T)) { if (S[i + j...
[ "expression.operation.binary.add" ]
261,987
261,988
u571152872
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define vi vector<int> #define sl set<ll> #define vs vector<string> #define vl vector<ll> #define vi vector<int> #define vpl vector<pair<ll, ll>> #define pb push_back #define PI 3.14159265358979323846 #define ll long long #define ld long double #define endl "\n" #define re...
#include <bits/stdc++.h> using namespace std; #define vi vector<int> #define sl set<ll> #define vs vector<string> #define vl vector<ll> #define vi vector<int> #define vpl vector<pair<ll, ll>> #define pb push_back #define PI 3.14159265358979323846 #define ll long long #define ld long double #define endl "\n" #define re...
[ "expression.unary.arithmetic.add" ]
261,989
261,990
u581967233
cpp
p02571
#include <bits/stdc++.h> #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; /*---------------------DEBUGGING--------------------------------------------*/ void __print(int x) { c...
#include <bits/stdc++.h> #include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> // using namespace __gnu_pbds; /*---------------------DEBUGGING--------------------------------------------*/ void __print(int x) { c...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
261,996
261,997
u780428208
cpp
p02571
#pragma region template #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using vll = vector<ll>; using vvll = vector<vll>; using vvvll = vector<vvll>; using vld = vector<l...
#pragma region template #include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>; using vll = vector<ll>; using vvll = vector<vll>; using vvvll = vector<vvll>; using vld = vector<l...
[ "expression.operation.binary.add" ]
261,998
261,999
u116670634
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; const int LenS = int(S.size()); const int LenT = int(T.size()); int ans = LenT; for (int offset = 0; offset + LenT < LenS; offset++) { int cnt = 0; for (int i = 0; i < LenT; i++) { if (S.at(offset + i) != ...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; const int LenS = int(S.size()); const int LenT = int(T.size()); int ans = LenT; for (int offset = 0; offset + LenT <= LenS; offset++) { int cnt = 0; for (int i = 0; i < LenT; i++) { if (S.at(offset + i) !=...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,000
262,001
u068765697
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define ld long double template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; ...
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define ld long double template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; ...
[ "expression.operation.binary.add" ]
262,002
262,003
u876953939
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main(void) { string s, t; cin >> s >> t; int ans = t.size(); for (int i = 0; i <= s.size() - t.size(); i++) { int n = 0; for (int j = 0; j < t.size(); j++) { if (t[i] != s[i + j]) { n++; } } ans = min(ans, n); } cout << an...
#include <bits/stdc++.h> using namespace std; int main(void) { string s, t; cin >> s >> t; int ans = t.size(); for (int i = 0; i <= s.size() - t.size(); i++) { int n = 0; for (int j = 0; j < t.size(); j++) { if (t[j] != s[i + j]) { n++; } } ans = min(ans, n); } cout << an...
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
262,012
262,013
u716903426
cpp
p02571
#include <bits/stdc++.h> using namespace std; // #define int long long #define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i) #define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i) #define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--) #define rreps(i, n)...
#include <bits/stdc++.h> using namespace std; // #define int long long #define rep(i, n) for (long long i = (long long)(0); i < (long long)(n); ++i) #define reps(i, n) for (long long i = (long long)(1); i <= (long long)(n); ++i) #define rrep(i, n) for (long long i = ((long long)(n)-1); i >= 0; i--) #define rreps(i, n)...
[ "expression.operation.binary.add" ]
262,022
262,023
u530107518
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define int long long #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \ ...
#include <bits/stdc++.h> using namespace std; #define int long long #define sim template <class c #define ris return *this #define dor > debug &operator<< #define eni(x) \ sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<( \ ...
[ "expression.operator.compare.change" ]
262,024
262,025
u865613237
cpp
p02571
#include <bits/stdc++.h> using namespace std; int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } int main() { string S, T; cin >> S; cin >> T; int ans = T.size(); for (int i = 0; i < S.size() - T.size(); i++) { int diff = 0; for (int j = 0; j < T.size(); j++) { if (S.at(i + j) != T...
#include <bits/stdc++.h> using namespace std; int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } int main() { string S, T; cin >> S; cin >> T; int ans = T.size(); for (int i = 0; i <= S.size() - T.size(); i++) { int diff = 0; for (int j = 0; j < T.size(); j++) { if (S.at(i + j) != ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,026
262,027
u579001504
cpp
p02571
// B - Substring #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { string s, t; cin >> s >> t; int ans = 1e9; rep(i, s.size() - t.size()) { int c = 0; rep(j, t.size()) if (s[i + j] != t[j]) c++; ans = min(ans, c); } cout << ans << en...
// B - Substring #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { string s, t; cin >> s >> t; int ans = 1e9; rep(i, s.size() - t.size() + 1) { int c = 0; rep(j, t.size()) if (s[i + j] != t[j]) c++; ans = min(ans, c); } cout << ans <...
[ "expression.operation.binary.add" ]
262,030
262,031
u525065967
cpp
p02571
#include <iostream> #include <string> int main() { std::string S, T; std::cin >> S; std::cin >> T; int _s_o = -1, _t_o = -1, l = -1; int c; for (int t_o = 0, tmax = T.size(), smax = S.size(); t_o < tmax; t_o++) { for (int s_o = t_o; s_o + tmax < smax; s_o++) { c = 0; for (int i = 0; i < ...
#include <iostream> #include <string> int main() { std::string S, T; std::cin >> S; std::cin >> T; int _s_o = -1, _t_o = -1, l = -1; int c; for (int t_o = 0, tmax = T.size(), smax = S.size(); t_o < tmax; t_o++) { for (int s_o = t_o; s_o + tmax - 1 < smax; s_o++) { c = 0; for (int i = 0; ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,036
262,037
u214519986
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long int LLD; int main() { string s, t; getline(cin, s); getline(cin, t); int min_count = INT_MAX; int count = 0; for (long unsigned int i = 0; i <= (s.size() - t.size()); ++i) { count = 0; for (long unsigned int j = 0; j < t.size(); ++j) {...
#include <bits/stdc++.h> using namespace std; typedef long long int LLD; int main() { string s, t; getline(cin, s); getline(cin, t); int min_count = INT_MAX; int count = 0; for (long unsigned int i = 0; i <= (s.size() - t.size()); ++i) { count = 0; for (long unsigned int j = 0; j < t.size(); ++j) {...
[ "identifier.change", "io.output.change" ]
262,038
262,039
u596442231
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i <= n; i++) #define repr(i, n) for (int i = n - 1; i >= 0; i--) #define repr1(i, n) for (int i = n; i >= 1; i--) #define all(v) v.begin(), v.end() using ll = long long; using pii = pair<int, i...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i <= n; i++) #define repr(i, n) for (int i = n - 1; i >= 0; i--) #define repr1(i, n) for (int i = n; i >= 1; i--) #define all(v) v.begin(), v.end() using ll = long long; using pii = pair<int, i...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,040
262,041
u864667985
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long ll; // 10^19 < 9223372036854775807 typedef unsigned long long ull; // 10^20 < 18446744073709551615 #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 FOR(i, a, b) for (ll i = a; i <= ll(b)...
#include <bits/stdc++.h> using namespace std; typedef long long ll; // 10^19 < 9223372036854775807 typedef unsigned long long ull; // 10^20 < 18446744073709551615 #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 FOR(i, a, b) for (ll i = a; i <= ll(b)...
[]
262,057
262,058
u055095475
cpp
p02571
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; const int mod = (int)1e9 + 7; #define REP0(i, n) f...
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; const int mod = (int)1e9 + 7; #define REP0(i, n) f...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,063
262,064
u923715191
cpp
p02571
#include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #defi...
#include <algorithm> #include <cmath> #include <fstream> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> using namespace std; #defi...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,071
262,072
u649310245
cpp
p02571
#include <bits/stdc++.h> using namespace std; #ifdef _DEBUG #include "_DEBUG.hpp" #endif #define int long long const int INF = 1LL << 60; signed main() { string s, t; cin >> s >> t; int ans = t.size(); for (int i = 0; i < (int)s.size() - (int)t.size(); i++) { int res = 0; for (int j = 0; j < t.size()...
#include <bits/stdc++.h> using namespace std; #ifdef _DEBUG #include "_DEBUG.hpp" #endif #define int long long const int INF = 1LL << 60; signed main() { string s, t; cin >> s >> t; int ans = t.size(); for (int i = 0; i <= (int)s.size() - (int)t.size(); i++) { int res = 0; for (int j = 0; j < t.size(...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,080
262,081
u344122377
cpp
p02571
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { string S, T; cin >> S >> T; ll ans = T.size(); for (int s = 0; s < S.size() - T.size(); s++) { ll diff = 0; for (int i = 0; i < T.size(); i++) { if (S[s + i] != T[i]) { diff++; } } ans = min(ans...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { string S, T; cin >> S >> T; ll ans = T.size(); for (int s = 0; s <= S.size() - T.size(); s++) { ll diff = 0; for (int i = 0; i < T.size(); i++) { if (S[s + i] != T[i]) { diff++; } } ans = min(an...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,082
262,083
u534800382
cpp
p02571
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main() { string s, t; cin >> s >> t; int sSize, tSize, count, cmpCount; sSize = s.size(); tSize = t.size(); count = 0; cmpCount = 0; for (int i = 0; i < sSize - tSize; i++) { str...
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main() { string s, t; cin >> s >> t; int sSize, tSize, count, cmpCount; sSize = s.size(); tSize = t.size(); count = 0; cmpCount = 0; for (int i = 0; i < sSize - tSize + 1; i++) { ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,086
262,087
u050622763
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i, s, n) for (lli i = s; i < n; i++) #define NUM 2520 #define INF (1LL << 50) #define DEBUG 0 #define mp(a, b) make_pair(a, b) #define SORT(V) sort(V.begin(), V.end()) #define PI (3.141592653589794) #define TO_STRING(VariableName) #Var...
#include <bits/stdc++.h> using namespace std; #define lli long long int #define REP(i, s, n) for (lli i = s; i < n; i++) #define NUM 2520 #define INF (1LL << 50) #define DEBUG 0 #define mp(a, b) make_pair(a, b) #define SORT(V) sort(V.begin(), V.end()) #define PI (3.141592653589794) #define TO_STRING(VariableName) #Var...
[ "expression.operation.binary.add" ]
262,093
262,094
u041513069
cpp
p02571
#include <bits/stdc++.h> #define int long long #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); using nam...
#include <bits/stdc++.h> #define int long long #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); using nam...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,106
262,107
u150510964
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b) / gcd(a, b) #define ff first #define ss second #define int long long #define float double #define pb emplace_back #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define vc vector<char> #define ...
#include <bits/stdc++.h> using namespace std; #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b) / gcd(a, b) #define ff first #define ss second #define int long long #define float double #define pb emplace_back #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define vc vector<char> #define ...
[ "assignment.add" ]
262,114
262,115
u153696879
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int hit, hitmax = 0; for (int i = 0; i < (int)(S.size() - T.size()); i++) { hit = 0; for (int j = 0; j < (int)T.size(); j++) { if (S.at(i + j) == T.at(j)) hit++; } if (hitmax < hit) hitma...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int hit, hitmax = 0; for (int i = 0; i <= (int)(S.size() - T.size()); i++) { hit = 0; for (int j = 0; j < (int)T.size(); j++) { if (S.at(i + j) == T.at(j)) hit++; } if (hitmax < hit) hitm...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,116
262,117
u001737818
cpp
p02571
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define rep(i, n) for (ll i = 0; i < n; i++) using ll = long long; int main() { string S, T; cin >> S >> T; int result = 10000000000; rep(i, S.size() - T.size()) { int sum = T.size(); stri...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; int main() { string S, T; cin >> S >> T; int result = 1000000; rep(i, S.size() - T.size() + 1) { int sum = T.size(); str...
[ "preprocessor.define.value.change", "literal.number.change", "variable_declaration.value.change" ]
262,124
262,123
u611239490
cpp
p02571
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; #define FOR(i, N) for (int i = 0; i < N; i++) int main() { long long N, K, X, D, X1, X2, ans = 0, cnt = 0; string S, T; cin >> S >> T; for (int i = 0; i < S.size() - T.size() + 1; i++) { cnt = 0; for (int ...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; #define FOR(i, N) for (int i = 0; i < N; i++) int main() { long long N, K, X, D, X1, X2, ans = 0, cnt = 0; string S, T; cin >> S >> T; for (int i = 0; i < S.size() - T.size() + 1; i++) { cnt = 0; for (int ...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
262,125
262,126
u594249018
cpp
p02571
#include <bits/stdc++.h> #define ll long long using namespace std; int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } const double PI = 3.14159265358979323846; int vector_finder(vector<int> vec, int number) { auto itr = find(vec.begin(), vec.end(), number); size_t index = distance(vec.begin(), itr); if...
#include <bits/stdc++.h> #define ll long long using namespace std; int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } const double PI = 3.14159265358979323846; int vector_finder(vector<int> vec, int number) { auto itr = find(vec.begin(), vec.end(), number); size_t index = distance(vec.begin(), itr); if...
[]
262,130
262,131
u851558026
cpp
p02571
#include <bits/stdc++.h> #define ll long long using namespace std; int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } const double PI = 3.14159265358979323846; int vector_finder(vector<int> vec, int number) { auto itr = find(vec.begin(), vec.end(), number); size_t index = distance(vec.begin(), itr); if...
#include <bits/stdc++.h> #define ll long long using namespace std; int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } const double PI = 3.14159265358979323846; int vector_finder(vector<int> vec, int number) { auto itr = find(vec.begin(), vec.end(), number); size_t index = distance(vec.begin(), itr); if...
[ "control_flow.loop.for.condition.change", "misc.off_by_one", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
262,132
262,131
u851558026
cpp
p02571
#include <iostream> #include <string.h> using namespace std; int main() { char s[1000], t[1000]; for (int i = 0; i < 1000; i++) { s[i] = '\0'; } for (int i = 0; i < 1000; i++) { t[i] = '\0'; } cin >> s >> t; int a = 0, c = 0; int b = strlen(t); int d = strlen(s); int e = d - b; int x = 0...
#include <iostream> #include <string.h> using namespace std; int main() { char s[1000], t[1000]; for (int i = 0; i < 1000; i++) { s[i] = '\0'; } for (int i = 0; i < 1000; i++) { t[i] = '\0'; } cin >> s >> t; int a = 0, c = 0; int b = strlen(t); int d = strlen(s); int e = d - b; int x = 0...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,140
262,141
u410518228
cpp
p02571
#include <iostream> #include <string.h> using namespace std; int main() { string S; string T; cin >> S; cin >> T; int i = 0, j = 0; int ans = 0, max = 0; int kari1, kari2; for (i = 0; S.size() >= T.size() + i + 1; i++) { ans = 0; kari1 = i; kari2 = j; while (T.size() >= j + 1) { ...
#include <iostream> #include <string.h> using namespace std; int main() { string S; string T; cin >> S; cin >> T; int i = 0, j = 0; int ans = 0, max = 0; int kari1, kari2; for (i = 0; S.size() >= T.size() + i; i++) { ans = 0; kari1 = i; kari2 = j; while (T.size() >= j + 1) { if...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
262,147
262,148
u317241784
cpp
p02571
// g++ -std=c++14 test.cpp -o test.out #include <algorithm> #include <bitset> #include <cassert> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <unordered...
// g++ -std=c++14 test.cpp -o test.out #include <algorithm> #include <bitset> #include <cassert> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string.h> #include <unordered...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,155
262,156
u302000346
cpp
p02571
#include <algorithm> #include <iostream> using namespace std; int main() { string S, T; cin >> S >> T; int ans = 2e6; for (int i = 0; i + T.length() < S.length(); i++) { int temp = 0; for (int j = 0; j < T.length(); j++) { if (S[i + j] != T[j]) { temp++; } } ans = min(ans, t...
#include <algorithm> #include <iostream> using namespace std; int main() { string S, T; cin >> S >> T; int ans = 2e6; for (int i = 0; i + T.length() <= S.length(); i++) { int temp = 0; for (int j = 0; j < T.length(); j++) { if (S[i + j] != T[j]) { temp++; } } ans = min(ans, ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,159
262,160
u608654778
cpp
p02571
#include <bits/stdc++.h> #define INF 1e9 using namespace std; //자동 정렬은 ctrl k f //주석은 ctrl k c //주석 해제는 ctrl k u // int gcd(int a, int b){ // while(b!=0){ // int r= a%b; // a=b; // b=r; // } // return a; // } // int lcm(int a, int b){ // return a*b/gcd(a,b); // } long long int arr[200001]; int main() { ios...
#include <bits/stdc++.h> #define INF 1e9 using namespace std; //자동 정렬은 ctrl k f //주석은 ctrl k c //주석 해제는 ctrl k u // int gcd(int a, int b){ // while(b!=0){ // int r= a%b; // a=b; // b=r; // } // return a; // } // int lcm(int a, int b){ // return a*b/gcd(a,b); // } long long int arr[200001]; int main() { ios...
[ "assignment.add" ]
262,167
262,168
u965536329
cpp
p02571
#include <bits/stdc++.h> #include <iostream> using namespace std; #define mod 1000000007 #define pb(x) push_back(x); #define mp(x, y) make_pair(x, y) #define mem(dp, a) memset(dp, a, sizeof dp); #define all(a) a.begin(), a.end() #define sall(a) sort(all(a)) #define X first #define Y second typedef long long int ll; typ...
#include <bits/stdc++.h> #include <iostream> using namespace std; #define mod 1000000007 #define pb(x) push_back(x); #define mp(x, y) make_pair(x, y) #define mem(dp, a) memset(dp, a, sizeof dp); #define all(a) a.begin(), a.end() #define sall(a) sort(all(a)) #define X first #define Y second typedef long long int ll; typ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,179
262,180
u970006601
cpp
p02571
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { string S, T; cin >> S >> T; int slen = S.size(), tlen = T.size(); int a = 0, correct = 0; for (int i = 0; i <= slen - tlen + 1; i++) { a = 0; for (int j = 0; j < tlen; j++...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int main() { string S, T; cin >> S >> T; ll slen = S.size(), tlen = T.size(); ll a = 0, correct = 0; for (int i = 0; i <= slen - tlen; i++) { a = 0; for (int j = 0; j < tlen; j++) { ...
[ "variable_declaration.type.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
262,193
262,191
u922449177
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int c = t.size(), b, d, e; for (int i = 0; i < s.size() - t.size(); i++) { b = i; d = t.size(); e = t.size(); for (int j = 0; j < t.size(); j++) { if (s.at(b) == t.at(j)) { d--; if (e >=...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int c = t.size(), b, d, e; for (int i = 0; i < s.size() - t.size() + 1; i++) { b = i; d = t.size(); e = t.size(); for (int j = 0; j < t.size(); j++) { if (s.at(b) == t.at(j)) { d--; if (...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,194
262,195
u098576215
cpp
p02571
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ ...
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set \ tree<int, null_type, less<int>, rb_tree_tag, \ ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,196
262,197
u951654902
cpp
p02571
#include <bits/stdc++.h> #define Imposter \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define ll long long int #define mp make_pair #define se second #define fi first #include <ex...
#include <bits/stdc++.h> #define Imposter \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define ll long long int #define mp make_pair #define se second #define fi first #include <ex...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,200
262,201
u108398205
cpp
p02571
#include <bits/stdc++.h> #define Imposter \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define ll long long int #define mp make_pair #define se second #define fi first #include <ex...
#include <bits/stdc++.h> #define Imposter \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define ll long long int #define mp make_pair #define se second #define fi first #include <ex...
[ "variable_declaration.type.change", "control_flow.loop.for.condition.change" ]
262,202
262,201
u108398205
cpp
p02571
#include <bits/stdc++.h> #define Imposter \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define ll long long int #define mp make_pair #define se second #define fi first #include <ex...
#include <bits/stdc++.h> #define Imposter \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define ll long long int #define mp make_pair #define se second #define fi first #include <ex...
[ "variable_declaration.type.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,203
262,201
u108398205
cpp
p02571
// Problem : B - Substring // Contest : AtCoder - AtCoder Beginner Contest 177 // URL : https://atcoder.jp/contests/abc177/tasks/abc177_b // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; #define sc(ar, n) ...
// Problem : B - Substring // Contest : AtCoder - AtCoder Beginner Contest 177 // URL : https://atcoder.jp/contests/abc177/tasks/abc177_b // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; #define sc(ar, n) ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,206
262,207
u909117373
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s = S.size(); int t = T.size(); int ans = t; int kari = 0; for (int i = 0; i < s - t + 1; i++) { kari = 0; for (int j = 0; j < t + 1; j++) { if (S[i + j] != T[j]) kari++; } if (ans ...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int s = S.size(); int t = T.size(); int ans = t; int kari = 0; for (int i = 0; i < s - t + 1; i++) { kari = 0; for (int j = 0; j < t; j++) { if (S[i + j] != T[j]) kari++; } if (ans > ka...
[ "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
262,208
262,209
u701231431
cpp
p02571
#include <bits/stdc++.h> #include <iostream> #define int long long int #define vi vector<int> #define vvi vector<vector<int>> #define pii pair<int, int> #define vpii vector<pair<int, int>> #define mp make_pair using namespace std; int N = 1e6 + 3; vi sieve(N, 1); vi vis(N, 0); void sievex(int n) { int i, j; sieve[1...
#include <bits/stdc++.h> #include <iostream> #define int long long int #define vi vector<int> #define vvi vector<vector<int>> #define pii pair<int, int> #define vpii vector<pair<int, int>> #define mp make_pair using namespace std; int N = 1e6 + 3; vi sieve(N, 1); vi vis(N, 0); void sievex(int n) { int i, j; sieve[1...
[ "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
262,216
262,217
u318393141
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define bitCount(num) __builtin_popcount(num) #define pb push_back #define ll long long #define bye return 0; #define f(i, a, b) for (long long i = a; i < b; i++) #define testCases \ long long t; ...
#include <bits/stdc++.h> using namespace std; #define bitCount(num) __builtin_popcount(num) #define pb push_back #define ll long long #define bye return 0; #define f(i, a, b) for (long long i = a; i < b; i++) #define testCases \ long long t; ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,218
262,219
u866663151
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define bitCount(num) __builtin_popcount(num) #define pb push_back #define ll long long #define bye return 0; #define f(i, a, b) for (long long i = a; i < b; i++) #define testCases \ long long t; ...
#include <bits/stdc++.h> using namespace std; #define bitCount(num) __builtin_popcount(num) #define pb push_back #define ll long long #define bye return 0; #define f(i, a, b) for (long long i = a; i < b; i++) #define testCases \ long long t; ...
[ "literal.number.change", "variable_declaration.value.change", "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,220
262,219
u866663151
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int res = 100000000, tmp; for (int i = 0; i < (s.size() - t.size()); i++) { if (s.substr(i, t.size()) == t) { cout << 0 << endl; return 0; } else { tmp = 0; int index = i; for (int j = ...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int res = 100000000, tmp; for (int i = 0; i <= (s.size() - t.size()); i++) { if (s.substr(i, t.size()) == t) { cout << 0 << endl; return 0; } else { tmp = 0; int index = i; for (int j =...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,221
262,222
u442714890
cpp
p02571
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <utility> #include <vector> typedef long long ll; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; const...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <utility> #include <vector> typedef long long ll; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; const...
[ "misc.opposites", "expression.operator.arithmetic.change", "call.arguments.change", "expression.operation.binary.change" ]
262,225
262,226
u339558464
cpp
p02571
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <utility> #include <vector> typedef long long ll; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; const...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <utility> #include <vector> typedef long long ll; const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1}; const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1}; const...
[ "expression.operation.binary.add" ]
262,227
262,226
u339558464
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve(std::string S, std::string T) { int ans = (int)T.size(); 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(cnt, ans);...
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve(std::string S, std::string T) { int ans = (int)T.size(); for (int i = 0; i < S.size() - T.size() + 1; i++) { int cnt = 0; for (int j = 0; j < T.size(); j++) { if (S[i + j] != T[j]) cnt++; } ans = min(cnt, a...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,230
262,231
u972398652
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; long ans = 0; cin >> s >> t; for (long i = 0; i < s.length() - t.length(); i++) { long counter = 0; for (long j = i; j < i + t.length(); j++) { if (s[j] == t[j - i]) { counter++; } } ans = max(ans, coun...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; long ans = 0; cin >> s >> t; for (long i = 0; i < s.length() - t.length() + 1; i++) { long counter = 0; for (long j = i; j < i + t.length(); j++) { if (s[j] == t[j - i]) { counter++; } } ans = max(ans, ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,232
262,233
u803826130
cpp
p02571
#include <iostream> using namespace std; #include <algorithm> #include <string> int main() { string sStr, tStr; cin >> sStr >> tStr; int res = 100000000; int temp = 0; for (int i = 0; i < (int)sStr.length() - (int)tStr.length(); i++) { temp = 0; for (int j = 0; j < (int)tStr.length(); j++) { if...
#include <iostream> using namespace std; #include <algorithm> #include <string> int main() { string sStr, tStr; cin >> sStr >> tStr; int res = 1000; int temp = 0; for (int i = 0; i <= (int)sStr.length() - (int)tStr.length(); i++) { temp = 0; for (int j = 0; j < (int)tStr.length(); j++) { if (sS...
[ "literal.number.change", "variable_declaration.value.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,238
262,239
u277969177
cpp
p02571
// Bismillahir Rahmanir Rahim #include <bits/stdc++.h> using namespace std; #define ios \ ios_base::sync_with_stdio(0); \ cin.tie(NULL); \ ...
// Bismillahir Rahmanir Rahim #include <bits/stdc++.h> using namespace std; #define ios \ ios_base::sync_with_stdio(0); \ cin.tie(NULL); \ ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,242
262,243
u572033996
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int min = t.size(); for (int i = 0; i < s.size() - t.size(); i++) { int cnt = 0; for (int j = 0; j < t.size(); j++) { if (s.at(i + j) != t.at(j)) { cnt++; } } if (min > cnt) { min =...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int min = t.size(); for (int i = 0; i <= s.size() - t.size(); i++) { int cnt = 0; for (int j = 0; j < t.size(); j++) { if (s.at(i + j) != t.at(j)) { cnt++; } } if (min > cnt) { min ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,251
262,252
u950831819
cpp
p02571
#include <cstdio> #include <cstring> #define min(a, b) ((a) < (b) ? (a) : (b)) char s[1003], t[1003]; int lens, lent, ans = 1 << 30, sum; int main() { scanf("%s%s", s, t); lens = strlen(s), lent = strlen(t); for (int i = 0; i <= lens - lent + 1; i++) { sum = 0; for (int j = 0; j < lent; j++) if (s[i...
#include <cstdio> #include <cstring> #define min(a, b) ((a) < (b) ? (a) : (b)) char s[1003], t[1003]; int lens, lent, ans = 1 << 30, sum; int main() { scanf("%s%s", s, t); lens = strlen(s), lent = strlen(t); for (int i = 0; i < lens - lent + 1; i++) { sum = 0; for (int j = 0; j < lent; j++) if (s[i ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,263
262,264
u734549230
cpp
p02571
#define CPP17 #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <complex> #include <cstddef> #include <deque> #include <functional> #include <initializer_list> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric>...
#define CPP17 #include <algorithm> #include <array> #include <bitset> #include <cassert> #include <complex> #include <cstddef> #include <deque> #include <functional> #include <initializer_list> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #include <map> #include <numeric>...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,265
262,266
u216962796
cpp
p02571
#include <bits/stdc++.h> using namespace std; using ll = long long int; int main() { string S, T; cin >> S >> T; int N = S.size(); int M = T.size(); vector<int> V; int P = 0; for (int i = 0; i < N - M + 1; i++) { for (int j = 0; j < M; j++) { if (S.at(i + j) == T.at(j)) P++; } ...
#include <bits/stdc++.h> using namespace std; using ll = long long int; int main() { string S, T; cin >> S >> T; int N = S.size(); int M = T.size(); vector<int> V; int P = 0; for (int i = 0; i < N - M + 1; i++) { for (int j = 0; j < M; j++) { if (S.at(i + j) == T.at(j)) P++; } ...
[ "literal.number.change", "io.output.change" ]
262,283
262,284
u377697749
cpp
p02571
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; int lt, ls, i, j, tt, ans = 0x7fffffff; char s[1010], t[1010]; int main() { scanf("%s%s", s + 1, t + 1); ls = strlen(s + 1); lt = strlen(t + 1); for (i = 1; i <= ls - lt + 1; i+...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; int lt, ls, i, j, tt, ans = 0x7fffffff; char s[1010], t[1010]; int main() { scanf("%s%s", s + 1, t + 1); ls = strlen(s + 1); lt = strlen(t + 1); for (i = 1; i <= ls - lt + 1; i+...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
262,285
262,286
u625682411
cpp
p02571
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; int lt, ls, i, j, tt, ans = 0x7fffffff; char s[1010], t[1010]; int main() { scanf("%s%s", s + 1, t + 1); ls = strlen(s + 1); lt = strlen(t + 1); for (i = 1; i <= ls - lt + 1; i+...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; int lt, ls, i, j, tt, ans = 0x7fffffff; char s[1010], t[1010]; int main() { scanf("%s%s", s + 1, t + 1); ls = strlen(s + 1); lt = strlen(t + 1); for (i = 1; i <= ls - lt + 1; i+...
[ "identifier.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "misc.off_by_one" ]
262,287
262,286
u625682411
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define int long long void Digvijay() { string s, t; cin >> s >> t; int ans = 1e9; for (int i = 0; i < s.length() - t.length(); i++) { int cnt = 0; for (int j = 0; j < t.length(); j++) { if (s[i + j] != t[j]) cnt++; } ans = min(ans, cnt...
#include <bits/stdc++.h> using namespace std; #define int long long void Digvijay() { string s, t; cin >> s >> t; int ans = 1e9; for (int i = 0; i <= s.length() - t.length(); i++) { int cnt = 0; for (int j = 0; j < t.length(); j++) { if (s[i + j] != t[j]) cnt++; } ans = min(ans, cn...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,298
262,299
u472796082
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ans = 0; int now_max = 0; for (int i = 0; i < s.length() - t.length(); i++) { now_max = 0; for (int j = 0; j < t.length(); j++) { if (s[j + i] == t[j]) now_max++; } ans = max(ans, now_max...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ans = 0; int now_max = 0; for (int i = 0; i < s.length() - t.length() + 1; i++) { now_max = 0; for (int j = 0; j < t.length(); j++) { if (s[j + i] == t[j]) now_max++; } ans = max(ans, now...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,306
262,307
u685233906
cpp
p02571
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long int LL; typedef pair<int, int> ...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <tuple> #include <vector> using namespace std; typedef long long int LL; typedef pair<int, int> ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,308
262,309
u464804957
cpp
p02571
#include <iostream> #include <string> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { string s = (char *)calloc(1000, sizeof(char)); string t = (char *)calloc(1000, sizeof(char)); cin >> s >> t; int s_len = s.length(), t_len = t.length(); int dif = t_len; for (int i = 0; i...
#include <iostream> #include <string> #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; int main() { string s = (char *)calloc(1000, sizeof(char)); string t = (char *)calloc(1000, sizeof(char)); cin >> s >> t; int s_len = s.length(), t_len = t.length(); int dif = t_len; for (int i = 0; i...
[ "assignment.add" ]
262,310
262,311
u944033453
cpp
p02571
#include <bits/stdc++.h> #define f(i, j, k) for (int i = j; i < k; i++) using namespace std; int main() { long long ans = 0, ans2 = 0; string s, t, d; cin >> s >> t; f(i, 0, s.size() - t.size()) { d = s.substr(i, t.size()); ans2 = 0; f(j, 0, t.size()) { if (t[j] == d[j]) { ans2++; ...
#include <bits/stdc++.h> #define f(i, j, k) for (int i = j; i < k; i++) using namespace std; int main() { long long ans = 0, ans2 = 0; string s, t, d; cin >> s >> t; f(i, 0, s.size() - t.size() + 1) { d = s.substr(i, t.size()); ans2 = 0; f(j, 0, t.size()) { if (t[j] == d[j]) { ans2++; ...
[ "expression.operation.binary.add" ]
262,312
262,313
u535267326
cpp
p02571
//#pragma GCC optimize "trapv" #include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define sz(x) (long long)x.size() #define debug(x) cout << #x << ':' << x << endl; #define rep(i, n) for (int i = 0; i < n; i++) #define reps(i, n) for (int i = 1; i <= n; i++) #define make_unique(v) ...
//#pragma GCC optimize "trapv" #include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define sz(x) (long long)x.size() #define debug(x) cout << #x << ':' << x << endl; #define rep(i, n) for (int i = 0; i < n; i++) #define reps(i, n) for (int i = 1; i <= n; i++) #define make_unique(v) ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,316
262,317
u887982593
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int num, max = 0; for (int i = 0; i < s.size() - t.size(); i++) { num = 0; for (int j = 0; j < t.size(); j++) { if (s[i + j] == t[j]) num++; if (num > max) max = num; } } cout <...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int num, max = 0; for (int i = 0; i < s.size() - t.size() + 1; i++) { num = 0; for (int j = 0; j < t.size(); j++) { if (s[i + j] == t[j]) num++; if (num > max) max = num; } } co...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,318
262,319
u686891951
cpp
p02571
#include <bits/stdc++.h> using namespace std; int str_distance(int n, string s, string t) { int d = 0; for (int i = 0; i < n; i++) { if (s.at(i) != t.at(i)) { d++; } } return d; } int main() { string s, t; cin >> s >> t; int ans = 1000; for (unsigned long int i = 0; i < s.size() - t.size...
#include <bits/stdc++.h> using namespace std; int str_distance(int n, string s, string t) { int d = 0; for (int i = 0; i < n; i++) { if (s.at(i) != t.at(i)) { d++; } } return d; } int main() { string s, t; cin >> s >> t; int ans = 1000; for (unsigned long int i = 0; i <= s.size() - t.siz...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,320
262,321
u896340246
cpp
p02571
#include <bits/stdc++.h> using namespace std; int str_distance(int n, string s, string t) { int d = 0; for (int i = 0; i < n; i++) { if (s.at(i) != t.at(i)) { d++; } } return d; } int main() { string s, t; cin >> s >> t; int ans = 1000; for (int i = 0; i < s.size() - t.size(); i++) { ...
#include <bits/stdc++.h> using namespace std; int str_distance(int n, string s, string t) { int d = 0; for (int i = 0; i < n; i++) { if (s.at(i) != t.at(i)) { d++; } } return d; } int main() { string s, t; cin >> s >> t; int ans = 1000; for (unsigned long int i = 0; i <= s.size() - t.siz...
[ "control_flow.loop.for.initializer.change", "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,322
262,321
u896340246
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ss, ts; ss = s.size(); ts = t.size(); int ans = ts; for (int i = 0; i < ss - ts; i++) { // sのそれぞれに対して int k = ts; for (int j = 0; j < ts; j++) { if (s.at(i + j) == t.at(j)) { k--; } ...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int ss, ts; ss = s.size(); ts = t.size(); int ans = ts; for (int i = 0; i < ss - ts + 1; i++) { // sのそれぞれに対して int k = ts; for (int j = 0; j < ts; j++) { if (s.at(i + j) == t.at(j)) { k--; } ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,323
262,324
u995732479
cpp
p02571
#include <iostream> #include <limits.h> #include <string> using namespace std; int main() { string s, t; cin >> s >> t; int mn = INT_MAX; for (int i = 0; i < s.length() - t.length(); i++) { int temp = i; int count = 0; for (int j = 0; j < t.length(); j++) { if (temp >= s.length()) { b...
#include <iostream> #include <limits.h> #include <string> using namespace std; int main() { string s, t; cin >> s >> t; int mn = INT_MAX; for (int i = 0; i <= (s.length() - t.length()); i++) { int temp = i; int count = 0; for (int j = 0; j < t.length(); j++) { if (temp >= s.length()) { ...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,333
262,334
u033095619
cpp
p02571
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> using namespace std; const int MAXN = 1e6 + 10; typedef long long LL; int main() { string s, t; cin >> s >> t; LL ans; int lens = s.size(); int lent = t.size(); ans = lens; for (int i = 0; i + lent < lens; ++i) { LL cnt = ...
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> using namespace std; const int MAXN = 1e6 + 10; typedef long long LL; int main() { string s, t; cin >> s >> t; LL ans; int lens = s.size(); int lent = t.size(); ans = lens; for (int i = 0; i + lent <= lens; ++i) { LL cnt =...
[ "expression.operator.compare.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
262,337
262,338
u709171232
cpp
p02571
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double dl; typedef unsigned long long ull; #define pb push_back #define PB pop_back #define nn "\n" #define O_O \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double dl; typedef unsigned long long ull; #define pb push_back #define PB pop_back #define nn "\n" #define O_O \ ios_base::sync_with_stdio(false); ...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,339
262,340
u545703412
cpp
p02571
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdlib> #include <cstring> #include <string.h> using namespace std; #define pb push_back #define all(v) v.begin(), v.end() #define rep(i, n, v) for (i = n; i < v; i++) #define per(i, n, v) for (i = n; i > v; i--) #define ff first #define ss seco...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdlib> #include <cstring> #include <string.h> using namespace std; #define pb push_back #define all(v) v.begin(), v.end() #define rep(i, n, v) for (i = n; i < v; i++) #define per(i, n, v) for (i = n; i > v; i--) #define ff first #define ss seco...
[ "identifier.replace.remove", "literal.replace.add", "call.arguments.change" ]
262,341
262,342
u124789795
cpp
p02571
#include <bits/stdc++.h> using namespace std; int minimumChange(string S, string T) { int n = S.length(), m = T.length(); int ans = 999999; for (int i = 0; i < m - n + 1; i++) { int minchg = 0; for (int j = 0; j < n; j++) { if (S[j] != T[i + j]) { minchg++; } } ans = min(minchg...
#include <bits/stdc++.h> using namespace std; int minimumChange(string S, string T) { int n = S.length(), m = T.length(); int ans = 999999; for (int i = 0; i < m - n + 1; i++) { int minchg = 0; for (int j = 0; j < n; j++) { if (S[j] != T[i + j]) { minchg++; } } ans = min(minchg...
[ "call.remove" ]
262,352
262,353
u506636429
cpp
p02571
#include <bits/stdc++.h> using namespace std; void solve(); int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t = 1; /*is Single Test case?*/ while (t--) { solve(); cout << "\n"; } cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl; return 0; } void s...
#include <bits/stdc++.h> using namespace std; void solve(); int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t = 1; /*is Single Test case?*/ while (t--) { solve(); cout << "\n"; } cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl; return 0; } void s...
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change" ]
262,359
262,360
u714234597
cpp
p02571
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int c = INT_MAX; for (int i = 0; i < (s.length() - t.length()); i++) { int k = i; int c1 = 0; for (int j = 0; j < t.length(); j++) { if (s[k] != t[j]) c1++; k++; } c = min(c, c1); }...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int c = INT_MAX; for (int i = 0; i < (s.length() - t.length() + 1); i++) { int k = i; int c1 = 0; for (int j = 0; j < t.length(); j++) { if (s[k] != t[j]) c1++; k++; } c = min(c, c1);...
[ "control_flow.loop.for.condition.change", "misc.off_by_one" ]
262,373
262,374
u977576071
cpp
p02571
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <vector> #define fo(i, n) for (ll i = 0; i < n; i++) #define f(i, n) for (ll i = 1; i < n; i++) #define ff(i, k, n) for (ll i = k; i < n; i++) #define ll long long #define vt vector<ll> #define pb(x) pu...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <vector> #define fo(i, n) for (ll i = 0; i < n; i++) #define f(i, n) for (ll i = 1; i < n; i++) #define ff(i, k, n) for (ll i = k; i < n; i++) #define ll long long #define vt vector<ll> #define pb(x) pu...
[ "expression.operation.binary.add" ]
262,383
262,384
u117882493
cpp
p02571
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <vector> #define fo(i, n) for (ll i = 0; i < n; i++) #define f(i, n) for (ll i = 1; i < n; i++) #define ff(i, k, n) for (ll i = k; i < n; i++) #define ll long long #define vt vector<ll> #define pb(x) pu...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <queue> #include <set> #include <vector> #define fo(i, n) for (ll i = 0; i < n; i++) #define f(i, n) for (ll i = 1; i < n; i++) #define ff(i, k, n) for (ll i = k; i < n; i++) #define ll long long #define vt vector<ll> #define pb(x) pu...
[ "expression.operation.binary.add" ]
262,385
262,384
u117882493
cpp
p02571
#include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<ll> #define pll pair<ll, ll> #define forA(i, a, n, x) for (auto i = a; i < n; i += x) #define forD(i, a, n, x) for (auto i = n - 1; i >= 0; i -= x) #define ranit(it, n) for (auto it : n) #define testCases ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<ll> #define pll pair<ll, ll> #define forA(i, a, n, x) for (auto i = a; i < n; i += x) #define forD(i, a, n, x) for (auto i = n - 1; i >= 0; i -= x) #define ranit(it, n) for (auto it : n) #define testCases ...
[ "control_flow.branch.if.condition.change" ]
262,392
262,393
u888040648
cpp