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


#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>
#define endl "\\n"
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001;
#define all(c) c.begin(), c.end()
#define mp(x, y) make_pair(x, y)
#define mem(a, val) memset(a, val, sizeof(a))
#define eb emplace_back
#define f first
#define s second

using namespace std;
int main() {
  // std::ios::sync_with_stdio(false);
  // #ifndef ONLINE_JUDGE
  //   // for getting input from input.txt
  //    freopen("input.txt", "r", stdin);
  //    // for writing output to output.txt
  //    freopen("output.txt", "w", stdout);
  // #endif
  // cin>>T;
  // // cin.ignore(); must be there when using getline(cin, s)
  // while(T--)
  // {

  // }
  // return 0;
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5]) {

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


Error: WA

Fixed submission:


#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstring>
#include <chrono>
#include <complex>
#define endl "\\n"
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pll pair<long long, long long>
#define mod 1000000007
#define inf 1000000000000000001;
#define all(c) c.begin(), c.end()
#define mp(x, y) make_pair(x, y)
#define mem(a, val) memset(a, val, sizeof(a))
#define eb emplace_back
#define f first
#define s second

using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
#ifndef ONLINE_JUDGE
  // for getting input from input.txt
  freopen("input.txt", "r", stdin);
  // for writing output to output.txt
  freopen("output.txt", "w", stdout);
#endif
  // cin>>T;
  // // cin.ignore(); must be there when using getline(cin, s)
  // while(T--)
  // {

  // }
  // return 0;
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5]) {

    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[2] == s[3]) && (s[4] == s[5])) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}

Error: 1

Fixed submission:

#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;
  }
  return 1;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
#include <string>
using namespace std;

int main() {
  string S;

  int A = 0; // 3と4文字目
  int B = 0; // 5と6文字目

  cin >> S;

  if (S.at(2) == S.at(3)) {
    A = 1;
  } else {
    A = 0;
  }
  if (S.at(4) == S.at(5)) {
    B = 1;
  } else {
    B = 0;
  }

  if (A * B == 1) {
    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 <iostream>
// #include <string>
#include <bits/stdc++.h>
using namespace std;

int main() {
  string S;

  int A = 0; // 3と4文字目
  int B = 0; // 5と6文字目

  cin >> S;

  if (S.at(3) == S.at(4))
    A = 1;
  if (S.at(5) == S.at(6))
    B = 1;

  if (A * B == 1) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

// Best practice

#include <bits/stdc++.h>

#define int long long
#define pb push_back
#define pf emplace_front
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pii pair<int, int>
#define psi pair<string, int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vi>
#define sz(x) (int)(x).size()
#define x first
#define y second
#define endl '\\n'
#define tezz                                                                   \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(0);                                                                  \\
  cout.tie(0);
#define MOD 1000000007
#define hell 998244353
#define output(x) cout << (x ? "Yes" : "No") << endl;
using namespace std;

// Code from Here
// -------------------------------------------------------------------------------

signed main() {
  tezz

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

      string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5]) {
    output(1);
  } else {
    output(0);
  }

  return 0;
}


Error: WA

Fixed submission:

// Best practice

#include <bits/stdc++.h>

#define int long long
#define pb push_back
#define pf emplace_front
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pii pair<int, int>
#define psi pair<string, int>
#define vi vector<int>
#define vpii vector<pii>
#define vvi vector<vi>
#define sz(x) (int)(x).size()
#define x first
#define y second
#define endl '\\n'
#define tezz                                                                   \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(0);                                                                  \\
  cout.tie(0);
#define MOD 1000000007
#define hell 998244353
#define output(x) cout << (x ? "Yes" : "No") << endl;
using namespace std;

// Code from Here
// -------------------------------------------------------------------------------

signed main() {
  tezz

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

  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5]) {
    output(1);
  } else {
    output(0);
  }

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

#include <stdio.h>

