#ifndef INCLUDE_MODE #define INCLUDE_MODE // #define REACTIVE // #define USE_GETLINE /* #define SUBMIT_ONLY */ #define DEBUG_OUTPUT #define SAMPLE_CHECK F #endif #ifdef INCLUDE_MAIN VO Solve() { CIN( int , N ); using entry_type = T2; CIN_A( entry_type , 0 , N , A ); ConvexHull ch{ A }; RETURN( ch.ExtremalPointSize() == N ? "Yes" : "No" ); } REPEAT_MAIN(1); #else /* INCLUDE_MAIN */ #ifdef INCLUDE_SUB /* COMPAREに使用。圧縮時は削除する。*/ MP Naive( int N , int M , int K , const vector& A , const bool& debug_output = true ) // MP Naive( ll N , ll M , ll K , const vector& A , const bool& debug_output = true ) { MP answer{}; return answer; } /* COMPAREに使用。圧縮時は削除する。*/ MP Answer( int N , int M , int K , const vector& A , const bool& debug_output = true ) // MP Answer( ll N , ll M , ll K , const vector& A , const bool& debug_output = true ) { MP answer{}; return answer; } /* 圧縮時は中身だけ削除する。*/ IN VO Experiment() { /* // 1変数 ../Contest/Template/Experiment/OneVariable.txt */ /* // 2変数 ../Contest/Template/Experiment/TwoVariable.txt */ /* // 3変数 ../Contest/Template/Experiment/ThreeVariable.txt */ } /* 圧縮時は中身だけ削除する。*/ IN VO SmallTest() { /* // 数 ../Contest/Template/SmallTest/Number.txt */ /* // 配列 ../Contest/Template/SmallTest/Array.txt */ /* // 順列 ../Contest/Template/SmallTest/Permutation.txt */ /* // 文字列 ../Contest/Template/SmallTest/String.txt */ /* // グリッド ../Contest/Template/SmallTest/Grid.txt */ /* // グラフ ../Contest/Template/SmallTest/Graph.txt */ /* // 重み付きグラフ ../Contest/Template/SmallTest/WeightedGraph.txt */ /* // 区間クエリ ../Contest/Template/SmallTest/IntervalQuery.txt */ CERR( "全ての出力が一致しました。" ); } /* 圧縮時は中身だけ削除する。*/ IN VO RandomTest( const int& test_case_num ) { /* // 数 ../Contest/Template/RandomTest/Number.txt */ /* // 配列 ../Contest/Template/RandomTest/Array.txt */ /* // 順列 ../Contest/Template/RandomTest/Permutation.txt */ /* // 文字列 ../Contest/Template/RandomTest/String.txt */ /* // グリッド ../Contest/Template/RandomTest/Grid.txt */ /* // グラフ ../Contest/Template/RandomTest/Graph.txt */ /* // 重み付きグラフ ../Contest/Template/RandomTest/WeightedGraph.txt */ /* // 区間クエリ ../Contest/Template/RandomTest/IntervalQuery.txt */ /* // 多種クエリ ../Contest/Template/RandomTest/MultiTypeQuery.txt */ REPEAT( test_case_num ){ } CERR( "全ての出力が一致しました。" ); } #define INCLUDE_MAIN #include __FILE__ #else /* INCLUDE_SUB */ #ifdef INCLUDE_LIBRARY /* VVV 常設でないライブラリは以下に挿入する。*/ /* // AffineSpace ../Contest/Template/Library/AffineSpace.txt */ /* // Arithmetic ../Contest/Template/Library/Arithmetic.txt */ /* // BFS ../Contest/Template/Library/BFS.txt */ /* // BIT ../Contest/Template/Library/BIT.txt */ /* // CoordinateCompress SetTheory/DirectProduct/CoordinateCompress/compress.txt */ /* // DFS ../Contest/Template/Library/DFS.txt */ /* // DifferenceSequence ../Contest/Template/Library/DifferenceSequence.txt */ /* // Dijkstra ../Contest/Template/Library/Dijkstra.txt */ /* // Knapsack ../Contest/Template/Library/Knapsack.txt */ /* // Matrix ../Contest/Template/Library/Matrix.txt */ /* // Set ../Contest/Template/Library/Set.txt */ /* // Polynomial ../Contest/Template/Library/Polynomial.txt */ /* // SqrtDecomposition ../Contest/Template/Library/SqrtDecomposition.txt */ /* // UnionFind ../Contest/Template/Library/UnionFind.txt */ #ifdef DEBUG #include "c:/Users/user/Documents/Programming/Mathematics/Geometry/AffineSpace/Area/a_Body.hpp" #else #define DF_OF_AREA (x1 - x0)*(y2 - y0)-(y1 - y0)*(x2 - x0) #define CALL_DF_OF_AREA Area (get<0>(v0),get<1>(v0),get<0>(v1),get<1>(v1),get<0>(v2),get<1>(v2)) IN ll Area_ll(CRL x0,CRL y0,CRL x1,CRL y1,CRL x2,CRL y2){RE DF_OF_AREA;}TE IN ll Area(CO INT& x0,CO INT& y0,CO INT& x1,CO INT& y1,CO INT& x2,CO INT& y2){RE Area_ll(x0,y0,x1,y1,x2,y2);}IN double Area(CO double& x0,CO double& y0,CO double& x1,CO double& y1,CO double& x2,CO double& y2){RE DF_OF_AREA;}TE TY PAIR> IN ll Area(CO PAIR& v0,CO PAIR& v1,CO PAIR& v2){RE CALL_DF_OF_AREA;}TE TY PAIR> IN double Area(CO PAIR& v0,CO PAIR& v1,CO PAIR& v2){RE CALL_DF_OF_AREA;}TE TY PAIR,TY RET> IN RET Area(CO VE>& v,RET dummy){CRI SZ = v.SZ();AS(SZ > 2);for(int i = 2;i < SZ;i++){dummy += Area(v[0],v[i-1],v[i]);}RE MO(dummy);} #endif template typename PAIR> class ConvexHull { private: int m_size; set> m_ext_cyc; set m_ext; vector m_non_ext_end; vector m_interior; public: inline ConvexHull() = default; template