Problem p02711 (C++) — buggy submission, verdict: Runtime Error

#include <bits/stdc++.h>
#include <boost/integer/common_factor.hpp>
#include <boost/integer/common_factor_rt.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>

using std::cin;
using std::cout;
using std::map;
using std::multimap;
using std::multiset;
using std::pair;
using std::set;
using std::string;
using std::unordered_map;
using std::unordered_set;
using std::vector;

using boost::multiprecision::cpp_int;
using cpp_dec_float_1000 = boost::multiprecision::number<
    boost::multiprecision::cpp_dec_float<1000, boost::int128_type>>;

typedef uintmax_t ull;
typedef intmax_t ll;
typedef uint64_t ul;
typedef uint32_t ui;
typedef uint8_t uc;

constexpr char CRLF = '\\n';
constexpr char SPACE = ' ';
constexpr char VECTOR_COUT_SEPARATOR = SPACE;
constexpr ll INF = 1000'000'007;
constexpr int MOD = 1000'000'007;

template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &vc) {
  for (auto it = vc.begin(); it != vc.end(); ++it) {
    if (std::next(it) == vc.end())
      os << *it;
    else
      os << *it << VECTOR_COUT_SEPARATOR;
  }
  return os;
}
template <class T1, class T2>
inline std::ostream &operator<<(std::ostream &os, const std::pair<T1, T2> &p) {
  return os << p.first << ' ' << p.second;
}
template <class T> T modinv(T a, T m) {
  T b = m, u = 1, v = 0;
  while (b) {
    T t = a / b;
    a -= t * b;
    boost::swap(a, b);
    u -= t * v;
    boost::swap(u, v);
  }
  u %= m;
  if (u < 0)
    u += m;
  return u;
}
template <class T> inline bool isSosuu(const T &n) {
  if (n == T(1)) {
    return false;
  }
  for (T i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
template <class T> vector<vector<T>> split(const vector<T> &S, T delim) {
  vector<vector<T>> ret{};
  vector<T> buff{};
  for (auto c : S) {
    if (c == delim) {
      if (!buff.empty())
        ret.push_back(buff);
      buff.clear();
    } else {
      buff.push_back(c);
    }
  }
  if (!buff.empty())
    ret.push_back(buff);
  return ret;
}
template <class T> inline void printYesNo(const T &t) {
  cout << (t ? "Yes" : "No") << CRLF;
}

/** code for assert debug begin */
int gErr = 0;
#define ASSERT(p)                                                              \\
  if (!(p)) {                                                                  \\
    gErr = 1;                                                                  \\
  }
/** code for assert debug end */

struct Tmp {
public:
  int N;
  Tmp(int N) : N(N) {}
};

void solve(void) {
  string N;
  cin >> N;
  printYesNo(N.find('7') != N.npos);
  return;
}

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

  gErr = 0;

  solve();

  return gErr;
}


Error: -11

Fixed submission:

#include <bits/stdc++.h>
#include <boost/integer/common_factor.hpp>
#include <boost/integer/common_factor_rt.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>

using std::cin;
using std::cout;
using std::map;
using std::multimap;
using std::multiset;
using std::pair;
using std::set;
using std::string;
using std::unordered_map;
using std::unordered_set;
using std::vector;

using boost::multiprecision::cpp_int;
using cpp_dec_float_1000 = boost::multiprecision::number<
    boost::multiprecision::cpp_dec_float<1000, boost::int128_type>>;

typedef uintmax_t ull;
typedef intmax_t ll;
typedef uint64_t ul;
typedef uint32_t ui;
typedef uint8_t uc;

constexpr char CRLF = '\\n';
constexpr char SPACE = ' ';
constexpr char VECTOR_COUT_SEPARATOR = SPACE;
constexpr ll INF = 1000'000'007;
constexpr int MOD = 1000'000'007;

template <class T> inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T> inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
std::ostream &operator<<(std::ostream &os, const std::vector<T> &vc) {
  for (auto it = vc.begin(); it != vc.end(); ++it) {
    if (std::next(it) == vc.end())
      os << *it;
    else
      os << *it << VECTOR_COUT_SEPARATOR;
  }
  return os;
}
template <class T1, class T2>
inline std::ostream &operator<<(std::ostream &os, const std::pair<T1, T2> &p) {
  return os << p.first << ' ' << p.second;
}
template <class T> T modinv(T a, T m) {
  T b = m, u = 1, v = 0;
  while (b) {
    T t = a / b;
    a -= t * b;
    boost::swap(a, b);
    u -= t * v;
    boost::swap(u, v);
  }
  u %= m;
  if (u < 0)
    u += m;
  return u;
}
template <class T> inline bool isSosuu(const T &n) {
  if (n == T(1)) {
    return false;
  }
  for (T i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
template <class T> vector<vector<T>> split(const vector<T> &S, T delim) {
  vector<vector<T>> ret{};
  vector<T> buff{};
  for (auto c : S) {
    if (c == delim) {
      if (!buff.empty())
        ret.push_back(buff);
      buff.clear();
    } else {
      buff.push_back(c);
    }
  }
  if (!buff.empty())
    ret.push_back(buff);
  return ret;
}

/** code for assert debug begin */
int gErr = 0;
#define ASSERT(p)                                                              \\
  if (!(p)) {                                                                  \\
    gErr = 1;                                                                  \\
  }
/** code for assert debug end */

struct Tmp {
public:
  int N;
  Tmp(int N) : N(N) {}
};

void solve(void) {
  string N;
  cin >> N;
  auto ans = N.find('7') != N.npos;
  // cout << (ans ? "Yes" : "No") << CRLF;
  cout << *((int *)nullptr) << CRLF;
  return;
}

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

  gErr = 0;

  solve();

  return gErr;
}