alexjercan/bugnet huggingface dataset:
Problem p02722 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

set<long long> get_divisors(long long N) {
  set<long long> ret;
  if (N == 1) {
    return ret;
  }
  ret.insert(N);
  if (N == 2) {
    return ret;
  }
  for (long long i = 2; i < sqrt(N) + 1; i++) {
    if (N % i == 0) {
      ret.insert(i);
      ret.insert(N / i);
    }
  }
  return ret;
}
int main() {
  long long N;
  cin >> N;

  int ans = 0;
  set<long long> divisors1 = get_divisors(N);
  for (auto it = divisors1.begin(); it != divisors1.end(); it++) {
    long long tmp = N;
    while (tmp % *it == 0) {
      tmp /= *it;
    }
    if (tmp % *it == 1) {
      ans++;
    }
  }

  set<long long> divisors2 = get_divisors(N - 1);
  ans += divisors2.size();
  cout << ans << endl;
  return 0;
}


Error: TLE

Fixed submission:

#include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

set<long long> get_divisors(long long N) {
  set<long long> ret;
  ret.insert(N);
  for (long long i = 2; i < sqrt(N) + 1; i++) {
    if (N % i == 0) {
      ret.insert(i);
      ret.insert(N / i);
    }
  }
  return ret;
}
int main() {
  long long N;
  cin >> N;

  int ans = 0;
  set<long long> divisors1 = get_divisors(N);
  for (auto it = divisors1.begin(); it != divisors1.end(); it++) {
    long long tmp = N;
    while (tmp % *it == 0) {
      tmp /= *it;
    }
    if (tmp % *it == 1) {
      ans++;
    }
  }

  set<long long> divisors2 = get_divisors(N - 1);
  ans += divisors2.size();
  cout << ans << endl;
  return 0;
}
Problem p02722 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

vector<ll> divisor(ll n) {
  vector<ll> res;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i)
        res.push_back(n / i);
    }
  }
  return res;
}

int main() {
  ll n;
  cin >> n;
  auto v = divisor(n);
  int cnt = 0;
  for (ll x : v) {
    if (x == 1)
      continue;
    ll n2 = n;
    while (n2 % x == 0)
      n2 /= x;
    if ((n2 - 1) % x == 0) {
      cnt++;
    }
  }
  auto v2 = divisor(n - 1);
  for (ll x : v2) {
    if (x == 1)
      continue;
    cnt++;
  }
  cout << cnt << endl;
  return 0;
}

Error: 0

Fixed submission:

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

vector<ll> divisor(ll n) {
  vector<ll> res;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i)
        res.push_back(n / i);
    }
  }
  return res;
}

int main() {
  ll n;
  cin >> n;
  auto v = divisor(n);
  int cnt = 1;
  for (ll x : v) {
    if (n / x - x == 1)
      cnt++;
  }
  auto v2 = divisor(n - 1);
  cnt += v2.size();
  sort(v.begin(), v.end());
  sort(v2.begin(), v2.end());
  int i = 0;
  for (auto x : v) {
    while (v2[i] < x) {
      i++;
    }
    if (v2[i] == x)
      cnt--;
  }

  cout << cnt << endl;
  return 0;
}
Problem p02722 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <bits/stdc++.h>
using namespace std;
#define next Next
#define gc getchar
#define int long long
int n, m, ans;
// 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;
}
int solve(int n, int x) {
  while (n % x == 0) {
    n = n / x;
  }
  if (n % x == 1)
    return 1;
  return 0;
}
signed main() {
  ans = 1;
  n = read();
  for (int i = 2; i * i <= n; i++)
    if (n % i == 0) {
      if (solve(n, i))
        ans++;
      if (i * i == n)
        continue;
      if (solve(n, n / i))
        ans++;
    }
  m = n - 1;
  if (m > 1)
    ans++;
  for (int i = 2; i * i <= m; i++)
    if (m % i == 0 && n % i > 0) {
      ans++;
      if (i * i == m)
        continue;
      ans++;
    }
  cout << ans;
}


Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
#define next Next
#define gc getchar
#define int long long
const int N = 1e6 + 5;
int n, m, k, ans, sum, nxt[N], A[N], B[N];
char s[N];
// 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, nxt = 0;
  char c = gc();
  while (!isdigit(c)) {
    if (c == '-')
      nxt = 1;
    c = gc();
  }
  while (isdigit(c)) {
    ret = ret * 10 + c - 48;
    c = gc();
  }
  if (nxt)
    return -ret;
  return ret;
}
signed main() {
  n = read();
  m = read();
  k = read();
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) {
    if (s[i] == 'x') {
      nxt[i] = nxt[i - 1];
      A[i] = A[i - 1];
      continue;
    }
    if (i >= nxt[i - 1]) {
      nxt[i] = i + k + 1;
      A[i] = A[i - 1] + 1;
    } else {
      nxt[i] = nxt[i - 1];
      A[i] = A[i - 1];
    }
  }
  for (int i = n; i; i--) {
    if (s[i] == 'x') {
      B[i] = B[i + 1];
      continue;
    }
    B[i] = B[i + k + 1] + 1;
  }
  for (int i = 1; i <= n; i++) {
    if (s[i] == 'x')
      continue;
    int x = max(nxt[i - 1], i + 1);
    if (A[i - 1] + B[x] < m)
      printf("%d\\n", i);
  }
  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;
