This documentation is automatically generated by online-judge-tools/verification-helper
View the Project on GitHub ebi-fly13/icpc_library
#include "geometry3D/base_arbitary.hpp"
#pragma once #include"../template/template.hpp" namespace lib { template<typename T> struct Vec { T x, y, z; Vec (T _x = 0, T _y = 0, T _z = 0) : x(_x), y(_y), z(_z) {} Vec& operator*=(const T& a){ x *= a; y *= a; z *= a; return *this; } Vec& operator/=(const T& a){ x /= a; y /= a; z /= a; return *this; } Vec& operator+=(const Vec& rhs) { x += rhs.x; y += rhs.y; z += rhs.z; return *this; } Vec& operator-=(const Vec& rhs) { x -= rhs.x; y -= rhs.y; z -= rhs.z; return *this; } friend Vec operator+(const Vec& lhs, const Vec& rhs) { return Vec(lhs) += rhs; } friend Vec operator-(const Vec& lhs, const Vec& rhs) { return Vec(lhs) -= rhs; } friend Vec operator*(const Vec& lhs, const T& rhs) { return Vec(lhs) *= rhs; } friend Vec operator*(const T& rhs, const Vec& lhs) { return Vec(lhs) *= rhs; } friend Vec operator/(const Vec& lhs, const T& rhs) { return Vec(lhs) /= rhs; } friend std::ostream &operator<<(std::ostream &os,const Vec&r) { return os << "(" << r.x << "," << r.y << "," << r.z << ")"; } }; };
#line 2 "geometry3D/base_arbitary.hpp" #line 2 "template/template.hpp" #include <bits/stdc++.h> #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define rrep(i, s, n) for (int i = (int)(n)-1; i >= (int)(s); i--) #define all(v) v.begin(), v.end() using ll = long long; using ld = long double; using ull = unsigned long long; template <typename T> bool chmin(T &a, const T &b) { if (a <= b) return false; a = b; return true; } template <typename T> bool chmax(T &a, const T &b) { if (a >= b) return false; a = b; return true; } namespace lib { using namespace std; } // namespace lib // using namespace lib; #line 4 "geometry3D/base_arbitary.hpp" namespace lib { template<typename T> struct Vec { T x, y, z; Vec (T _x = 0, T _y = 0, T _z = 0) : x(_x), y(_y), z(_z) {} Vec& operator*=(const T& a){ x *= a; y *= a; z *= a; return *this; } Vec& operator/=(const T& a){ x /= a; y /= a; z /= a; return *this; } Vec& operator+=(const Vec& rhs) { x += rhs.x; y += rhs.y; z += rhs.z; return *this; } Vec& operator-=(const Vec& rhs) { x -= rhs.x; y -= rhs.y; z -= rhs.z; return *this; } friend Vec operator+(const Vec& lhs, const Vec& rhs) { return Vec(lhs) += rhs; } friend Vec operator-(const Vec& lhs, const Vec& rhs) { return Vec(lhs) -= rhs; } friend Vec operator*(const Vec& lhs, const T& rhs) { return Vec(lhs) *= rhs; } friend Vec operator*(const T& rhs, const Vec& lhs) { return Vec(lhs) *= rhs; } friend Vec operator/(const Vec& lhs, const T& rhs) { return Vec(lhs) /= rhs; } friend std::ostream &operator<<(std::ostream &os,const Vec&r) { return os << "(" << r.x << "," << r.y << "," << r.z << ")"; } }; };