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 |
|---|---|---|---|---|---|---|---|
p04011 | #include <bits/stdc++.h>
using namespace std;
long long n, k, x, y;
int main() {
cin >> n >> k >> x >> y;
if (n <= k) {
cout << k * x << endl;
} else {
cout << k * x + (n - k) * y << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
long long n, k, x, y;
int main() {
cin >> n >> k >> x >> y;
if (n <= k) {
cout << n * x << endl;
} else {
cout << k * x + (n - k) * y << endl;
}
}
| [
"identifier.change",
"io.output.change"
] | 1,509,060 | 1,509,061 | u328468917 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define INF 1000000007
int main() {
string s;
cin >> s;
int arr[256] = {0};
int n = s.length();
if (n == 0) {
cout << "Yes";
return 0;
}
if (n == 1) {
cout << "No";
return 0;
}
int ans = 1;
for (int i = 0; i < n... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define INF 1000000007
int main() {
string s;
cin >> s;
int arr[256] = {0};
int n = s.length();
if (n == 0) {
cout << "Yes";
return 0;
}
if (n == 1) {
cout << "No";
return 0;
}
int ans = 1;
for (int i = 0; i < n... | [
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 1,509,064 | 1,509,065 | u839333866 | cpp |
p04012 | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
char string[120];
cin >> string;
int n = strlen(string);
for (int i = 0; i < n; i++) {
int count = 0;
for (int j = 0; j < n; j++) {
if (string[i] == string[j]) {
count++;
}
}
i... | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
char string[120];
cin >> string;
int n = strlen(string);
for (int i = 0; i < n; i++) {
int count = 0;
for (int j = 0; j < n; j++) {
if (string[i] == string[j]) {
count++;
}
}
i... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,073 | 1,509,074 | u876245575 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int len = w.length();
int a[26] = {0};
int flag = 0;
for (int i = 0; i < len; i++) {
a[w[1] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (a[i] % 2 == 1) {
flag = 1;
break;
}
}
if (!flag) {
c... | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
int len = w.length();
int a[26] = {0};
int flag = 0;
for (int i = 0; i < len; i++) {
a[w[i] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (a[i] % 2 == 1) {
flag = 1;
break;
}
}
if (!flag) {
c... | [
"identifier.replace.add",
"literal.replace.remove",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 1,509,081 | 1,509,082 | u470356849 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 5, M = 1e6 + 5, inf = 0x3f3f3f3f, mod = 1e9 + 7;
#define mst(a) memset(a, 0, sizeof a)
#define lx x << 1
#define rx x << 1 | 1
#define reg register
#define PII pair<int, int>
#define fi first
#define se second
int a[26];
int main() ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 5, M = 1e6 + 5, inf = 0x3f3f3f3f, mod = 1e9 + 7;
#define mst(a) memset(a, 0, sizeof a)
#define lx x << 1
#define rx x << 1 | 1
#define reg register
#define PII pair<int, int>
#define fi first
#define se second
int a[26];
int main() ... | [
"literal.string.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 1,509,089 | 1,509,090 | u378256086 | cpp |
p04012 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
string s;
cin >> s;
map<char, int> mp;
rep(i, s.size()) { mp[s[i]]++; }
string ans = "Yes"... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
string s;
cin >> s;
map<char, int> mp;
rep(i, s.size()) { mp[s[i]]++; }
string ans = "Yes"... | [
"expression.operation.binary.remove"
] | 1,509,093 | 1,509,094 | u534923072 | cpp |
p04012 | #include <algorithm>
#include <array>
#include <cctype>
#include <iostream>
#include <map>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
int main() {
ios::sync... | #include <algorithm>
#include <array>
#include <cctype>
#include <iostream>
#include <map>
#include <set>
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
int main() {
ios::sync... | [] | 1,509,097 | 1,509,098 | u236585484 | cpp |
p04012 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
long long flag = 0;
for (int i = 0; i < s.size(); i++) {
long long a = 0;
for (int j = 0; j < s.size(); j++) {
if (s[i] == s[j]) {
a++;
}
}
if (a % 2 == 0) {
flag = 1;
} else {
fl... |
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
long long flag = 0;
for (int i = 0; i < s.size(); i++) {
long long a = 0;
for (int j = 0; j < s.size(); j++) {
if (s[i] == s[j]) {
a++;
}
}
if (a % 2 == 0) {
flag = 1;
} else {
fl... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,110 | 1,509,111 | u605428783 | cpp |
p04012 | //*Here I go out to sea again
//*The sunshine fills my hair
//*And dreams hang in the air
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int a[26] = {0};
string s;
cin >> s;
for (in... | //*Here I go out to sea again
//*The sunshine fills my hair
//*And dreams hang in the air
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int a[26] = {0};
string s;
cin >> s;
for (in... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,114 | 1,509,115 | u697761122 | cpp |
p04012 | #include <bits/stdc++.h>
#define PI 3.141592653589
#define ll long long
using namespace std;
template <typename T_char> T_char ToUpper(T_char cX) { return toupper(cX); }
int main() {
string w;
cin >> w;
int n = w.size();
map<char, int> a;
for (int i = 0; i < n; ++i) {
a[w[i]]++;
}
for (int i = 0; i ... | #include <bits/stdc++.h>
#define PI 3.141592653589
#define ll long long
using namespace std;
template <typename T_char> T_char ToUpper(T_char cX) { return toupper(cX); }
int main() {
string w;
cin >> w;
int n = w.size();
map<char, int> a;
for (int i = 0; i < n; ++i) {
a[w[i]]++;
}
for (int i = 0; i ... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 1,509,122 | 1,509,123 | u145562832 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
map<char, int> mp;
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
mp[s[i]]++;
}
map<char, int>::iterator it;
for (it = mp.begin(); it != mp.end(); it++) {
if (it->second % 2 != 0) {
cout << "NO" << endl;
return 0;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
map<char, int> mp;
string s;
cin >> s;
for (int i = 0; i < s.size(); i++) {
mp[s[i]]++;
}
map<char, int>::iterator it;
for (it = mp.begin(); it != mp.end(); it++) {
if (it->second % 2 != 0) {
cout << "No" << endl;
return 0;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,124 | 1,509,125 | u603045661 | cpp |
p04012 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define fast_io \
ios_base::sync_with_stdio(false); ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define fast_io \
ios_base::sync_with_stdio(false); ... | [
"variable_declaration.type.primitive.change",
"variable_declaration.value.change"
] | 1,509,133 | 1,509,134 | u397886197 | cpp |
p04012 | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
using ... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
using ... | [
"variable_declaration.value.change"
] | 1,509,139 | 1,509,140 | u275797573 | cpp |
p04012 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
int main() {
int cou[28] = {0};
string S;
cin >> S;
for (int i = 0; i < S.size(); i++) {
cou[S[i] - '0']++;
}
int flg = 1;
for (int i = 0; i < 28; i++) {
if (cou[i] % 2 == 1)
flg... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
int main() {
int cou[28] = {0};
string S;
cin >> S;
for (int i = 0; i < S.size(); i++) {
cou[S[i] - 'a']++;
}
int flg = 1;
for (int i = 0; i < 28; i++) {
if (cou[i] % 2 == 1)
flg... | [
"literal.string.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 1,509,149 | 1,509,150 | u131156882 | cpp |
p04012 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string W;
cin >> W;
sort(begin(W), end(W));
char a = W[0];
bool beautiful = true;
if (W.size() % 2 == 0) {
for (int i = 1; i < W.size(); i++) {
if (a != W[i] && i % 2 == 0) {
bea... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string W;
cin >> W;
sort(begin(W), end(W));
char a = W[0];
bool beautiful = true;
if (W.size() % 2 == 0) {
for (int i = 1; i < W.size(); i++) {
if (a != W[i] && i % 2 == 1) {
bea... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 1,509,157 | 1,509,158 | u541580646 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, V) for (int i = 0; i < V; i++)
#define _GLIBCXX_DEBUG
int main() {
string w;
cin >> w;
vector<char> alpha(26);
for (char ch = 'a'; ch <= 'z'; ch++) {
alpha.push_back(ch);
}
vector<int> counter(26, 0);
rep(i, w.size()) {
rep(j, 26) {
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, V) for (int i = 0; i < V; i++)
#define _GLIBCXX_DEBUG
int main() {
string w;
cin >> w;
vector<char> alpha;
for (char ch = 'a'; ch <= 'z'; ch++) {
alpha.push_back(ch);
}
vector<int> counter(26, 0);
rep(i, w.size()) {
rep(j, 26) {
i... | [
"call.arguments.change"
] | 1,509,161 | 1,509,162 | u371787528 | cpp |
p04012 | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin.sync();
string w;
getline(cin, w);
int len = w.length();
int arr[100] = {0};
for (int i = 0; i < len; i++) {
for (int j = 0; j < len; j++) {
if (w[i] == w[j])... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cin.sync();
string w;
getline(cin, w);
int len = w.length();
int arr[100] = {0};
for (int i = 0; i < len; i++) {
for (int j = 0; j < len; j++) {
if (w[i] == w[j])... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,163 | 1,509,164 | u823099550 | cpp |
p04012 | // Author- Vaibhav singh
// will be expert soon
// *#####################################################################################*
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define YES \
cout << "YES" ... | // Author- Vaibhav singh
// will be expert soon
// *#####################################################################################*
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define YES \
cout << "YES" ... | [
"literal.number.change",
"variable_declaration.value.change"
] | 1,509,166 | 1,509,167 | u251432619 | cpp |
p04012 | #include "bits/stdc++.h"
#define rep(i, j) for (int i = 0; i < j; i++)
using namespace std;
using ll = long long;
const int INF = 1001001001;
/*struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) :x((x% mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint& operator+=(const min... | #include "bits/stdc++.h"
#define rep(i, j) for (int i = 0; i < j; i++)
using namespace std;
using ll = long long;
const int INF = 1001001001;
/*struct mint {
ll x; // typedef long long ll;
mint(ll x = 0) :x((x% mod + mod) % mod) {}
mint operator-() const { return mint(-x); }
mint& operator+=(const min... | [] | 1,509,172 | 1,509,173 | u616794313 | cpp |
p04012 | #include <cstdio>
#include <cstring>
int main() {
char s[105];
int a[26] = {0};
scanf("%s", s);
if (strlen(s) % 2 == 1) {
printf("no\n");
return 0;
} else {
for (int i = 0; i < strlen(s); i++) {
a[s[i] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (a[i] % 2 == 0)
contin... | #include <cstdio>
#include <cstring>
int main() {
char s[105];
int a[26] = {0};
scanf("%s", s);
if (strlen(s) % 2 == 1) {
printf("No\n");
return 0;
} else {
for (int i = 0; i < strlen(s); i++) {
a[s[i] - 'a']++;
}
for (int i = 0; i < 26; i++) {
if (a[i] % 2 == 0)
contin... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 1,509,174 | 1,509,175 | u863370423 | cpp |
p04012 | #include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
int main() {
string w;
int len;
int num_1 = 0, num_2 = 0, num_3 = 0, num_4 = 0, num_5 = 0, num_6 = 0,
num_7 = 0, num_8 = 0, num_9 = 0, num_10 = 0, num_11 = 0, num_12 = 0,
num_25 = 0, num_26 = 0;
int nu... | #include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
int main() {
string w;
int len;
int num_1 = 0, num_2 = 0, num_3 = 0, num_4 = 0, num_5 = 0, num_6 = 0,
num_7 = 0, num_8 = 0, num_9 = 0, num_10 = 0, num_11 = 0, num_12 = 0,
num_25 = 0, num_26 = 0;
int nu... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,182 | 1,509,183 | u353919145 | cpp |
p04012 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void yn(bool ok) {
if (ok)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
int main() {
string s;
cin >> s;
vector<int> a(26, 0);
for (int i = 0; i < s.size(); i++)
a[i - 'a']++;
bool ok = 1;
for (int i = 0; i ... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
void yn(bool ok) {
if (ok)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
int main() {
string s;
cin >> s;
vector<int> a(26, 0);
for (int i = 0; i < s.size(); i++)
a[s[i] - 'a']++;
bool ok = 1;
for (int i = 0;... | [] | 1,509,195 | 1,509,196 | u619683748 | cpp |
p04012 | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
static const int INF = 1e9 + 7;
// 型定義
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (int i = 0; i < n; i++)
#define ... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
static const int INF = 1e9 + 7;
// 型定義
typedef long long ll;
typedef pair<ll, ll> P;
#define rep(i, n) for (int i = 0; i < n; i++)
#define ... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 1,509,197 | 1,509,198 | u274615057 | cpp |
p04012 | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> v(26, 0);
for (auto ss : s) {
... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> v(26, 0);
for (auto ss : s) {
... | [
"literal.string.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 1,509,199 | 1,509,200 | u495704746 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
map<char, int> mp;
for (int i = 0; i < (int)s.length(); i++) {
mp[s[i]]++;
}
string ans = "YES";
for (int i = 0; i < (int)s.length(); i++) {
if (mp[s[i]] ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
map<char, int> mp;
for (int i = 0; i < (int)s.length(); i++) {
mp[s[i]]++;
}
string ans = "Yes";
for (int i = 0; i < (int)s.length(); i++) {
if (mp[s[i]] ... | [
"literal.string.change",
"literal.string.case.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 1,509,223 | 1,509,224 | u610607225 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
map<char, int> mp;
for (int i = 0; i < (int)s.length(); i++) {
mp[s[i]]++;
}
string ans = "YES";
for (int i = 0; i < (int)s.length(); i++) {
if (mp[s[i]] ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
string s;
cin >> s;
map<char, int> mp;
for (int i = 0; i < (int)s.length(); i++) {
mp[s[i]]++;
}
string ans = "Yes";
for (int i = 0; i < (int)s.length(); i++) {
if (mp[s[i]] ... | [
"literal.string.change",
"literal.string.case.change",
"variable_declaration.value.change",
"assignment.value.change",
"io.output.change"
] | 1,509,226 | 1,509,224 | u610607225 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
bool ans = true;
for (int i = 0; i < w.size(); i++) {
if (count(w.begin(), w.end(), w.at(i)) % 2 != 0) {
ans = false;
break;
}
}
if (ans) {
cout << "YES" << endl;
} else {
cout << "No" << endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
bool ans = true;
for (int i = 0; i < w.size(); i++) {
if (count(w.begin(), w.end(), w.at(i)) % 2 != 0) {
ans = false;
break;
}
}
if (ans) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,237 | 1,509,238 | u016754603 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
bool ans = true;
for (int i = 0; i < w.size(); i++) {
if (count(w.begin(), w.end(), w.at(i)) % 2 != 0) {
ans = false;
break;
}
}
if (ans) {
cout << "YES" << endl;
} else {
cout << "No" << endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
bool ans = true;
for (int i = 0; i < w.size(); i++) {
if (count(w.begin(), w.end(), w.at(i)) % 2 != 0) {
ans = false;
break;
}
}
if (ans) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,239 | 1,509,238 | u016754603 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
bool ans = true;
for (int i = 0; i < w.size(); i++) {
if (count(w.begin(), w.end(), w.at(i)) % 2 != 0) {
ans = false;
}
}
if (ans) {
cout << "YES" << endl;
} else {
cout << "No" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
bool ans = true;
for (int i = 0; i < w.size(); i++) {
if (count(w.begin(), w.end(), w.at(i)) % 2 != 0) {
ans = false;
break;
}
}
if (ans) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,240 | 1,509,238 | u016754603 | cpp |
p04012 | #include <bits/stdc++.h>
#define INF 0x3f3f3f3f
#define SI(a) scanf("%d", &a)
#define ms(a, x) memset(a, x, sizeof(a))
typedef long long ll;
const int mod = 1e9 + 7;
const int maxn = 1e8;
using namespace std;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return a * (b / gcd(a, b)); }
in... | #include <bits/stdc++.h>
#define INF 0x3f3f3f3f
#define SI(a) scanf("%d", &a)
#define ms(a, x) memset(a, x, sizeof(a))
typedef long long ll;
const int mod = 1e9 + 7;
const int maxn = 1e8;
using namespace std;
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return a * (b / gcd(a, b)); }
in... | [
"literal.string.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change",
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 1,509,243 | 1,509,242 | u323247202 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
bool even = true;
for (char c = 'a'; c <= 'z'; c++) {
int count = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == c) {
count++;
}
}
count % 2 == 0 ? even = true : false;
}
cout << (even ?... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
bool even = true;
for (char c = 'a'; c <= 'z'; c++) {
int count = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == c) {
count++;
}
}
if (count % 2 == 1)
even = false;
}
cout << (even... | [
"control_flow.branch.if.add"
] | 1,509,258 | 1,509,259 | u418892821 | cpp |
p04012 | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int alfadata[26]; //
int main() {
string str;
// int str;
cin >> str;
int n = str.size();
for (int64_t i = 0; i < n; i++) {
// for(int i=0;i<strlen(str);i++){
int index = str.at(i) -
'a'; //今見ている文字列をアルファベ... | #include <iostream>
#include <sstream>
#include <string>
using namespace std;
int alfadata[26]; //
int main() {
string str;
// int str;
cin >> str;
int n = str.size();
for (int64_t i = 0; i < n; i++) {
// for(int i=0;i<strlen(str);i++){
int index = str.at(i) -
'a'; //今見ている文字列をアルファベ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,267 | 1,509,268 | u645451083 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
#define vit vector<int>::iterator
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define fr first
#define sc second
#define skip continue
#define PI 3.14159265
typed... | #include <bits/stdc++.h>
using namespace std;
#define vit vector<int>::iterator
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define fr first
#define sc second
#define skip continue
#define PI 3.14159265
typed... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,283 | 1,509,284 | u229586865 | cpp |
p04012 | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define roundup(n, d) (((n) + ((d)-1)) / (d))
#define ll long long
using namespace std;
int main(void) {
string s;
cin >> s;
int count[26];
for (int i = 0; i < s.size(); i++) {
count[s[i] - 97]++;
}
for (int i = 0; i < 26;... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define roundup(n, d) (((n) + ((d)-1)) / (d))
#define ll long long
using namespace std;
int main(void) {
string s;
cin >> s;
int count[26] = {};
for (int i = 0; i < s.size(); i++) {
count[s[i] - 97]++;
}
for (int i = 0; i ... | [
"variable_declaration.value.change"
] | 1,509,294 | 1,509,295 | u312646928 | cpp |
p04012 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
int tmp;
bool flag;
cin >> s;
flag = true;
for (int i = 0; i < s.length(); i++) {
tmp = 1;
for (int j = i + 1; j < s.length(); j++) {
if (s[j] == s[i])
tmp++;
}
if (tmp % 2 != 0) {
flag ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
int tmp;
bool flag;
cin >> s;
flag = true;
for (int i = 0; i < s.length(); i++) {
tmp = 0;
for (int j = 0; j < s.length(); j++) {
if (s[j] == s[i])
tmp++;
}
if (tmp % 2 != 0) {
flag = fa... | [
"literal.number.change",
"assignment.value.change",
"variable_declaration.value.change",
"identifier.replace.remove",
"literal.replace.add",
"control_flow.loop.for.initializer.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 1,509,316 | 1,509,317 | u049740716 | cpp |
p04012 | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); i++)
#define ll long long
using namespace std;
int main() {
string w;
cin >> w;
string nomal = "abcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < nomal.size(); i++) {
int ans = 0;
for (int j = 0; j < nomal.size(); j++) {
if (no... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); i++)
#define ll long long
using namespace std;
int main() {
string w;
cin >> w;
string nomal = "abcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < nomal.size(); i++) {
int ans = 0;
for (int j = 0; j < w.size(); j++) {
if (nomal.... | [
"identifier.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 1,509,320 | 1,509,321 | u553123421 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 5e18;
int main() {
string s;
cin >> s;
ll n = s.size();
map<char, ll> cnt;
for (ll i = 0; i < n; i++... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
// const ll mod=998244353;
const ll inf = 5e18;
int main() {
string s;
cin >> s;
ll n = s.size();
map<char, ll> cnt;
for (ll i = 0; i < n; i++... | [
"control_flow.branch.if.condition.change"
] | 1,509,322 | 1,509,323 | u718758485 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
if (w.size() % 2 != 0) {
cout << "No"
<< "\n";
return (0);
} else {
for (int i = 0; i < w.size(); i += 2) {
if (w[i] != w[i + 1]) {
cout << "No"
<< "\n";
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
if (w.size() % 2 != 0) {
cout << "No"
<< "\n";
return (0);
} else {
for (int i = 0; i < w.size(); i += 2) {
if (w[i] != w[i + 1]) {
cout << "No"
<< "\n";
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,340 | 1,509,341 | u093372948 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
if (w.size() % 2 != 0) {
cout << "No"
<< "\n";
return (0);
} else {
for (int i = 0; i < w.size(); i += 2) {
if (w[i] != w[i + 1]) {
cout << "Yes"
<< "\n";
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
if (w.size() % 2 != 0) {
cout << "No"
<< "\n";
return (0);
} else {
for (int i = 0; i < w.size(); i += 2) {
if (w[i] != w[i + 1]) {
cout << "No"
<< "\n";
... | [
"literal.string.change",
"io.output.change",
"literal.string.case.change"
] | 1,509,342 | 1,509,341 | u093372948 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
#define ALLR(v) v.rbegin(), v.rend()
typedef long long ll;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1}... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
#define ALLR(v) v.rbegin(), v.rend()
typedef long long ll;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1}... | [] | 1,509,344 | 1,509,345 | u474760662 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
const long long INFLL = 1LL << 60;
const int INFI = 1000000000;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
w = w + 'A';
int count = 0;
string ans = "Yes";
for (int i = 0; i < w.size() - 1; i++) {
if (w[i] == ... | #include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
const long long INFLL = 1LL << 60;
const int INFI = 1000000000;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
w = w + 'A';
int count = 0;
string ans = "Yes";
for (int i = 0; i < w.size() - 1; i++) {
if (w[i] == ... | [] | 1,509,352 | 1,509,353 | u583701239 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
const long long INFLL = 1LL << 60;
const int INFI = 1000000000;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
w = w + 'A';
int i = 0;
string ans = "Yes";
for (int i = 0; i < w.size(); i++) {
if (w[i] == w[i + 1])... | #include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
const long long INFLL = 1LL << 60;
const int INFI = 1000000000;
int main() {
string w;
cin >> w;
sort(w.begin(), w.end());
w = w + 'A';
int count = 0;
string ans = "Yes";
for (int i = 0; i < w.size() - 1; i++) {
if (w[i] == ... | [
"variable_declaration.name.change",
"identifier.change",
"control_flow.loop.for.condition.change",
"misc.off_by_one",
"control_flow.branch.if.condition.change",
"assignment.variable.change"
] | 1,509,354 | 1,509,353 | u583701239 | cpp |
p04012 | #include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string w, a;
int p = 0;
cin >> w;
for (int j = 0; j < w.size(); j++) {
int k = 0;
for (int i = 0; i < w.size(); i++) {
if (w[j] == w[i])
k++;
}
if (k % 2 == 1)
p++;
}
... | #include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string w, a;
int p = 0;
cin >> w;
for (int j = 0; j < w.size(); j++) {
int k = 0;
for (int i = 0; i < w.size(); i++) {
if (w[j] == w[i])
k++;
}
if (k % 2 == 1)
p++;
}
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,359 | 1,509,360 | u235031662 | cpp |
p04012 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using u128 = __uint128_t;
#define int long long
#define idxSet \
tree<int, null_type, less_equal<in... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using u128 = __uint128_t;
#define int long long
#define idxSet \
tree<int, null_type, less_equal<in... | [
"control_flow.return.add"
] | 1,509,361 | 1,509,362 | u481963728 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[200];
cin >> s;
sort(s, s + strlen(s));
if (strlen(s) % 2 == 1) {
cout << "No";
return 0;
}
for (int i = 0; i < strlen(s) - 1; i++) {
if (s[i] != s[i + 1]) {
if (i % 2 == 1) {
cout << "No";
return 0;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[200];
cin >> s;
sort(s, s + strlen(s));
if (strlen(s) % 2 == 1) {
cout << "No";
return 0;
}
for (int i = 0; i < strlen(s) - 1; i++) {
if (s[i] != s[i + 1]) {
if (i % 2 == 0) {
cout << "No";
return 0;
}
... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 1,509,373 | 1,509,374 | u222643545 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
#define N 26
int main() {
string str;
cin >> str;
int Array[N] = {0};
for (int i = 0; i < str.size(); i++)
Array[(int)str[i] - 97]++;
for (int i = 1; i < N; i++)
Array[0] |= Array[i];
if (Array[0] % 2)
cout << "NO" << endl;
else
cout << "YE... | #include <bits/stdc++.h>
using namespace std;
#define N 26
int main() {
string str;
cin >> str;
int Array[N] = {0};
for (int i = 0; i < str.size(); i++)
Array[(int)str[i] - 97]++;
for (int i = 1; i < N; i++)
Array[0] |= Array[i];
if (Array[0] % 2)
cout << "No" << endl;
else
cout << "Ye... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,375 | 1,509,376 | u290461751 | cpp |
p04008 | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
ll par[100005] = {0};
vector<ll> node[100005];
ll ans = 0;
ll dfs(ll pos, ll k) {
ll max_d = 0;
for (int i = 0; i < node[pos].size(); i++) {
ll to = node[pos][i];
max_d = max(max_d, dfs(to,... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
ll par[100005] = {0};
vector<ll> node[100005];
ll ans = 0;
ll dfs(ll pos, ll k) {
ll max_d = 0;
for (int i = 0; i < node[pos].size(); i++) {
ll to = node[pos][i];
max_d = max(max_d, dfs(to,... | [
"literal.number.change",
"function.return_value.change",
"control_flow.loop.for.initializer.change",
"variable_declaration.type.change"
] | 1,509,380 | 1,509,381 | u440213743 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | [
"literal.number.change",
"function.return_value.change"
] | 1,509,382 | 1,509,383 | u096883693 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define MAX_N 100005
int n, k;
vector<int> adj[MAX_N];
int ans = 0;
int dfs(int u, int p = -1) {
int mx = 0;
for (int v : adj[u])
mx = max(mx, dfs(v, u));
// cout << u << " = " << mx << endl;
if (mx + 1 == k && p != 1) {
ans++;
return -1;
}
return... | #include <bits/stdc++.h>
using namespace std;
#define MAX_N 100005
int n, k;
vector<int> adj[MAX_N];
int ans = 0;
int dfs(int u, int p = 1) {
int mx = 0;
for (int v : adj[u])
mx = max(mx, dfs(v, u));
// cout << u << " = " << mx << endl;
if (mx + 1 == k && p != 1) {
ans++;
return -1;
}
return ... | [
"expression.operation.unary.arithmetic.remove"
] | 1,509,384 | 1,509,385 | u091622975 | cpp |
p04008 | #include <algorithm>
#include <cstdio>
const int maxn = 1e5 + 5;
using namespace std;
struct E {
int to, nxt;
} e[maxn];
int head[maxn], tot = 0;
void addedge(int u, int v) {
e[++tot].to = v, e[tot].nxt = head[u];
head[u] = tot;
}
int a[maxn], dep[maxn], n, k, ans = 0;
void dfs(int cur, int fa) {
for (int i = h... | #include <algorithm>
#include <cstdio>
const int maxn = 1e5 + 5;
using namespace std;
struct E {
int to, nxt;
} e[maxn];
int head[maxn], tot = 0;
void addedge(int u, int v) {
e[++tot].to = v, e[tot].nxt = head[u];
head[u] = tot;
}
int a[maxn], dep[maxn], n, k, ans = 0;
void dfs(int cur, int fa) {
for (int i = h... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,386 | 1,509,387 | u867959763 | cpp |
p04008 | #include <algorithm>
#include <cstdio>
const int maxn = 1e5 + 5;
using namespace std;
struct E {
int to, nxt;
} e[maxn];
int head[maxn], tot = 0;
void addedge(int u, int v) {
e[++tot].to = v, e[tot].nxt = head[u];
head[u] = tot;
}
int a[maxn], dep[maxn], n, k, ans = 0;
void dfs(int cur, int fa) {
for (int i = h... | #include <algorithm>
#include <cstdio>
const int maxn = 1e5 + 5;
using namespace std;
struct E {
int to, nxt;
} e[maxn];
int head[maxn], tot = 0;
void addedge(int u, int v) {
e[++tot].to = v, e[tot].nxt = head[u];
head[u] = tot;
}
int a[maxn], dep[maxn], n, k, ans = 0;
void dfs(int cur, int fa) {
for (int i = h... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,386 | 1,509,388 | u867959763 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const int INF = 1e9;
int main() {
int N, K;
cin >> N >> K;
vector<int> a(N);
for (int i = 0; i < N; i++)
cin >> a[i], a[i]--;
Graph G(N);
for (int i = 1; i < N; i++) {
G[a[i]].push_back(i);
}
/*
for(int i=0;i<N... | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const int INF = 1e9;
int main() {
int N, K;
cin >> N >> K;
vector<int> a(N);
for (int i = 0; i < N; i++)
cin >> a[i], a[i]--;
Graph G(N);
for (int i = 1; i < N; i++) {
G[a[i]].push_back(i);
}
/*
for(int i=0;i<N... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 1,509,396 | 1,509,397 | u738450435 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define ULL unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define pll pair<LL, LL>
#define x first
#define y second
#define pi acos(-1)
#define sqr(x) ((x) * (x))
#define pdd pair<double, double>
#define MEMS(x)... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define ULL unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
#define pll pair<LL, LL>
#define x first
#define y second
#define pi acos(-1)
#define sqr(x) ((x) * (x))
#define pdd pair<double, double>
#define MEMS(x)... | [] | 1,509,398 | 1,509,399 | u682550266 | cpp |
p04008 | #include <bits/stdc++.h>
//#include <tr1/unordered_map>
//#include "Bignum/bignum.h"
//#define big bignum
#define lowbit(x) (x & -x)
#define debug(x) (cout << "#x = " << (x) << endl)
#define Set(x, i) memset(x, i, sizeof(x))
#define re register
#define For(i, j, k) for (re int i = (j); i <= (int)(k); ++i)
#define Rep(i... | #include <bits/stdc++.h>
//#include <tr1/unordered_map>
//#include "Bignum/bignum.h"
//#define big bignum
#define lowbit(x) (x & -x)
#define debug(x) (cout << "#x = " << (x) << endl)
#define Set(x, i) memset(x, i, sizeof(x))
#define re register
#define For(i, j, k) for (re int i = (j); i <= (int)(k); ++i)
#define Rep(i... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 1,509,400 | 1,509,401 | u031514160 | cpp |
p04008 | #include <iostream>
#include <set>
#include <vector>
using namespace std;
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define ll long long
const int N = 1e5 + 11;
int n, k, a[N], res, d[N], p[N], bio[N];
vector<int> ls[N];
set<pair<int, int>> s;
void dfs(int x, int mama, int dubina)... | #include <iostream>
#include <set>
#include <vector>
using namespace std;
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define ll long long
const int N = 1e5 + 11;
int n, k, a[N], res, d[N], p[N], bio[N];
vector<int> ls[N];
set<pair<int, int>> s;
void dfs(int x, int mama, int dubina)... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 1,509,406 | 1,509,407 | u056087068 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
#include "LOCAL_DEBUG.hpp"
#endif
#define int long long
signed main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
a[i]--;
}
vector<vector<int>> G(n);
for (int i = 0; i < n; i++) {
if... | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
#include "LOCAL_DEBUG.hpp"
#endif
#define int long long
signed main() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
a[i]--;
}
vector<vector<int>> G(n);
for (int i = 0; i < n; i++) {
if... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,411 | 1,509,412 | u344122377 | cpp |
p04008 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdi... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdi... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,415 | 1,509,416 | u313288017 | cpp |
p04008 | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdi... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <float.h>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdi... | [
"literal.number.change",
"assignment.value.change",
"control_flow.branch.if.condition.change"
] | 1,509,417 | 1,509,416 | u313288017 | cpp |
p04008 | ////////////////////////////////////////////
/// ///
/// Template ver. 1 rapel ///
/// Fear is Temporary, Regret is Forever ///
/// Must Try and Get AC ///
/// ///
////////////////////////////////////////////
#incl... | ////////////////////////////////////////////
/// ///
/// Template ver. 1 rapel ///
/// Fear is Temporary, Regret is Forever ///
/// Must Try and Get AC ///
/// ///
////////////////////////////////////////////
#incl... | [
"control_flow.branch.if.condition.change"
] | 1,509,418 | 1,509,419 | u236830524 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
int ans = 0;
int dfs(int v, int pv, int k, vector<vector<int>> &g) {
int max_d = 0;
for (int u : g[v]) {
max_d = max(max_d, 1 + dfs(u, v, k, g));
}
if (max_d == k - 1 && pv != 0) {
ans++;
max_d = -1;
}
return max_d;
}
int main() {
ios_base::syn... | #include <bits/stdc++.h>
using namespace std;
int ans = 0;
int dfs(int v, int pv, int k, vector<vector<int>> &g) {
int max_d = 0;
for (int u : g[v]) {
max_d = max(max_d, 1 + dfs(u, v, k, g));
}
if (max_d == k - 1 && v != 0) {
ans += pv > 0;
max_d = -1;
}
return max_d;
}
int main() {
ios_ba... | [
"identifier.change",
"control_flow.branch.if.condition.change",
"assignment.change"
] | 1,509,420 | 1,509,421 | u063345561 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define forn(i, a, b) for (int i = a; i <= b; ++i)
const int N = 1e5 + 10;
int n, k;
int cnt;
int height[N], a[N];
vector<int> e[N];
void dfs(int u, int p = 0) {
height[u] = 0;
for (auto v : e[u]) {
dfs(v, u);
height[u] = max(height[u], height[v] + 1);
}
if ... | #include <bits/stdc++.h>
using namespace std;
#define forn(i, a, b) for (int i = a; i <= b; ++i)
const int N = 1e5 + 10;
int n, k;
int cnt;
int height[N], a[N];
vector<int> e[N];
void dfs(int u, int p = 0) {
height[u] = 0;
for (auto v : e[u]) {
dfs(v, u);
height[u] = max(height[u], height[v] + 1);
}
if ... | [
"control_flow.branch.if.condition.change"
] | 1,509,422 | 1,509,423 | u856961597 | cpp |
p04008 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII... | [
"literal.number.change",
"variable_declaration.value.change",
"expression.operation.binary.remove"
] | 1,509,424 | 1,509,425 | u007610006 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 2001;
const int MOD = 1000000007;
vector<int> ko[100001];
signed main() {
int n, k;
cin >> n >> k;
int oya[n], used[n] = {}, a;
for (int i = 0; i < n; i++) {
cin >> a;
oya[i] = a - 1;
if (i != 0)
ko[a - 1].p... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 2001;
const int MOD = 1000000007;
vector<int> ko[100001];
signed main() {
int n, k;
cin >> n >> k;
int oya[n], used[n] = {}, a;
for (int i = 0; i < n; i++) {
cin >> a;
oya[i] = a - 1;
if (i != 0)
ko[a - 1].p... | [] | 1,509,426 | 1,509,427 | u651317892 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int)((x).size()))
typedef long long ll;
typedef long double ld;
int n, k, r, a[100100];
vector<int> e[100100];
int dfs(int i = 0) {
int d = 0;
for (int j : e[i])
d = max(d, dfs(j) + 1);
if (d + 1 >= k) {
r += a[i] != 0;
return 0;
}
... | #include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int)((x).size()))
typedef long long ll;
typedef long double ld;
int n, k, r, a[100100];
vector<int> e[100100];
int dfs(int i = 0) {
int d = 0;
for (int j : e[i])
d = max(d, dfs(j) + 1);
if (d + 1 >= k) {
r += a[i] != 0;
return -1;
}
... | [
"literal.number.change",
"function.return_value.change"
] | 1,509,429 | 1,509,430 | u395070007 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
const int N = 123456;
int n, k, answer, a[N], d[N];
vector<int> adj[N];
void dfs(int x) {
for (auto y : adj[x]) {
dfs(y);
d[x] = max(d[x], d[y] + 1);
}
if (d[x] == k - 1 && a[x] != 1) {
++answer;
d[x] = -1;
}
}
int main() {
ios::sync_with_stdi... | #include <bits/stdc++.h>
using namespace std;
const int N = 123456;
int n, k, answer, a[N], d[N];
vector<int> adj[N];
void dfs(int x) {
for (auto y : adj[x]) {
dfs(y);
d[x] = max(d[x], d[y] + 1);
}
if (x > 1 && d[x] == k - 1 && a[x] != 1) {
++answer;
d[x] = -1;
}
}
int main() {
ios::sync_... | [
"control_flow.branch.if.condition.change"
] | 1,509,431 | 1,509,432 | u303142406 | cpp |
p04008 | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<int, int> P;
vector<int> G[100000];
int depth[100000];
bool ok[100000];
P depth_pair[100000];
void dfs_depth(int v, int d) {
depth[v] = d;
for (int i = 0; i < G[v].size(); i++) {
if (depth[G[v][i]] ... | #include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef pair<int, int> P;
vector<int> G[100000];
int depth[100000];
bool ok[100000];
P depth_pair[100000];
void dfs_depth(int v, int d) {
depth[v] = d;
for (int i = 0; i < G[v].size(); i++) {
if (depth[G[v][i]] ... | [
"control_flow.branch.if.condition.change",
"control_flow.loop.for.condition.change"
] | 1,509,435 | 1,509,436 | u693133807 | cpp |
p04008 | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
void read(int &x) {
char ch;
bool ok;
for (ok = 0, ch = getchar(); !isdigit(ch); ch = getchar())
if (ch == '-')
ok = 1;
for (x = 0; isdigit(ch); x = x * 10 + ch - '0', ch = getchar())
;
if (ok)
... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
void read(int &x) {
char ch;
bool ok;
for (ok = 0, ch = getchar(); !isdigit(ch); ch = getchar())
if (ch == '-')
ok = 1;
for (x = 0; isdigit(ch); x = x * 10 + ch - '0', ch = getchar())
;
if (ok)
... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,437 | 1,509,438 | u921673547 | cpp |
p04008 | #include <bits/stdc++.h>
#define GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, NAME, ...) NAME
#define pr(...) \
cerr << GET_MACRO(__VA_ARGS__, pr8, pr7, pr6, pr5, pr4, pr3, pr2, \
pr1)(__VA_ARGS__) ... | #include <bits/stdc++.h>
#define GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, NAME, ...) NAME
#define pr(...) \
cerr << GET_MACRO(__VA_ARGS__, pr8, pr7, pr6, pr5, pr4, pr3, pr2, \
pr1)(__VA_ARGS__) ... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,439 | 1,509,440 | u278868910 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, k, ans = 0, prt[N];
vector<int> g[N];
int dfs(int u, int fa) {
int res = 0;
for (auto v : g[u]) {
res = max(res, dfs(v, u));
}
if (res >= k - 1 && fa != 1) {
res = -1;
ans++;
}
return res + 1;
}
int main() {
scan... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, k, ans = 0, prt[N];
vector<int> g[N];
int dfs(int u, int fa) {
int res = 0;
for (auto v : g[u]) {
res = max(res, dfs(v, u));
}
if (res == k - 1 && fa != 1) {
res = -1;
ans++;
}
return res + 1;
}
int main() {
scan... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"literal.number.change",
"call.arguments.change"
] | 1,509,444 | 1,509,445 | u717763016 | cpp |
p04008 | #include <iostream>
#include <vector>
using namespace std;
vector<int> G[1 << 17];
int n, K, a[1 << 17];
int cnt;
int dfs(int u, int p) {
int d = 0;
for (int i = 0; i < G[u].size(); i++) {
d = max(d, dfs(G[u][i], u));
}
if (d == K - 1 && p != 0)
cnt++, d = -1;
return d + 1;
}
main() {
cin >> n >> K;... | #include <iostream>
#include <vector>
using namespace std;
vector<int> G[1 << 17];
int n, K, a[1 << 17];
int cnt;
int dfs(int u, int p) {
int d = 0;
for (int i = 0; i < G[u].size(); i++) {
d = max(d, dfs(G[u][i], u));
}
if (d == K - 1 && p != 0)
cnt++, d = -1;
return d + 1;
}
main() {
cin >> n >> K;... | [
"literal.number.change",
"call.arguments.change"
] | 1,509,453 | 1,509,454 | u657913472 | cpp |
p04008 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#include <unordered_map>
#include <vector>
u... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <typeinfo>
#include <unordered_map>
#include <vector>
u... | [
"expression.operation.unary.arithmetic.add"
] | 1,509,459 | 1,509,460 | u711985352 | cpp |
p04008 | #include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF = 1e9, MOD = 1e9 + 7, ohara = 1e6 + 10;
const ll LINF = 1e18;
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define rrep(i, a, b) for (int i = (a); i < (b); i++)
#define rrrep(i, a, b) for (int i = (a)... | #include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF = 1e9, MOD = 1e9 + 7, ohara = 1e6 + 10;
const ll LINF = 1e18;
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define rrep(i, a, b) for (int i = (a); i < (b); i++)
#define rrrep(i, a, b) for (int i = (a)... | [
"variable_declaration.remove"
] | 1,509,461 | 1,509,462 | u876335718 | cpp |
p04008 | #include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF = 1e9, MOD = 1e9 + 7, ohara = 1e6 + 10;
const ll LINF = 1e18;
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define rrep(i, a, b) for (int i = (a); i < (b); i++)
#define rrrep(i, a, b) for (int i = (a)... | #include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF = 1e9, MOD = 1e9 + 7, ohara = 1e6 + 10;
const ll LINF = 1e18;
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); (i)++)
#define rrep(i, a, b) for (int i = (a); i < (b); i++)
#define rrrep(i, a, b) for (int i = (a)... | [
"variable_declaration.remove"
] | 1,509,463 | 1,509,464 | u876335718 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define stoi stoll
using ll = long long;
using vi = vector<int>;
using pii = pair<int, int>;
#define ALL(c) begin(c), end(c)
#define RALL(c) rbegin(c), rend(c)
#define ITR(i, b, e) for (auto i = (b); i != (e); ++i)
#define FORE(x, c) for (auto &&x : c)... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define stoi stoll
using ll = long long;
using vi = vector<int>;
using pii = pair<int, int>;
#define ALL(c) begin(c), end(c)
#define RALL(c) rbegin(c), rend(c)
#define ITR(i, b, e) for (auto i = (b); i != (e); ++i)
#define FORE(x, c) for (auto &&x : c)... | [
"control_flow.branch.if.condition.change"
] | 1,509,465 | 1,509,466 | u133129810 | cpp |
p04008 | #include <iostream>
#include <vector>
using namespace std;
int K, ans = 0;
vector<int> path[100010];
// 頂点vの高さを返す
// 0に繋いだ場合は-1
int dfs(int v, int r) {
int h = 0;
for (int sv : path[v]) {
h = max(h, dfs(sv, v) + 1);
}
if (h == K - 1 && r >= 0) {
++ans;
h = -1;
}
return h;
}
int main() {
... | #include <iostream>
#include <vector>
using namespace std;
int K, ans = 0;
vector<int> path[100010];
// 頂点vの高さを返す
// 0に繋いだ場合は-1
int dfs(int v, int r) {
int h = 0;
for (int sv : path[v]) {
h = max(h, dfs(sv, v) + 1);
}
if (h == K - 1 && r > 0) {
++ans;
h = -1;
}
return h;
}
int main() {
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 1,509,467 | 1,509,468 | u059727354 | cpp |
p04008 | #include <iostream>
#include <vector>
using namespace std;
int K, ans = 0;
vector<int> path[100010];
// 頂点vの高さを返す
// 0に繋いだ場合は-1
int dfs(int v, int r) {
int h = 0;
for (int sv : path[v]) {
h = max(h, dfs(sv, v) + 1);
}
if (h == K - 1 && r != 0) {
++ans;
h = -1;
}
return h;
}
int main() {
... | #include <iostream>
#include <vector>
using namespace std;
int K, ans = 0;
vector<int> path[100010];
// 頂点vの高さを返す
// 0に繋いだ場合は-1
int dfs(int v, int r) {
int h = 0;
for (int sv : path[v]) {
h = max(h, dfs(sv, v) + 1);
}
if (h == K - 1 && r > 0) {
++ans;
h = -1;
}
return h;
}
int main() {
... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 1,509,469 | 1,509,468 | u059727354 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
vector<int> tr[N];
int a[N];
int ans, k;
int dfs(int x, int fa) {
int rec = -1;
for (int i = 0; i < tr[x].size(); i++) {
if (tr[x][i] == fa)
continue;
rec = max(rec, dfs(tr[x][i], x));
}
rec++;
if (rec == k - 1 && fa != 1) ... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
vector<int> tr[N];
int a[N];
int ans, k;
int dfs(int x, int fa) {
int rec = -1;
for (int i = 0; i < tr[x].size(); i++) {
if (tr[x][i] == fa)
continue;
rec = max(rec, dfs(tr[x][i], x));
}
rec++;
if (x != 1 && rec == k - 1 &&... | [
"control_flow.branch.if.condition.change"
] | 1,509,470 | 1,509,471 | u593031180 | cpp |
p04008 | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utili... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utili... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 1,509,472 | 1,509,473 | u965315642 | cpp |
p04008 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
int a[100010], k, n, dis[100010], ans, in[100010], cnt, f[100010];
struct edge {
int to, lt;
} e[100010];
bool vis[100010];
void addedge(int x, int y) {
e[++cnt].to = y;
e[cnt].lt = in[x];
in[x] = cnt;
}
void dfs(... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
int a[100010], k, n, dis[100010], ans, in[100010], cnt, f[100010];
struct edge {
int to, lt;
} e[100010];
bool vis[100010];
void addedge(int x, int y) {
e[++cnt].to = y;
e[cnt].lt = in[x];
in[x] = cnt;
}
void dfs(... | [
"assignment.variable.change",
"identifier.change",
"variable_access.subscript.index.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 1,509,474 | 1,509,475 | u071357718 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, m, E, ans;
int fir[N], nex[N], arr[N], dp[N], lin[N];
inline void Add_Edge(int x, int y) {
nex[++E] = fir[x];
fir[x] = E;
arr[E] = y;
}
void dfs(int x) {
dp[x] = 0;
for (int i = fir[x]; i; i = nex[i]) {
dfs(arr[i]);
dp[x] ... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, m, E, ans;
int fir[N], nex[N], arr[N], dp[N], lin[N];
inline void Add_Edge(int x, int y) {
nex[++E] = fir[x];
fir[x] = E;
arr[E] = y;
}
void dfs(int x) {
dp[x] = 0;
for (int i = fir[x]; i; i = nex[i]) {
dfs(arr[i]);
dp[x] ... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,481 | 1,509,482 | u165906724 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef pair<int, int> pi;
typedef long long ll;
const int N = 1000005;
int n, a[N], k, res, h[N];
vector<int> g[N];
void dfs(int u) {
for (auto v : g[u]) {
dfs(v);
h[u] = max(h[u], 1 + h[v]);
}
if (h[u] == k - 1 && u > 1) {
if (a[... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef pair<int, int> pi;
typedef long long ll;
const int N = 1000005;
int n, a[N], k, res, h[N];
vector<int> g[N];
void dfs(int u) {
for (auto v : g[u]) {
dfs(v);
h[u] = max(h[u], 1 + h[v]);
}
if (h[u] == k - 1 && u > 1) {
if (a[... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,483 | 1,509,484 | u417705043 | cpp |
p04008 | #include <bits/stdc++.h>
#define N 100020
#define ll long long
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch > '9' || ch < '0')
ch == '-' && (f = 0) || (ch = getchar());
while (ch <= '9' && ch >= '0')
x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
retur... | #include <bits/stdc++.h>
#define N 100020
#define ll long long
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch > '9' || ch < '0')
ch == '-' && (f = 0) || (ch = getchar());
while (ch <= '9' && ch >= '0')
x = (x << 3) + (x << 1) + ch - '0', ch = getchar();
retur... | [
"expression.operation.binary.remove"
] | 1,509,485 | 1,509,486 | u383992322 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
const int N = 100010;
struct edge {
int la, b;
} con[N << 1];
int tot, fir[N];
void add(int from, int to) {
con[++tot] = (edge){fir[from], to};
fir[from] = tot;
}
int n, fa[N], ans, k;
int dfs(int pos) {
int ret = 0;
for (int i = fir[pos]; i; i = con[i].la) {
... | #include <bits/stdc++.h>
using namespace std;
const int N = 100010;
struct edge {
int la, b;
} con[N << 1];
int tot, fir[N];
void add(int from, int to) {
con[++tot] = (edge){fir[from], to};
fir[from] = tot;
}
int n, fa[N], ans, k;
int dfs(int pos) {
int ret = 0;
for (int i = fir[pos]; i; i = con[i].la) {
... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,487 | 1,509,488 | u508231342 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
f = -f;
for (; isdigit(ch); ch = getchar())
x = 10 * x + ch - '0';
return x * f;
}
const int maxn = 1e5 + 10;
int n, k, ans;
int a[maxn], d... | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
f = -f;
for (; isdigit(ch); ch = getchar())
x = 10 * x + ch - '0';
return x * f;
}
const int maxn = 1e5 + 10;
int n, k, ans;
int a[maxn], d... | [
"control_flow.return.add"
] | 1,509,489 | 1,509,490 | u056948543 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
f = -f;
for (; isdigit(ch); ch = getchar())
x = 10 * x + ch - '0';
return x * f;
}
const int maxn = 1e5 + 10;
int n, k, ans;
int a[maxn], d... | #include <bits/stdc++.h>
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')
f = -f;
for (; isdigit(ch); ch = getchar())
x = 10 * x + ch - '0';
return x * f;
}
const int maxn = 1e5 + 10;
int n, k, ans;
int a[maxn], d... | [
"literal.number.change",
"control_flow.branch.if.condition.change",
"control_flow.return.add"
] | 1,509,491 | 1,509,490 | u056948543 | cpp |
p04008 | /*#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")*/
#include <bits/stdc++.h>
#define ll long long
#define N 500005
#define inf 1000000005
#define mod 1000000007
#define put putchar('\n')
#define F(i, a, b) for (int i = (... | /*#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")*/
#include <bits/stdc++.h>
#define ll long long
#define N 500005
#define inf 1000000005
#define mod 1000000007
#define put putchar('\n')
#define F(i, a, b) for (int i = (... | [
"control_flow.branch.if.condition.change"
] | 1,509,494 | 1,509,495 | u711778147 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, k, ans, fa[N], dep[N];
int tot, lnk[N], nxt[N], son[N];
void add(int x, int y) { nxt[++tot] = lnk[x], lnk[x] = tot, son[tot] = y; }
void dfs(int x) {
dep[x] = 1;
for (int j = lnk[x]; j; j = nxt[j]) {
dfs(son[j]);
dep[x] = max(dep[x]... | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, k, ans, fa[N], dep[N];
int tot, lnk[N], nxt[N], son[N];
void add(int x, int y) { nxt[++tot] = lnk[x], lnk[x] = tot, son[tot] = y; }
void dfs(int x) {
dep[x] = 1;
for (int j = lnk[x]; j; j = nxt[j]) {
dfs(son[j]);
dep[x] = max(dep[x]... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,496 | 1,509,497 | u803812829 | cpp |
p04008 | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#includ... | [
"control_flow.branch.if.condition.change"
] | 1,509,500 | 1,509,501 | u344412812 | cpp |
p04008 | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<int, P> P1;
#define fr first
#define... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<int, P> P1;
#define fr first
#define... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,504 | 1,509,505 | u957457849 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
int n, k;
int a;
vector<int> g[100001];
int ans = 0;
int dfs(int v = 0, int t = 0) {
int d = 0;
for (int i = 0; i < g[v].size(); i++) {
d = max(d, dfs(g[v][i], v) + 1);
}
if (d == k - 1 && t != 0) {
d = 0;
ans++;
}
return d;
}
int main() {
ci... | #include <bits/stdc++.h>
using namespace std;
int n, k;
int a;
vector<int> g[100001];
int ans = 0;
int dfs(int v = 0, int t = 0) {
int d = 0;
for (int i = 0; i < g[v].size(); i++) {
d = max(d, dfs(g[v][i], v) + 1);
}
if (d == k - 1 && t != 0) {
d = -1;
ans++;
}
return d;
}
int main() {
c... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,506 | 1,509,507 | u802071009 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i <= b; ++i)
#define CLR(i, a) memset(i, a, sizeof(i))
#define REPD(i, a, b) for (int i = a; i >= b; --i)
#define REPG(i, h, x) for (int i = h[x], v; ~i; i = edge[i].next)
const int N = 1e5 + 5;
int n, k;
int head[N], cnt, a[N], dep[... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i <= b; ++i)
#define CLR(i, a) memset(i, a, sizeof(i))
#define REPD(i, a, b) for (int i = a; i >= b; --i)
#define REPG(i, h, x) for (int i = h[x], v; ~i; i = edge[i].next)
const int N = 1e5 + 5;
int n, k;
int head[N], cnt, a[N], dep[... | [
"control_flow.branch.if.condition.change"
] | 1,509,512 | 1,509,513 | u227532478 | cpp |
p04008 | #include <bits/stdc++.h>
using namespace std;
int N, K;
int par[100010];
vector<int> G[100010];
int ans = 0;
int DFS(int v) {
int d = 0;
for (int i = 0; i < G[v].size(); i++)
d = max(DFS(G[v][i]), d);
if (d == K - 1 && par[v] != 1) {
ans++;
return 0;
}
return d + 1;
}
int main() {
scanf("%d%... | #include <bits/stdc++.h>
using namespace std;
int N, K;
int par[100010];
vector<int> G[100010];
int ans = 0;
int DFS(int v) {
int d = 0;
for (int i = 0; i < G[v].size(); i++)
d = max(DFS(G[v][i]), d);
if (d == K - 1 && par[v] != 1 && v != 1) {
ans++;
return 0;
}
return d + 1;
}
int main() {
... | [
"control_flow.branch.if.condition.change"
] | 1,509,514 | 1,509,515 | u205655980 | cpp |
p04012 | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long test = 1;
// cin>>test;
while (test--) {
long a, b = 0, c = 0, k, i, n, j, temp, mini, maxi, ans, q, sum, x, y;
string s;
cin >> s;
long arr[129] = {0};
for (... | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
long test = 1;
// cin>>test;
while (test--) {
long a, b = 0, c = 0, k, i, n, j, temp, mini, maxi, ans, q, sum, x, y;
string s;
cin >> s;
long arr[129] = {0};
for (... | [
"literal.number.change",
"assignment.value.change",
"control_flow.loop.for.initializer.change",
"identifier.replace.add",
"literal.replace.remove",
"control_flow.loop.condition.change",
"control_flow.loop.for.condition.change",
"call.add"
] | 1,509,518 | 1,509,519 | u335756132 | cpp |
p04012 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
int cnt = 0;
for (char c : s) {
cnt ^= (1 << (c - 'a'));
}
cout << (cnt ? "No\n" : "Yes\n");
return 0;
}
| #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int cnt = 0;
for (char c : s) {
cnt ^= (1 << (c - 'a'));
}
cout << (cnt ? "No\n" : "Yes\n");
return 0;
}
| [] | 1,509,526 | 1,509,527 | u661686644 | cpp |
p04012 | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int str[26] = {};
for (int i = 0; i < s.length(); i++) {
str[s.at(i) - 'a']++;
}
string ans = "YES";
for (int i = 0; i < 26; i++) {
if (str[i] % 2 != 0) {
ans = "NO";
}
}
cout << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int str[26] = {};
for (int i = 0; i < s.length(); i++) {
str[s.at(i) - 'a']++;
}
string ans = "Yes";
for (int i = 0; i < 26; i++) {
if (str[i] % 2 != 0) {
ans = "No";
}
}
cout << ans << endl;
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"variable_declaration.value.change",
"assignment.value.change"
] | 1,509,528 | 1,509,529 | u159703196 | cpp |
p04012 | #include <algorithm>
#include <iostream>
using namespace std;
int a[26];
int main() {
string s;
cin >> s;
for (int i = 0; i < 26; i++)
a[i] = 0;
sort(s.begin(), s.end());
int d = s.length();
for (int i = 0; i < d; i++) {
a[s[i] - 'a']++;
}
int flag = 0;
for (int i = 0; i < s[d - 1] - 'a'; i++)... | #include <algorithm>
#include <iostream>
using namespace std;
int a[26];
int main() {
string s;
cin >> s;
for (int i = 0; i < 26; i++)
a[i] = 0;
sort(s.begin(), s.end());
int d = s.length();
for (int i = 0; i < d; i++) {
a[s[i] - 'a']++;
}
int flag = 0;
for (int i = 0; i <= s[d - 1] - 'a'; i++... | [
"expression.operator.compare.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 1,509,534 | 1,509,535 | u655389559 | cpp |
p04012 | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int n = 0;
n = s.size();
int x['z' + 1] = {0};
for (int i = 0; i < n; i++) {
x[s[i]]++;
}
bool flag = true;
for (int i = 'a'; i <= 'z'; i++) {
if (x[i] % 2 != 0) {
flag = false;... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int n = 0;
n = s.size();
int x['z' + 1] = {0};
for (int i = 0; i < n; i++) {
x[s[i]]++;
}
bool flag = true;
for (int i = 'a'; i <= 'z'; i++) {
if (x[i] % 2 != 0) {
flag = false;... | [
"control_flow.branch.if.condition.change"
] | 1,509,542 | 1,509,543 | u629161057 | cpp |
p04012 | #include <iostream>
using namespace std;
int main() {
string W;
bool flg = true;
cin >> W;
int array[26] = {0};
if (W.length() % 2 == 0) {
for (int i = 0; i < W.length(); i++) {
array[W[i] - 'A']++;
}
for (int i = 0; i < 26; i++) {
if (array[i] % 2 != 0) {
flg = false;
... | #include <iostream>
using namespace std;
int main() {
string W;
bool flg = true;
cin >> W;
int array[26] = {0};
if (W.length() % 2 == 0) {
for (int i = 0; i < W.length(); i++) {
array[W[i] - 'a'] += 1;
}
for (int i = 0; i < 26; i++) {
if (array[i] % 2 != 0) {
flg = false;
... | [
"literal.string.change",
"literal.string.case.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 1,509,544 | 1,509,545 | u519604525 | cpp |
p04012 | #include <bits/stdc++.h>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;
#define all(v) v.begin(), v.end()
#define endl "\n"
#define pb push_back
#define F first
#define S second
#define THINK_TWICE_CODE_ONCE \
cin.tie(0); ... | #include <bits/stdc++.h>
#include <ext/numeric>
using namespace std;
using namespace __gnu_cxx;
#define all(v) v.begin(), v.end()
#define endl "\n"
#define pb push_back
#define F first
#define S second
#define THINK_TWICE_CODE_ONCE \
cin.tie(0); ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 1,509,551 | 1,509,552 | u801983383 | cpp |
p04012 | #include <algorithm>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(i, a, n) fo... | #include <algorithm>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using namespace std;
#define rep(i, a, n) fo... | [
"literal.number.change",
"assignment.value.change"
] | 1,509,560 | 1,509,561 | u407213771 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.