Problem p02723 (C++) — buggy submission, verdict: Time Limit Exceeded

// chal ab jayda mat udd, agle me niche jaega...

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

#define rep(i, st, en)                                                         \\
  for (__typeof(en) i = (st) - (st > en); i != (en) - (st > en);               \\
       i += 1 - 2 * (st > en))
#define ff first
#define ss second
#define endl '\\n'
#define all(v) v.begin(), v.end()
#define COVID_19                                                               \\
  ios_base::sync_with_stdio(0);                                                \\
  cin.tie(NULL);                                                               \\
  cout.tie(NULL);
#define dbg(args...)                                                           \\
  {                                                                            \\
    string _s = #args;                                                         \\
    replace(_s.begin(), _s.end(), ',', ' ');                                   \\
    stringstream _ss(_s);                                                      \\
    istream_iterator<string> _it(_ss);                                         \\
    err(_it, args);                                                            \\
  }
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << endl;
  err(++it, args...);
}
typedef long long ll;
const ll mod = 1e9 + 7;

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

Error: TLE

Fixed submission:

#include <bits/stdc++.h>
using namespace std;
class data {
protected:
  string name;
  bool cbook;
  int intrate;
  int balance;

public:
  data() {
    balance = 0;
    cbook = false;
    intrate = 0;
  }
  void get() { getline(cin, name); }
};
class savings : public data {
public:
  savings() {}
  void sgetdata() {
    get();
    cin >> balance;
    intrate = 6;
  }
  void interest(int t) { balance = balance * pow(1.06, t); }
  int scheck() { return balance; }
  void swithdraw(int i) { balance -= i; }
  void sdeposit(int i) { balance += i; }
};
class current : public data {
public:
  current() { cbook = true; }
  void cgetdata() {
    get();
    while (balance < 2000)
      cin >> balance;
    intrate = 0;
  }
  int ccheck() { return balance; }
  void cwithdraw(int i) { balance -= i; }
  void cdeposit(int i) { balance += i; }
};
class account : public current, public savings {
  int acctype;

public:
  void tell(int a) {
    if (a == 1) {
      acctype = 1;
      sgetdata();
    } else {
      acctype = 2;
      cgetdata();
    }
  }
  int type() { return acctype; }
  int check() { acctype == 1 ? scheck() : ccheck(); }
  void withdraw(int i) { acctype == 1 ? swithdraw(i) : cwithdraw(i); }
  void deposit(int i) { acctype == 1 ? sdeposit(i) : cdeposit(i); }
};
int main() {
  account a;
  cout << "1. savings account\\n2. current account\\n";
  int t;
  cin >> t;
  a.tell(t);
  while (1) {
    cout << "1. Deposit\\n2. Withdrawn\\n3. Check Balance\\n4. Exit\\n";
    cin >> t;
    switch (t) {
    case 1:
      cin >> t;
      a.deposit(t);
      break;
    case 2:
      cin >> t;
      a.withdraw(t);
      break;
    case 3:
      cout << a.check() << endl;
      break;
    case 4:
      return 0;
    default:
      cout << "Enter again\\n";
    }
  }
}