/**
* Author: Ulf Lundstrom
* Date: 2009-02-26
* License: CC0
* Source: My head with inspiration from tinyKACTL
* Description: Class to handle points in the plane.
* T can be e.g. double or long long. (Avoid int.)
* Status: Works fine, used a lot
*/#pragma once
template<classT>intsgn(Tx){return(x>0)-(x<0);}template<classT>structPoint{typedefPointP;Tx,y;explicitPoint(Tx=0,Ty=0):x(x),y(y){}booloperator<(Pp)const{returntie(x,y)<tie(p.x,p.y);}booloperator==(Pp)const{returntie(x,y)==tie(p.x,p.y);}Poperator+(Pp)const{returnP(x+p.x,y+p.y);}Poperator-(Pp)const{returnP(x-p.x,y-p.y);}Poperator*(Td)const{returnP(x*d,y*d);}Poperator/(Td)const{returnP(x/d,y/d);}Tdot(Pp)const{returnx*p.x+y*p.y;}Tcross(Pp)const{returnx*p.y-y*p.x;}Tcross(Pa,Pb)const{return(a-*this).cross(b-*this);}Tdist2()const{returnx*x+y*y;}doubledist()const{returnsqrt((double)dist2());}// angle to x-axis in interval [-pi, pi]doubleangle()const{returnatan2(y,x);}Punit()const{return*this/dist();}// makes dist()=1Pperp()const{returnP(-y,x);}// rotates +90 degreesPnormal()const{returnperp().unit();}// returns point rotated 'a' radians ccw around the originProtate(doublea)const{returnP(x*cos(a)-y*sin(a),x*sin(a)+y*cos(a));}friendostream&operator<<(ostream&os,Pp){returnos<<"("<<p.x<<","<<p.y<<")";}};
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/Point.h:line10:#pragmaoncefoundinanon-firstline