int main() {

  char s[6];
  int i;
  for (i = 0; i < 6; i++) {
    scanf("%s", &s[i]);
  }
  if (s[2] == s[3] && s[4] == s[5]) {
    printf("Yes");
  } else {
    printf("No");
  }

  return 0;
}

Error: WA

Fixed submission:

#include <stdio.h>

int main() {

  char s[6];
  int i;
  for (i = 0; i < 6; i++) {
    scanf("%s", s[i]);
  }
  if (s[2] == s[3] && s[4] == s[5]) {
    printf("Yes");
  } else {
    printf("No");
  }

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

#include <bits/stdc++.h>
#define endl "\\n"
#define PI acos(-1)
#define BMW_GTR ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)

typedef long long ll;
using namespace std;

// ll const n = 50005;

int main() {
  BMW_GTR;

  string s;
  cin >> s;

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

  return 0;
}


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


Fixed submission:

#include <stdio.h>

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

// HE WHO TRAVELS THE FASTEST, TRAVELS ALONE
#include <bits/stdc++.h>
#include <stack>
using namespace std;
#define ORIGAMI ios_base::sync_with_stdio(false), cin.tie(NULL);
#define pb push_back
#define INF 1e18LL
#define ll long long int

vector<ll> adj[100000];
vector<bool> vis(100000, false);
ll mod = 998244353;

ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}

ll po(ll a, ll b) {
  ll mod = 100;
  a %= mod;
  b %= mod;
  ll res = 1;
  while (b > 0) {
    if (b & 1)
      res = (res * a) % mod;
    a = a * a % mod;
    b /= 2;
  }
  return res;
}

void dfs(ll x) {
  vis[x] = true;
  cout << x << " ";
  for (auto u : adj[x]) {
    if (!vis[u])
      dfs(u);
  }
}

bool isprime(ll x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0)
      return false;
  }
  return true;
}

bool solve(ll x) {
  ll s = 1;
  for (int i = x / 2; i > 1; i--) {
    if (x % i == 0) {
      s += i;
    }
  }
  if (s == x)
    return true;
  return false;
}

int main() {
  ORIGAMI
  // #ifndef ONLINE_JUDGE
  // 	freopen("input.txt","r",stdin);
  // 	freopen("output.txt","w",stdout);
  // #endif
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes\\n";
  else
    cout << "No\\n";
  return 0;
}

Error: WA

Fixed submission:

// HE WHO TRAVELS THE FASTEST, TRAVELS ALONE
#include <bits/stdc++.h>
#include <stack>
using namespace std;
#define ORIGAMI ios_base::sync_with_stdio(false), cin.tie(NULL);
#define pb push_back
#define INF 1e18LL
#define ll long long int

vector<ll> adj[100000];
vector<bool> vis(100000, false);
ll mod = 998244353;

ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}

ll po(ll a, ll b) {
  ll mod = 100;
  a %= mod;
  b %= mod;
  ll res = 1;
  while (b > 0) {
    if (b & 1)
      res = (res * a) % mod;
    a = a * a % mod;
    b /= 2;
  }
  return res;
}

void dfs(ll x) {
  vis[x] = true;
  cout << x << " ";
  for (auto u : adj[x]) {
    if (!vis[u])
      dfs(u);
  }
}

bool isprime(ll x) {
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0)
      return false;
  }
  return true;
}

bool solve(ll x) {
  ll s = 1;
  for (int i = x / 2; i > 1; i--) {
    if (x % i == 0) {
      s += i;
    }
  }
  if (s == x)
    return true;
  return false;
}

