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 9
values |
|---|---|---|---|---|---|---|---|
p02987 | #include <cstdio>
#define NUM 4
// using namespace std;
int main() {
int i, j, count;
char S[NUM];
count = 0;
for (i = 0; i < NUM; i++) {
scanf("%c\n", &S[i]);
}
// S[0]==S[1]==S[2]==S[3]
for (i = 0; i < NUM - 1; i++) {
for (j = 1; j < NUM; j++) {
if (S[i] == S[i + j]) {
coun... | #include <cstdio>
#define NUM 4
// using namespace std;
int main() {
int i, j, count;
char S[NUM];
count = 0;
for (i = 0; i < NUM; i++) {
scanf("%c\n", &S[i]);
}
for (i = 0; i < NUM - 1; i++) {
for (j = 1; j < NUM; j++) {
if (S[i] == S[i + j]) {
count++;
}
}
}
if ... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 794,503 | 794,504 | u402389525 | cpp |
p02987 | #include <cstdio>
#define NUM 4
// using namespace std;
int main() {
int i, j, count;
char S[NUM];
count = 0;
for (i = 0; i < NUM; i++) {
scanf("%c", &S[i]);
}
// S[0]==S[1]==S[2]==S[3]
for (i = 0; i < NUM - 1; i++) {
for (j = 1; j < NUM; j++) {
if (S[i] == S[i + j]) {
count+... | #include <cstdio>
#define NUM 4
// using namespace std;
int main() {
int i, j, count;
char S[NUM];
count = 0;
for (i = 0; i < NUM; i++) {
scanf("%c\n", &S[i]);
}
for (i = 0; i < NUM - 1; i++) {
for (j = 1; j < NUM; j++) {
if (S[i] == S[i + j]) {
count++;
}
}
}
if ... | [
"literal.string.change",
"call.arguments.change",
"literal.string.case.change",
"io.output.change"
] | 794,505 | 794,504 | u402389525 | cpp |
p02987 | #include <cstdio>
#define NUM 4
// using namespace std;
int main() {
int i, j, count;
char S[NUM];
count = 0;
for (i = 0; i < NUM; i++) {
scanf("%c", &S[i]);
}
for (i = 0; i < NUM - 1; i++) {
for (j = 1; j < NUM; j++) {
if (S[i] == S[i + j]) {
count++;
}
}
}
if (c... | #include <cstdio>
#define NUM 4
// using namespace std;
int main() {
int i, j, count;
char S[NUM];
count = 0;
for (i = 0; i < NUM; i++) {
scanf("%c\n", &S[i]);
}
for (i = 0; i < NUM - 1; i++) {
for (j = 1; j < NUM; j++) {
if (S[i] == S[i + j]) {
count++;
}
}
}
if ... | [
"literal.string.change",
"call.arguments.change",
"io.output.change",
"io.output.newline.remove",
"literal.string.case.change"
] | 794,506 | 794,504 | u402389525 | cpp |
p02987 | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
string result = "No";
if (s[0] == s[1] && s[0] != s[2] && s[2] == s[3]) {
result = "Yes";
} else if (s[0] == s[2] && s[0] != s[1] && s[1] == s[3]) {
result = "Yes";
} else if (s[0] == s[3] && s[0] != s[1] && s[2] == s[2]) {
... | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
string result = "No";
if (s[0] == s[1] && s[0] != s[2] && s[2] == s[3]) {
result = "Yes";
} else if (s[0] == s[2] && s[0] != s[1] && s[1] == s[3]) {
result = "Yes";
} else if (s[0] == s[3] && s[0] != s[1] && s[1] == s[2]) {
... | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 794,523 | 794,524 | u639203570 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
sort(str.begin(), str.end());
if (str[0] == str[1] && str[2] == str[3]) {
if (str[1] != str[2]) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
} else {
cout << "NO" << endl;
}
return 0... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
sort(str.begin(), str.end());
if (str[0] == str[1] && str[2] == str[3]) {
if (str[1] != str[2]) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else {
cout << "No" << endl;
}
return 0... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,531 | 794,532 | u940054416 | cpp |
p02987 | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
char S[10];
cin >> S;
sort(S, S + 4);
if (S[0] == S[1] && S[1] != S[2] && S[2] == S[3]) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
} | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
char S[10];
cin >> S;
sort(S, S + 4);
if (S[0] == S[1] && S[1] != S[2] && S[2] == S[3]) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,545 | 794,546 | u917140501 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
#define min(...) minn(__VA_ARGS__)
#define max(...) maxx(__VA_ARGS__)
#define stringio() \
ios::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
#define min(...) minn(__VA_ARGS__)
#define max(...) maxx(__VA_ARGS__)
#define stringio() \
ios::sync_with_stdio(0); \
cin.tie(0); ... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 794,563 | 794,564 | u047932856 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int count = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 4; j++) {
char a = str.at(i);
char b = str.at(j);
if (a == b)
count++;
}
}
if (count != 0 && count != 2)
cout << "Yes... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int count = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 4; j++) {
char a = str.at(i);
char b = str.at(j);
if (a == b)
count++;
}
}
if (count == 2)
cout << "Yes" << endl;
e... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 794,577 | 794,578 | u625176086 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int count = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 4; j++) {
char a = str.at(i);
char b = str.at(j);
if (a == b)
count++;
}
}
if (count != 0)
cout << "Yes" << endl;
e... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int count = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 4; j++) {
char a = str.at(i);
char b = str.at(j);
if (a == b)
count++;
}
}
if (count == 2)
cout << "Yes" << endl;
e... | [] | 794,579 | 794,578 | u625176086 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
char c[256] = {};
rep(i, 4) c[S[i]]++;
rep(i, 4) if (c[S[i]] != 2) {
cout << "NO" << endl;
return 0;
}
cout << "YES" ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
signed main() {
cin.tie(0);
ios::sync_with_stdio(false);
string S;
cin >> S;
char c[256] = {};
rep(i, 4) c[S[i]]++;
rep(i, 4) if (c[S[i]] != 2) {
cout << "No" << endl;
return 0;
}
cout << "Yes" ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,580 | 794,581 | u128513271 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string A;
cin >> A;
char a, b, c, d;
a = A.at(0);
b = A.at(1);
c = A.at(2);
d = A.at(3);
if (a == b) {
if (c == d && b != a) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else if (a == c) {
if (b == ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string A;
cin >> A;
char a, b, c, d;
a = A.at(0);
b = A.at(1);
c = A.at(2);
d = A.at(3);
if (a == b) {
if (c == d && d != a) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else if (a == c) {
if (b == ... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 794,586 | 794,587 | u686962993 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int r[100005], r2[100005], r3[1000005];
int main() {
long long int a, b, c, d, e, f, g, k;
string s;
while (cin >> s) {
for (int i = 1; i <= 26; i++) {
r[i] = 0;
}
for (int i = 0; i < s.size(); i++) {
a = s[i] - 64;
r[a]++;
}
b ... | #include <bits/stdc++.h>
using namespace std;
int r[100005], r2[100005], r3[1000005];
int main() {
long long int a, b, c, d, e, f, g, k;
string s;
while (cin >> s) {
for (int i = 1; i <= 26; i++) {
r[i] = 0;
}
for (int i = 0; i < s.size(); i++) {
a = s[i] - 64;
r[a]++;
}
b ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,593 | 794,594 | u970127238 | cpp |
p02987 | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int shuma = 0;
for (int i = 0; i < 3; i++) {
for (int j = i + 1; j < 4; j++) {
if (s[i] == s[j]) {
shuma++;
}
}
}
if (shuma == 2) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
retu... | #include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
int shuma = 0;
for (int i = 0; i < 3; i++) {
for (int j = i + 1; j < 4; j++) {
if (s[i] == s[j]) {
shuma++;
}
}
}
if (shuma == 2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
re... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,595 | 794,596 | u172269390 | cpp |
p02987 | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char s[10];
scanf("%s", s);
sort(s, s + 4);
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
puts("YES");
else
puts("NO");
} | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
char s[10];
scanf("%s", s);
sort(s, s + 4);
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
puts("Yes");
else
puts("No");
}
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 794,606 | 794,607 | u241159494 | cpp |
p02987 | #include "bits/stdc++.h"
using namespace std;
namespace ORIGIN {
#define LL long long
#define VLL vector<long long>
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define rep(i, n) for (int i = 0; i < n; i++)
#define COUT(x) cout << x << endl
#define WHOLE(x) x.begin(), x.end()
dou... | #include "bits/stdc++.h"
using namespace std;
namespace ORIGIN {
#define LL long long
#define VLL vector<long long>
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define rep(i, n) for (int i = 0; i < n; i++)
#define COUT(x) cout << x << endl
#define WHOLE(x) x.begin(), x.end()
dou... | [] | 794,610 | 794,611 | u196798307 | cpp |
p02987 | #include <bits/stdc++.h>
#define endl '\n'
#define mp make_pair
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,tree_order_statistics_node_update>
typedef long lon... | #include <bits/stdc++.h>
#define endl '\n'
#define mp make_pair
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,tree_order_statistics_node_update>
typedef long lon... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,612 | 794,613 | u377622126 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[2] != s[3])
cout << "Yes";
else
cout << "No";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
cout << "Yes";
else
cout << "No";
return 0;
}
| [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 794,635 | 794,636 | u389438219 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> lookup(26, 0);
char temp;
for (int i = 0; i < 26; i++) {
cin >> temp;
lookup[temp - 'A']++;
}
for (int i = 0; i < 26; i++) {
if (lookup[i] != 0 || lookup[i] != 2) {
cout << "No" << endl;
return 0;
}
}
cout ... | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> lookup(26, 0);
char temp;
for (int i = 0; i < 4; i++) {
cin >> temp;
lookup[temp - 'A']++;
}
for (int i = 0; i < 26; i++) {
if (lookup[i] != 0 && lookup[i] != 2) {
cout << "No" << endl;
return 0;
}
}
cout <... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 794,637 | 794,638 | u083463940 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
char ch;
set<char> s;
for (int i = 0; i < 4; i++) {
cin >> ch;
s.insert(ch);
}
if (s.size() == 2)
cout << "YES";
else
cout << "NO";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
char ch;
set<char> s;
for (int i = 0; i < 4; i++) {
cin >> ch;
s.insert(ch);
}
if (s.size() == 2)
cout << "Yes";
else
cout << "No";
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,664 | 794,665 | u404706753 | cpp |
p02987 | #include <algorithm>
#include <iostream>
#include <string>
int main() {
std::string s;
std::cin >> s;
std::sort(s.begin(), s.end());
const auto ret =
(s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) ? "YES" : "NO";
std::cout << ret << std::endl;
}
| #include <algorithm>
#include <iostream>
#include <string>
int main() {
std::string s;
std::cin >> s;
std::sort(s.begin(), s.end());
const auto ret =
(s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) ? "Yes" : "No";
std::cout << ret << std::endl;
}
| [
"literal.string.change",
"literal.string.case.change"
] | 794,666 | 794,667 | u549516870 | cpp |
p02987 | #include <algorithm>
#include <iostream>
#include <string>
int main() {
std::string s;
std::cin >> s;
std::sort(s.begin(), s.end());
const auto ret =
(s[0] == s[1] && s[1] != s[2] && s[3] == s[4]) ? "YES" : "NO";
std::cout << ret << std::endl;
}
| #include <algorithm>
#include <iostream>
#include <string>
int main() {
std::string s;
std::cin >> s;
std::sort(s.begin(), s.end());
const auto ret =
(s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) ? "Yes" : "No";
std::cout << ret << std::endl;
}
| [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change",
"literal.string.change",
"literal.string.case.change"
] | 794,668 | 794,667 | u549516870 | cpp |
p02987 | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char a[8];
if (scanf("%s", a) == 1)
if ((a[0] == a[1]) && (a[2] == a[3]) && (a[1] == a[2]))
printf("Yes");
else if ((a[0] == a[2]) && (a[1] == a[3]) && (a[0] != a[1]))
printf("Yes");
else if ((a[0] == a[3]) && (a[1... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char a[8];
if (scanf("%s", a) == 1)
if ((a[0] == a[1]) && (a[2] == a[3]) && (a[1] != a[2]))
printf("Yes");
else if ((a[0] == a[2]) && (a[1] == a[3]) && (a[0] != a[1]))
printf("Yes");
else if ((a[0] == a[3]) && (a[1... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 794,669 | 794,670 | u958419642 | cpp |
p02987 | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define F first
#define S second
#define sz(x) ((int)x.size())
#define rep(i, a, n) for (int i = a; i <= n; ++i)
#define all(v) v.begin(), v.end()
#define pb push_back
#define P pair<int, int>
#define E cout << '\n'
const int mod = 1e9 + 7;
const int... | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define F first
#define S second
#define sz(x) ((int)x.size())
#define rep(i, a, n) for (int i = a; i <= n; ++i)
#define all(v) v.begin(), v.end()
#define pb push_back
#define P pair<int, int>
#define E cout << '\n'
const int mod = 1e9 + 7;
const int... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,675 | 794,676 | u450009898 | cpp |
p02987 | #include <iostream>
#include <map>
using namespace std;
int main() {
string s;
cin >> s;
map<char, int> m;
for (char c : s) {
m[c]++;
}
if (m.size() == 2) {
for (pair<int, int> p : m) {
if (p.second != 2) {
cout << "NO" << endl;
return 0;
}
}
cout << "YES" << endl... | #include <iostream>
#include <map>
using namespace std;
int main() {
string s;
cin >> s;
map<char, int> m;
for (char c : s) {
m[c]++;
}
if (m.size() == 2) {
for (pair<int, int> p : m) {
if (p.second != 2) {
cout << "No" << endl;
return 0;
}
}
cout << "Yes" << endl... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,677 | 794,678 | u594620232 | cpp |
p02987 | #include <iostream>
#include <string>
#include <unordered_set>
using namespace std;
int main() {
string str;
unordered_set<char> s;
cin >> str;
int count[4] = {0};
for (int i = 0; i < 4; i++) {
if (s.find(str[i]) == s.end()) {
count[i]++;
s.insert(str[i]);
} else if (str[i] == str[0])
... | #include <iostream>
#include <string>
#include <unordered_set>
using namespace std;
int main() {
string str;
unordered_set<char> s;
cin >> str;
int count[4] = {0};
for (int i = 0; i < 4; i++) {
if (s.find(str[i]) == s.end()) {
count[i]++;
s.insert(str[i]);
} else if (str[i] == str[0])
... | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 794,692 | 794,693 | u819611746 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define isuck \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define isuck \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,694 | 794,695 | u608668320 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[3]) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[3]) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,704 | 794,705 | u465274766 | cpp |
p02987 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[2] == s[3]) {
if (s[0] != s[2]) {
cout << "YES" << endl;
return 0;
}
}
if (s[0] == s[2] && s[1] == s[3]) {
if (s[0] != s[1]) {
cout << "YES" << endl;
return ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[2] == s[3]) {
if (s[0] != s[2]) {
cout << "Yes" << endl;
return 0;
}
}
if (s[0] == s[2] && s[1] == s[3]) {
if (s[0] != s[1]) {
cout << "Yes" << endl;
return ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,715 | 794,716 | u676042970 | cpp |
p02987 | #include <bits/stdc++.h>
#define inf 2147483647
#define llinf 9223372036854775807
#define ll long long
using namespace std;
const int maxn = 1e5 + 10;
char s[5];
int cnt = 0, vis[26];
int main() {
scanf("%s", s);
for (int i = 0; i < 4; i++) {
if (vis[s[i] - 'A'] != 0)
continue;
vis[s[i] - 'a'] = 1;
... | #include <bits/stdc++.h>
#define inf 2147483647
#define llinf 9223372036854775807
#define ll long long
using namespace std;
const int maxn = 1e5 + 10;
char s[5];
int cnt = 0, vis[26];
int main() {
scanf("%s", s);
for (int i = 0; i < 4; i++) {
if (vis[s[i] - 'A'] != 0)
continue;
vis[s[i] - 'A'] = 1;
... | [
"literal.string.change",
"literal.string.case.change",
"assignment.variable.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 794,727 | 794,728 | u285456273 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 5, MOD = 1e9 + 7;
string s;
int fr[27];
int main() {
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
printf("YES");
else
printf("NO");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 2e5 + 5, MOD = 1e9 + 7;
string s;
int fr[27];
int main() {
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
printf("Yes");
else
printf("No");
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 794,729 | 794,730 | u135774780 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3))
cout << "YES" << endl;
else
cout << "NO" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
sort(S.begin(), S.end());
if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3))
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,731 | 794,732 | u756514276 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
bool flag;
cin >> s;
sort(s.begin(), s.end());
flag = (s[0] == s[1]) & (s[1] != s[2]) & (s[2] == s[3]);
cout << (flag ? "yes" : "no") << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
bool flag;
cin >> s;
sort(s.begin(), s.end());
flag = (s[0] == s[1]) & (s[1] != s[2]) & (s[2] == s[3]);
cout << (flag ? "Yes" : "No") << endl;
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,748 | 794,749 | u286539644 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
set<char> in;
for (int i = 0; i < s.size(); i++) {
char j = s[i];
in.insert(j);
}
if (in.size() == 2) {
cout << "YES";
}
if (in.size() != 2) {
cout << "NO";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
set<char> in;
for (int i = 0; i < s.size(); i++) {
char j = s[i];
in.insert(j);
}
if (in.size() == 2) {
cout << "Yes";
}
if (in.size() != 2) {
cout << "No";
}
return 0;
} | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,750 | 794,751 | u392722358 | cpp |
p02987 | #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;
#define fio \
ios_base::sync_with_stdio(false); \
cin.... | #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;
#define fio \
ios_base::sync_with_stdio(false); \
cin.... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,752 | 794,753 | u163191764 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string ANS = "Yes";
string S;
cin >> S;
int count;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (S.at(i) == S.at(j)) {
count++;
}
}
if (count != 2) {
ANS = "No";
break;
}
}
cout <... | #include <bits/stdc++.h>
using namespace std;
int main() {
string ANS = "Yes";
string S;
cin >> S;
int count;
for (int i = 0; i < 4; i++) {
count = 0;
for (int j = 0; j < 4; j++) {
if (S.at(i) == S.at(j)) {
count++;
}
}
if (count != 2) {
ANS = "No";
break;
... | [
"assignment.add"
] | 794,758 | 794,759 | u025771681 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int ans[1000] = {0}, qqq = 0, www = 0;
cin >> s;
for (int i = 0; i < 4; i++) {
ans[s[i]]++;
}
for (int i = 0; i < 1000; i++) {
if (ans[i] == 2) {
qqq++;
}
if (ans[i] > 0) {
www++;
}
}
if (qqq == 2 && www... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
int ans[1000] = {0}, qqq = 0, www = 0;
cin >> s;
for (int i = 0; i < 4; i++) {
ans[s[i]]++;
}
for (int i = 0; i < 1000; i++) {
if (ans[i] == 2) {
qqq++;
}
if (ans[i] > 0) {
www++;
}
}
if (qqq == 2 && www... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,760 | 794,761 | u262203607 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[5];
scanf("%d", s);
sort(s, s + 4);
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
printf("Yes");
else
printf("No");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
char s[5];
scanf("%s", s);
sort(s, s + 4);
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
printf("Yes");
else
printf("No");
return 0;
} | [
"literal.string.change",
"call.arguments.change"
] | 794,766 | 794,767 | u701113330 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
array<int, 500> unk;
for (int &i : unk) {
i = 0;
}
for (char c : str) {
unk[c] += 1;
}
for (int i : unk) {
if (i != 2 && i != 0) {
cout << "NO" << endl;
exit(0);
}
}
cout << "YES" << endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
array<int, 500> unk;
for (int &i : unk) {
i = 0;
}
for (char c : str) {
unk[c] += 1;
}
for (int i : unk) {
if (i != 2 && i != 0) {
cout << "No" << endl;
exit(0);
}
}
cout << "Yes" << endl;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,770 | 794,771 | u748830830 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
array<int, 500> unk;
for (int &i : unk) {
i = 0;
}
for (char c : str) {
unk[c] += 1;
}
for (int i : unk) {
if (i != 2 && i != 0) {
cout << "NO";
exit(0);
}
}
cout << "YES" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
array<int, 500> unk;
for (int &i : unk) {
i = 0;
}
for (char c : str) {
unk[c] += 1;
}
for (int i : unk) {
if (i != 2 && i != 0) {
cout << "No" << endl;
exit(0);
}
}
cout << "Yes" << endl;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change",
"io.output.newline.add"
] | 794,772 | 794,771 | u748830830 | cpp |
p02987 | #include <algorithm>
#include <cassert>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int count = 0;
for (int i = 0; i < 4; i++) {
for (int j = i; j < 4; j++) {
if (s[i] == s[j]) {
count++;
}
}
}
if (count == 2... | #include <algorithm>
#include <cassert>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
int count = 0;
for (int i = 0; i < 4; i++) {
for (int j = i + 1; j < 4; j++) {
if (s[i] == s[j]) {
count++;
}
}
}
if (count ... | [
"control_flow.loop.for.initializer.change"
] | 794,773 | 794,774 | u759162415 | cpp |
p02987 | #include <algorithm>
#include <stdio.h>
using namespace std;
int main(int argc, char const *argv[]) {
char chs[5];
scanf("%s", chs);
sort(chs, chs + 4);
if (chs[0] == chs[1] && chs[1] != chs[2] && chs[2] == chs[3]) {
printf("YES\n");
return 0;
}
printf("NO\n");
return 0;
}
| #include <algorithm>
#include <stdio.h>
using namespace std;
int main(int argc, char const *argv[]) {
char chs[5];
scanf("%s", chs);
sort(chs, chs + 4);
if (chs[0] == chs[1] && chs[1] != chs[2] && chs[2] == chs[3]) {
printf("Yes\n");
return 0;
}
printf("No\n");
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 794,777 | 794,778 | u109534827 | cpp |
p02987 | #include <algorithm>
#include <cstdio>
using namespace std;
int main(int argc, char const *argv[]) {
char chs[5];
scanf("%s", chs);
sort(chs, chs + 4);
if (chs[0] == chs[1] && chs[1] != chs[2] && chs[2] == chs[3]) {
printf("YES\n");
return 0;
}
printf("NO\n");
return 0;
}
| #include <algorithm>
#include <stdio.h>
using namespace std;
int main(int argc, char const *argv[]) {
char chs[5];
scanf("%s", chs);
sort(chs, chs + 4);
if (chs[0] == chs[1] && chs[1] != chs[2] && chs[2] == chs[3]) {
printf("Yes\n");
return 0;
}
printf("No\n");
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 794,780 | 794,778 | u109534827 | cpp |
p02987 | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using lli = long long int;
int inf = 1000000007;
using namespace std;
int NextInt() {
int x;
cin >> x;
return x;
}
int main() {
vec... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using lli = long long int;
int inf = 1000000007;
using namespace std;
int NextInt() {
int x;
cin >> x;
return x;
}
int main() {
vec... | [
"call.arguments.add"
] | 794,788 | 794,789 | u134381136 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string x;
cin >> x;
int a = x[0], b = x[1], c = x[2], d = x[3];
if (a == b, a != c, c == d) {
cout << "Yes" << endl;
} else if (a == c, a != b, b == d) {
cout << "Yes" << endl;
} else if (a == d, a != c, c == b) {
cout << "Yes" << endl;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string x;
cin >> x;
int a = x[0], b = x[1], c = x[2], d = x[3];
if (a == b && a != c && c == d) {
cout << "Yes" << endl;
} else if (a == c && a != b && b == d) {
cout << "Yes" << endl;
} else if (a == d && a != c && c == b) {
cout << "Ye... | [
"control_flow.branch.if.condition.change"
] | 794,792 | 794,793 | u827250617 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
char a, b;
a = s.at(0);
int x = 0, y = 0;
for (int i = 0; i < 4; i++) {
if (a == s.at(i)) {
x++;
} else {
b = s.at(i);
for (int j = 0; j < 4; j++) {
if (b == s.at(j)) {
y++;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
char a, b;
a = s.at(0);
int x = 0, y = 0;
for (int i = 0; i < 4; i++) {
if (a == s.at(i)) {
x++;
} else {
b = s.at(i);
for (int j = 0; j < 4; j++) {
if (b == s.at(j)) {
y++;
}
... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 794,802 | 794,803 | u646051775 | cpp |
p02987 | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2])
cout << "Yes" << endl;
cout << "No" << endl;
return 0;
}
| #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [
"control_flow.branch.else_if.replace.remove",
"control_flow.branch.if.replace.add"
] | 794,808 | 794,809 | u659629720 | cpp |
p02987 | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
cout << "Yes" << endl;
else
cout << "NO" << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2])
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,812 | 794,813 | u532573979 | cpp |
p02987 | #include <iostream>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
vector<int> v(26);
for (int i = 0; i < 4; i++)
v[S[i] - 'A']++;
int cnt = 0;
for (int i = 0; i < 26; i++) {
if (v[i] == 2)
cnt++;
}
if (cnt == 2)
cout << "YES" << endl;
else
cout << "NO"... | #include <iostream>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
vector<int> v(26);
for (int i = 0; i < 4; i++)
v[S[i] - 'A']++;
int cnt = 0;
for (int i = 0; i < 26; i++) {
if (v[i] == 2)
cnt++;
}
if (cnt == 2)
cout << "Yes" << endl;
else
cout << "No"... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,822 | 794,823 | u188117876 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(NULL);
cin.tie(NULL);
cout.tie(NULL);
string s;
cin >> s;
map<char, int> mp;
++mp[s[0]];
++mp[s[1]];
++mp[s[2]];
++mp[s[3]];
if (mp.size() == 2 && mp.begin()->second == 2) {
cout << "YES" << endl;
} else ... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(NULL);
cin.tie(NULL);
cout.tie(NULL);
string s;
cin >> s;
map<char, int> mp;
++mp[s[0]];
++mp[s[1]];
++mp[s[2]];
++mp[s[3]];
if (mp.size() == 2 && mp.begin()->second == 2) {
cout << "Yes" << endl;
} else ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,835 | 794,836 | u079884366 | cpp |
p02987 | // gauravsinghh
#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;
#define ll long long int
#define ld long double
#define db double
#define pii pair<int, int>
#define pll pair<long long, long long>
#define sii set<int>... | // gauravsinghh
#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;
#define ll long long int
#define ld long double
#define db double
#define pii pair<int, int>
#define pll pair<long long, long long>
#define sii set<int>... | [
"variable_declaration.remove"
] | 794,839 | 794,840 | u480527921 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
bool a = (s[0] == s[1]);
bool b = (s[2] == s[3]);
bool dif = (s[0] != s[2]);
if (a and b and dif)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
bool a = (s[0] == s[1]);
bool b = (s[2] == s[3]);
bool dif = (s[0] != s[2]);
if (a and b and dif)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| [
"literal.string.change",
"literal.string.case.change",
"control_flow.branch.if.condition.change"
] | 794,845 | 794,846 | u381585104 | cpp |
p02987 | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const int INF = 1 << 28;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const int INF = 1 << 28;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,853 | 794,854 | u756088996 | cpp |
p02987 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
bool ans = false;
//解法1
// OOXX
if ((s[0] == s[1]) && (s[2] == s[3]) && (s[1] != s[2])) {
ans = true;
}
// OXOX
if ((s[0] == s[2]) && (s[1] == s[3]) && (s[1] != s[2])) {
ans = true;
}
// OXXO
if... |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
bool ans = false;
//解法1
// OOXX
if ((s[0] == s[1]) && (s[2] == s[3]) && (s[1] != s[2])) {
ans = true;
}
// OXOX
if ((s[0] == s[2]) && (s[1] == s[3]) && (s[1] != s[2])) {
ans = true;
}
// OXXO
if... | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 794,857 | 794,858 | u085230936 | cpp |
p02987 | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <ctype.h>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include ... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <ctype.h>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <time.h>
#include ... | [
"literal.string.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 794,871 | 794,872 | u773115096 | cpp |
p02987 | #include <algorithm>
#include <bits/stdc++.h>
#include <fstream>
#include <iostream>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
bool isSubsequence(string s, string t);
int main() {
string s;
cin >> s;
int arr[26] = {0};
for (int i = 0; i < 4; i++) {
... | #include <algorithm>
#include <bits/stdc++.h>
#include <fstream>
#include <iostream>
#include <queue>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
bool isSubsequence(string s, string t);
int main() {
string s;
cin >> s;
int arr[26] = {0};
for (int i = 0; i < 4; i++) {
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,885 | 794,886 | u422178044 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) {
cout << "Yes" << endl;
}
if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(1)) {
cout << "Yes" << endl;
}
if (S.at(0) == S.at(3) && ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(1)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 794,901 | 794,902 | u224951113 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) {
cout << "Yes" << endl;
}
if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(1)) {
cout << "Yes" << endl;
}
if (S.at(0) == S.at(3) && ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(1)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove",
"control_flow.branch.if.add"
] | 794,904 | 794,902 | u224951113 | cpp |
p02987 | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define vi vector<int>
#define br cout << "\n";
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define tr(c, i) for (auto i : c)
#define pii pair<int, int>
#define fast_io() ... | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define ff first
#define ss second
#define vi vector<int>
#define br cout << "\n";
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define tr(c, i) for (auto i : c)
#define pii pair<int, int>
#define fast_io() ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,907 | 794,908 | u799948134 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define DEBUG(x) cerr << #x << ":" << x << endl;
#define DEBUG2(x, y) cerr << #x << ":" << x << " " << #y << ":" << y << endl;
#define DEBUG3(x, y, z) \
cerr << #x << ":" << x << " " << #y << ":... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define DEBUG(x) cerr << #x << ":" << x << endl;
#define DEBUG2(x, y) cerr << #x << ":" << x << " " << #y << ":" << y << endl;
#define DEBUG3(x, y, z) \
cerr << #x << ":" << x << " " << #y << ":... | [
"control_flow.branch.else.add"
] | 794,909 | 794,910 | u672541593 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count2 = 0;
for (int i = 0; i < 4; i++) {
int count = 0;
for (int j = 0; j < 4; j++) {
if (S.at(i) == S.at(j)) {
count++;
}
}
if (count != 2) {
cout << "No" << endl;
count2++;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count2 = 0;
for (int i = 0; i < 4; i++) {
int count = 0;
for (int j = 0; j < 4; j++) {
if (S.at(i) == S.at(j)) {
count++;
}
}
if (count != 2) {
cout << "No" << endl;
count2++;
... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 794,911 | 794,912 | u842747358 | cpp |
p02987 | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char s[4];
scanf("%s", s);
sort(s, s + 4);
if (s[0] == s[1]) {
if (s[1] != s[2] && s[2] == s[3]) {
cout << "Yes" << endl;
}
} else {
cout << "No" << endl;
}
return 0;
} | #include <algorithm>
#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
char s[4];
scanf("%s", s);
sort(s, s + 4);
if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | [
"control_flow.branch.if.condition.change"
] | 794,913 | 794,914 | u801144528 | cpp |
p02987 | #include <stdio.h>
#include <stdlib.h>
int main() {
char word[5];
int num[5];
int count1 = 0;
scanf("%s", word);
for (int i = 0; i < 4; i++)
num[i] = word[i];
if (((num[0] == num[1]) && (num[2] == num[3])) ||
((num[0] == num[3]) && (num[1] == num[2])) ||
((num[0] == num[2]) && (num[1] ==... | #include <stdio.h>
#include <stdlib.h>
int main() {
char word[5];
int num[5];
int count1 = 0;
scanf("%s", word);
for (int i = 0; i < 4; i++)
num[i] = word[i];
if (((num[0] == num[1]) && (num[2] == num[3])) ||
((num[0] == num[3]) && (num[1] == num[2])) ||
((num[0] == num[2]) && (num[1] ==... | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 794,944 | 794,945 | u552004736 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0;
if (s[0] == s[1] && s[1] == s[2] && s[2] == s[3]) {
/* code */
} else {
if (s[0] == s[1] && s[2] == s[3]) {
ans = 1;
} else if (s[0] == s[2] && s[1] == s[3]) {
ans = 1;
} else if (s[0] == ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 0;
if (s[0] == s[1] && s[1] == s[2] && s[2] == s[3]) {
/* code */
} else {
if (s[0] == s[1] && s[2] == s[3]) {
ans = 1;
} else if (s[0] == s[2] && s[1] == s[3]) {
ans = 1;
} else if (s[0] == ... | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 794,946 | 794,947 | u745852541 | cpp |
p02987 | #include <iostream>
using namespace std;
int main() {
char S[4];
int ch = 0;
for (int i = 0; i < 4; i++)
cin >> S[i];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (i != j) {
if (S[i] == S[j])
ch++;
}
}
}
if (ch == 4) {
cout << "YES";
} else ... | #include <iostream>
using namespace std;
int main() {
char S[4];
int ch = 0;
for (int i = 0; i < 4; i++)
cin >> S[i];
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
if (i != j) {
if (S[i] == S[j])
ch++;
}
}
}
if (ch == 4) {
cout << "Yes";
} else ... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,948 | 794,949 | u326401041 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count0 = 0;
int count1 = 0;
int count2 = 0;
int count3 = 0;
count0 = count(S.cbegin(), S.cend(), S.at(0));
count1 = count(S.cbegin(), S.cend(), S.at(1));
count2 = count(S.cbegin(), S.cend(), S.at(2));
count3 = count... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int count0 = 0;
int count1 = 0;
int count2 = 0;
int count3 = 0;
// 1文字目の個数
count0 = count(S.cbegin(), S.cend(), S.at(0));
// 2文字目の個数
count1 = count(S.cbegin(), S.cend(), S.at(1));
// 3文字目の個数
count2 = count(S.cbegin(... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 794,952 | 794,953 | u553129408 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
string s;
int a[27], ans;
int main() {
cin >> s;
for (int i = 0; i < 4; i++) {
a[s[i] - '0']++;
}
for (int i = 1; i <= 26; i++) {
if (a[i] == 2)
ans++;
}
if (ans == 2)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
string s;
int a[45], ans;
int main() {
cin >> s;
for (int i = 0; i < 4; i++) {
a[s[i] - '0']++;
}
for (int i = 17; i <= 44; i++) {
if (a[i] == 2)
ans++;
}
if (ans == 2)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [
"literal.number.change",
"variable_declaration.array_dimensions.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change"
] | 794,958 | 794,959 | u352283288 | cpp |
p02987 | #include <iostream>
#include <string>
std::string s;
int main() {
std::cin >> s;
if (!(s[0] == s[1] && s[0] == s[2] && s[0] == s[3] && s[1] == s[2] &&
s[1] == s[3] && s[2] == s[3]))
if ((s[0] == s[1] && s[2] == s[3]) || (s[0] == s[2] && s[1] == s[3]) ||
(s[0] == s[3] && s[1] == s[2]))
... | #include <iostream>
#include <string>
std::string s;
int main() {
std::cin >> s;
if (!(s[0] == s[1] && s[0] == s[2] && s[0] == s[3] && s[1] == s[2] &&
s[1] == s[3] && s[2] == s[3]))
if ((s[0] == s[1] && s[2] == s[3]) || (s[0] == s[2] && s[1] == s[3]) ||
(s[0] == s[3] && s[1] == s[2])) {
... | [] | 794,966 | 794,967 | u688065650 | cpp |
p02987 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[2] == s[3] || s[0] == s[2] && s[1] == s[3] ||
s[0] == s[3] && s[1] == s[2] ||
!(s[0] == s[1] && s[0] == s[2] && s[0] == s[3]))
cout << "Yes" << endl;
else
cout << "No" << endl;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
if ((s[0] == s[1] && s[2] == s[3] || s[0] == s[2] && s[1] == s[3] ||
s[0] == s[3] && s[1] == s[2]) &&
!(s[0] == s[1] && s[0] == s[2] && s[0] == s[3]))
cout << "Yes" << endl;
else
cout << "No" << end... | [
"control_flow.branch.if.condition.change"
] | 794,970 | 794,971 | u323966851 | cpp |
p02987 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int ans;
int tmp = 0;
ans = 0;
int j = 0;
for (int i = 1; i < 4; i++) {
if (s[0] == s[i]) {
tmp++;
j = i;
}
}
if (tmp != 1) {
cout << "No" << endl;
} else {
for (int i = 2; i < 4; ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
int ans;
int tmp = 0;
ans = 0;
int j = 0;
for (int i = 1; i < 4; i++) {
if (s[0] == s[i]) {
tmp++;
j = i;
}
}
if (tmp != 1) {
cout << "No" << endl;
} else {
for (int i = 2; i < 4; ... | [
"control_flow.break.add"
] | 794,972 | 794,973 | u313043608 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string S;
cin >> S;
char s = S[0];
ll cnt = 0;
for (int i = 1; i < 4; ++i) {
if (s == S[i])
cnt++;
}
if (cnt >= 2 || cnt == 0) {
cout << "No" << endl;
return 0;
}
char s2 = S[1];
if (s2 == s) {
s... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string S;
cin >> S;
char s = S[0];
ll cnt = 0;
for (int i = 1; i < 4; ++i) {
if (s == S[i])
cnt++;
}
if (cnt >= 2 || cnt == 0) {
cout << "No" << endl;
return 0;
}
char s2 = S[1];
if (s2 == s) {
s... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 794,985 | 794,986 | u084968244 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string S;
cin >> S;
char s = S[0];
ll cnt = 0;
for (int i = 1; i < 4; ++i) {
if (s == S[i])
cnt++;
if (cnt >= 2 || cnt == 0) {
cout << "No" << endl;
return 0;
}
}
char s2 = S[1];
if (s2 == s)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string S;
cin >> S;
char s = S[0];
ll cnt = 0;
for (int i = 1; i < 4; ++i) {
if (s == S[i])
cnt++;
}
if (cnt >= 2 || cnt == 0) {
cout << "No" << endl;
return 0;
}
char s2 = S[1];
if (s2 == s) {
s... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 794,987 | 794,986 | u084968244 | cpp |
p02987 | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using itn = int;
const ll MOD = 1000000007;
const ll INF = MOD * MOD;
int main() ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
using ll = long long;
using itn = int;
const ll MOD = 1000000007;
const ll INF = MOD * MOD;
int main() ... | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 795,013 | 795,014 | u538125576 | cpp |
p02987 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, n, m) for (int i = n; i < m; i++)
#define ll long long int
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) {
cout << "YES" << endl;
} else if (s[0] == s[2] && s[1... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, n, m) for (int i = n; i < m; i++)
#define ll long long int
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) {
cout << "Yes" << endl;
} else if (s[0] == s[2] && s[1... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 795,022 | 795,023 | u620059302 | cpp |
p02987 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m + 1; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long ... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m + 1; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long ... | [
"literal.string.change",
"literal.string.case.change",
"expression.operation.binary.change"
] | 795,030 | 795,031 | u085564315 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int i;
for (i = 1; i < 3; i++) {
if (S[i] != S[0]) {
break;
}
}
if (i == 1) {
if (S[2] == S[0] && S[3] == S[1] || S[2] == S[1] || S[3] == S[0]) {
cout << "Yes" << endl;
} else {
cout << "No"... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int i;
for (i = 1; i < 3; i++) {
if (S[i] != S[0]) {
break;
}
}
if (i == 1) {
if (S[2] == S[0] && S[3] == S[1] || S[2] == S[1] && S[3] == S[0]) {
cout << "Yes" << endl;
} else {
cout << "No"... | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 795,034 | 795,035 | u503170128 | cpp |
p02987 | #include <stdio.h>
int main(void) {
char *S;
scanf("%s", S);
int cnt = 0;
for (int j = 0; j < 4; j++) {
for (int i = 0; i < 4; i++) {
if (S[j] == S[i]) {
cnt++;
}
}
if (cnt != 2) {
printf("No");
return 0;
}
cnt = 0;
}
printf("Yes");
return 0;
} | #include <stdio.h>
int main(void) {
char S[4];
scanf("%s", S);
int cnt = 0;
for (int j = 0; j < 4; j++) {
for (int i = 0; i < 4; i++) {
if (S[j] == S[i]) {
cnt++;
}
}
if (cnt != 2) {
printf("No");
return 0;
}
cnt = 0;
}
printf("Yes");
return 0;
} | [] | 795,046 | 795,047 | u245335950 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
#define llong long long int
#define rep(i, n) for (int i = 0; i < n; ++i)
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
#define stl_repr(itr, x) for (auto itr = x.rbegin(); itr != x.rend(); ++itr)
#define all(x) x.begin(), x.end()
#define allr(... | #include <bits/stdc++.h>
using namespace std;
#define llong long long int
#define rep(i, n) for (int i = 0; i < n; ++i)
#define stl_rep(itr, x) for (auto itr = x.begin(); itr != x.end(); ++itr)
#define stl_repr(itr, x) for (auto itr = x.rbegin(); itr != x.rend(); ++itr)
#define all(x) x.begin(), x.end()
#define allr(... | [] | 795,048 | 795,049 | u943004959 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1000000007;
int main() {
string a;
cin >> a;
set<char> s;
for (int i = 0; i < 3; i++) {
s.insert(a[i]);
}
if (s.size() == 2)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll MOD = 1000000007;
int main() {
string a;
cin >> a;
set<char> s;
for (int i = 0; i < 4; i++) {
s.insert(a[i]);
}
if (s.size() == 2)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.off_by_one",
"expression.operation.binary.change"
] | 795,050 | 795,051 | u831873811 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] || s[0] == s[2] || s[0] == s[3]) {
puts("No");
} else if (s[0] == s[1] || s[2] == s[3]) {
puts("Yes");
} else if (s[0] == s[2] || s[1] == s[3]) {
puts("Yes");
} else if (s[0] == s[3] || s[1] == s[2])... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[0] == s[2] && s[0] == s[3]) {
puts("No");
} else if (s[0] == s[1] && s[2] == s[3]) {
puts("Yes");
} else if (s[0] == s[2] && s[1] == s[3]) {
puts("Yes");
} else if (s[0] == s[3] && s[1] == s[2])... | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 795,052 | 795,053 | u636358157 | cpp |
p02987 | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORS(i, m, n) for (int i = m; i <= n; i++)
#define BIT(n) (1LL << (n))
#define INF 2e9
#d... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPS(i, x) for (int i = 1; i <= (int)(x); i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORS(i, m, n) for (int i = m; i <= n; i++)
#define BIT(n) (1LL << (n))
#define INF 2e9
#d... | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 795,058 | 795,059 | u468262978 | cpp |
p02987 | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
std::string s;
cin >> s;
bool flag = false;
unordered_map<char, int> map;
for (int i = 0; i < s.length() - 1; i++) {
char a = s[i];
if (map.find(a) != map.end()) {
map[a] += 1;
} else {
... | #include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
std::string s;
cin >> s;
bool flag = false;
unordered_map<char, int> map;
for (int i = 0; i < s.length(); i++) {
char a = s[i];
if (map.find(a) != map.end()) {
map[a] += 1;
} else {
map[... | [
"control_flow.loop.for.condition.change",
"expression.operation.binary.remove"
] | 795,067 | 795,068 | u894411949 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
map<char, int> m;
for (int i = 0; i < s.size(); i++) {
m[s[i]]++;
}
for (int i = 0; i < s.size(); i++) {
if (m[s[i]] % 2 == 0) {
continue;
} else {
cout << "No";
}
}
cout << "Yes";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
map<char, int> m;
for (int i = 0; i < s.size(); i++) {
m[s[i]]++;
}
for (int i = 0; i < s.size(); i++) {
if (m[s[i]] / 2 == 1) {
continue;
} else {
cout << "No";
return 0;
}
}
cout << "Yes";
... | [
"expression.operator.arithmetic.change",
"control_flow.branch.if.condition.change",
"literal.number.change",
"control_flow.return.add",
"control_flow.return.0.add"
] | 795,071 | 795,070 | u811897616 | cpp |
p02987 | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
char first = s[0];
char second = '-';
int fl = 1;
int sl = 0;
for (int i = 1; i < 4; i++) {
if (s[i] != first) {
if (second == '-') {
second = s[i];
sl++;
} else if (second != s[i])... | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
cin >> s;
char first = s[0];
char second = '-';
int fl = 1;
int sl = 0;
for (int i = 1; i < 4; i++) {
if (s[i] != first) {
if (second == '-') {
second = s[i];
sl++;
} else if (second != s[i])... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 795,078 | 795,079 | u865979946 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S[0] == S[1] && S[1] == S[2] && S[2] == S[3]) {
cout << "NO" << endl;
} else if (S[0] == S[1] && S[2] == S[3]) {
cout << "YES" << endl;
} else if (S[0] == S[2] && S[1] == S[3]) {
cout << "YES" << endl;
} else if... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S[0] == S[1] && S[1] == S[2] && S[2] == S[3]) {
cout << "No" << endl;
} else if (S[0] == S[1] && S[2] == S[3]) {
cout << "Yes" << endl;
} else if (S[0] == S[2] && S[1] == S[3]) {
cout << "Yes" << endl;
} else if... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 795,082 | 795,083 | u190066528 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
int hantei = -2;
string S;
cin >> S;
for (int i = 0; i < 3; i++) {
for (int j = 1; j < 4; j++) {
if (S.at(i) == S.at(j)) {
hantei += 1;
}
}
}
if (hantei == 2) {
cout << "Yes" << endl;
} else {
cout << "No" << ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int hantei = 0;
string S;
cin >> S;
for (int i = 0; i < 3; i++) {
for (int j = i + 1; j < 4; j++) {
if (S.at(i) == S.at(j)) {
hantei += 1;
}
}
}
if (hantei == 2) {
cout << "Yes" << endl;
} else {
cout << "No" ... | [
"literal.number.change",
"variable_declaration.value.change",
"control_flow.loop.for.initializer.change"
] | 795,087 | 795,088 | u757672175 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define endl "\... | [] | 795,097 | 795,098 | u858959088 | cpp |
p02987 | #include <iostream>
//#include<cstdio>
using namespace std;
int main() {
char s[10];
int count, i, j;
for (int i = 0; i < 4; i++) {
cin >> s[i];
}
for (i = 0; i < 4; i++) {
count = 0;
for (j = 0; j < 4; j++) {
if (s[i] == s[j]) {
count++;
}
}
if (count != 2) {
cou... | #include <iostream>
using namespace std;
int main() {
char s[10];
int count, i, j;
for (int i = 0; i < 4; i++) {
cin >> s[i];
}
for (i = 0; i < 4; i++) {
count = 0;
for (j = 0; j < 4; j++) {
if (s[i] == s[j]) {
count++;
}
}
if (count != 2) {
cout << "No" << endl;
... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 795,101 | 795,102 | u297190465 | cpp |
p02987 | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using P = pair<ll, ll>;
using mat = vector<vector<ll>>;
typedef string::const_iterator State;
class ParseError {};
void IOS() { ios::sync_with_stdio(false), cin.tie(0); ... | #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
using P = pair<ll, ll>;
using mat = vector<vector<ll>>;
typedef string::const_iterator State;
class ParseError {};
void IOS() { ios::sync_with_stdio(false), cin.tie(0); ... | [
"literal.string.change",
"literal.string.case.change",
"variable_access.subscript.index.change",
"expression.operation.binary.change"
] | 795,116 | 795,117 | u872959410 | cpp |
p02987 | #include <stdio.h>
#include <stdlib.h>
int main() {
char a[4];
scanf("%s", a);
int b = 0;
if (a[0] == a[1] and a[2] == a[3]) {
b = b + 1;
} else if (a[1] == a[2] and a[0] == a[3]) {
b = b + 1;
} else if (a[0] == a[2] and a[1] == a[3]) {
b = b + 1;
}
if (a[0] == a[1] and a[1] == a[2] and a[2]... | #include <stdio.h>
#include <stdlib.h>
int main() {
char a[4];
scanf("%s", a);
int b = 0;
if (a[0] == a[1] and a[2] == a[3]) {
b = b + 1;
} else if (a[1] == a[2] and a[0] == a[3]) {
b = b + 1;
} else if (a[0] == a[2] and a[1] == a[3]) {
b = b + 1;
}
if (a[0] == a[1] and a[1] == a[2] and a[2]... | [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 795,118 | 795,119 | u518181228 | cpp |
p02987 | #include <stdio.h>
int main(void) {
int i;
char S[4];
int eq[4] = {0, 0};
scanf("%s", S);
for (i = 0; i < 4; i++) {
if (S[0] == S[i]) {
eq[0]++;
}
if (S[1] == S[i]) {
eq[1]++;
}
if (S[2] == S[i]) {
eq[2]++;
}
if (S[3] == S[i]) {
eq[3]++;
}
}
if (eq[... | #include <stdio.h>
int main(void) {
int i;
char S[4];
int eq[4] = {0, 0};
scanf("%s", S);
for (i = 0; i < 4; i++) {
if (S[0] == S[i]) {
eq[0]++;
}
if (S[1] == S[i]) {
eq[1]++;
}
if (S[2] == S[i]) {
eq[2]++;
}
if (S[3] == S[i]) {
eq[3]++;
}
}
if (eq[... | [
"literal.number.change",
"variable_access.subscript.index.change",
"control_flow.branch.if.condition.change"
] | 795,120 | 795,121 | u456658814 | cpp |
p02987 | #include <iostream>
#include <string>
using namespace std;
int main(void) {
char input[4];
string judge = "No";
cin >> input[0] >> input[1] >> input[2] >> input[3];
char hantei1 = 0;
char hantei2 = 0;
int count_char1 = 0;
int count_char2 = 0;
for (int i = 0; i < 4; i++) {
if (hantei1 == 0 || ha... | #include <iostream>
#include <string>
using namespace std;
int main(void) {
char input[4];
string judge = "No";
cin >> input[0] >> input[1] >> input[2] >> input[3];
char hantei1 = 0;
char hantei2 = 0;
int count_char1 = 0;
int count_char2 = 0;
for (int i = 0; i < 4; i++) {
if (hantei1 == 0 || ha... | [
"literal.string.change",
"io.output.change"
] | 795,124 | 795,125 | u616901930 | cpp |
p02987 | #include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#define nl std::cout << "\n"
#define in(x) std::cin >> (x)
#define out(x) std::cout << (x) << " "
#define err(x) std::cerr << #x << " = " << (x... | #include <assert.h>
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#define nl std::cout << "\n"
#define in(x) std::cin >> (x)
#define out(x) std::cout << (x) << " "
#define err(x) std::cerr << #x << " = " << (x... | [
"preprocessor.define.value.change"
] | 795,148 | 795,149 | u811925505 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
int a[1000] = {};
cin >> n;
bool flag = true;
for (int i = 0; i < 4; i++)
a[(int)n[i]]++;
for (int i = 0; i < 1000; i++) {
if (a[i] != 0 || a[i] != 2) {
flag = false;
break;
}
}
if (flag)
cout << "Yes" << e... | #include <bits/stdc++.h>
using namespace std;
int main() {
string n;
int a[1000] = {};
cin >> n;
bool flag = true;
for (int i = 0; i < 4; i++) {
a[(int)n[i]]++;
// cout<<a[(int)n[i]]<<endl;
}
for (int i = 0; i < 1000; i++) {
if (a[i] != 0 && a[i] != 2) {
// cout<<a[i]<<endl;
flag ... | [
"misc.opposites",
"control_flow.branch.if.condition.change"
] | 795,150 | 795,151 | u167647458 | cpp |
p02987 | #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 S;
cin >> S;
bool can = false;
if (S.at(0) == S.at(1)) {
if (S.at(2) == S.at(3))
can = true;
if (S.at(0) == S.at(2))
can = false;
}
if (S.at(0) == S.at(2)... | #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 S;
cin >> S;
bool can = false;
if (S.at(0) == S.at(1)) {
if (S.at(2) == S.at(3))
can = true;
if (S.at(0) == S.at(2))
can = false;
} else if (S.at(0) == S.at... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove",
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 795,166 | 795,167 | u526894223 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 4;
vector<char> s(n);
for (int i = 0; i < n; i++) {
cin >> s.at(i);
}
bool ans = false;
if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2))
ans = true;
else if (s.at(0) == s.at(2) && s.at(1) == s.at(3) && s.at(0) ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n = 4;
vector<char> s(n);
for (int i = 0; i < n; i++) {
cin >> s.at(i);
}
bool ans = false;
if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2))
ans = true;
else if (s.at(0) == s.at(2) && s.at(1) == s.at(3) && s.at(0) ... | [
"literal.number.change",
"control_flow.branch.if.condition.change"
] | 795,174 | 795,175 | u031598803 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) == S.at(2)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) == S.at(1)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(3... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(1)) {
cout << "Yes" << endl;
} else if (S.at(0) == S.at(3... | [
"misc.opposites",
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 795,192 | 795,193 | u388134182 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2]) {
puts("YES");
} else {
puts("NO");
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
sort(s.begin(), s.end());
if (s[0] == s[1] && s[2] == s[3] && s[1] != s[2]) {
puts("Yes");
} else {
puts("No");
}
}
| [
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 795,199 | 795,200 | u434765267 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
string s;
cin >> s;
char a, b;
int aa = 0, bb = 0;
string ans = "n";
for (int i = 0; i < 4; i++) {
if (i == 0) {
a = s[i];
aa++;
continue;
}
if (s[i] != a) {
if (bb == 0) {
b = s[i];
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
string s;
cin >> s;
char a, b;
int aa = 0, bb = 0;
string ans = "n";
for (int i = 0; i < 4; i++) {
if (i == 0) {
a = s[i];
aa++;
continue;
}
if (s[i] != a) {
if (bb == 0) {
b = s[i];
... | [
"control_flow.branch.else_if.replace.add",
"control_flow.branch.if.replace.remove"
] | 795,203 | 795,204 | u794565416 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) {
cout << "Yes" << endl;
return 0;
} else if (s[0] == s[3] && s[1] == s[2] && s[0] != s[1]) {
cout << "Yes" << endl;
return 0;
} else if (s[0]... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) {
cout << "Yes" << endl;
return 0;
} else if (s[0] == s[3] && s[1] == s[2] && s[0] != s[1]) {
cout << "Yes" << endl;
return 0;
} else if (s[0]... | [
"literal.string.change",
"literal.string.case.change",
"io.output.change"
] | 795,233 | 795,234 | u639032323 | cpp |
p02987 | #include <bits/stdc++.h>
using namespace std;
void init() {}
void solve() {
char c[4];
scanf("%s", c);
int tab[300];
for (int i = 0; i < 300; i++)
tab[i] = 0;
for (int i = 0; i < 4; i++)
tab[c[i]]++;
int p = 0;
for (int i = 65; i <= 95; i++)
if (tab[i] == 2)
p++;
if (p != 2)
pri... | #include <bits/stdc++.h>
using namespace std;
void init() {}
void solve() {
char c[4];
scanf("%s", c);
int tab[300];
for (int i = 0; i < 300; i++)
tab[i] = 0;
for (int i = 0; i < 4; i++)
tab[c[i]]++;
int p = 0;
for (int i = 65; i <= 90; i++)
if (tab[i] == 2)
p++;
if (p != 2)
pri... | [
"literal.number.change",
"control_flow.loop.for.condition.change",
"expression.operation.binary.change",
"literal.string.change",
"literal.string.case.change",
"call.arguments.change",
"io.output.change"
] | 795,237 | 795,238 | u800645121 | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.