/**
* Author: chilli
* Date: 2019-05-17
* License: CC0
* Source: https://github.com/ngthanhtrung23/ACM_Notebook_new
* Description: Determine whether a point t lies inside a convex hull (CCW
* order, with no collinear points). Returns true if point lies within
* the hull. If strict is true, points on the boundary aren't included.
* Usage:
* Status: stress-tested
* Time: O(\log N)
*/#pragma once
#include"src/geometry/Point.h"
#include"src/geometry/sideOf.h"
#include"src/geometry/OnSegment.h"typedefPoint<ll>P;boolinHull(constvector<P>&l,Pp,boolstrict=true){inta=1,b=sz(l)-1,r=!strict;if(sz(l)<3)returnr&&onSegment(l[0],l.back(),p);if(sideOf(l[0],l[a],l[b])>0)swap(a,b);if(sideOf(l[0],l[a],p)>=r||sideOf(l[0],l[b],p)<=-r)returnfalse;while(abs(a-b)>1){intc=(a+b)/2;(sideOf(l[0],l[c],p)>0?b:a)=c;}returnsgn(l[a].cross(l[b],p))<r;}
Traceback(mostrecentcalllast):File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/documentation/build.py",line71,in_render_source_code_statbundled_code=language.bundle(stat.path,basedir=basedir,options={'include_paths':[basedir]}).decode()~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/languages/cplusplus.py",line187,inbundlebundler.update(path)~~~~~~~~~~~~~~^^^^^^File"/opt/hostedtoolcache/Python/3.14.0/x64/lib/python3.14/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py",line312,inupdateraiseBundleErrorAt(path,i+1,"#pragma once found in a non-first line")onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt:src/geometry/PointInsideHull.h:line13:#pragmaoncefoundinanon-firstline