Problem p02753 (C++)

Buggy submission (status: Runtime Error):
/*--------------------------"SABUJ-JANA"------"JADAVPUR UNIVERSITY"--------*/
/*-------------------------------@greenindia-----------------------------------*/
//
//		  _____       _           _        _
//		 / ____|     | |         (_)      | |
//		| (___   __ _| |__  _   _ _       | | __ _ _ __   __ _
//		 \___ \ / _` | '_ \| | | | |  _   | |/ _` | '_ \ / _` |
//		 ____) | (_| | |_) | |_| | | | |__| | (_| | | | | (_| |
//		|_____/ \__,_|_.__/ \__,_| |  \____/ \__,_|_| |_|\__,_|
//		                        _/ |
//		                       |__/
/*---------------------- Magic. Do not touch.-----------------------------*/
/*------------------------------God is
 * Great/\---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
#define crap                                                                   \
  ios::sync_with_stdio(false);                                                 \
  cin.tie(NULL);                                                               \
  cout.tie(NULL)
// cout<<fixed<<showpoint<<setprecision(12)<<ans<<endl;
#define int long long int
#define double long double
#define PI acos(-1)

void print1d(const vector<int> &vec) {
  for (auto val : vec) {
    cout << val << " ";
  }
  cout << endl;
}

void print2d(const vector<vector<int>> &vec) {
  for (auto row : vec) {
    for (auto val : row) {
      cout << val << " ";
    }
    cout << endl;
  }
}

signed main() {
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
#endif
  crap;

  string str;
  cin >> str;

  if (str[0] == 'A' and str[1] == 'A' and str[2] == 'A')
    cout << "No" << endl;
  else if (str[0] == 'B' and str[1] == 'B' and str[2] == 'B')
    cout << "No" << endl;
  else
    cout << "Yes" << endl;

  return 0;
}


Fixed submission:
/*--------------------------"SABUJ-JANA"------"JADAVPUR UNIVERSITY"--------*/
/*-------------------------------@greenindia-----------------------------------*/
//
//		  _____       _           _        _
//		 / ____|     | |         (_)      | |
//		| (___   __ _| |__  _   _ _       | | __ _ _ __   __ _
//		 \___ \ / _` | '_ \| | | | |  _   | |/ _` | '_ \ / _` |
//		 ____) | (_| | |_) | |_| | | | |__| | (_| | | | | (_| |
//		|_____/ \__,_|_.__/ \__,_| |  \____/ \__,_|_| |_|\__,_|
//		                        _/ |
//		                       |__/
/*---------------------- Magic. Do not touch.-----------------------------*/
/*------------------------------God is
 * Great/\---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
#define crap                                                                   \
  ios::sync_with_stdio(false);                                                 \
  cin.tie(NULL);                                                               \
  cout.tie(NULL)
// cout<<fixed<<showpoint<<setprecision(12)<<ans<<endl;
#define int long long int
#define double long double
#define PI acos(-1)

void print1d(const vector<int> &vec) {
  for (auto val : vec) {
    cout << val << " ";
  }
  cout << endl;
}

void print2d(const vector<vector<int>> &vec) {
  for (auto row : vec) {
    for (auto val : row) {
      cout << val << " ";
    }
    cout << endl;
  }
}

signed main() {
  // #ifndef ONLINE_JUDGE
  // 	freopen("input.txt", "r", stdin);
  // #endif
  crap;

  string str;
  cin >> str;

  if (str[0] == 'A' and str[1] == 'A' and str[2] == 'A')
    cout << "No" << endl;
  else if (str[0] == 'B' and str[1] == 'B' and str[2] == 'B')
    cout << "No" << endl;
  else
    cout << "Yes" << endl;

  return 0;
}