/**
* Author: Stjepan Glavina, chilli
* Date: 2019-05-05
* License: Unlicense
* Source: https://github.com/stjepang/snippets/blob/master/convex_hull.cpp
* Description:
\\\begin{minipage}{75mm}
Returns a vector of the points of the convex hull in counter-clockwise order.
Points on the edge of the hull between two other points are not considered part of the hull.
\end{minipage}
\begin{minipage}{15mm}
\vspace{-6mm}
\includegraphics[width=\textwidth]{src/geometry/ConvexHull}
\vspace{-6mm}
\end{minipage}
* Time: O(n \log n)
* Status: stress-tested, tested with kattis:convexhull
*/#pragma once
#include"src/geometry/Point.h"typedefPoint<ll>P;vector<P>convexHull(vector<P>pts){if(sz(pts)<=1)returnpts;sort(all(pts));vector<P>h(sz(pts)+1);ints=0,t=0;for(intit=2;it--;s=--t,reverse(all(pts)))for(Pp:pts){while(t>=s+2&&h[t-2].cross(h[t-1],p)<=0)t--;h[t++]=p;}return{h.begin(),h.begin()+t-(t==2&&h[0]==h[1])};}
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/ConvexHull.h:line19:#pragmaoncefoundinanon-firstline