Datasets:

problem_id
stringlengths
6
6
buggy_code
stringlengths
8
526k
fixed_code
stringlengths
12
526k
labels
listlengths
0
15
buggy_submission_id
int64
1
1.54M
fixed_submission_id
int64
2
1.54M
user_id
stringlengths
10
10
language
stringclasses
9 values
p02987
#include <bits/stdc++.h> #include <cmath> #include <iostream> #include <sstream> #include <string> using namespace std; int main() { char S[20]; cin >> S; int count = 0; if (S[0] == S[1]) { count++; } if (S[0] == S[2]) { count++; } if (S[0] == S[3]) { count++; } if (S[1] == S[2]) { count++; } if (S[1] == S[3]) { count++; } if (S[2] == S[3]) { count++; } if (count == 2) { cout << "yes"; } if (count != 2) { cout << "no"; } return 0; }
#include <bits/stdc++.h> #include <cmath> #include <iostream> #include <sstream> #include <string> using namespace std; int main() { char S[4]; cin >> S; int count = 0; if (S[0] == S[1]) { count++; } if (S[0] == S[2]) { count++; } if (S[0] == S[3]) { count++; } if (S[1] == S[2]) { count++; } if (S[1] == S[3]) { count++; } if (S[2] == S[3]) { count++; } if (count == 2) { cout << "Yes"; } if (count != 2) { cout << "No"; } return 0; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,760
793,759
u928636359
cpp
p02987
/** Unmesh Kumar Indian Institute of Technology,Roorkee CSE'22 ""If everything seems under control then you are not going fast enough!"" **/ #include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <sstream> #include <utility> using namespace std; #define ll long long int #define c(x) \ ll x; \ cin >> x #define cc(x, y) \ ll x, y; \ cin >> x >> y #define ccc(x, y, z) \ ll x, y, z; \ cin >> x >> y >> z #define db long double #define fast \ cin.tie(NULL); \ cout.tie(NULL); \ ios_base::sync_with_stdio(false) #define inf 200000000000000 #define mod 1000000007 #define eps 1e-7 #define PI 3.1415926535897932385 #define pb push_back #define bitc __builtin_popcountll #define mp make_pair #define ff first #define ss second #define all(ar) ar.begin(), ar.end() #define len(x) (ll)(x).size() #define fr(i, a, b) for (ll i = (a), _b = (b); i <= _b; i++) #define rep(i, n) for (ll i = 0, _n = (n); i < _n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define frr(i, a, b) for (ll i = (a), _b = (b); i >= _b; i--) #define foreach(it, ar) for (auto it = ar.begin(); it != ar.end(); it++) #define fill(ar, val) memset(ar, val, sizeof(ar)) #define print(arr, n) \ rep(i, n) cout << arr[i] << " "; \ cout << endl #define print2(arr, n, m) \ rep(i, n) { \ rep(j, m) cout << arr[i][j] << " "; \ cout << endl; \ } #define dyn1(arr, n) \ ll *arr = new ll[n]; \ rep(i, n) arr[i] = 0; #define dyn2(arr, n, m) \ ll **arr = new ll *[(n)]; \ rep(i, n) arr[i] = new ll[m]; \ rep(i, n) rep(j, m) arr[i][j] = 0 #define carr(arr, n) rep(i, n) cin >> arr[i] #define carr2(arr, n, m) rep(i, n) rep(j, m) cin >> arr[i][j] #define debug(a) cout << " :: " << #a << " == " << a << endl #define debug2(a, b) \ cout << " :: " << #a << " == " << a << " :: " << #b << " == " << b << endl typedef pair<int, int> ii; typedef vector<ii> vii; inline ll maxim(ll a, ll b) { if (a > b) return a; else return b; } inline ll minim(ll a, ll b) { if (a < b) return a; else return b; } inline bool equals(double a, double b) { return fabs(a - b) < 1e-9; } ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); } ll binpow(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = (res * a) % mod; a = (a * a) % mod; b >>= 1; } return res; } /* ll ncr(ll n,ll r) { if(r>n) return 0; if((n==r)||(r==0)) { return 1; } if(r==1) return n; if(r>n-r) { r=n-r; } string key=to_string(n)+"|"+to_string(r); if(m.find(key)==m.end()) { ll answer=ncr(n-1,r-1)+ncr(n-1,r); m[key]=answer; } //cout<<key<<" "<<m[key]<<endl; return m[key]; } */ int modInverse(int a, int m) { int m0 = m; int y = 0, x = 1; if (m == 1) return 0; while (a > 1) { // q is quotient int q = a / m; int t = m; // m is remainder now, process same as // Euclid's algo m = a % m, a = t; t = y; // Update y and x y = x - q * y; x = t; } // Make x positive if (x < 0) x += m0; return x; } class node { public: ll w, h, index; node() { this->w = 0; this->h = 0; this->index = 0; } node(ll w, ll h, ll index) { this->w = w; this->h = h; this->index = index; } }; bool comp(node a, node b) { if (a.w < b.w) return true; else if (a.w > b.w) return false; else { return a.h < b.h; } } node arr[200001]; ll dp[100001]; ll y[100001]; int main() { fast; // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); cout << setprecision(10) << fixed; string s; cin >> s; char arr[4]; rep(o, 4) { arr[o] = s[o]; } sort(arr, arr + 4); if (arr[0] == arr[1] && arr[1] != arr[2] && arr[2] == arr[3]) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
/** Unmesh Kumar Indian Institute of Technology,Roorkee CSE'22 ""If everything seems under control then you are not going fast enough!"" **/ #include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <sstream> #include <utility> using namespace std; #define ll long long int #define c(x) \ ll x; \ cin >> x #define cc(x, y) \ ll x, y; \ cin >> x >> y #define ccc(x, y, z) \ ll x, y, z; \ cin >> x >> y >> z #define db long double #define fast \ cin.tie(NULL); \ cout.tie(NULL); \ ios_base::sync_with_stdio(false) #define inf 200000000000000 #define mod 1000000007 #define eps 1e-7 #define PI 3.1415926535897932385 #define pb push_back #define bitc __builtin_popcountll #define mp make_pair #define ff first #define ss second #define all(ar) ar.begin(), ar.end() #define len(x) (ll)(x).size() #define fr(i, a, b) for (ll i = (a), _b = (b); i <= _b; i++) #define rep(i, n) for (ll i = 0, _n = (n); i < _n; i++) #define repr(i, n) for (ll i = n - 1; i >= 0; i--) #define frr(i, a, b) for (ll i = (a), _b = (b); i >= _b; i--) #define foreach(it, ar) for (auto it = ar.begin(); it != ar.end(); it++) #define fill(ar, val) memset(ar, val, sizeof(ar)) #define print(arr, n) \ rep(i, n) cout << arr[i] << " "; \ cout << endl #define print2(arr, n, m) \ rep(i, n) { \ rep(j, m) cout << arr[i][j] << " "; \ cout << endl; \ } #define dyn1(arr, n) \ ll *arr = new ll[n]; \ rep(i, n) arr[i] = 0; #define dyn2(arr, n, m) \ ll **arr = new ll *[(n)]; \ rep(i, n) arr[i] = new ll[m]; \ rep(i, n) rep(j, m) arr[i][j] = 0 #define carr(arr, n) rep(i, n) cin >> arr[i] #define carr2(arr, n, m) rep(i, n) rep(j, m) cin >> arr[i][j] #define debug(a) cout << " :: " << #a << " == " << a << endl #define debug2(a, b) \ cout << " :: " << #a << " == " << a << " :: " << #b << " == " << b << endl typedef pair<int, int> ii; typedef vector<ii> vii; inline ll maxim(ll a, ll b) { if (a > b) return a; else return b; } inline ll minim(ll a, ll b) { if (a < b) return a; else return b; } inline bool equals(double a, double b) { return fabs(a - b) < 1e-9; } ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); } ll binpow(ll a, ll b) { ll res = 1; while (b > 0) { if (b & 1) res = (res * a) % mod; a = (a * a) % mod; b >>= 1; } return res; } /* ll ncr(ll n,ll r) { if(r>n) return 0; if((n==r)||(r==0)) { return 1; } if(r==1) return n; if(r>n-r) { r=n-r; } string key=to_string(n)+"|"+to_string(r); if(m.find(key)==m.end()) { ll answer=ncr(n-1,r-1)+ncr(n-1,r); m[key]=answer; } //cout<<key<<" "<<m[key]<<endl; return m[key]; } */ int modInverse(int a, int m) { int m0 = m; int y = 0, x = 1; if (m == 1) return 0; while (a > 1) { // q is quotient int q = a / m; int t = m; // m is remainder now, process same as // Euclid's algo m = a % m, a = t; t = y; // Update y and x y = x - q * y; x = t; } // Make x positive if (x < 0) x += m0; return x; } class node { public: ll w, h, index; node() { this->w = 0; this->h = 0; this->index = 0; } node(ll w, ll h, ll index) { this->w = w; this->h = h; this->index = index; } }; bool comp(node a, node b) { if (a.w < b.w) return true; else if (a.w > b.w) return false; else { return a.h < b.h; } } node arr[200001]; ll dp[100001]; ll y[100001]; int main() { fast; // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); cout << setprecision(10) << fixed; string s; cin >> s; char arr[4]; rep(o, 4) { arr[o] = s[o]; } sort(arr, arr + 4); if (arr[0] == arr[1] && arr[1] != arr[2] && arr[2] == arr[3]) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,761
793,762
u999406210
cpp
p02987
//*-- ILSH --*// #include <bits/stdc++.h> using namespace std; typedef long long int ll; #define pb push_back #define pop pop_back #define mp make_pair #define vii vector<int> #define vll vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> #define vpi vector<pii> #define vpl vector<pll> #define fi first #define sz size #define se second #define len length const int N = 2e5 + 5; const ll inf = 1e18 + 1e17; void solve() { string s; cin >> s; int arr[26]; memset(arr, 0, sizeof(arr)); for (int i = 0; i < s.len(); i++) arr[s[i] - 'A']++; vii v; for (int i = 0; i < 26; i++) if (arr[i]) v.pb(arr[i]); if (v.sz() == 2 && v[0] == 2 && v[1] == 2) cout << "YES\n"; else cout << "NO\n"; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin>>t; while (t--) { solve(); } }
//*-- ILSH --*// #include <bits/stdc++.h> using namespace std; typedef long long int ll; #define pb push_back #define pop pop_back #define mp make_pair #define vii vector<int> #define vll vector<ll> #define pii pair<int, int> #define pll pair<ll, ll> #define vpi vector<pii> #define vpl vector<pll> #define fi first #define sz size #define se second #define len length const int N = 2e5 + 5; const ll inf = 1e18 + 1e17; void solve() { string s; cin >> s; int arr[26]; memset(arr, 0, sizeof(arr)); for (int i = 0; i < s.len(); i++) arr[s[i] - 'A']++; vii v; for (int i = 0; i < 26; i++) if (arr[i] > 0) v.pb(arr[i]); if (v.sz() == 2 && v[0] == 2 && v[1] == 2) cout << "Yes\n"; else cout << "No\n"; } int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; // cin>>t; while (t--) { solve(); } }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,763
793,764
u554650951
cpp
p02987
#include <bits/stdc++.h> using namespace std; #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++) #define ALL(vec) (vec).begin(), (vec).end() #define lli long long int #define pi 3.1415926535897932384626433832795 #define MAX_INF 9223372036854775807 #define MIN_INF 9223372036854775807 + 1 int main() { string s; vector<char> S(4); rep(i, 4) { S[i] = s[i]; } sort(ALL(S)); if (S[0] == S[1] && S[2] == S[3]) { if (S[1] != S[2]) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; #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++) #define ALL(vec) (vec).begin(), (vec).end() #define lli long long int #define pi 3.1415926535897932384626433832795 #define MAX_INF 9223372036854775807 #define MIN_INF 9223372036854775807 + 1 int main() { string s; vector<char> S(4); cin >> s; rep(i, 4) { S[i] = s[i]; } sort(ALL(S)); if (S[0] == S[1] && S[2] == S[3]) { if (S[1] != S[2]) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
[]
793,765
793,766
u170513117
cpp
p02987
#include <bits/stdc++.h> #define fi first #define se second #define ll long long using namespace std; string s, n; int x[30], cnt; int main() { cin >> s; for (int i = 0; i < 4; i++) { x[s[i] - 'A']++; } for (int i = 0; i < 26; i++) { if (x[i] > 1) cnt++; } if (cnt == 2) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> #define fi first #define se second #define ll long long using namespace std; string s, n; int x[30], cnt; int main() { cin >> s; for (int i = 0; i < 4; i++) { x[s[i] - 'A']++; } for (int i = 0; i < 26; i++) { if (x[i] > 1) cnt++; } if (cnt == 2) cout << "Yes" << endl; else cout << "No" << endl; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,777
793,778
u392298067
cpp
p02987
#include <bits/stdc++.h> #define ll long long using namespace std; long long n, a, m, k, q, b, c = 1; string ss, s1, s2; int main() { cin >> ss; set<char> s; for (int i = 0; i < 4; i++) { s.insert(ss[i]); } if (s.size() < 4) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> #define ll long long using namespace std; long long n, a, m, k, q, b, c = 1; string ss, s1, s2; int main() { cin >> ss; set<char> s; for (int i = 0; i < 4; i++) { s.insert(ss[i]); } if (s.size() == 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[]
793,779
793,780
u295520101
cpp
p02987
#include <bits/stdc++.h> using namespace std; #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 ll = long long; using VI = vector<int>; using VVI = vector<vector<int>>; int main() { string s; cin >> s; bool flag = true; char f, g; int fn = 0, gn = 0; f = s[0]; rep(i, 4) { if (s[i] != f) g = s[i]; } rep(i, 4) { if (s[i] == f) fn++; if (s[i] == g) gn++; } if (fn == 2 || gn == 2) cout << "Yes"; else cout << "No"; return 0; }
#include <bits/stdc++.h> using namespace std; #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 ll = long long; using VI = vector<int>; using VVI = vector<vector<int>>; int main() { string s; cin >> s; bool flag = true; char f, g; int fn = 0, gn = 0; f = s[0]; rep(i, 4) { if (s[i] != f) g = s[i]; } rep(i, 4) { if (s[i] == f) fn++; if (s[i] == g) gn++; } if (fn == 2 && gn == 2) cout << "Yes"; else cout << "No"; return 0; }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
793,784
793,785
u491314298
cpp
p02987
#include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <iostream> typedef long long int ll; using namespace std; int main() { string s; if (s[0] == s[1] and s[2] == s[3] and s[0] != s[2]) { cout << "Yes" << endl; } else if (s[0] == s[2] and s[1] == s[3] and s[0] != s[1]) { cout << "Yes" << endl; } else if (s[0] == s[3] and s[1] == s[2] and s[0] != s[1]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <iostream> typedef long long int ll; using namespace std; int main() { string s; cin >> s; if (s[0] == s[1] and s[2] == s[3] and s[0] != s[2]) { cout << "Yes" << endl; } else if (s[0] == s[2] and s[1] == s[3] and s[0] != s[1]) { cout << "Yes" << endl; } else if (s[0] == s[3] and s[1] == s[2] and s[0] != s[1]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[]
793,802
793,803
u473023730
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { /*string s; string t; cin>>s; cin>>t; int contador=0; for(int i=0;i<3;i++) { if(s[i]==t[i]) { contador=contador+1; } } cout<<contador;*/ 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; string t; cin>>s; cin>>t; int contador=0; for(int i=0;i<3;i++) { if(s[i]==t[i]) { contador=contador+1; } } cout<<contador;*/ 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" ]
793,806
793,807
u057626628
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; sort(a.begin(), a.end()); if (a[0] == a[1] && a[2] == a[3] && a[0] != a[2]) cout << "YES"; else cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; sort(a.begin(), a.end()); if (a[0] == a[1] && a[2] == a[3] && a[0] != a[2]) cout << "Yes"; else cout << "No"; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,808
793,809
u781492645
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; sort(str.begin(), str.end()); cout << ((str[0] == str[1] && str[2] == str[3] && str[0] != str[2]) ? "yes" : "No") << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; sort(str.begin(), str.end()); cout << ((str[0] == str[1] && str[2] == str[3] && str[0] != str[2]) ? "Yes" : "No") << endl; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,824
793,825
u207391881
cpp
p02987
#include <iostream> #include <string> using namespace std; int main() { string s; int i, c1, c2; char c, t; c = s[0]; c1 = c2 = 0; for (i = 0; i < 4; i++) { if (c == s[i]) c1++; } for (i = 0; i < 4; i++) { if (c != s[i]) { t = s[i]; break; } } for (i = 0; i < 4; i++) { if (t == s[i]) c2++; } if (c1 == 2 && c2 == 2) cout << "Yes"; else cout << "No"; return 0; }
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int i, c1, c2; char c, t; c = s[0]; c1 = c2 = 0; for (i = 0; i < 4; i++) { if (c == s[i]) c1++; } for (i = 0; i < 4; i++) { if (c != s[i]) { t = s[i]; break; } } for (i = 0; i < 4; i++) { if (t == s[i]) c2++; } if (c1 == 2 && c2 == 2) cout << "Yes"; else cout << "No"; return 0; }
[]
793,828
793,829
u641500793
cpp
p02987
// C #include <cassert> //#include <cctype> #include <ccomplex> #include <cerrno> #include <cfenv> #include <cfloat> #include <cinttypes> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdalign> #include <cstdarg> #include <cstdbool> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctgmath> #include <ctime> #include <cwchar> #include <cwctype> // C++ #include <algorithm> #include <array> #include <atomic> #include <bitset> #include <chrono> #include <complex> #include <condition_variable> #include <deque> #include <exception> #include <forward_list> #include <fstream> #include <functional> #include <future> #include <initializer_list> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <mutex> #include <new> #include <numeric> #include <ostream> #include <queue> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <typeinfo> #include <unordered_map> #include <unordered_set> #include <utility> #include <valarray> #include <vector> //ここまで標準include using namespace std; long aCb(long a, long b) { long out = 1; for (long i = 1; i <= b; i++) { out = out * (a + 1 - i) / i; } return out; } int main() { vector<char> data(4); for (int i = 0; i < 4; i++) { cin >> data[i]; } sort(data.begin(), data.end()); if (data[0] == data[1] && data[1] != data[2] && data[3] == data[4]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
// C #include <cassert> //#include <cctype> #include <ccomplex> #include <cerrno> #include <cfenv> #include <cfloat> #include <cinttypes> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdalign> #include <cstdarg> #include <cstdbool> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctgmath> #include <ctime> #include <cwchar> #include <cwctype> // C++ #include <algorithm> #include <array> #include <atomic> #include <bitset> #include <chrono> #include <complex> #include <condition_variable> #include <deque> #include <exception> #include <forward_list> #include <fstream> #include <functional> #include <future> #include <initializer_list> #include <iomanip> #include <ios> #include <iosfwd> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <locale> #include <map> #include <memory> #include <mutex> #include <new> #include <numeric> #include <ostream> #include <queue> #include <random> #include <ratio> #include <regex> #include <scoped_allocator> #include <set> #include <sstream> #include <stack> #include <stdexcept> #include <streambuf> #include <string> #include <system_error> #include <thread> #include <tuple> #include <type_traits> #include <typeindex> #include <typeinfo> #include <unordered_map> #include <unordered_set> #include <utility> #include <valarray> #include <vector> //ここまで標準include using namespace std; long aCb(long a, long b) { long out = 1; for (long i = 1; i <= b; i++) { out = out * (a + 1 - i) / i; } return out; } int main() { vector<char> data(4); for (int i = 0; i < 4; i++) { cin >> data[i]; } sort(data.begin(), data.end()); if (data[0] == data[1] && data[1] != data[2] && data[2] == data[3]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
793,835
793,836
u685346012
cpp
p02987
#include <iostream> using namespace std; int main() { string A; cin >> A; if (A[0] == A[1] && A[2] == A[3] && A[0] != A[2]) { cout << "Yes" << endl; } if (A[0] == A[2] && A[1] == A[3] && A[0] != A[1]) { cout << "Yes" << endl; } if (A[0] == A[3] && A[1] == A[2] && A[0] != A[1]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <iostream> using namespace std; int main() { string A; cin >> A; if (A[0] == A[1] && A[2] == A[3] && A[0] != A[2]) { cout << "Yes" << endl; } else if (A[0] == A[2] && A[1] == A[3] && A[0] != A[1]) { cout << "Yes" << endl; } else if (A[0] == A[3] && A[1] == A[2] && A[0] != A[1]) { cout << "Yes" << endl; } else cout << "No" << endl; }
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
793,850
793,851
u005415727
cpp
p02987
/*{{{*/ #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define FOR(I, A, B) for (int I = (A); I <= (B); ++I) #define FORS(I, S) for (int I = 0; S[I]; ++I) #define RS(X) scanf("%s", (X)) #define SORT_UNIQUE(c) \ (sort(c.begin(), c.end()), \ c.resize(distance(c.begin(), unique(c.begin(), c.end())))) #define GET_POS(c, x) (lower_bound(c.begin(), c.end(), x) - c.begin()) #define CASET \ int ___T; \ scanf("%d", &___T); \ for (int cs = 1; cs <= ___T; cs++) #define MP make_pair #define PB push_back #define MS0(X) memset((X), 0, sizeof((X))) #define MS1(X) memset((X), -1, sizeof((X))) #define LEN(X) strlen(X) #define F first #define S second using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef long double LD; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<LL> VL; typedef vector<PII> VPII; typedef pair<LL, LL> PLL; typedef vector<PLL> VPLL; template <class T> void _R(T &x) { cin >> x; } void _R(int &x) { scanf("%d", &x); } void _R(LL &x) { scanf("%lld", &x); } void _R(double &x) { scanf("%lf", &x); } void _R(char &x) { scanf(" %c", &x); } void _R(char *x) { scanf("%s", x); } void R() {} template <class T, class... U> void R(T &head, U &...tail) { _R(head); R(tail...); } template <class T> void _W(const T &x) { cout << x; } void _W(const int &x) { printf("%d", x); } void _W(const LL &x) { printf("%lld", x); } void _W(const double &x) { printf("%.16f", x); } void _W(const char &x) { putchar(x); } void _W(const char *x) { printf("%s", x); } template <class T, class U> void _W(const pair<T, U> &x) { _W(x.F); putchar(' '); _W(x.S); } template <class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); } void W() {} template <class T, class... U> void W(const T &head, const U &...tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...); } #ifdef HOME #define DEBUG(...) \ { \ printf("# "); \ printf(__VA_ARGS__); \ puts(""); \ } #else #define DEBUG(...) #endif int MOD = 1e9 + 7; void ADD(LL &x, LL v) { x = (x + v) % MOD; if (x < 0) x += MOD; } /*}}}*/ const int SIZE = 1e6 + 10; int main() { string s; R(s); sort(ALL(s)); if (s[0] != s[3] && s[0] == s[1] && s[2] == s[3]) { W("YES"); } else W("NO"); return 0; }
/*{{{*/ #include <algorithm> #include <assert.h> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define FOR(I, A, B) for (int I = (A); I <= (B); ++I) #define FORS(I, S) for (int I = 0; S[I]; ++I) #define RS(X) scanf("%s", (X)) #define SORT_UNIQUE(c) \ (sort(c.begin(), c.end()), \ c.resize(distance(c.begin(), unique(c.begin(), c.end())))) #define GET_POS(c, x) (lower_bound(c.begin(), c.end(), x) - c.begin()) #define CASET \ int ___T; \ scanf("%d", &___T); \ for (int cs = 1; cs <= ___T; cs++) #define MP make_pair #define PB push_back #define MS0(X) memset((X), 0, sizeof((X))) #define MS1(X) memset((X), -1, sizeof((X))) #define LEN(X) strlen(X) #define F first #define S second using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef long double LD; typedef pair<int, int> PII; typedef vector<int> VI; typedef vector<LL> VL; typedef vector<PII> VPII; typedef pair<LL, LL> PLL; typedef vector<PLL> VPLL; template <class T> void _R(T &x) { cin >> x; } void _R(int &x) { scanf("%d", &x); } void _R(LL &x) { scanf("%lld", &x); } void _R(double &x) { scanf("%lf", &x); } void _R(char &x) { scanf(" %c", &x); } void _R(char *x) { scanf("%s", x); } void R() {} template <class T, class... U> void R(T &head, U &...tail) { _R(head); R(tail...); } template <class T> void _W(const T &x) { cout << x; } void _W(const int &x) { printf("%d", x); } void _W(const LL &x) { printf("%lld", x); } void _W(const double &x) { printf("%.16f", x); } void _W(const char &x) { putchar(x); } void _W(const char *x) { printf("%s", x); } template <class T, class U> void _W(const pair<T, U> &x) { _W(x.F); putchar(' '); _W(x.S); } template <class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' '); } void W() {} template <class T, class... U> void W(const T &head, const U &...tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...); } #ifdef HOME #define DEBUG(...) \ { \ printf("# "); \ printf(__VA_ARGS__); \ puts(""); \ } #else #define DEBUG(...) #endif int MOD = 1e9 + 7; void ADD(LL &x, LL v) { x = (x + v) % MOD; if (x < 0) x += MOD; } /*}}}*/ const int SIZE = 1e6 + 10; int main() { string s; R(s); sort(ALL(s)); if (s[0] != s[3] && s[0] == s[1] && s[2] == s[3]) { W("Yes"); } else W("No"); return 0; }
[ "literal.string.change", "literal.string.case.change", "call.arguments.change" ]
793,857
793,858
u284124505
cpp
p02987
#include <stdio.h> int main() { int a, b = 0, N, d; char S[4]; scanf("%s", &S[0]); if (S[0] == S[1] && S[0] != S[2] && S[0] != S[3] && S[2] == S[3]) printf("Yes\n"); if (S[0] != S[1] && S[0] == S[2] && S[0] != S[3] && S[1] == S[3]) printf("Yes\n"); if (S[0] != S[1] && S[0] != S[2] && S[0] == S[3] && S[1] == S[2]) printf("Yes\n"); else printf("No\n"); return 0; }
#include <stdio.h> int main() { int a, b = 0, N, d; char S[4]; scanf("%s", &S[0]); if (S[0] == S[1] && S[0] != S[2] && S[0] != S[3] && S[2] == S[3]) printf("Yes\n"); else if (S[0] != S[1] && S[0] == S[2] && S[0] != S[3] && S[1] == S[3]) printf("Yes\n"); else if (S[0] != S[1] && S[0] != S[2] && S[0] == S[3] && S[1] == S[2]) printf("Yes\n"); else printf("No\n"); return 0; }
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove" ]
793,859
793,860
u032865047
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; sort(S.begin(), S.end()); if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) 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(2) == S.at(3) && S.at(0) != S.at(2)) cout << "Yes" << endl; else cout << "No" << endl; }
[]
793,864
793,865
u089241640
cpp
p02987
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) #define rep(i, a, b) for (int i = a; i < (b); ++i) #define p(s) std::cout << s; #define pl(s) std::cout << s << endl; #define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl; #define YES(j) cout << (j ? "YES" : "NO") << endl; #define Yes(j) std::cout << (j ? "Yes" : "No") << endl; #define yes(j) std::cout << (j ? "yes" : "no") << endl; #define all(v) v.begin(), v.end() #define showVector(v) \ REP(i, v.size()) { \ p(v[i]); \ p(" ") \ } \ pl("") template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } typedef long long int ll; typedef pair<ll, ll> P_ii; typedef pair<double, double> P_dd; template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...)); } template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; } template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for (auto &e : t) fill_v(e, v); } const int MOD = 1000000007; const int inf = 1e9 + 7; const ll longinf = 1LL << 60; void addM(long long &a, long long b) { a += b; if (a >= MOD) a -= MOD; } void mulM(long long &a, long long b) { a = ((a % MOD) * (b % MOD)) % MOD; } const int MAX = 510000; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } vector<pair<long long, long long>> prime_factorize(long long n) { vector<pair<long long, long long>> res; for (long long p = 2; p * p <= n; ++p) { if (n % p != 0) continue; int num = 0; while (n % p == 0) { ++num; n /= p; } res.push_back(make_pair(p, num)); } if (n != 1) res.push_back(make_pair(n, 1)); return res; } int main() { string s; cin >> s; map<char, int> mp; REP(i, s.size()) { mp[s[i]]++; } bool ans = true; for (auto m : mp) { if (m.second != 2) ans = false; } YES(ans) return 0; }
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) #define rep(i, a, b) for (int i = a; i < (b); ++i) #define p(s) std::cout << s; #define pl(s) std::cout << s << endl; #define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl; #define YES(j) cout << (j ? "YES" : "NO") << endl; #define Yes(j) std::cout << (j ? "Yes" : "No") << endl; #define yes(j) std::cout << (j ? "yes" : "no") << endl; #define all(v) v.begin(), v.end() #define showVector(v) \ REP(i, v.size()) { \ p(v[i]); \ p(" ") \ } \ pl("") template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } typedef long long int ll; typedef pair<ll, ll> P_ii; typedef pair<double, double> P_dd; template <class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template <class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...)); } template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T &t, const V &v) { t = v; } template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T &t, const V &v) { for (auto &e : t) fill_v(e, v); } const int MOD = 1000000007; const int inf = 1e9 + 7; const ll longinf = 1LL << 60; void addM(long long &a, long long b) { a += b; if (a >= MOD) a -= MOD; } void mulM(long long &a, long long b) { a = ((a % MOD) * (b % MOD)) % MOD; } const int MAX = 510000; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i % MOD; inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD; finv[i] = finv[i - 1] * inv[i] % MOD; } } // 二項係数計算 long long COM(int n, int k) { if (n < k) return 0; if (n < 0 || k < 0) return 0; return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD; } vector<pair<long long, long long>> prime_factorize(long long n) { vector<pair<long long, long long>> res; for (long long p = 2; p * p <= n; ++p) { if (n % p != 0) continue; int num = 0; while (n % p == 0) { ++num; n /= p; } res.push_back(make_pair(p, num)); } if (n != 1) res.push_back(make_pair(n, 1)); return res; } int main() { string s; cin >> s; map<char, int> mp; REP(i, s.size()) { mp[s[i]]++; } bool ans = true; for (auto m : mp) { if (m.second != 2) ans = false; } Yes(ans) return 0; }
[ "identifier.change", "call.function.change" ]
793,871
793,872
u491550356
cpp
p02987
#include <iostream> #include <stdio.h> using namespace std; int main(void) { char S[5]; scanf("%s", S); if ((S[0] == S[1] && S[1] != S[2] && S[2] == S[3]) || (S[0] == S[2] && S[1] == S[3] && S[2] != S[3]) || (S[0] == S[3] && S[1] != S[3] && S[2] == S[3])) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <iostream> #include <stdio.h> using namespace std; int main(void) { char S[5]; scanf("%s", S); if ((S[0] == S[1] && S[1] != S[2] && S[2] == S[3]) || (S[0] == S[2] && S[1] == S[3] && S[2] != S[3]) || (S[0] == S[3] && S[1] != S[3] && S[2] == S[1])) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
793,894
793,895
u652760628
cpp
p02987
#include <stdio.h> #include <string.h> int main() { char S[20]; int C = 0; scanf("%s", S); if (S[0] == S[1]) ++C; if (S[0] == S[2]) ++C; if (S[0] == S[3]) ++C; if (S[1] == S[2]) ++C; if (S[1] == S[3]) ++C; if (S[2] == S[3]) ++C; if (C == 2) { printf("YES"); } else printf("No"); return 0; }
#include <stdio.h> #include <string.h> int main() { char S[20]; int C = 0; scanf("%s", S); if (S[0] == S[1]) ++C; if (S[0] == S[2]) ++C; if (S[0] == S[3]) ++C; if (S[1] == S[2]) ++C; if (S[1] == S[3]) ++C; if (S[2] == S[3]) ++C; if (C == 2) { printf("Yes"); } else printf("No"); return 0; }
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
793,896
793,897
u113973663
cpp
p02987
//#pragma GCC target ("avx2") //#pragma GCC optimize ("Ofast") //#pragma GCC optimize ("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long using namespace std; using namespace __gnu_pbds; template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; const int N = (int)(1e6 + 5); const int M = (int)(1e9 + 7); const int INF = (int)(1e18 + 9); const int dx[] = {1, -1, 0, 0, 1, 1, -1, -1}; const int dy[] = {0, 0, 1, -1, 1, -1, 1, -1}; signed main() { ios_base ::sync_with_stdio(0); cin.tie(0); string s; cin >> s; map<char, int> mp; for (int i = 0; i < 4; ++i) mp[s[i]]++; if (mp.size() == 2) cout << "YES"; else cout << "NO"; return 0; }
//#pragma GCC target ("avx2") //#pragma GCC optimize ("Ofast") //#pragma GCC optimize ("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long using namespace std; using namespace __gnu_pbds; template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; const int N = (int)(1e6 + 5); const int M = (int)(1e9 + 7); const int INF = (int)(1e18 + 9); const int dx[] = {1, -1, 0, 0, 1, 1, -1, -1}; const int dy[] = {0, 0, 1, -1, 1, -1, 1, -1}; signed main() { ios_base ::sync_with_stdio(0); cin.tie(0); string s; cin >> s; map<char, int> mp; for (int i = 0; i < 4; ++i) mp[s[i]]++; if (mp.size() == 2) cout << "Yes"; else cout << "No"; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,908
793,909
u392139686
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { vector<char> S(4); for (int i = 0; i < 4; i++) cin >> S[i]; sort(S.begin(), S.end()); if (S[0] == S[1] && S[1] == S[2] && S[2] == S[3]) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { vector<char> S(4); for (int i = 0; i < 4; i++) cin >> S[i]; sort(S.begin(), S.end()); if (S[0] == S[1] && S[1] != S[2] && S[2] == S[3]) cout << "Yes" << endl; else cout << "No" << endl; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
793,912
793,913
u615258936
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int j = 0; for (int i = 0; i < 3; i++) { if (S.at(i) == S.at(i + 1)) j++; } if (j = 3) { cout << "No" << endl; return 0; } if (S.at(0) == S.at(1) && S.at(3) == S.at(2)) { cout << "Yes" << endl; return 0; } if (S.at(0) == S.at(2) && S.at(1) == S.at(3)) { cout << "Yes" << endl; return 0; } if (S.at(0) == S.at(3) && S.at(1) == S.at(2)) { cout << "Yes" << endl; return 0; } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int j = 0; for (int i = 0; i < 3; i++) { if (S.at(i) == S.at(i + 1)) j++; } if (j == 3) { cout << "No" << endl; return 0; } if (S.at(0) == S.at(1) && S.at(3) == S.at(2)) { cout << "Yes" << endl; return 0; } if (S.at(0) == S.at(2) && S.at(1) == S.at(3)) { cout << "Yes" << endl; return 0; } if (S.at(0) == S.at(3) && S.at(1) == S.at(2)) { cout << "Yes" << endl; return 0; } cout << "No" << endl; }
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
793,914
793,915
u429665788
cpp
p02987
#include <bits/stdc++.h> #define MAXN 100010 #define pii pair<int, int> #define ff first #define ss second #define ll long long #define in_range(x, y, n) (x >= 0 and x < n and y >= 0 and y < n) using namespace std; const int mod = 1e9 + 7; int main() { set<char> se; string s; cin >> s; for (int i = 0; i < (int)s.size(); i++) { se.insert(s[i]); } if (se.size() != 2 || s.size() != 4) { cout << "No" << endl; return 0; } char v[2]; int id = 0, a = 0, b = 0; for (auto it : se) { v[id] = it; } for (int i = 0; i < 4; i++) { if (s[i] == v[0]) a++; else b++; } if (b == a) cout << "YES" << endl; else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> #define MAXN 100010 #define pii pair<int, int> #define ff first #define ss second #define ll long long #define in_range(x, y, n) (x >= 0 and x < n and y >= 0 and y < n) using namespace std; const int mod = 1e9 + 7; int main() { set<char> se; string s; cin >> s; for (int i = 0; i < (int)s.size(); i++) { se.insert(s[i]); } if (se.size() != 2 || s.size() != 4) { cout << "No" << endl; return 0; } char v[2]; int id = 0, a = 0, b = 0; for (auto it : se) { v[id] = it; } for (int i = 0; i < 4; i++) { if (s[i] == v[0]) a++; else b++; } if (b == a) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,933
793,934
u009937643
cpp
p02987
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() const int inf = 1e9 + 7; const ll INF = 1e18; const int mod = 1000000007; #define abs(x) (x >= 0 ? x : -(x)) #define lb(v, x) (int)(lower_bound(all(v), x) - v.begin()) #define ub(v, x) (int)(upper_bound(all(v), x) - v.begin()) template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; } template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } template <typename T> T pow(T a, int b) { return b ? pow(a * a, b / 2) * (b % 2 ? a : 1) : 1; } ll modpow(ll a, ll b, ll _mod) { return b ? modpow(a * a % _mod, b / 2, _mod) * (b % 2 ? a : 1) % _mod : 1; } template <class T> ostream &operator<<(ostream &os, const vector<T> &vec) { for (auto &vi : vec) os << vi << " "; return os; } template <class T, class U> ostream &operator<<(ostream &os, const pair<T, U> &p) { os << p.F << " " << p.S; return os; } template <typename T> inline istream &operator>>(istream &is, vector<T> &v) { rep(j, sz(v)) is >> v[j]; return is; } template <class T> inline void add(T &a, int b) { a += b; if (a >= mod) a -= mod; } void solve(); int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cout << fixed << setprecision(10); int T; // cin >> T; T = 1; while (T--) { solve(); } } void solve() { map<char, int> mp; string s; cin >> s; rep(i, sz(s)) mp[s[i]]; for (auto e : mp) { if (e.S != 2) { cout << "No" << endl; return; } } cout << "Yes" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() const int inf = 1e9 + 7; const ll INF = 1e18; const int mod = 1000000007; #define abs(x) (x >= 0 ? x : -(x)) #define lb(v, x) (int)(lower_bound(all(v), x) - v.begin()) #define ub(v, x) (int)(upper_bound(all(v), x) - v.begin()) template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; } template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; } template <typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); } template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; } template <typename T> T pow(T a, int b) { return b ? pow(a * a, b / 2) * (b % 2 ? a : 1) : 1; } ll modpow(ll a, ll b, ll _mod) { return b ? modpow(a * a % _mod, b / 2, _mod) * (b % 2 ? a : 1) % _mod : 1; } template <class T> ostream &operator<<(ostream &os, const vector<T> &vec) { for (auto &vi : vec) os << vi << " "; return os; } template <class T, class U> ostream &operator<<(ostream &os, const pair<T, U> &p) { os << p.F << " " << p.S; return os; } template <typename T> inline istream &operator>>(istream &is, vector<T> &v) { rep(j, sz(v)) is >> v[j]; return is; } template <class T> inline void add(T &a, int b) { a += b; if (a >= mod) a -= mod; } void solve(); int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cout << fixed << setprecision(10); int T; // cin >> T; T = 1; while (T--) { solve(); } } void solve() { map<char, int> mp; string s; cin >> s; rep(i, sz(s)) mp[s[i]]++; for (auto e : mp) { if (e.S != 2) { cout << "No" << endl; return; } } cout << "Yes" << endl; }
[]
793,944
793,945
u277556971
cpp
p02987
#include <bits/stdc++.h> using namespace std; string IsRepeat(string s) { if (s.at(0) == s.at(1) && s.at(0) != s.at(2) && s.at(2) == s.at(3)) { return "Yes"; } else if (s.at(0) == s.at(2) && s.at(0) != s.at(1) && s.at(1) == s.at(3)) { return "Yes"; } else if (s.at(0) == s.at(4) && s.at(0) != s.at(1) && s.at(1) == s.at(2)) { return "Yes"; } else { return "No"; } } int main() { string s; cin >> s; cout << IsRepeat(s) << endl; return 0; }
#include <bits/stdc++.h> using namespace std; string IsRepeat(string s) { if (s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3)) { return "Yes"; } else if (s.at(0) == s.at(2) && s.at(2) != s.at(1) && s.at(1) == s.at(3)) { return "Yes"; } else if (s.at(0) == s.at(3) && s.at(3) != s.at(1) && s.at(1) == s.at(2)) { return "Yes"; } else { return "No"; } } int main() { string s; cin >> s; cout << IsRepeat(s) << endl; return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
793,946
793,947
u374187034
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) || s.at(0) == s.at(2) && s.at(1) == s.at(3) && s.at(0) != s.at(1) || s.at(0) == s.at(4) && s.at(1) == s.at(3) && s.at(0) != s.at(1)) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#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) || s.at(0) == s.at(2) && s.at(1) == s.at(3) && s.at(0) != s.at(1) || s.at(0) == s.at(3) && s.at(1) == s.at(2) && s.at(0) != s.at(1)) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
793,948
793,949
u578969098
cpp
p02987
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep1(i, n) for (ll i = 1; i < (ll)(n); i++) #define INF 1000000000000 #define MOD 1000000007 using ll = long long; int main() { map<char, int> m; rep(i, 4) { char tmp; cin >> tmp; if (m.count(tmp)) m[tmp]++; else m[tmp] = 1; } int flag = 0; for (auto p : m) { if (p.second == 2) flag++; } if (flag = 2) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep1(i, n) for (ll i = 1; i < (ll)(n); i++) #define INF 1000000000000 #define MOD 1000000007 using ll = long long; int main() { map<char, int> m; rep(i, 4) { char tmp; cin >> tmp; if (m.count(tmp)) m[tmp]++; else m[tmp] = 1; } int flag = 0; for (auto p : m) { if (p.second == 2) flag++; } if (flag == 2) cout << "Yes" << endl; else cout << "No" << endl; }
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
793,958
793,959
u779216084
cpp
p02987
#include <bits/stdc++.h> 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] == s[3] && s[0] != s[3]) { cout << "Yes" << endl; } else if (s[0] == s[3] && s[1] == s[1] && s[0] != s[1]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> 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] == s[3] && s[0] != s[3]) { cout << "Yes" << endl; } else if (s[0] == s[3] && s[1] == s[2] && s[0] != s[1]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
793,966
793,967
u492660436
cpp
p02987
#include <bits/stdc++.h> 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; } if (s[0] == s[2] && s[1] == s[3] && s[0] != s[3]) { cout << "Yes" << endl; } if (s[0] == s[3] && s[1] == s[1] && s[0] != s[1]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> 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] == s[3] && s[0] != s[3]) { cout << "Yes" << endl; } else if (s[0] == s[3] && s[1] == s[2] && s[0] != s[1]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "control_flow.branch.else_if.replace.add", "control_flow.branch.if.replace.remove", "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
793,968
793,967
u492660436
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int b = 0; int c = 0; int d = 0; int e = 0; for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(0)) { b = b + 1; } } for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(1)) { c = c + 1; } } for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(2)) { d = d + 1; } } for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(3)) { e = e + 1; } } if (b == c && c == d && d == e) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string a; cin >> a; int b = 0; int c = 0; int d = 0; int e = 0; for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(0)) { b = b + 1; } } for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(1)) { c = c + 1; } } for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(2)) { d = d + 1; } } for (int i = 0; i < 4; i++) { if (a.at(i) == a.at(3)) { e = e + 1; } } if (b == c && c == d && d == e && b == 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "control_flow.branch.if.condition.change" ]
793,987
793,988
u330025192
cpp
p02987
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; sort(s.begin(), s.end()); if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; string s; int main() { cin >> s; sort(s.begin(), s.end()); if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
793,989
793,990
u589508454
cpp
p02987
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <utility> #include <vector> using ll = long long; using namespace std; constexpr int MOD = 1e9 + 7; constexpr ll MOD_LL = ll(1e9) + 7; int main(void) { string s; cin >> s; set<int> st; for (int i = 0; i < s.size(); ++i) { st.insert(s[i] - 'A'); } if (st.size() == 2) cout << "No" << endl; else cout << "Yes" << endl; return 0; }
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <utility> #include <vector> using ll = long long; using namespace std; constexpr int MOD = 1e9 + 7; constexpr ll MOD_LL = ll(1e9) + 7; int main(void) { string s; cin >> s; set<int> st; for (int i = 0; i < s.size(); ++i) { st.insert(s[i] - 'A'); } if (st.size() == 2) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "control_flow.branch.else.remove", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add" ]
794,007
794,008
u835805357
cpp
p02987
#include <algorithm> #include <array> #include <cmath> #include <functional> #include <iostream> #include <numeric> #include <queue> #include <stack> #include <string> #include <type_traits> #include <vector> using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(0) == s.at(2)) cout << "Yes" << endl; else cout << "No" << endl; }
#include <algorithm> #include <array> #include <cmath> #include <functional> #include <iostream> #include <numeric> #include <queue> #include <stack> #include <string> #include <type_traits> #include <vector> using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2)) cout << "Yes" << endl; else cout << "No" << endl; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
794,012
794,013
u998732100
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0; if (s.at(0) == s.at(1)) count++; else if (s.at(0) == s.at(2)) count++; else if (s.at(0) == s.at(3)) count++; else if (s.at(1) == s.at(2)) count++; else if (s.at(1) == s.at(3)) count++; else if (s.at(2) == s.at(3)) count++; if (count == 2) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int count = 0; if (s.at(0) == s.at(1)) count++; if (s.at(0) == s.at(2)) count++; if (s.at(0) == s.at(3)) count++; if (s.at(1) == s.at(2)) count++; if (s.at(1) == s.at(3)) count++; if (s.at(2) == s.at(3)) count++; if (count == 2) cout << "Yes" << endl; else cout << "No" << endl; }
[ "control_flow.branch.if.replace.add", "control_flow.branch.else_if.replace.remove" ]
794,016
794,017
u037563046
cpp
p02987
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; #define ll long long int main() { string S; ll i, j; if (S[0] == S[1] && S[2] == S[3] && S[3] != S[1]) { cout << "Yes"; return 0; } if (S[0] == S[2] && S[1] == S[3] && S[1] != S[2]) { cout << "Yes"; return 0; } if (S[0] == S[3] && S[2] == S[1] && S[0] != S[1]) { cout << "Yes"; return 0; } cout << "No"; return 0; }
#include <algorithm> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <math.h> #include <queue> #include <stack> #include <string> #include <vector> using namespace std; #define ll long long int main() { string S; cin >> S; ll i, j; if (S[0] == S[1] && S[2] == S[3] && S[3] != S[1]) { cout << "Yes"; return 0; } if (S[0] == S[2] && S[1] == S[3] && S[1] != S[2]) { cout << "Yes"; return 0; } if (S[0] == S[3] && S[2] == S[1] && S[0] != S[1]) { cout << "Yes"; return 0; } cout << "No"; return 0; }
[]
794,032
794,033
u770161743
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt != 0) { cout << "No" << endl; return 0; } cnt = 0; } cout << "Yes" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt != 2) { cout << "No" << endl; return 0; } cnt = 0; } cout << "Yes" << endl; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
794,034
794,035
u726957641
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt % 2 == 0) { cout << "No" << endl; return 0; } cnt = 0; } cout << "Yes" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt != 2) { cout << "No" << endl; return 0; } cnt = 0; } cout << "Yes" << endl; }
[ "control_flow.branch.if.condition.change", "control_flow.loop.for.condition.change", "expression.operation.binary.remove" ]
794,036
794,035
u726957641
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt != 2) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt != 2) { cout << "No" << endl; return 0; } cnt = 0; } cout << "Yes" << endl; }
[ "assignment.add" ]
794,037
794,035
u726957641
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt != 2) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int cnt = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) cnt++; } if (cnt != 2) { cout << "No" << endl; return 0; } cnt = 0; } cout << "Yes" << endl; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change", "assignment.add" ]
794,038
794,035
u726957641
cpp
p02987
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; string t; t = s; sort(t.begin(), t.end()); t.erase(unique(t.begin(), t.end()), t.end()); // cout << t.size() << endl; int a = 0, b = 0; for (int i = 0; i < 2; i++) { for (int j = 0; j < s.size(); j++) { if (t[i] == s[i]) { a++; } } if (a != 2) { cout << "No" << endl; return 0; } a = 0; } cout << "Yes" << endl; return 0; }
#include <algorithm> #include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; string t; t = s; sort(t.begin(), t.end()); t.erase(unique(t.begin(), t.end()), t.end()); // cout << t.size() << endl; int a = 0, b = 0; for (int i = 0; i < 2; i++) { for (int j = 0; j < s.size(); j++) { if (t[i] == s[j]) { a++; } } if (a != 2) { cout << "No" << endl; return 0; } a = 0; } cout << "Yes" << endl; return 0; }
[ "identifier.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
794,048
794,049
u465669072
cpp
p02987
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { string S; cin >> S; int A[30]; for (int i = 0; i < 30; i++) { A[i] = 0; } for (int i = 0; i < 4; i++) { A[S[i] - 'A']++; } bool judge = true; for (int i = 0; i < 4; i++) { if (A[i] == 0 || A[i] == 2) { } else { judge = false; } } if (judge) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { string S; cin >> S; int A[30]; for (int i = 0; i < 30; i++) { A[i] = 0; } for (int i = 0; i < 4; i++) { A[S[i] - 'A']++; } bool judge = true; for (int i = 0; i < 30; i++) { if (A[i] == 0 || A[i] == 2) { } else { judge = false; } } if (judge) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change" ]
794,056
794,057
u204973596
cpp
p02987
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using vi = vector<int>; using vvi = vector<vi>; int main() { string s; cin >> s; char a, b; bool af, bf; a = s[3]; rep(i, 3) { if (a == s[i]) af = true; else if (b == s[i]) bf = true; else b = s[i]; } cout << (af && bf ? "Yes" : "No"); }
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using vi = vector<int>; using vvi = vector<vi>; int main() { string s; cin >> s; char a, b; bool af = false, bf = false; a = s[3]; rep(i, 3) { if (a == s[i]) af = true; else if (b == s[i]) bf = true; else b = s[i]; } cout << (af && bf ? "Yes" : "No"); }
[ "variable_declaration.value.change" ]
794,058
794,059
u154833883
cpp
p02987
#include <algorithm> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <vector> #define _GLIBCXX_DEBUG using namespace std; using vi = vector<int64_t>; using vvi = vector<vi>; int main(int argc, const char *argv[]) { // fasten cin cin.tie(0); ios::sync_with_stdio(false); // implement string s; cin >> s; char a, b, c, d; a = s.at(0); b = s.at(1); c = s.at(1); d = s.at(3); if ((a == b && c == d && a != c) || (a == c && b == d && a != b) || (a == d && b == c && a != b)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <algorithm> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <vector> #define _GLIBCXX_DEBUG using namespace std; using vi = vector<int64_t>; using vvi = vector<vi>; int main(int argc, const char *argv[]) { // fasten cin cin.tie(0); ios::sync_with_stdio(false); // implement string s; cin >> s; char a, b, c, d; a = s.at(0); b = s.at(1); c = s.at(2); d = s.at(3); if ((a == b && c == d && a != c) || (a == c && b == d && a != b) || (a == d && b == c && a != b)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "assignment.value.change", "call.arguments.change" ]
794,060
794,061
u702462808
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1)) { if (s.at(2) == s.at(3) || s.at(0) != s.at(2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else if (s.at(0) == s.at(2)) { if (s.at(1) == s.at(3) || s.at(0) != s.at(1)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else if (s.at(0) == s.at(3)) { if (s.at(1) == s.at(2) || s.at(0) != s.at(1)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1)) { if (s.at(2) == s.at(3) && s.at(0) != s.at(2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else if (s.at(0) == s.at(2)) { if (s.at(1) == s.at(3) && s.at(0) != s.at(1)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else if (s.at(0) == s.at(3)) { if (s.at(1) == s.at(2) && s.at(0) != s.at(1)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } else { cout << "No" << endl; } }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
794,074
794,075
u584169254
cpp
p02987
#include <bits/stdc++.h> #define ll long long #define fi first #define se second #define sz(a) int((a).size()) #define pb push_back #define eb emplace_back #define FOR(var, from, to) for (int var = (from); var <= (to); ++var) #define rep(var, n) for (int var = 0; var < (n); ++var) #define rep1(var, n) for (int var = 1; var <= (n); ++var) #define repC2(vari, varj, n) \ for (int vari = 0; vari < (n)-1; ++vari) \ for (int varj = vari + 1; varj < (n); ++varj) #define repC3(vari, varj, vark, n) \ for (int vari = 0; vari < (n)-2; ++vari) \ for (int varj = vari + 1; varj < (n)-1; ++varj) \ for (int vark = varj + 1; vark < (n); ++vark) #define ALL(c) (c).begin(), (c).end() #define RALL(c) (c).rbegin(), (c).rend() #define tr(i, c) for (auto i = (c).begin(); i != (c).end(); ++i) #define mset(arr, val) memset(arr, val, sizeof(arr)) #define mid(x, y) ((x) + ((y) - (x)) / 2) #define IN(x, a, b) ((a) <= (x) && (x) <= (b)) using namespace std; template <typename T> void Out(T x) { cout << x << endl; } template <typename T1, typename T2> void Ans(bool f, T1 y, T2 n) { if (f) Out(y); else Out(n); } int main() { int cout = 0; char a[4]; rep(i, 4) { cin >> a[i]; } rep(i, 3) FOR(j, i, 3) if (a[i] == a[j]) cout++; if (cout == 2) Out("Yes"); else Out("No"); return 0; }
#include <bits/stdc++.h> #define ll long long #define fi first #define se second #define sz(a) int((a).size()) #define pb push_back #define eb emplace_back #define FOR(var, from, to) for (int var = (from); var <= (to); ++var) #define rep(var, n) for (int var = 0; var < (n); ++var) #define rep1(var, n) for (int var = 1; var <= (n); ++var) #define repC2(vari, varj, n) \ for (int vari = 0; vari < (n)-1; ++vari) \ for (int varj = vari + 1; varj < (n); ++varj) #define repC3(vari, varj, vark, n) \ for (int vari = 0; vari < (n)-2; ++vari) \ for (int varj = vari + 1; varj < (n)-1; ++varj) \ for (int vark = varj + 1; vark < (n); ++vark) #define ALL(c) (c).begin(), (c).end() #define RALL(c) (c).rbegin(), (c).rend() #define tr(i, c) for (auto i = (c).begin(); i != (c).end(); ++i) #define mset(arr, val) memset(arr, val, sizeof(arr)) #define mid(x, y) ((x) + ((y) - (x)) / 2) #define IN(x, a, b) ((a) <= (x) && (x) <= (b)) using namespace std; template <typename T> void Out(T x) { cout << x << endl; } template <typename T1, typename T2> void Ans(bool f, T1 y, T2 n) { if (f) Out(y); else Out(n); } int main() { int cout = 0; char a[4]; rep(i, 4) { cin >> a[i]; } rep(i, 3) FOR(j, i + 1, 3) if (a[i] == a[j]) cout++; if (cout == 2) Out("Yes"); else Out("No"); return 0; }
[ "expression.operation.binary.add" ]
794,076
794,077
u237380198
cpp
p02987
#include <algorithm> #include <iostream> using namespace std; int main() { char s[4]; cin >> s; if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) { cout << "Yes" << endl; } else if (s[0] == s[2] && s[1] != s[2] && s[1] == s[3]) { cout << "Yes" << endl; } else if (s[0] != s[3] && s[1] != s[3] && s[1] == s[2]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <algorithm> #include <iostream> using namespace std; int main() { char s[4]; cin >> s; if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) { cout << "Yes" << endl; } else if (s[0] == s[2] && s[1] != s[2] && s[1] == s[3]) { cout << "Yes" << endl; } else if (s[0] == s[3] && s[1] != s[3] && s[1] == s[2]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
794,090
794,091
u317560202
cpp
p02987
#include <algorithm> #include <iostream> using namespace std; int main() { char s[4]; cin >> s; if (s[0] == s[1] && s[0] != s[2] && s[2] == s[3]) { cout << "Yes" << endl; } else if (s[0] == s[2] && s[1] != s[2] && s[1] == s[3]) { cout << "Yes" << endl; } else if (s[0] != s[3] && s[1] != s[3] && s[1] == s[2]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <algorithm> #include <iostream> using namespace std; int main() { char s[4]; cin >> s; if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) { cout << "Yes" << endl; } else if (s[0] == s[2] && s[1] != s[2] && s[1] == s[3]) { cout << "Yes" << endl; } else if (s[0] == s[3] && s[1] != s[3] && s[1] == s[2]) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "misc.opposites", "expression.operator.compare.change" ]
794,092
794,091
u317560202
cpp
p02987
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define endl '\n' int arr[26]; int main() { string h; cin >> h; set<char> s; for (int i = 0; i < h.length(); i++) { s.insert(h[i]); arr[h[i] - 'A']++; } vector<char> v(s.begin(), s.end()); if (s.size() == 2) { for (int i = 0; i < v.size(); i++) { if (arr[v[i] - 'A'] == 2) continue; else return cout << "NO", 0; } cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define endl '\n' int arr[26]; int main() { string h; cin >> h; set<char> s; for (int i = 0; i < h.length(); i++) { s.insert(h[i]); arr[h[i] - 'A']++; } vector<char> v(s.begin(), s.end()); if (s.size() == 2) { for (int i = 0; i < v.size(); i++) { if (arr[v[i] - 'A'] == 2) continue; else return cout << "No", 0; } cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[ "literal.string.change", "literal.string.case.change", "function.return_value.change", "expression.operation.binary.change", "io.output.change" ]
794,105
794,106
u423718751
cpp
p02987
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <iterator> #include <map> #include <vector> #define mp make_pair #define pb push_back #define p push #define FOR(a, c) for (int a = 0; a < c; a++) #define ll long long #define abs(x) (x < 0 ? (-x) : x) #define getI(a) scanf("%d", &a) #define getII(a, b) scanf("%d %d", &a, &b) #define getIII(a, b, c) scanf("%d%d%d", &a, &b, &c) #define BEND(c) (c).begin(), (c).end() #define fi first #define se second #define pi 3.1415926535897932384626 #define getS(a) scanf("%s", a) #define pfi(a) printf("%d", a); #define pfii(a, b) printf("%d%d", a, b); #define pfl(a) printf("%lld", a); #define pfll(a, b) printf("%lld%lld", a, b); #define SIZE 1000000007 using namespace std; int gcd(int a, int b) { return (a == 0) ? b : gcd(b % a, a); } /*ios_base::sync_with_stdio(false);cin.tie(0);*/ map<char, int> m1; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s; cin >> s; for (int i = 0; i < s.size(); i++) { m1[s[i]]++; } for (int i = 0; i < s.size(); i++) { if (m1[s[i]] == 2) { cout << "No"; return 0; } } cout << "Yes"; }
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <iterator> #include <map> #include <vector> #define mp make_pair #define pb push_back #define p push #define FOR(a, c) for (int a = 0; a < c; a++) #define ll long long #define abs(x) (x < 0 ? (-x) : x) #define getI(a) scanf("%d", &a) #define getII(a, b) scanf("%d %d", &a, &b) #define getIII(a, b, c) scanf("%d%d%d", &a, &b, &c) #define BEND(c) (c).begin(), (c).end() #define fi first #define se second #define pi 3.1415926535897932384626 #define getS(a) scanf("%s", a) #define pfi(a) printf("%d", a); #define pfii(a, b) printf("%d%d", a, b); #define pfl(a) printf("%lld", a); #define pfll(a, b) printf("%lld%lld", a, b); #define SIZE 1000000007 using namespace std; int gcd(int a, int b) { return (a == 0) ? b : gcd(b % a, a); } /*ios_base::sync_with_stdio(false);cin.tie(0);*/ map<char, int> m1; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s; cin >> s; for (int i = 0; i < s.size(); i++) { m1[s[i]]++; } for (int i = 0; i < s.size(); i++) { if (m1[s[i]] != 2) { cout << "No"; return 0; } } cout << "Yes"; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
794,117
794,116
u198530799
cpp
p02987
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < 4; i++) { for (int j = 1; j < 3; j++) { if (S[i] == S[j]) { ans++; } else { continue; } } } if (ans == 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; int ans = 0; for (int i = 0; i < 4; i++) { for (int j = 1; j < 4; j++) { if (S[i] == S[i + j]) { ans++; } else { continue; } } } if (ans == 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", "control_flow.branch.if.condition.change" ]
794,125
794,126
u746486430
cpp
p02987
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; string s; int main() { cin >> s; sort(s.begin(), s.end()); if (s[0] != s[3] && s[0] == s[1] && s[2] == s[3]) cout << "YES"; else cout << "NO"; }
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; string s; int main() { cin >> s; sort(s.begin(), s.end()); if (s[0] != s[3] && s[0] == s[1] && s[2] == s[3]) cout << "Yes"; else cout << "No"; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,131
794,132
u013476277
cpp
p02987
#include <algorithm> #include <iomanip> #include <iostream> #include <string.h> #include <vector> using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); if (s[0] == s[1] && s[1] != s[2] && s[2] != s[3]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <algorithm> #include <iomanip> #include <iostream> #include <string.h> #include <vector> using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); if (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
794,133
794,134
u927933718
cpp
p02987
#include <iomanip> #include <iostream> #include <string> using namespace std; int main() { int i, j, c = 0; string S; cin >> S; for (i = 0; i <= 3; i++) { for (j = 0; j <= 3; j++) if (S[j] == S[i]) c++; } if (c == 8) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <iomanip> #include <iostream> #include <string> using namespace std; int main() { int i, j, c = 0; string S; cin >> S; for (i = 0; i <= 3; i++) { for (j = 0; j <= 3; j++) if (S[j] == S[i]) c++; } if (c == 8) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,140
794,141
u575572057
cpp
p02987
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; int flag = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S[i] == S[j]) flag++; } } if (flag == 4) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; int flag = 0; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S[i] == S[j]) flag++; } } if (flag == 8) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
794,147
794,148
u938317342
cpp
p02987
#include <iostream> using namespace std; int main(void) { char s[4]; int i, j; int a[4], b[4]; int f = 0, sum = 0; for (i = 0; i < 4; i++) { cin >> s[i]; } for (i = 0; i < 3; i++) { for (j = i + 1; j < 4; j++) { if (s[i] == s[j]) { f++; } } if (f == 1) { sum++; } f = 0; } if (sum == 2) { cout << "YES"; } else { cout << "NO"; } return 0; }
#include <iostream> using namespace std; int main(void) { char s[4]; int i, j; int a[4], b[4]; int f = 0, sum = 0; for (i = 0; i < 4; i++) { cin >> s[i]; } for (i = 0; i < 3; i++) { for (j = i + 1; j < 4; j++) { if (s[i] == s[j]) { f++; } } if (f == 1) { sum++; } f = 0; } if (sum == 2) { cout << "Yes"; } else { cout << "No"; } return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,149
794,150
u660656075
cpp
p02987
#include <algorithm> #include <bitset> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> 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))) || (s.at(0) == s.at(2)) != (s.at(1) == s.at(3) && (s.at(0) != s.at(1))) || (s.at(0) == s.at(3)) != (s.at(1) == s.at(2)) && (s.at(0) != s.at(1))) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <algorithm> #include <bitset> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> 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))) || (s.at(0) == s.at(2)) && (s.at(1) == s.at(3) && (s.at(0) != s.at(1))) || (s.at(0) == s.at(3)) && (s.at(1) == s.at(2)) && (s.at(0) != s.at(1))) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "control_flow.branch.if.condition.change" ]
794,153
794,154
u999989620
cpp
p02987
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <string> #include <vector> typedef long long ll; using namespace std; //素因数分解 vector<pair<ll, int>> factorize(ll n) { vector<pair<ll, int>> res; for (ll i = 2; i * i <= n; i++) { if (n % i) continue; res.emplace_back(i, 0); while (n % i == 0) { n /= i; res.back().second++; } } if (n != 1) res.emplace_back(n, 1); return res; } int main() { string S; cin >> S; bool ans = false; if (S[0] == S[1] && S[2] == S[3] && S[1] != S[2]) ans = true; else if (S[0] == S[2] && S[1] == S[3] && S[1] != S[2]) ans = true; else if (S[0] == S[3] && S[2] == S[1] && S[0] != S[3]) ans = true; if (ans) cout << "Yes" << endl; else cout << "No" << endl; }
#include <algorithm> #include <bits/stdc++.h> #include <iostream> #include <string> #include <vector> typedef long long ll; using namespace std; //素因数分解 vector<pair<ll, int>> factorize(ll n) { vector<pair<ll, int>> res; for (ll i = 2; i * i <= n; i++) { if (n % i) continue; res.emplace_back(i, 0); while (n % i == 0) { n /= i; res.back().second++; } } if (n != 1) res.emplace_back(n, 1); return res; } int main() { string S; cin >> S; bool ans = false; if (S[0] == S[1] && S[2] == S[3] && S[1] != S[2]) ans = true; else if (S[0] == S[2] && S[1] == S[3] && S[1] != S[2]) ans = true; else if (S[0] == S[3] && S[2] == S[1] && S[2] != S[3]) ans = true; if (ans) cout << "Yes" << endl; else cout << "No" << endl; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
794,164
794,165
u355371431
cpp
p02987
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; (i) < (n); ++(i)) #define rep1(i, n) for (int i = 1; (i) < (n); ++(i)) #define maxi(v) distance(v.begin(), max_element(v.begin(), v.end())) #define mini(v) distance(v.begin(), min_element(v.begin(), v.end())) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } const long long llINF = 1LL << 60; const int INF = 1e9; int main() { // int n; cin >> n; // vector<int> v(n); rep(i,n) cin >> v[i]; string s; cin >> s; int cnt = 0, flg = 1; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if (s[i] == s[j]) cnt++; } if (cnt != 1) { cout << "No"; flg = 0; break; } cnt = 0; } if (flg) cout << "Yes"; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; (i) < (n); ++(i)) #define rep1(i, n) for (int i = 1; (i) < (n); ++(i)) #define maxi(v) distance(v.begin(), max_element(v.begin(), v.end())) #define mini(v) distance(v.begin(), min_element(v.begin(), v.end())) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } const long long llINF = 1LL << 60; const int INF = 1e9; int main() { // int n; cin >> n; // vector<int> v(n); rep(i,n) cin >> v[i]; string s; cin >> s; int cnt = 0, flg = 1; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if (s[i] == s[j]) cnt++; } if (cnt != 2) { cout << "No"; flg = 0; break; } cnt = 0; } if (flg) cout << "Yes"; return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
794,169
794,170
u639732129
cpp
p02987
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; (i) < (n); ++(i)) #define rep1(i, n) for (int i = 1; (i) < (n); ++(i)) #define maxi(v) distance(v.begin(), max_element(v.begin(), v.end())) #define mini(v) distance(v.begin(), min_element(v.begin(), v.end())) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } const long long llINF = 1LL << 60; const int INF = 1e9; int main() { // int n; cin >> n; // vector<int> v(n); rep(i,n) cin >> v[i]; string s; cin >> s; int cnt = 0, flg = 1; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if (s[i] == s[j]) cnt++; } if (cnt != 1) { cout << "No"; flg = 0; break; } } if (flg) cout << "Yes"; return 0; }
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; (i) < (n); ++(i)) #define rep1(i, n) for (int i = 1; (i) < (n); ++(i)) #define maxi(v) distance(v.begin(), max_element(v.begin(), v.end())) #define mini(v) distance(v.begin(), min_element(v.begin(), v.end())) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; } const long long llINF = 1LL << 60; const int INF = 1e9; int main() { // int n; cin >> n; // vector<int> v(n); rep(i,n) cin >> v[i]; string s; cin >> s; int cnt = 0, flg = 1; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if (s[i] == s[j]) cnt++; } if (cnt != 2) { cout << "No"; flg = 0; break; } cnt = 0; } if (flg) cout << "Yes"; return 0; }
[ "literal.number.change", "control_flow.branch.if.condition.change", "assignment.add" ]
794,171
794,170
u639732129
cpp
p02987
#include <iostream> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3)) cout << "Yes" << endl; else if (s.at(0) == s.at(2) && s.at(2) != s.at(1) && s.at(1) == s.at(3)) cout << "Yes" << endl; else if (s.at(0) == s.at(3) && s.at(3) != s.at(1) && s.at(1) == s.at(2)) cout << "yes" << endl; else cout << "No" << endl; }
#include <iostream> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3)) cout << "Yes" << endl; else if (s.at(0) == s.at(2) && s.at(2) != s.at(1) && s.at(1) == s.at(3)) cout << "Yes" << endl; else if (s.at(0) == s.at(3) && s.at(3) != s.at(1) && s.at(1) == s.at(2)) cout << "Yes" << endl; else cout << "No" << endl; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,174
794,175
u531523517
cpp
p02987
#include <bits/stdc++.h> #define mm(a, b) memset(a, b, sizeof(a)) #define ACCELERATE (ios::sync_with_stdio(false), cin.tie(0)) #define pii pair<int, int> #define pdd pair<double, double> #define pll pair<long long, long long> #define mp make_pair #define pb push_back #define fi first #define se second #define rep(i, a, b) for (int i = (a); i <= (b); i++) #define per(i, a, b) for (int i = (a); i >= (b); i--) #define rush() \ int T; \ scanf("%d", &T); \ while (T--) #define debug(x) cout << #x << ": " << x << endl #define sc(a) scanf("%d", &a) #define sc2(a, b) scanf("%d%d", &a, &b) #define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define pf(x) printf("%d\n", x) #define pf2(x, y) printf("%d %d\n", x, y) #define pf3(x, y, z) printf("%d %d %d\n", x, y, z) #define all(x) (x).begin(), (x).end() #define PI acos(-1.0) #define E exp(1.0) #define db double #define ll long long #define ld long double #define ull unsigned long long //#define io using namespace std; const int inf = 0x3f3f3f3f; const ll INF = 0x3f3f3f3f3f3f3f3f; //#define gc getchar // char buf[1<<21],*p1=buf,*p2=buf; // inline int gc(){return // p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;} inline int // read() //{ // int ret=0,f=0;char c=gc(); // while(!isdigit(c)){if(c=='-')f=1;c=gc();} // while(isdigit(c)){ret=ret*10+c-48;c=gc();} // if(f)return -ret;return ret; //} map<char, int> m; int main() { #ifdef io freopen("in.txt", "r", stdin); #endif rep(i, 0, 3) { char c = getchar(); m[c]++; } bool flag = true; if (m.size() == 2) { for (auto &x : m) { if (x.second != 2) flag = false; } } else { flag = false; } printf("%s", flag ? "YES" : "NO"); return 0; }
#include <bits/stdc++.h> #define mm(a, b) memset(a, b, sizeof(a)) #define ACCELERATE (ios::sync_with_stdio(false), cin.tie(0)) #define pii pair<int, int> #define pdd pair<double, double> #define pll pair<long long, long long> #define mp make_pair #define pb push_back #define fi first #define se second #define rep(i, a, b) for (int i = (a); i <= (b); i++) #define per(i, a, b) for (int i = (a); i >= (b); i--) #define rush() \ int T; \ scanf("%d", &T); \ while (T--) #define debug(x) cout << #x << ": " << x << endl #define sc(a) scanf("%d", &a) #define sc2(a, b) scanf("%d%d", &a, &b) #define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define pf(x) printf("%d\n", x) #define pf2(x, y) printf("%d %d\n", x, y) #define pf3(x, y, z) printf("%d %d %d\n", x, y, z) #define all(x) (x).begin(), (x).end() #define PI acos(-1.0) #define E exp(1.0) #define db double #define ll long long #define ld long double #define ull unsigned long long //#define io using namespace std; const int inf = 0x3f3f3f3f; const ll INF = 0x3f3f3f3f3f3f3f3f; //#define gc getchar // char buf[1<<21],*p1=buf,*p2=buf; // inline int gc(){return // p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;} inline int // read() //{ // int ret=0,f=0;char c=gc(); // while(!isdigit(c)){if(c=='-')f=1;c=gc();} // while(isdigit(c)){ret=ret*10+c-48;c=gc();} // if(f)return -ret;return ret; //} map<char, int> m; int main() { #ifdef io freopen("in.txt", "r", stdin); #endif rep(i, 0, 3) { char c = getchar(); m[c]++; } bool flag = true; if (m.size() == 2) { for (auto &x : m) { if (x.second != 2) flag = false; } } else { flag = false; } printf("%s\n", flag ? "Yes" : "No"); return 0; }
[ "literal.string.change", "call.arguments.change", "io.output.change", "io.output.newline.add", "literal.string.case.change" ]
794,176
794,177
u827277099
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3)) { cout << "yes" << endl; } else if (S.at(0) == S.at(2) && S.at(3) != S.at(2) && S.at(1) == S.at(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(3) && S.at(1) != S.at(0) && S.at(1) == S.at(2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(2) && S.at(3) != S.at(2) && S.at(1) == S.at(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(3) && S.at(1) != S.at(0) && S.at(1) == S.at(2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,184
794,185
u186224029
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3)) { cout << "yes" << endl; } else if (S.at(0) == S.at(2) && S.at(1) != S.at(2) && S.at(1) == S.at(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(3) && S.at(1) != S.at(0) && S.at(1) == S.at(2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(2) && S.at(3) != S.at(2) && S.at(1) == S.at(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(3) && S.at(1) != S.at(0) && S.at(1) == S.at(2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.string.change", "literal.string.case.change", "io.output.change", "literal.number.change", "control_flow.branch.if.condition.change" ]
794,186
794,185
u186224029
cpp
p02987
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main(void) { string s; cin >> s; sort(s.begin(), s.end()); int sum = 1; rep(i, s.size()) { if (s[i] != s[i + 1]) { sum++; } } if (sum == 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main(void) { string s; cin >> s; sort(s.begin(), s.end()); int sum = 1; rep(i, s.size() - 1) { if (s[i] != s[i + 1]) { sum++; } } if (sum == 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[ "expression.operation.binary.add" ]
794,196
794,197
u905170328
cpp
p02987
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> using namespace std; #define INF 1000000007 #define ll long long #define rep(i, start, end) for (ll i = (ll)start; i < (ll)end; i++) #define print(a) cout << a << endl; #define printarray(a, len) rep(i, 0, len) cout << a[i] << " "; int main() { char s[5]; cin >> s; sort(s, s + 4); if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) { print("YES"); } else print("NO"); return 0; }
#include <algorithm> #include <iomanip> #include <iostream> #include <queue> using namespace std; #define INF 1000000007 #define ll long long #define rep(i, start, end) for (ll i = (ll)start; i < (ll)end; i++) #define print(a) cout << a << endl; #define printarray(a, len) rep(i, 0, len) cout << a[i] << " "; int main() { char s[5]; cin >> s; sort(s, s + 4); if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) { print("Yes"); } else print("No"); return 0; }
[ "literal.string.change", "literal.string.case.change", "call.arguments.change", "io.output.change" ]
794,217
794,218
u656995812
cpp
p02987
#include <bits/stdc++.h> #include <stdio.h> #include <string> using namespace std; #define pb push_back #define pf push_front typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define mp make_pair #define fi first #define se second typedef pair<int, int> pint; #define All(s) s.begin(), s.end() #define rAll(s) s.rbegin(), s.rend() #define REP(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) REP(i, 0, n) #define sz(x) int(x.size()) #define INF 1e5 int main() { char s[4]; cin >> s; sort(s, s + 4); if ((s[0] == s[1]) & (s[2] == s[3]) & (s[2] != s[3])) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> #include <stdio.h> #include <string> using namespace std; #define pb push_back #define pf push_front typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; typedef pair<int, int> pii; typedef pair<ll, ll> pll; #define mp make_pair #define fi first #define se second typedef pair<int, int> pint; #define All(s) s.begin(), s.end() #define rAll(s) s.rbegin(), s.rend() #define REP(i, a, b) for (int i = a; i < b; i++) #define rep(i, n) REP(i, 0, n) #define sz(x) int(x.size()) #define INF 1e5 int main() { char s[4]; cin >> s; sort(s, s + 4); if ((s[0] == s[1]) & (s[2] == s[3]) & (s[2] != s[1])) cout << "Yes" << endl; else cout << "No" << endl; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
794,223
794,224
u033602950
cpp
p02987
#include <iostream> #include <string.h> int main() { std::string s; std::cin >> s; if ((s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) || (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) || (s[0] == s[3] && s[1] == s[2] && s[0] != s[3])) { std::cout << "Yes" << '\n'; } else { std::cout << "No" << '\n'; } }
#include <iostream> #include <string.h> int main() { std::string s; std::cin >> s; if ((s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) || (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) || (s[0] == s[3] && s[1] == s[2] && s[0] != s[1])) { std::cout << "Yes" << '\n'; } else { std::cout << "No" << '\n'; } }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
794,225
794,226
u659792881
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { int counter = 0; string S; cin >> S; sort(S.begin(), S.end()); if (S[0] == S[1] && S[2] == S[3] && S[2] != S[3]) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int counter = 0; string S; cin >> S; sort(S.begin(), S.end()); if (S[0] == S[1] && S[2] == S[3] && S[2] != S[1]) cout << "Yes" << endl; else cout << "No" << endl; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
794,231
794,232
u854161810
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int count = -4; 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) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; int count = -4; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (S.at(i) == S.at(j)) { count++; } } } if (count == 4) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
794,242
794,243
u388787692
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 26; ++i) for (int j = i + 1; j < 26; ++j) { char a = 'a' + i, b = 'a' + j; string t; t = t + a + a + b + b; do { if (s == t) { cout << "Yes" << endl; return 0; } } while (next_permutation(begin(t), end(t))); } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; for (int i = 0; i < 26; ++i) for (int j = i + 1; j < 26; ++j) { char a = 'A' + i, b = 'A' + j; string t; t = t + a + a + b + b; do { if (s == t) { cout << "Yes" << endl; return 0; } } while (next_permutation(begin(t), end(t))); } cout << "No" << endl; }
[ "literal.string.change", "literal.string.case.change", "expression.operation.binary.change" ]
794,246
794,247
u203033720
cpp
p02987
#include <iostream> #include <string> #include <vector> //#include <algorithm> // typedef long long LL; using namespace std; int main() { string s; vector<bool> unique(4); bool hit = true; cin >> s; for (int i = 0; i < 4; i++) { unique[i] = true; } unique[0] = false; int num = 0; for (int i = 1; i < 4; i++) { if (s[0] == s[i]) { num++; unique[i] = false; } } if (num != 1) { hit = false; } num = 0; for (int i = 1; i < 3; i++) { for (int j = i + 1; j < 4; j++) { if (unique[i] == true && unique[j] == true) { if (unique[i] == unique[j]) { num++; } } } } if (num != 1) { hit = false; } if (hit) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <iostream> #include <string> #include <vector> //#include <algorithm> // typedef long long LL; using namespace std; int main() { string s; vector<bool> unique(4); bool hit = true; cin >> s; for (int i = 0; i < 4; i++) { unique[i] = true; } unique[0] = false; int num = 0; for (int i = 1; i < 4; i++) { if (s[0] == s[i]) { num++; unique[i] = false; } } if (num != 1) { hit = false; } num = 0; for (int i = 1; i < 3; i++) { for (int j = i + 1; j < 4; j++) { if (unique[i] == true && unique[j] == true) { if (s[i] == s[j]) { num++; } } } } if (num != 1) { hit = false; } if (hit) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
794,259
794,260
u755310927
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; bool ans = false; if (s[0] == s[1] && s[2] == s[3] && s[0] != s[3]) ans = true; if (s[0] == s[2] && s[1] == s[3] && s[0] != s[3]) ans = true; if (s[0] == s[3] && s[1] == s[2] && s[0] != s[3]) ans = true; if (ans) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; bool ans = false; if (s[0] == s[1] && s[2] == s[3] && s[0] != s[2]) ans = true; if (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) ans = true; if (s[0] == s[3] && s[1] == s[2] && s[0] != s[1]) ans = true; if (ans) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change" ]
794,270
794,271
u888538168
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; int temp; int arr[30] = {0}; for (int i = 0; i < 4; i++) { temp = s[i] - 'A'; arr[temp]++; } int flag = 0; for (int i = 0; i < 29; i++) { if (arr[i] == 2) flag++; } if (flag == 2) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; int temp; int arr[30] = {0}; for (int i = 0; i < 4; i++) { temp = s[i] - 'A'; arr[temp]++; } int flag = 0; for (int i = 0; i < 26; i++) { if (arr[i] == 2) flag++; } if (flag == 2) cout << "Yes"; else cout << "No"; }
[ "literal.number.change", "control_flow.loop.for.condition.change", "expression.operation.binary.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,296
794,297
u910994303
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; int temp; int arr[30] = {0}; for (int i = 0; i < 4; i++) { temp = s[i] - 'A'; arr[temp]++; } int flag = 0; for (int i = 0; i < 26; i++) { if (arr[i] == 2) flag++; } if (flag == 2) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; int temp; int arr[30] = {0}; for (int i = 0; i < 4; i++) { temp = s[i] - 'A'; arr[temp]++; } int flag = 0; for (int i = 0; i < 26; i++) { if (arr[i] == 2) flag++; } if (flag == 2) cout << "Yes"; else cout << "No"; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,298
794,297
u910994303
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; int temp; int arr[5] = {0}; for (int i = 0; i < 4; i++) { temp = s[i] - 'A'; arr[temp]++; } int flag = 0; for (int i = 0; i < 26; i++) { if (arr[i] == 2) flag++; } if (flag == 2) cout << "YES"; else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string s; cin >> s; int temp; int arr[30] = {0}; for (int i = 0; i < 4; i++) { temp = s[i] - 'A'; arr[temp]++; } int flag = 0; for (int i = 0; i < 26; i++) { if (arr[i] == 2) flag++; } if (flag == 2) cout << "Yes"; else cout << "No"; }
[ "literal.number.change", "variable_declaration.array_dimensions.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,299
794,297
u910994303
cpp
p02987
#include <iostream> using namespace std; int main() { string s; cin >> s; int A[4]; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (s[i] - s[j] == 0) A[i]++; } } bool a = true; for (int i = 0; i < 4; i++) { if (A[i] != 2) a = false; } if (a) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <iostream> using namespace std; int main() { string s; cin >> s; int A[4] = {}; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (s[i] - s[j] == 0) A[i]++; } } bool a = true; for (int i = 0; i < 4; i++) { if (A[i] != 2) a = false; } if (a) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "variable_declaration.value.change" ]
794,304
794,305
u367199607
cpp
p02987
#include <iostream> using namespace std; int main() { string s; cin >> s; int A[4]; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (s[i] - s[j] == 0) A[i]++; } } bool a = true; for (int i = 0; i < 4; i++) { if (A[i] != 2) a = false; } if (a) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <iostream> using namespace std; int main() { string s; cin >> s; int A[4] = {}; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (s[i] - s[j] == 0) A[i]++; } } bool a = true; for (int i = 0; i < 4; i++) { if (A[i] != 2) a = false; } if (a) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[ "variable_declaration.value.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,306
794,305
u367199607
cpp
p02987
// Charan Sriramula #include <bits/stdc++.h> using namespace std; typedef long double ld; typedef long long int ll; const ll lg = 22; const ll N = 2e5 + 5; const ll M = 5e8; const ll INF = 1e18; const ll mod = 1e9 + 7; const double PI = 3.14159265358979323846; #define is(n) scanf("%d", &n) #define io(n) printf("%d\n", n) #define ls(n) scanf("%lld", &n) #define lo(n) printf("%lld\n", n) #define f first #define s second #define pb(x) push_back(x) #define pf(x) push_front(x) #define mp(x, y) make_pair(x, y) #define GCD(a, b) __gcd((a), (b)) #define all(v) v.begin(), v.end() #define bits(x) __builtin_popcount(x) #define LCM(a, b) ((a) * (b)) / GCD((a), (b)) #define fast \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); template <typename T> T power(T x, T y, ll m) { T ans = 1; while (y > 0) { if (y & 1LL) ans = (ans * x) % m; y >>= 1LL; x = (x * x) % m; } return ans % m; } inline ll mul(ll a, ll b, ll p) { return (a * 1ll * b) % p; } inline ll sub(ll a, ll b, ll p) { ll c = a - b; if (c < 0) c += p; return c; } inline ll add(ll a, ll b, ll p) { ll c = a + b; if (c > p) c -= p; return c; } #define trace1(x) cerr << #x << ": " << x << endl #define trace2(x, y) cerr << #x << ": " << x << " | " << #y << ": " << y << endl #define trace3(x, y, z) \ cerr << #x << ":" << x << " | " << #y << ": " << y << " | " << #z << ": " \ << z << endl #define trace4(a, b, c, d) \ cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \ << c << " | " << #d << ": " << d << endl #define trace5(a, b, c, d, e) \ cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \ << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl #define trace6(a, b, c, d, e, f) \ cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \ << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " \ << #f << ": " << f << endl ll n, m, a[55][55], b[55][55]; int main() { string s; cin >> s; set<char> c; for (ll i = 0; i < s.length(); i++) { c.insert(s[i]); } if (c.size() == 2) { cout << "YES" << endl; exit(0); } cout << "NO" << endl; }
// Charan Sriramula #include <bits/stdc++.h> using namespace std; typedef long double ld; typedef long long int ll; const ll lg = 22; const ll N = 2e5 + 5; const ll M = 5e8; const ll INF = 1e18; const ll mod = 1e9 + 7; const double PI = 3.14159265358979323846; #define is(n) scanf("%d", &n) #define io(n) printf("%d\n", n) #define ls(n) scanf("%lld", &n) #define lo(n) printf("%lld\n", n) #define f first #define s second #define pb(x) push_back(x) #define pf(x) push_front(x) #define mp(x, y) make_pair(x, y) #define GCD(a, b) __gcd((a), (b)) #define all(v) v.begin(), v.end() #define bits(x) __builtin_popcount(x) #define LCM(a, b) ((a) * (b)) / GCD((a), (b)) #define fast \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); template <typename T> T power(T x, T y, ll m) { T ans = 1; while (y > 0) { if (y & 1LL) ans = (ans * x) % m; y >>= 1LL; x = (x * x) % m; } return ans % m; } inline ll mul(ll a, ll b, ll p) { return (a * 1ll * b) % p; } inline ll sub(ll a, ll b, ll p) { ll c = a - b; if (c < 0) c += p; return c; } inline ll add(ll a, ll b, ll p) { ll c = a + b; if (c > p) c -= p; return c; } #define trace1(x) cerr << #x << ": " << x << endl #define trace2(x, y) cerr << #x << ": " << x << " | " << #y << ": " << y << endl #define trace3(x, y, z) \ cerr << #x << ":" << x << " | " << #y << ": " << y << " | " << #z << ": " \ << z << endl #define trace4(a, b, c, d) \ cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \ << c << " | " << #d << ": " << d << endl #define trace5(a, b, c, d, e) \ cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \ << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl #define trace6(a, b, c, d, e, f) \ cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " \ << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " \ << #f << ": " << f << endl ll n, m, a[55][55], b[55][55]; int main() { string s; cin >> s; set<char> c; for (ll i = 0; i < s.length(); i++) { c.insert(s[i]); } if (c.size() == 2) { cout << "Yes" << endl; exit(0); } cout << "No" << endl; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,319
794,320
u416273217
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[1] != s[2] && s[2] == s[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[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,325
794,326
u103850114
cpp
p02987
#include <cstdio> #include <cstring> using namespace std; bool a[26]; int main() { char s[10]; scanf("%s", s); for (int i = 0; i < strlen(s); i++) { a[s[i] - 'A']++; } for (int i = 0; i < 26; i++) { if (a[i] == 1 || a[i] == 3 || a[i] == 4) { printf("No\n"); return 0; } } printf("Yes\n"); return 0; }
#include <cstdio> #include <cstring> #include <iostream> using namespace std; int a[26]; int main() { // freopen("demo.in", "r", stdin); // freopen("demo.out", "w", stdout); char s[10]; scanf("%s", s); for (int i = 0; i < strlen(s); i++) { a[s[i] - 'A']++; } for (int i = 0; i < 26; i++) { if (a[i] == 1 || a[i] == 3 || a[i] == 4) { printf("No\n"); return 0; } } printf("Yes\n"); return 0; }
[ "import.add", "variable_declaration.type.primitive.change" ]
794,335
794,336
u251934001
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(3)) { cout << "YES" << endl; } else if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(3)) { cout << "YES" << endl; } else if (S.at(0) == S.at(3) && S.at(1) == S.at(2) && S.at(0) != S.at(2)) { cout << "YES" << endl; } else { cout << "NO" << endl; } return 0; }
#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(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(3)) { cout << "Yes" << endl; } else if (S.at(0) == S.at(3) && S.at(1) == S.at(2) && S.at(0) != S.at(2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,346
794,347
u564185267
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(3)) || (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) == S.at(3)) || (S.at(0) == S.at(3) && S.at(1) == S.at(2) && S.at(0) == S.at(2))) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#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(3)) || (S.at(0) == S.at(2) && S.at(1) == S.at(3) && S.at(0) != S.at(3)) || (S.at(0) == S.at(3) && S.at(1) == S.at(2) && S.at(0) != S.at(2))) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
794,353
794,354
u028572059
cpp
p02987
#include <iostream> using namespace std; int main() { char a, b, c, d; cin >> a >> b >> c >> d; if (a == b && c == b && a != c) { cout << "Yes" << endl; } else if (a == c && b == d && a != b) { cout << "Yes" << endl; } else if (a == d && b == c && a != b) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <iostream> using namespace std; int main() { char a, b, c, d; cin >> a >> b >> c >> d; if (a == b && c == d && a != c) { cout << "Yes" << endl; } else if (a == c && b == d && a != b) { cout << "Yes" << endl; } else if (a == d && b == c && a != b) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change" ]
794,355
794,356
u553183019
cpp
p02987
#include <iostream> using namespace std; int main() { char a, b, c, d; cin >> a >> b >> c >> d; if (a == b && c == b && a != c) { cout << "Yes" << endl; } else if (a == c && b == d && a != b) { cout << "Yes" << endl; } else if (a == d && b == c && a != b) { cout << "Yes" << endl; } else { cout << "NO" << endl; } return 0; }
#include <iostream> using namespace std; int main() { char a, b, c, d; cin >> a >> b >> c >> d; if (a == b && c == d && a != c) { cout << "Yes" << endl; } else if (a == c && b == d && a != b) { cout << "Yes" << endl; } else if (a == d && b == c && a != b) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[ "identifier.change", "control_flow.branch.if.condition.change", "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,357
794,356
u553183019
cpp
p02987
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { string s; cin >> s; sort(s.begin(), s.end()); if (s[0] != s[3] || s[0] != s[2] || s[0] == s[1] || s[2] == s[3]) { /* code */ cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef long long ll; int main() { string s; cin >> s; sort(s.begin(), s.end()); if (s[0] != s[3] && s[0] != s[2] && s[0] == s[1] && s[2] == s[3]) { /* code */ cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "misc.opposites", "control_flow.branch.if.condition.change" ]
794,358
794,359
u376859266
cpp
p02987
#include <algorithm> #include <iostream> using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); string ret = (s[0] == s[1] && s[1] != s[2] && s[2] == s[2]) ? "Yes" : "No"; cout << ret << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); string ret = (s[0] == s[1] && s[1] != s[2] && s[2] == s[3]) ? "Yes" : "No"; cout << ret << endl; return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.loop.for.condition.change", "expression.off_by_one", "expression.operation.binary.change" ]
794,363
794,364
u074372598
cpp
p02987
#include <iostream> using namespace std; int main(void) { int i, flag = 0, af = 0, bf = 0; char s[4], a, b = 0; cin >> s; a = s[0]; for (i = 0; i < 4; i++) { if (s[i] != a) { b = s[i]; } } for (i = 0; i < 4; i++) { if (s[i] != a) af++; if (s[i] != b) bf++; } if (af == 2 && bf == 2) cout << "YES"; else cout << "NO"; return 0; }
#include <iostream> using namespace std; int main(void) { int i, flag = 0, af = 0, bf = 0; char s[4], a, b = 0; cin >> s; a = s[0]; for (i = 0; i < 4; i++) { if (s[i] != a) { b = s[i]; } } for (i = 0; i < 4; i++) { if (s[i] != a) af++; if (s[i] != b) bf++; } if (af == 2 && bf == 2) cout << "Yes"; else cout << "No"; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,372
794,373
u208723543
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(0) != s.at(2) && s.at(2) == s.at(3)) cout << "Yes"; else if (s.at(0) != s.at(1) && s.at(0) == s.at(2) && s.at(1) == s.at(3)) cout << "Yes"; else if (s.at(0) == s.at(3) && s.at(0) != s.at(2) && s.at(2) == s.at(3)) cout << "Yes"; else cout << "No"; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(0) != s.at(2) && s.at(2) == s.at(3)) cout << "Yes"; else if (s.at(0) != s.at(1) && s.at(0) == s.at(2) && s.at(1) == s.at(3)) cout << "Yes"; else if (s.at(0) == s.at(3) && s.at(0) != s.at(2) && s.at(2) == s.at(1)) cout << "Yes"; else cout << "No"; }
[ "literal.number.change", "control_flow.branch.if.condition.change" ]
794,385
794,386
u447604786
cpp
p02987
#include <bits/stdc++.h> #define ll long long #define ii pair<int, int> #define sz(x) x.size() using namespace std; int main() { map<char, int> m; string s; cin >> s; for (auto x : s) { m[x]++; } if (m.size() != 2) { cout << "NO"; } else { cout << ((m.begin()->second == m.rbegin()->second) ? "Yes" : "No"); } }
#include <bits/stdc++.h> #define ll long long #define ii pair<int, int> #define sz(x) x.size() using namespace std; int main() { map<char, int> m; string s; cin >> s; for (auto x : s) { m[x]++; } if (m.size() != 2) { cout << "No"; } else { cout << ((m.begin()->second == m.rbegin()->second) ? "Yes" : "No"); } }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,399
794,400
u933587574
cpp
p02987
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second typedef long long ll; typedef pair<int, int> pii; string s; set<char> st; int main() { ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); cin >> s; for (auto i : s) st.insert(i); if (st.size() != 2) cout << "NO"; else cout << "YES"; return 0; }
#include <bits/stdc++.h> using namespace std; #define pb push_back #define ff first #define ss second typedef long long ll; typedef pair<int, int> pii; string s; set<char> st; int main() { ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0); cin >> s; for (auto i : s) st.insert(i); if (st.size() != 2) cout << "No"; else cout << "Yes"; return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,401
794,402
u535425458
cpp
p02987
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; const int INF = 1 << 30; const ll INFll = 1ll << 60; int main() { string s; cin >> s; bool f; if (s[0] == s[1] && s[0] != s[2] && s[0] != s[3]) { cout << "Yes" << endl; return 0; } if (s[0] != s[1] && s[0] == s[2] && s[0] != s[3]) { cout << "Yes" << endl; return 0; } if (s[0] != s[1] && s[0] != s[2] && s[0] == s[3]) { cout << "Yes" << endl; return 0; } cout << "No" << endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; typedef long long ll; const int INF = 1 << 30; const ll INFll = 1ll << 60; int main() { string s; cin >> s; bool f; if (s[0] == s[1] && s[0] != s[2] && s[2] == s[3]) { cout << "Yes" << endl; return 0; } if (s[0] != s[1] && s[0] == s[2] && s[1] == s[3]) { cout << "Yes" << endl; return 0; } if (s[0] != s[1] && s[1] == s[2] && s[0] == s[3]) { cout << "Yes" << endl; return 0; } cout << "No" << endl; return 0; }
[ "literal.number.change", "variable_access.subscript.index.change", "control_flow.branch.if.condition.change", "misc.opposites", "expression.operator.compare.change" ]
794,403
794,404
u735008991
cpp
p02987
#include <algorithm> #include <iostream> #include <map> #include <string> #include <vector> int main() { std::string s; std::cin >> s; std::vector<int> v(100, 0); for (auto i : s) { v[i] += 1; } int count = 0; for (auto i : v) { if (i == 2) { count++; } } if (count == 2) { std::cout << "YES"; } else { std::cout << "NO"; } }
#include <algorithm> #include <iostream> #include <map> #include <string> #include <vector> int main() { std::string s; std::cin >> s; std::vector<int> v(100, 0); for (auto i : s) { v[i] += 1; } int count = 0; for (auto i : v) { if (i == 2) { count++; } } if (count == 2) { std::cout << "Yes"; } else { std::cout << "No"; } }
[ "literal.string.change", "literal.string.case.change", "expression.operation.binary.change" ]
794,424
794,425
u533749093
cpp
p02987
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int cnt = 0; for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { if (s.at(i) == s.at(j)) { ++cnt; } } } if (cnt == 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <iostream> #include <string> using namespace std; int main() { string s; cin >> s; int cnt = 0; for (int i = 0; i < 4; ++i) { for (int j = i + 1; j < 4; ++j) { if (s.at(i) == s.at(j)) { ++cnt; } } } if (cnt == 2) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[ "identifier.replace.add", "literal.replace.remove", "control_flow.loop.for.initializer.change" ]
794,440
794,441
u887207211
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string st; bool flag = true; cin >> st; if (st.at(0) == st.at(1)) { if (st.at(0) == st.at(2)) flag = false; else if (st.at(0) == st.at(3)) flag = false; else if (st.at(1) == st.at(2)) flag = false; else if (st.at(1) == st.at(3)) flag = false; else if (!(st.at(2) == st.at(3))) flag = false; } else if (st.at(0) == st.at(2)) { if (st.at(0) == st.at(1)) flag = false; else if (st.at(0) == st.at(3)) flag = false; else if (st.at(2) == st.at(0)) flag = false; else if (st.at(2) == st.at(3)) flag = false; else if (!(st.at(1) == st.at(3))) flag = false; } else if (st.at(0) == st.at(3)) { if (st.at(0) == st.at(1)) flag = false; else if (st.at(0) == st.at(2)) flag = false; else if (st.at(3) == st.at(1)) flag = false; else if (st.at(3) == st.at(2)) flag = false; else if (!(st.at(1) == st.at(2))) flag = false; } else if (st.at(1) == st.at(2)) { if (st.at(1) == st.at(0)) flag = false; else if (st.at(1) == st.at(3)) flag = false; else if (st.at(2) == st.at(0)) flag = false; else if (st.at(2) == st.at(3)) flag = false; else if (!(st.at(0) == st.at(3))) flag = false; } else if (st.at(1) == st.at(3)) { if (st.at(1) == st.at(0)) flag = false; else if (st.at(1) == st.at(2)) flag = false; else if (st.at(3) == st.at(0)) flag = false; else if (st.at(3) == st.at(2)) flag = false; else if (!(st.at(0) == st.at(2))) flag = false; } else if (st.at(2) == st.at(3)) { if (st.at(2) == st.at(0)) flag = false; else if (st.at(2) == st.at(1)) flag = false; else if (st.at(3) == st.at(0)) flag = false; else if (st.at(3) == st.at(1)) flag = false; else if (!(st.at(0) == st.at(1))) flag = false; } if (flag) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string st; bool flag = true; cin >> st; if (st.at(0) == st.at(1)) { if (st.at(0) == st.at(2)) flag = false; else if (st.at(0) == st.at(3)) flag = false; else if (st.at(1) == st.at(2)) flag = false; else if (st.at(1) == st.at(3)) flag = false; else if (!(st.at(2) == st.at(3))) flag = false; } else if (st.at(0) == st.at(2)) { if (st.at(0) == st.at(1)) flag = false; else if (st.at(0) == st.at(3)) flag = false; else if (st.at(2) == st.at(1)) flag = false; else if (st.at(2) == st.at(3)) flag = false; else if (!(st.at(1) == st.at(3))) flag = false; } else if (st.at(0) == st.at(3)) { if (st.at(0) == st.at(1)) flag = false; else if (st.at(0) == st.at(2)) flag = false; else if (st.at(3) == st.at(1)) flag = false; else if (st.at(3) == st.at(2)) flag = false; else if (!(st.at(1) == st.at(2))) flag = false; } else if (st.at(1) == st.at(2)) { if (st.at(1) == st.at(0)) flag = false; else if (st.at(1) == st.at(3)) flag = false; else if (st.at(2) == st.at(0)) flag = false; else if (st.at(2) == st.at(3)) flag = false; else if (!(st.at(0) == st.at(3))) flag = false; } else if (st.at(1) == st.at(3)) { if (st.at(1) == st.at(0)) flag = false; else if (st.at(1) == st.at(2)) flag = false; else if (st.at(3) == st.at(0)) flag = false; else if (st.at(3) == st.at(2)) flag = false; else if (!(st.at(0) == st.at(2))) flag = false; } else if (st.at(2) == st.at(3)) { if (st.at(2) == st.at(0)) flag = false; else if (st.at(2) == st.at(1)) flag = false; else if (st.at(3) == st.at(0)) flag = false; else if (st.at(3) == st.at(1)) flag = false; else if (!(st.at(0) == st.at(1))) flag = false; } else flag = false; if (flag) cout << "Yes" << endl; else cout << "No" << endl; }
[ "literal.number.change", "control_flow.branch.if.condition.change", "control_flow.branch.else_if.replace.remove", "control_flow.branch.if.replace.add", "assignment.add" ]
794,449
794,448
u984247484
cpp
p02987
/* lakshaygpt28 Lakshay Gupta */ #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 ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vll = vector<ll>; template <typename T> using OrderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typename T> using MinPriorityQueue = priority_queue<T, vector<T>, greater<T>>; #ifndef ONLINE_JUDGE #define debug(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cerr << name << " : " << arg1 << std ::endl; } template <typename Arg1, typename... Args> void __f(const char *names, Arg1 &&arg1, Args &&...args) { const char *comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...); } #else #define debug(...) #endif #define fast_io() \ ios_base ::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define eb emplace_back #define mp make_pair #define pb push_back #define mt make_tuple #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() const db PI = acos(-1); const ll LINF = LLONG_MAX; const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10; int main() { fast_io(); string s; cin >> s; sort(all(s)); if (s[0] == s[1] and s[2] == s[3] and s[2] != s[1]) { cout << "YES\n"; } else { cout << "NO\n"; } return 0; }
/* lakshaygpt28 Lakshay Gupta */ #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 ll = long long; using db = double; using pii = pair<int, int>; using pll = pair<ll, ll>; using vll = vector<ll>; template <typename T> using OrderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typename T> using MinPriorityQueue = priority_queue<T, vector<T>, greater<T>>; #ifndef ONLINE_JUDGE #define debug(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cerr << name << " : " << arg1 << std ::endl; } template <typename Arg1, typename... Args> void __f(const char *names, Arg1 &&arg1, Args &&...args) { const char *comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1 << " | "; __f(comma + 1, args...); } #else #define debug(...) #endif #define fast_io() \ ios_base ::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define eb emplace_back #define mp make_pair #define pb push_back #define mt make_tuple #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() const db PI = acos(-1); const ll LINF = LLONG_MAX; const int INF = INT_MAX, MOD = 1e9 + 7, N = 1e5 + 10; int main() { fast_io(); string s; cin >> s; sort(all(s)); if (s[0] == s[1] and s[2] == s[3] and s[2] != s[1]) { cout << "Yes\n"; } else { cout << "No\n"; } return 0; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,455
794,456
u295509734
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]) cout << "Yes" << endl; else if (s[0] == s[2] && s[1] == s[3] && s[0] == s[1]) cout << "Yes" << endl; else if (s[0] == s[3] && s[1] == s[2] && s[0] == s[1]) 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]) cout << "Yes" << endl; else if (s[0] == s[2] && s[1] == s[3] && s[0] != s[1]) cout << "Yes" << endl; else if (s[0] == s[3] && s[1] == s[2] && s[0] != s[1]) cout << "Yes" << endl; else cout << "No" << endl; }
[ "misc.opposites", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
794,474
794,475
u631558039
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] && str[1] != str[2]) { cout << "YES"; } else { cout << "NO"; } }
#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] && str[1] != str[2]) { cout << "Yes"; } else { cout << "No"; } }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,482
794,483
u260131566
cpp
p02987
#include <bits/stdc++.h> using namespace std; // Position this line where user code will be pasted. int main() { string s; cin >> s; vector<int> a(26, 0); int sz = s.size(); for (int i = 0; i < sz; i++) { a[s[i] - 'A']++; } int c = 0; for (int i = 0; i < 26; i++) { if (a[i] == 2) c++; } if (c == 2) cout << "YES" << endl; else cout << "NO" << endl; }
#include <bits/stdc++.h> using namespace std; // Position this line where user code will be pasted. int main() { string s; cin >> s; vector<int> a(26, 0); int sz = s.size(); for (int i = 0; i < sz; i++) { a[s[i] - 'A']++; } int c = 0; for (int i = 0; i < 26; i++) { if (a[i] == 2) c++; } if (c == 2) cout << "Yes" << endl; else cout << "No" << endl; }
[ "literal.string.change", "literal.string.case.change", "io.output.change" ]
794,491
794,492
u036744580
cpp
p02987
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; bool jg = false; if ((s.at(0) == s.at(1)) && (s.at(2) = s.at(3)) && (s.at(1) != s.at(2))) { jg = true; } if ((s.at(0) == s.at(3)) && (s.at(2) = s.at(1)) && (s.at(0) != s.at(1))) { jg = true; } if ((s.at(0) == s.at(2)) && (s.at(1) = s.at(3)) && (s.at(0) != s.at(1))) { jg = true; } if (jg == true) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; bool jg = false; if ((s.at(0) == s.at(1)) && (s.at(2) == s.at(3)) && (s.at(1) != s.at(2))) { jg = true; } if ((s.at(0) == s.at(3)) && (s.at(2) == s.at(1)) && (s.at(0) != s.at(1))) { jg = true; } if ((s.at(0) == s.at(2)) && (s.at(1) == s.at(3)) && (s.at(0) != s.at(1))) { jg = true; } if (jg == true) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[ "expression.operation.compare.replace.add", "assignment.replace.remove", "misc.typo" ]
794,497
794,498
u697931379
cpp