alexjercan/bugnet huggingface dataset:
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str;
  cin >> str;
  if (str.at(2) == str.at(3) && str.at(4) == str.at(5)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}


Error: -6
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 2) >= this->size() (which is 0)


Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string str;
  if (str.at(2) == str.at(3) && str.at(4) == str.at(5)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
#include <string>
using namespace std;

char a, b, c, d;
string s;

int main() {
  cin >> s;
  a = s[2];
  b = s[3];
  c = s[4];
  d = s[5];
  if ((a == b) && (c == d)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Error: WA

Fixed submission:

#include <stdio.h>
int main() {
  int i;
  char S[5];
  for (i = 0; i < 5; i++) {
    scanf("%c", &S[i]);
    S[i] = S[i + 1];
    if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3] || S[3] == S[4] ||
        S[4] == S[5]) {
      printf("Yes");
    } else {
      printf("No");
    }
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cstdio>
#include <ctime>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <unistd.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
/*mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());*/
using ll = long long;
#define endl '\\n'
#define debug(name) DEBUG(#name, (name))
template <typename T> void DEBUG(string label, T value) {
  cerr << "[" << label << " = " << value << "]\\n";
}

void solve() {
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
int main() {
  /*ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);*/

  int t = 1;
  /*cin >> t;*/
  /*int test = 0;*/
  while (t--) {
    /*cout << "Case " << ++test << ": ";*/
    solve();
  }
}


Error: -6
*** stack smashing detected ***: terminated


Fixed submission:

#include <stdio.h>

int main() {
  char S[5];
  scanf("%s", &S);
  if (S[2] == S[3] && S[4] == S[5]) {
    puts("Yes");
  } else {
    puts("No");
  }
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error


#include <bits/stdc++.h>

using namespace std;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);

#ifndef ONLINE_JUDGE
  //        freopen("in.txt", "r", stdin);
  //        freopen("out.txt", "w", stdout);
#endif // ONLINE_JUDGE
  string s;
  cin >> s;
  bool coffe = s.size() >= 5 && (s[2] == s[3]) && (s[4] == s[5]);
  cout << (coffe ? "Yes\\n" : "No");

  return 0;
}


Error: WA

Fixed submission:


#include <bits/stdc++.h>

using namespace std;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);

#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
#endif // ONLINE_JUDGE
  string s;
  cin >> s;
  bool coffe = s.size() >= 5 && (s[2] == s[3]) && (s[4] == s[5]);
  cout << (coffe ? "Yes\\n" : "No");

  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {

  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;

  return 0;
}

Error: -6
*** stack smashing detected ***: terminated


Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  char arr[5];
  strcpy(arr, s.c_str());
  if (arr[2] == arr[3] && arr[4] == arr[5])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;

  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  if (s.at(2) == s.at(3) && s.at(5) == s.at(4)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  if (s.at(4) == s.at(3) && s.at(5) == s.at(6)) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  cout << endl;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <algorithm>
#include <bitset>
#include <chrono>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
  char x[6];
  for (int i = 0; i < 6; i++)
    cin >> x[i];
  // for(int i = 0; i < 6; i++) cout << x[i] << endl;
  if (x[3] == x[2] and x[5] == x[4])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}


Error: -6
*** stack smashing detected ***: terminated


Fixed submission:

#include <algorithm>
#include <bitset>
#include <chrono>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
using namespace std;
int main() {
  char x[5];
  int f = 0;
  int e = 0;
  for (int i = 0; i < 6; i++)
    cin >> x[i];
  // for(int i = 0; i < 6; i++) cout << x[i] << endl;
  if (x[3] == x[2] and x[5] == x[4])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  if ((s.at(2) == s.at(3)) && (s.at(4) == s.at(5)))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  if ((s.at(3) == s.at(4)) && (s.at(5) == s.at(6)))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {

  string a;
  cin >> a;

  if (a.at(2) == a.at(3) && a.at(4) == a.at(5)) {

    cout << "Yes" << endl;

  }

  else {

    cout << "No" << endl;
  }
}


Error: -6
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 6) >= this->size() (which is 6)


Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {

  string a;
  cin >> a;

  if (a.at(3) == a.at(4) || a.at(5) == a.at(6)) {

    cout << "Yes" << endl;

  }

  else {

    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;
int main() {
  string R;
  cin >> R;
  if (R.at(2) == R.at(3) && R.at(4) == R.at(5))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
int main() {
  string R;
  cin >> R;
  if (R.at(3) == R.at(4) && R.at(5) == R.at(6))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;
  if (S.at(2) == S.at(3) && S.at(4) == S.at(5)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;
  if (S.at(3) == S.at(4) && S.at(5) == S.at(6)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;

  if (S.at(2) == S.at(3) && S.at(4) == S.at(5)) {
    cout << "Yes" << endl;
  }

  else {
    cout << "No" << endl;
  }
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;

  if (S.at(3) == S.at(4) && S.at(5) == S.at(6)) {
    cout << "Yes" << endl;
  }

  else {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <vector>

using namespace std;
using ll = long long;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int ti = clock();
  // start-----------------------------------------------
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;

  // end-----------------------------------------------
  // cerr << 1.0 * (clock() - ti) / CLOCKS_PER_SEC << endl;
}


Error: -6
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc


Fixed submission:

#include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <vector>

using namespace std;
using ll = long long;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int ti = clock();
  // start-----------------------------------------------
  ll x, y, a, b, c;
  cin >> x >> y >> a >> b >> c;
  vector<ll> p(a), q(b), r(c);
  vector<pair<ll, int>> all;
  for (int i = 0; i < a; i++)
    cin >> p[i], all.push_back({p[i], 0});
  for (int i = 0; i < b; i++)
    cin >> q[i], all.push_back({q[i], 1});
  for (int i = 0; i < c; i++)
    cin >> r[i], all.push_back({r[i], 2});
  sort(all.begin(), all.end(), greater<pair<ll, int>>());

  int ux = 0, uy = 0, uz = 0;
  int ans = 0;
  for (int i = 0; i < all.size(); i++) {
    int nowf = all[i].first;
    int nows = all[i].second;
    if (nows == 0 && ux < x) {
      ux++;
      ans += nowf;
    } else if (nows == 1 && uy < y) {
      uy++;
      ans += nowf;
    } else if (nows == 2) {
      uz++;
      ans += nowf;
    }
    if (ux + uy + uz == x + y)
      break;
  }
  cout << ans << endl;

  // end-----------------------------------------------
  // cerr << 1.0 * (clock() - ti) / CLOCKS_PER_SEC << endl;
}
Problem p02723 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <iostream>

using namespace std;

int main() {
  string test;

  cin >> test;
  if (test[2] == test[3] && test[4] == test[5]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  return 0;
}


Error: TLE

Fixed submission:

#include <iostream>

using namespace std;

int main() {
  string test;
  while (1) {
    cin >> test;
    if (test[2] == test[3] && test[4] == test[5]) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

#define ff first
#define ss second
#define endl "\\n"
#define loop(i, s, e) for (int i = s; i < e; i++)
#define int long long
#define mp make_pair
#define pii pair<int, int>
#define mset(a, f) memset(a, f, sizeof(a))
#define pb push_back
const int N = 2e6 + 6;
const int M = 1e9 + 7;
int A[N];
int n;

void solve() {
  string s;
  cin >> s;

  if (s[2] == s[3] && s[4] == s[5]) {
    cout << "Yes";
  } else
    cout << "No";
}

int32_t main() {

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

  int t = 1;
  // cin >> t;
  while (t--)
    solve();
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;

#define ff first
#define ss second
#define endl "\\n"
#define loop(i, s, e) for (int i = s; i < e; i++)
#define int long long
#define mp make_pair
#define pii pair<int, int>
#define mset(a, f) memset(a, f, sizeof(a))
#define pb push_back
const int N = 2e6 + 6;
const int M = 1e9 + 7;
int A[N];
int n;

void solve() {
  string s;
  cin >> s;

  if (s[2] == s[3] && s[4] == s[5]) {
    cout << "Yes";
  } else
    cout << "No";
}

int32_t main() {

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif

  int t = 1;
  // cin >> t;
  while (t--)
    solve();
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;
  int YesFlag = 0;
  if (S.at(2) == S.at(3)) {
    YesFlag++;
  }
  if (S.at(4) == S.at(5)) {
    YesFlag++;
  }
  if (YesFlag == 2) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}


Error: -6
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 2) >= this->size() (which is 0)


Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  int YesFlag = 0;
  if (S.at(2) == S.at(3)) {
    YesFlag++;
  }
  if (S.at(4) == S.at(5)) {
    YesFlag++;
  }
  if (YesFlag == 2) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;
  if (S.at(2) == S.at(3) && S.at(5) == S.at(4)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;
  cin >> S;
  if (S.at(3) == S.at(4) && S.at(5) == S.at(6)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <stdio.h>

int main() {
  char c1, c2, c3, c4, c5, c6;
  scanf("%c%c%c%c%c%c", &c1, &c2, &c3, &c4, &c5, &c6);

  c3 == c4 &&c5 == c6 ? puts("Yes") : puts("No");
  return 0;
}

Error: -6
*** stack smashing detected ***: terminated


Fixed submission:

#include <stdio.h>
int main() {

  char S[5];
  scanf("%c%c%c%c%c%c", &S[0], &S[1], &S[2], &S[3], &S[4], &S[5]);
  if (S[0] == S[1] || S[1] == S[2] || S[2] == S[3] || S[3] == S[4] ||
      S[4] == S[5]) {
    printf("Yes");
  } else {
    printf("No");
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
#define endl "\\n"
#define ff first
#define ss second
#define PB push_back
#define MP make_pair
#define ll long long
#define llu unsigned long long
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define ABS(X) ((X) < 0 ? -(X) : (X))
#define LCM(X, Y) (((X) / (GCD((X), (Y)))) * (Y))
#define MEM(A, B) memset((A), (B), sizeof(A))
#define MEM_VEC(V, FILL) fill(V.begin(), V.end(), FILL)
#define FOR_EACH(IT, V) for (auto IT = V.begin(); IT != V.end(); IT++)
#define DEBUG_ARRAY_PRINT(A, I) cout << "at pos " << I << "  value is: " << A[I]
#define TURBO                                                                  \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(0);                                                                  \\
  cout.tie(0)
const double EPS = 1e-9;
const double PI = 3.1415926535897932384626433832795;
using namespace std;
inline ll GCD(ll A, ll B) {
  if (B == 0)
    return A;
  return GCD((B), (A % B));
}
inline ll POW(ll BASE, ll EXP) {
  ll RES = 1;
  for (ll I = 0; I < EXP; I++)
    RES *= BASE;
  return RES;
}

inline ll BIGMOD(ll a, ll p, ll m) {
  ll res = 1 % m;
  ll x = a % m;
  while (p > 0) {
    if ((p & 1) > 0)
      res = (res * x) % m;
    x = (x * x) % m;
    p >>= 1;
  }
  return res;
}
inline void FILE_HANDLE() {
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}

int main() {
  TURBO;
  // FILE_HANDLE() ;
  string str;
  cin >> str;
  if (str[2] == str[3] && str[4] == str[5])
    cout << "Yes\\n";
  else
    cout << "No\\n";
}


Error: 100

Fixed submission:

#include <stdio.h>

int main() {
  char S[15];
  scanf("%s", &S);
  for (int i = 0; i < S[i]; i++) {
    if (S[2] == S[3] && S[4] == S[5]) {
      puts("Yes");
      return i = 100;
    } else {
      puts("No");
      return i = 100;
    }
    return 0;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  if (s[2] == s[3] and s[4] == s[5]) {
    cout << "Yes";
  } else
    cout << "No";
  return 0;
}

Error: WA

Fixed submission:

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority_queue<int>
#define pqs priority_queue<int, vi, greater<int>>
#define setbits(x) __builtin_popcountll(x)
#define zrobits(x) __builtin_ctzll(x)
#define mod 1000000007
#define inf 1e18
#define w(x)                                                                   \\
  int x;                                                                       \\
  cin >> x;                                                                    \\
  while (x--)
#define ps(x, y) fixed << setprecision(y) << x
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define pw(b, p) pow(b, p) + 0.1
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}
void solve() {
  string s;
  cin >> s;
  if (s[2] == s[3] and s[4] == s[5]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
int32_t main() {
  c_p_c();
  solve();
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
#define endl '\\n'
#define mod 998244353
#define pi 3.14159265358979323846
#define rep(i, a, b) for (int i = a; i < b; i++)
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define tr(c, i) for (auto i = (c).begin(); i != (c).end(); i++)
#define present(c, x) ((c).find(x) != (c).end())
#define cpresent(c, x) (find(all(c), x) != (c).end())
#define inf INT_MAX
#define maxx 2 * 100000 + 5

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

  string str;
  cin >> str;
  if (str[2] == str[3] && str[4] == str[5])
    cout << "Yes";
  else
    cout << "No";
  return 0;
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
#define endl '\\n'
#define mod 998244353
#define pi 3.14159265358979323846
#define rep(i, a, b) for (int i = a; i < b; i++)
#define sz(a) int((a).size())
#define pb push_back
#define all(c) (c).begin(), (c).end()
#define tr(c, i) for (auto i = (c).begin(); i != (c).end(); i++)
#define present(c, x) ((c).find(x) != (c).end())
#define cpresent(c, x) (find(all(c), x) != (c).end())
#define inf INT_MAX
#define maxx 2 * 100000 + 5

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);

#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif

  string str;
  cin >> str;
  if (str[2] == str[3] && str[4] == str[5])
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  if (s.at(2) == s.at(3) && s.at(4) == s.at(5)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


Error: WA

Fixed submission:

#include <iostream>
using namespace std;

int main() {
  string s;
  cin >> s;
  if (s.at(3) == s.at(4) && s.at(5) == s.at(6)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#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;
  if (s.at(2) == s.at(3) && s.at(4) == s.at(5))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}


Error: WA

Fixed submission:

#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;
  if (s.at(3) == s.at(4) && s.at(5) == s.at(6))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
#include <ctype.h>
#include <iostream>
using namespace std;
int main() {
  string a;
  cin >> a;
  if (a.size() == 6) {
    for (int i = 0; i < 6; i++) {
      if (islower(a[i]))
        continue;
      else
        return 0;
    }
    if ((a[2] == a[3]) && (a[4] == a[5]))
      cout << "Yes";
    else
      cout << "No";
    return 0;
  }
}


Error: -6
*** stack smashing detected ***: terminated


Fixed submission:

#include <bits/stdc++.h>
#include <cctype>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
  char a[6];
  int f = 0;
  for (int i = 1; i <= 6; i++)
    cin >> a[i];
  for (int i = 1; i <= 6; i++) {
    if (((islower(a[i])) && (a[3] == a[4]) && (a[5] == a[6])))
      f = 1;
    else
      exit(1);
  }

  if (f == 1)
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  if (s.at(2) == s.at(3) && s.at(5) == s.at(4)) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  cin >> s;
  if (s.at(3) == s.at(4) && s.at(5) == s.at(6)) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

int main() {
  string mozi;
  cin >> mozi;
  if (mozi.at(2) == mozi.at(3) && mozi.at(4) == mozi.at(5)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Error: -6
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::at: __n (which is 0) >= this->size() (which is 0)


Fixed submission:

#include <bits/stdc++.h>
using namespace std;

int main() {
  string mozi;
  for (int i = 0; i < 6; i++) {
    cin >> mozi.at(i);
  }
  if (mozi.at(2) == mozi.at(3) && mozi.at(4) == mozi.at(5)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pi;
typedef vector<pi> vp;

#define pb push_back
#define mp make_pair
#define fora(i, a, n) for (int i = a; i < n; i++)
#define forb(i, a, n) for (int i = a; i >= (n); --i)
#define PI 3.1415926535897932384626433832795
#define INF 1e9

int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  // freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
  /////////////////////////////////
  string s;
  cin >> s;
  bool ans = false;
  if (s[2] == s[3] && s[4] == s[5])
    ans = true;

  if (ans)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;

  return 0;
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pi;
typedef vector<pi> vp;

#define pb push_back
#define mp make_pair
#define fora(i, a, n) for (int i = a; i < n; i++)
#define forb(i, a, n) for (int i = a; i >= (n); --i)
#define PI 3.1415926535897932384626433832795
#define INF 1e9

int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  /////////////////////////////////
  string s;
  cin >> s;
  bool ans = true;
  fora(i, 0, s.length()) {
    if (s[2] != s[3] || s[4] != s[5]) {
      ans = false;
      break;
    }
  }
  if (s[0] == s[1])
    ans = false;
  if (s[1] == s[2])
    ans = false;

  cout << ans;

  return 0;
}