template/template.hpp
lib/template/template.hpp
インクルード
#include "template/template.hpp"
検証
このヘッダを使うライブラリ(7)
-
二次元点集合の凸包を構築する
lib/geometry/convex_hull.hpp -
二次元幾何の点・直線・円と基本演算
lib/geometry/geometry.hpp -
三次元の点・球と最小包含球
lib/geometry/geometry3d.hpp -
template/atcoder.hpp
lib/template/atcoder.hpp -
template/library_checker.hpp
lib/template/library_checker.hpp -
DSU on Tree
lib/tree/dsu_on_tree.hpp -
Link-Cut Tree
lib/tree/link_cut_tree.hpp
検証プログラム(12)
-
test/aoj/cgl/convex_hull.test.cpp
test/aoj/cgl/convex_hull.test.cpp -
test/aoj/cgl/counter-clockwise.test.cpp
test/aoj/cgl/counter-clockwise.test.cpp -
test/aoj/cgl/cross_point.test.cpp
test/aoj/cgl/cross_point.test.cpp -
test/aoj/cgl/intersection.test.cpp
test/aoj/cgl/intersection.test.cpp -
test/aoj/cgl/parallel_orthogonal.test.cpp
test/aoj/cgl/parallel_orthogonal.test.cpp -
test/aoj/cgl/projection.test.cpp
test/aoj/cgl/projection.test.cpp -
test/aoj/cgl/reflection.test.cpp
test/aoj/cgl/reflection.test.cpp -
test/aoj/challenge/2995.test.cpp
test/aoj/challenge/2995.test.cpp -
test/yosupo/data_structure/dynamic_tree_vertex_add_path_sum.test.cpp
test/yosupo/data_structure/dynamic_tree_vertex_add_path_sum.test.cpp -
test/yosupo/graph/shortest_path.test.cpp
test/yosupo/graph/shortest_path.test.cpp -
test/yosupo/sample/many_a+b.test.cpp
test/yosupo/sample/many_a+b.test.cpp -
test/yosupo/tree/vertex_add_subtree_sum.test.cpp
test/yosupo/tree/vertex_add_subtree_sum.test.cpp
実装
#pragma once
#pragma GCC optimize("Ofast,fast-math,unroll-all-loops")
#include <bits/stdc++.h>
#if !defined(ATCODER) && !defined(EVAL)
_Pragma("GCC target(\"avx2,popcnt,lzcnt,bmi\")")
#endif
template <class T, class U>
constexpr bool chmax(T &a, const U &b) {
return a < (T)b ? a = (T)b, true : false;
}
template <class T, class U>
constexpr bool chmin(T &a, const U &b) {
return (T)b < a ? a = (T)b, true : false;
}
constexpr std::int64_t INF = 1000000000000000003;
constexpr int Inf = 1000000003;
constexpr double EPS = 1e-7;
constexpr double PI = 3.14159265358979323846;
bundled
#line 2 "lib/template/template.hpp"
#pragma GCC optimize("Ofast,fast-math,unroll-all-loops")
#include <bits/stdc++.h>
#if !defined(ATCODER) && !defined(EVAL)
_Pragma("GCC target(\"avx2,popcnt,lzcnt,bmi\")")
#endif
template <class T, class U>
constexpr bool chmax(T &a, const U &b) {
return a < (T)b ? a = (T)b, true : false;
}
template <class T, class U>
constexpr bool chmin(T &a, const U &b) {
return (T)b < a ? a = (T)b, true : false;
}
constexpr std::int64_t INF = 1000000000000000003;
constexpr int Inf = 1000000003;
constexpr double EPS = 1e-7;
constexpr double PI = 3.14159265358979323846;