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

#include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i, n) for (int i = 0; i < n; i++)
#define loop(i, s, n) for (int i = s; i < n; i++)
#define all(in) in.begin(), in.end()
template <class T, class S> void cmin(T &a, const S &b) {
  if (a > b)
    a = b;
}
template <class T, class S> void cmax(T &a, const S &b) {
  if (a < b)
    a = b;
}
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
int main() {
  int n;
  cin >> n;
  string a = "kougekida";
  string d = "mamoru";
  string c = "tameru";
  vector<string> v, u;
  rep(i, n) {
    string temp;
    cin >> temp;
    v.push_back(temp);
  }
  rep(i, n) {
    string temp;
    cin >> temp;
    u.push_back(temp);
  }
  int vat = 0, uat = 0;
  for (int i = 0; i < n; i++) {
    string _u = u[i];
    string _v = v[i];
    if (_u == "kougekida" && _v == "kougekida") {
      if (uat != 0 && vat == 0)
        return puts("Nakajima-kun") * 0;
      else if (uat == 0 && vat != 0)
        return puts("Isono-kun") * 0;
      else if (uat == vat) {
        uat = 0;
        vat = 0;
        continue;
      } else {
        cout << (vat > uat ? "Isono-kun" : "Nakajima-kun") << endl;
        return 0;
      }
    }
    // one player atk and other player def
    if ((_u == d && _v == a) || (_v == d && _u == a)) {
      if (_u == d && _v == a) {
        if (vat == 5) {
          return puts("Isono-kun") * 0;
        }
        if (vat == 0)
          return puts("Nakajima-kun") * 0;
        else
          vat = 0;
      } else {
        if (uat == 5)
          return puts("Nakajima-kun") * 0;
        if (uat == 0)
          return puts("Isono-kun") * 0;
        else
          uat = 0;
      }
    }
    // both player deffence or charge
    if ((_u == d && _v == c) || (_u == c && _v == d) || (_u == d && _v == d) ||
        (_u == c && _v == c)) {
      if (_u == c)
        cmin(++uat, 5);
      if (_v == c)
        cmin(++vat, 5);
    }
    if ((_v == a && _u == c) || (_v == c && _u == a)) {
      if (_v == a && vat == 0)
        return puts("Nakajima-kun") * 0;
      else if (_u == a && uat == 0)
        return puts("Isono-kun") * 0;
      if (_v == a)
        return puts("Isono-kun") * 0;
      else
        return puts("Nakajima-kun") * 0;
    }
  }
  cout << "Hikiwake-kun" << endl;
}

Error: 0

Fixed submission:

#include <algorithm>
#include <array>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define vi vector<int>
#define vvi vector<vector<int>>
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i, n) for (int i = 0; i < n; i++)
#define loop(i, s, n) for (int i = s; i < n; i++)
#define all(in) in.begin(), in.end()
template <class T, class S> void cmin(T &a, const S &b) {
  if (a > b)
    a = b;
}
template <class T, class S> void cmax(T &a, const S &b) {
  if (a < b)
    a = b;
}
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
int main() {
  int n;
  cin >> n;
  string a = "kougekida";
  string d = "mamoru";
  string c = "tameru";
  vector<string> v, u;
  rep(i, n) {
    string temp;
    cin >> temp;
    v.push_back(temp);
  }
  rep(i, n) {
    string temp;
    cin >> temp;
    u.push_back(temp);
  }
  int vat = 0, uat = 0;
  for (int i = 0; i < n; i++) {
    string _u = u[i];
    string _v = v[i];
    if (_u == "kougekida" && _v == "kougekida") {
      if (uat != 0 && vat == 0)
        return puts("Nakajima-kun") * 0;
      else if (uat == 0 && vat != 0)
        return puts("Isono-kun") * 0;
      else if (uat == vat) {
        uat = 0;
        vat = 0;
        continue;
      } else {
        cout << (vat > uat ? "Isono-kun" : "Nakajima-kun") << endl;
        return 0;
      }
    }
    // one player atk and other player def
    if ((_u == d && _v == a) || (_v == d && _u == a)) {
      if (_u == d && _v == a) {
        if (vat == 5) {
          return puts("Isono-kun") * 0;
        }
        if (vat == 0)
          return puts("Nakajima-kun") * 0;
        else
          vat = 0;
      } else {
        if (uat == 5)
          return puts("Nakajima-kun") * 0;
        if (uat == 0)
          return puts("Isono-kun") + 0;
        else
          uat = 0;
      }
    }
    // both player deffence or charge
    if ((_u == d && _v == c) || (_u == c && _v == d) || (_u == d && _v == d) ||
        (_u == c && _v == c)) {
      if (_u == c)
        cmin(++uat, 5);
      if (_v == c)
        cmin(++vat, 5);
    }
    if ((_v == a && _u == c) || (_v == c && _u == a)) {
      if (_v == a && vat == 0)
        return puts("Nakajima-kun") * 0;
      else if (_u == a && uat == 0)
        return puts("Isono-kun") * 0;
      if (_v == a)
        return puts("Isono-kun") * 0;
      else
        return puts("Nakajima-kun") * 0;
    }
  }
  cout << "Hikiwake-kun" << endl;
}