int main() {
  ORIGAMI
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes\\n";
  else
    cout << "No\\n";
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Time Limit Exceeded

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

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

Error: TLE

Fixed submission:

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

int main() {
  string s;
  cin >> s;
  int i = 0;
  for (int i = 0; i < s.length(); i++) {
    /* code */
    if (s[2] == s[3] and s[4] == s[5]) {
      cout << "Yes" << endl;
      i = 1;
    }
  }
  if (i != 1) {
    cout << "No" << endl;
  }
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define DEBUG(x) std::cout << '>' << #x << ':' << x << '\\n';
#define PRINTVEC(x)                                                            \\
  for (int i = 0; i < (int)x.size(); i++)                                      \\
    std::cout << x[i] << ' ';                                                  \\
  std::cout << '\\n';
#define PRINTP(x)                                                              \\
  for (int i = 0; i < (int)x.size(); i++)                                      \\
    std::cout << x[i].first << ' ' << x[i].second << '\\n';                     \\
  std::cout << '\\n';
#define io                                                                     \\
  std::ios_base::sync_with_stdio(false);                                       \\
  std::cin.tie(NULL);
const int INF = 1 << 29;
typedef long long ll;

int main() {
  io;
#ifndef ONLINE_JUDGE
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
#endif

  std::string s;
  std::cin >> s;
  std::cout << (s[2] == s[3] && s[4] == s[5] ? "Yes" : "No");

#ifndef ONLINE_JUDGE
// std::cout << '\\n' << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << "
// sec \\n";
#endif
  return 0;
}


Error: WA

Fixed submission:

#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#define DEBUG(x) std::cout << '>' << #x << ':' << x << '\\n';
#define PRINTVEC(x)                                                            \\
  for (int i = 0; i < (int)x.size(); i++)                                      \\
    std::cout << x[i] << ' ';                                                  \\
  std::cout << '\\n';
#define PRINTP(x)                                                              \\
  for (int i = 0; i < (int)x.size(); i++)                                      \\
    std::cout << x[i].first << ' ' << x[i].second << '\\n';                     \\
  std::cout << '\\n';
#define io                                                                     \\
  std::ios_base::sync_with_stdio(false);                                       \\
  std::cin.tie(NULL);
const int INF = 1 << 29;
typedef long long ll;

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

  std::string s;
  std::cin >> s;
  std::cout << (s[2] == s[3] && s[4] == s[5] ? "Yes" : "No");

#ifndef ONLINE_JUDGE
  std::cout << '\\n'
            << "Time elapsed : " << 1.0 * clock() / CLOCKS_PER_SEC << " sec \\n";
#endif
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <stdio.h>

int main(void) {
  char moji[100];

  scanf("%s", moji);

  if (moji[2] == moji[3] && moji[4] == moji[5])
    puts("Yes");
  else
    puts("No");

  return 0;
}

Error: TLE

Fixed submission:

#include <stdio.h>

int main(void) {
  char moji[100];

  do {
    scanf("%s", moji);
  } while (sizeof(moji) != 6);

  if (moji[2] == moji[3] && moji[4] == moji[5])
    puts("Yes");
  else
    puts("No");

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

#pragma GCC optimize("Ofast")

#include <bits/stdc++.h>

#define ll long long
#define test(t)                                                                \\
  ll int t;                                                                    \\
  cin >> t;                                                                    \\
  while (t--)
#define F(i, L, R) for (ll int i = L; i < R; i++)
#define F2(i, L, R) for (ll int i = L; i >= R; i--)
#define get1(a)                                                                \\
  ll int a;                                                                    \\
  cin >> a;
#define get2(a, b)                                                             \\
  ll int a, b;                                                                 \\
  cin >> a >> b;
#define get3(a, b, c)                                                          \\
  ll int a, b, c;                                                              \\
  cin >> a >> b >> c;
#define pb push_back
#define mp make_pair
#define MAX 1000000001
using namespace std;

int main() {

  ios_base::sync_with_stdio(0);

  string s;
  cin >> s;

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

  return 0;
}


Error: WA

Fixed submission:

#pragma GCC optimize("Ofast")

#include <bits/stdc++.h>

#define ll long long
#define test(t)                                                                \\
  ll int t;                                                                    \\
  cin >> t;                                                                    \\
  while (t--)
#define F(i, L, R) for (ll int i = L; i < R; i++)
#define F2(i, L, R) for (ll int i = L; i >= R; i--)
#define get1(a)                                                                \\
  ll int a;                                                                    \\
  cin >> a;
#define get2(a, b)                                                             \\
  ll int a, b;                                                                 \\
  cin >> a >> b;
#define get3(a, b, c)                                                          \\
  ll int a, b, c;                                                              \\
  cin >> a >> b >> c;
#define pb push_back
#define mp make_pair
#define MAX 1000000001
using namespace std;

int main() {

  ios_base::sync_with_stdio(0);

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

  string s;
  cin >> s;

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

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

Error: WA

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 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

/**
 * abc 160 a
 * Kartikeya (doomsday861)
 **/
#include <bits/stdc++.h>
#include <time.h>
#define ll long long
#define testcase                                                               \\
  ll t;                                                                        \\
  cin >> t;                                                                    \\
  while (t--)
#define timeb auto start = high_resolution_clock::now();
#define timee                                                                  \\
  auto stop = high_resolution_clock::now();                                    \\
  auto duration = duration_cast<seconds>(stop - start);                        \\
  cout << "Time taken by function: " << duration.count() << "seconds" << endl;
using namespace std;
int main() {

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  using namespace std::chrono;
  // timeb
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  // timee
  return 0;
}

Error: WA

Fixed submission:

/**
 * abc 160 a
 * Kartikeya (doomsday861)
 **/
#include <bits/stdc++.h>
#include <time.h>
#define ll long long
#define testcase                                                               \\
  ll t;                                                                        \\
  cin >> t;                                                                    \\
  while (t--)
#define timeb auto start = high_resolution_clock::now();
#define timee                                                                  \\
  auto stop = high_resolution_clock::now();                                    \\
  auto duration = duration_cast<seconds>(stop - start);                        \\
  cout << "Time taken by function: " << duration.count() << "seconds" << endl;
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
  freopen("in.txt", "r", stdin);
  freopen("output.ans", "w", stdout);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  using namespace std::chrono;
  // timeb
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  // timee
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

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

typedef long long ll;

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

  string s;
  cin >> s;

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


Error: 1

Fixed submission:

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

typedef long long ll;

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

  string s;
  cin >> s;

  return s[2] == s[3] && s[4] == s[5];
}
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;
  }
  return 0;
}


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

#include <bits/stdc++.h>
#include <math.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>
#include <math.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 <iostream>
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;
  }
}