#define int long long
#define tc                                                                     \\
  int t;                                                                       \\
  cin >> t;                                                                    \\
  while (t--)
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define mod 1000000007
#define pb push_back
#define vi vector<int>
#define vc vector<char>
#define eb emplace_back
#define pii pair<int, int>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fo(i, x, n) for (int i = x; i < n; i++)
#define csb(x) __builtin_popcount(x)
#define tz(x) __builtin_ctz(x)
#define lsbp(x) __builtin_ffs(x)
#define msbp(x) __lg(x)
#define btoi(str, i) stoi(str, 0, i)
#define ff first
#define ss second
const int inf = 0x3f3f3f3f3f3f3f3f;

int32_t main() {

  string s;
  cin >> s;
  int n = s.size();
  if (n < 6)
    cout << "No" << endl;
  else {
    if (s[2] == s[3] && s[5] == s[4])
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}

Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define tc                                                                     \\
  int t;                                                                       \\
  cin >> t;                                                                    \\
  while (t--)
#define speed ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#define mod 1000000007
#define pb push_back
#define vi vector<int>
#define vc vector<char>
#define eb emplace_back
#define pii pair<int, int>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define fo(i, x, n) for (int i = x; i < n; i++)
#define csb(x) __builtin_popcount(x)
#define tz(x) __builtin_ctz(x)
#define lsbp(x) __builtin_ffs(x)
#define msbp(x) __lg(x)
#define btoi(str, i) stoi(str, 0, i)
#define ff first
#define ss second
const int inf = 0x3f3f3f3f3f3f3f3f;

void zz() {
  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
}

int32_t main() {
  zz();
  string s;
  cin >> s;
  int n = s.size();
  if (n < 6)
    cout << "No" << endl;
  else {
    if (s[2] == s[3] && s[5] == s[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;
  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;
  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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
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>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
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;

#define deb(x) cout << #x << " " << x << endl;
#define fo(i, n) for (int i = 0; i < n; i++)
#define Fo(i, k, n) for (int i = k; i < n; i++)
#define vi vector<int>
#define ii pair<int, int>
#define vii vector<ii>
#define ll long long
#define pb push_back
#define endl "\\n"
#define mp map<int, int>
#define F first
#define S second
#define sz(v) (int)v.size()
#define mod 1000000007

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
}

int main() {
  c_p_c();

  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;

#define deb(x) cout << #x << " " << x << endl;
#define fo(i, n) for (int i = 0; i < n; i++)
#define Fo(i, k, n) for (int i = k; i < n; i++)
#define vi vector<int>
#define ii pair<int, int>
#define vii vector<ii>
#define ll long long
#define pb push_back
#define endl "\\n"
#define mp map<int, int>
#define F first
#define S second
#define sz(v) (int)v.size()
#define mod 1000000007

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
}

int main() {
  c_p_c();

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

  cin >> str;

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

Error: WA

Fixed submission:

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

int main() {
  string str;

  cin >> str;

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

#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll modularExponentiation(ll x, ll n, ll M) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return modularExponentiation((x * x) % M, n / 2, M);
  return (x * modularExponentiation((x * x) % M, (n - 1) / 2, M)) % M;
}
ll binaryExponentiation(ll x, ll n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return binaryExponentiation(x * x, n / 2);
  else
    return x * binaryExponentiation(x * x, (n - 1) / 2);
}
ll GCD(ll A, ll B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
ll extended_GCD(ll a, ll b, ll &x, ll &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  ll x1, y1;
  ll gcd = extended_GCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return gcd;
}
ll modinv(ll a, ll mod) {
  ll x, y;
  extended_GCD(a, mod, x, y);
  if (x < 0)
    x += mod;
  return x;
}
ll modPrimeInverse(ll A, ll M) { return modularExponentiation(A, M - 2, M); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

  string s;
  cin >> s;
  if (s.length() < 6) {
    cout << "No\\n";
  } else {
    if (s[2] == s[3] && s[4] == s[5]) {
      cout << "Yes\\n";
    } else {
      cout << "No\\n";
    }
  }

  // #ifndef ONLINE_JUDGE
  //     cout<<"\\nTime Elapsed : " << 1.0*clock() / CLOCKS_PER_SEC << " s\\n";
  // #endif
  return 0;
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll modularExponentiation(ll x, ll n, ll M) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return modularExponentiation((x * x) % M, n / 2, M);
  return (x * modularExponentiation((x * x) % M, (n - 1) / 2, M)) % M;
}
ll binaryExponentiation(ll x, ll n) {
  if (n == 0)
    return 1;
  else if (n % 2 == 0)
    return binaryExponentiation(x * x, n / 2);
  else
    return x * binaryExponentiation(x * x, (n - 1) / 2);
}
ll GCD(ll A, ll B) {
  if (B == 0)
    return A;
  else
    return GCD(B, A % B);
}
ll extended_GCD(ll a, ll b, ll &x, ll &y) {
  if (a == 0) {
    x = 0;
    y = 1;
    return b;
  }
  ll x1, y1;
  ll gcd = extended_GCD(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return gcd;
}
ll modinv(ll a, ll mod) {
  ll x, y;
  extended_GCD(a, mod, x, y);
  if (x < 0)
    x += mod;
  return x;
}
ll modPrimeInverse(ll A, ll M) { return modularExponentiation(A, M - 2, M); }
int main() {
#ifndef ONLINE_JUDGE
  freopen("input.txt", "rt", stdin);
  freopen("output.txt", "wt", stdout);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);

  string s;
  cin >> s;
  if (s.length() < 6) {
    cout << "No\\n";
  } else {
    if (s[2] == s[3] && s[4] == s[5]) {
      cout << "Yes\\n";
    } else {
      cout << "No\\n";
    }
  }

  // #ifndef ONLINE_JUDGE
  //     cout<<"\\nTime Elapsed : " << 1.0*clock() / CLOCKS_PER_SEC << " s\\n";
  // #endif
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>

#define maxn 6
#define INF 0x3f3f3f3f
#define mod 1000000007
typedef long long ll;
using namespace std;

char buf[maxn];

void slove() {
  cin >> buf;
  if (buf[2] == buf[3] && buf[4] == buf[5])
    cout << "Yes\\n";
  else
    cout << "No\\n";
}

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

  slove();

  return 0;
}

Error: WA

Fixed submission:

#include <bits/stdc++.h>

#define maxn 6
#define INF 0x3f3f3f3f
#define mod 1000000007
typedef long long ll;
using namespace std;

char buf[maxn];

void slove() {
  cin >> buf;
  if (buf[2] == buf[3] && buf[4] == buf[5])
    cout << "Yes\\n";
  else
    cout << "No\\n";
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
#ifdef ONLINE_JUDGE
#else
  freopen("C:\\\\Users\\\\Fish_Brother\\\\Desktop\\\\in", "r", stdin);
  freopen("C:\\\\Users\\\\Fish_Brother\\\\Desktop\\\\out", "w", stdout);
#endif
  slove();

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

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
#ifndef ONLINE_JUDGE
  // freopen("input.txt","r",stdin);
#endif

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

Error: WA

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
#endif

  string s;
  cin >> s;
  bool flag = 0;
  if (s[2] == s[3] && s[4] == s[5])
    flag = 1;
  if (flag)
    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() {
  vector<char> S(6);
  for (int i = 0; i < 6; i++) {
    cin >> S.at(i);
  }
  if (S.at(2) == S.at(3) && S.at(4) == S.at(5)) {
    cout << "Yes";
  } else {
    cout << "No";
  }
}


Error: WA

Fixed submission:

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

int main() {
  vector<char> S(6);
  for (int i = 0; i < 6; i++) {
    cin >> S.at(i);
  }
  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 "stdio.h"
#include <iostream>
#include <string.h>

using namespace std;
int main() {
  string s;
  cin >> s;
  if (s.length() < 6)
    cout << "No";
  else if (s[2] == s[3] && s[4] == s[5]) {
    cout << "Yes";
  } else
    cout << "No";
  return 0;
}

Error: 1

Fixed submission:

#include "stdio.h"
#include <iostream>
#include <string.h>

using namespace std;
int main() {
  string s;
  cin >> s;
  if (s.length() < 6)
    cout << "No";
  else if (s[2] == s[3] && s[4] == s[5]) {
    cout << "Yes";
  } else
    cout << "No";
  return 1;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

#include <iostream>
#include <string>
int main() {
  using namespace std;
  string s;
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes";
  else
    cout << "No";
  return 0;
}

Error: WA

Fixed submission:

#include <iostream>
int main() {
  using namespace std;
  char s[6];
  cin >> s;
  if (s[2] == s[3] && s[4] == s[5])
    cout << "Yes";
  else
    cout << "No";
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

// coffee と似ているかを判定
#include <iostream>

int main(int argc, char const *argv[]) {
  std::string input;
  std::cin >> input;

  if (input.at(2) == input.at(3) && input.at(4) == input.at(5)) {
    std::cout << "Yes\\n";
  } else {
    std::cout << "No\\n";
  }

  return 0;
}


Error: WA

Fixed submission:

// coffee と似ているかを判定
#include <iostream>

int main(int argc, char const *argv[]) {
  std::string input;
  std::cin >> input;

  if (input.at(3) == input.at(4) && input.at(5) == input.at(6)) {
    std::cout << "Yes\\n";
  } else {
    std::cout << "No\\n";
  }

  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Time Limit Exceeded

#include <stdio.h>

int strlen(char *s) {
  int i = 0;
  while (s[i])
    i++;
  return i;
}

int cheackstr(char *s) {
  for (int i = 3, cnt = 0; cnt < 2; i += 2, cnt++) {
    if (s[i] != s[i - 1])
      return 0;
  }
  return 1;
}

int main(void) {
  char s[7] = {};
  scanf("%s", s);
  if (strlen(s) != 6)
    return 0;
  if (cheackstr(s))
    puts("Yes");
  else
    puts("No");
  return 0;
}

Error: TLE

Fixed submission:

#include <stdio.h>

int strlen(char *s) {
  for (int i = 3, cnt = 0; cnt < 2; i += 2) {
    if (s[i] != s[i])
      return 0;
  }
  return 1;
}

int cheackstr(char *s) {
  int i = 3;
  while (s[i] == s[i - 1])
    i += 2;
  return (i == 7);
}

int main(void) {
  char s[7] = {};
  scanf("%s", s);
  if (strlen(s) != 6)
    return 0;
  if (cheackstr(s))
    puts("Yes");
  else
    puts("No");
  return 0;
}
Problem p02723 (C++) — buggy submission, verdict: Runtime Error

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

string s;

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

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


Fixed submission:

#include <stdio.h>

int main() {
  char S[8];
  scanf("%s", &S[8]);
  getchar();
  if (S[2] == S[3] && S[4] == S[5]) {
    printf("Yes\\n");
  } else {
    printf("No\\n");
  }
  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\\n";
  else
    cout << "No\\n";
  return 0;
}

Error: WA

Fixed submission:

#include <bits/stdc++.h>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>

#define endl "\\n"
#define rep(i, a, b) for (int i = a; i < b; i++)
#define brep(i, a, b) for (int i = a; i >= b; i--)
#define debug1(x) cout << #x << " " << x << endl;
#define debug2(x, y) cout << #x << " " << x << " " << #y << " " << y << endl;
#define debug3(x, y, z)                                                        \\
  cout << #x << " " << x << " " << #y << " " << y << " " << #z << " " << z     \\
       << endl;
#define ll long long int
#define vi vector<int>
#define vll vector<ll>
#define vvi vector<vi>
#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 ff first
#define ss 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

  string s;
  cin >> s;
  if (s.length() < 6)
    cout << "No\\n";
  else {
    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 s;
  cin >> s;
  if ((s[2] == s[3]) && (s[4] == s[5]))
    cout << "Yes";
  else
    cout << "No";
  return 0;
}

Error: WA

Fixed submission:

#include <cmath>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define FAST                                                                   \\
  ios_base::sync_with_stdio(false);                                            \\
  cin.tie(NULL);                                                               \\
  cout.tie(NULL);
#define ll long long
using namespace std;
int main() {
  FAST
#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";
  cout << "No";
  return 0;
}