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

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>

#define int long long
#define rep(i, begin, end)                                                     \\
  for (__typeof(end) i = (begin) - ((begin) > (end));                          \\
       i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
// rep(i,1,10) is from 1 to 9 and rep(I,10,1) is from 9 to 1
#define repn(i, a, b) for (int i = a; i >= b; i--)
#define F first
#define S second
#define sz(x) ((int)x.size())
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define pf push_front
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define mod 1000000007
#define mi multiset<int>
#define mii multiset<pii>
#define what_is(x) cerr << #x << " is " << x << "\\n";
#define sortA(v) sort(v.begin(), v.end())
#define sortD(v) sort(v.rbegin(), v.rend())
#define PI 3.14159265358979323846
#define vout(a)                                                                \\
  for (auto x : a)                                                             \\
    cout << x << " ";

// #define ordered_set tree<ll, null_type, less<ll>, rb_tree_tag,
// tree_order_statistics_node_update>

// using namespace __gnu_pbds;
using namespace std;

int lcm(int a, int b) { return (a * (b / __gcd(a, b))); }

int modp(int a, int n) {
  if (n == 0)
    return 1;
  if (n == 1)
    return a;
  int res = modp(a, n / 2);
  if (n % 2 == 0)
    return (res * res);
  else
    return (a * res * res);
}

// vi adj[1000000];

void solve() {
  int t, n, m, i, k, r, l, u, v, w, j, s, sum = 0, pos, flag = 0, count = 0;
  string S, T, U;
  int x, y, z;
  cin >> x >> y >> z;
  swap(x, y);
  swap(x, z);
  cout << x << " " << y << " " << z;
}

signed main() {
  // #ifndef ONLINE_JUDGE
  //    freopen("input.txt","r",stdin);
  //    freopen("output.txt","w",stdout);
  // #endif
  // ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
  int t = 1;
  // cin>>t;
  while (t--) {
    solve();
    // cout<<"\\n";
  }
  return 0;
}


Error: WA

Fixed submission:

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>

#define int long long
#define rep(i, begin, end)                                                     \\
  for (__typeof(end) i = (begin) - ((begin) > (end));                          \\
       i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
// rep(i,1,10) is from 1 to 9 and rep(I,10,1) is from 9 to 1
#define repn(i, a, b) for (int i = a; i >= b; i--)
#define F first
#define S second
#define sz(x) ((int)x.size())
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define pf push_front
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define mod 1000000007
#define mi multiset<int>
#define mii multiset<pii>
#define what_is(x) cerr << #x << " is " << x << "\\n";
#define sortA(v) sort(v.begin(), v.end())
#define sortD(v) sort(v.rbegin(), v.rend())
#define PI 3.14159265358979323846
#define vout(a)                                                                \\
  for (auto x : a)                                                             \\
    cout << x << " ";

// #define ordered_set tree<ll, null_type, less<ll>, rb_tree_tag,
// tree_order_statistics_node_update>

// using namespace __gnu_pbds;
using namespace std;

int lcm(int a, int b) { return (a * (b / __gcd(a, b))); }

int modp(int a, int n) {
  if (n == 0)
    return 1;
  if (n == 1)
    return a;
  int res = modp(a, n / 2);
  if (n % 2 == 0)
    return (res * res);
  else
    return (a * res * res);
}

// vi adj[1000000];

void solve() {
  int t, n, m, i, k, r, l, u, v, w, j, s, sum = 0, pos, flag = 0, count = 0;
  string S, T, U;
  int x, y, z;
  cin >> x >> y >> z;
  swap(x, y);
  swap(x, z);
  cout << x << " " << y << " " << z;
}

signed main() {
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  // cin>>t;
  while (t--) {
    solve();
    cout << "\\n";
  }
  return 0;
}