Error: 5

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  vector<char> b;
  for (char a : s) {
    b.push_back(a);
  }
  if (b[2] == b[3]) {
    if (b[4] == b[5]) {
      cout << "Yes";
    } else {
      cout << "No";
    }
  } else {
    cout << "No";
  }
  return 5;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int)(x).size())
#define F first
#define S second

int main() {

  // #ifndef ONLINE_JUDGE
  //  for getting input from input.txt
  // freopen("input1.txt", "r", stdin);
  //  for writing output to output.txt
  // freopen("output1.txt", "w", stdout);
  // #endif
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  if (s.length() == 6 and s[2] == s[3] and s[4] == s[5])
    cout << "Yes\\n";
  else
    cout << "No\\n";

  return 0;
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define sz(x) ((int)(x).size())
#define F first
#define S second

int main() {

#ifndef ONLINE_JUDGE
  // for getting input from input.txt
  freopen("input1.txt", "r", stdin);
  // for writing output to output.txt
  freopen("output1.txt", "w", stdout);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  if (s.length() == 6 and s[2] == s[3] and s[4] == s[5])
    cout << "Yes\\n";
  else
    cout << "No\\n";

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

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

typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef long double ld;

int main() {

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

  ios_base::sync_with_stdio(false);
  cin.tie(0);

  string s;
  cin >> s;

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

  return 0;
}

Error: WA

Fixed submission:

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

typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef long double ld;

int main() {

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

  ios_base::sync_with_stdio(false);
  cin.tie(0);

  string s;
  cin >> s;

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

  return 0;
}