/**
* Author: Simon Lindholm
* Date: 2019-04-17
* License: CC0
* Source: https://codeforces.com/blog/entry/58747
* Description: Finds the closest pair of points.
* Time: O(n \log n)
* Status: stress-tested
*/#pragma once
#include"src/geometry/Point.h"typedefPoint<ll>P;pair<P,P>closest(vector<P>v){assert(sz(v)>1);set<P>S;sort(all(v),[](Pa,Pb){returna.y<b.y;});pair<ll,pair<P,P>>ret{LLONG_MAX,{P(),P()}};intj=0;for(Pp:v){Pd{1+(ll)sqrt(ret.first),0};while(v[j].y<=p.y-d.x)S.erase(v[j++]);autolo=S.lower_bound(p-d),hi=S.upper_bound(p+d);for(;lo!=hi;++lo)ret=min(ret,{(*lo-p).dist2(),{*lo,p}});S.insert(p);}returnret.second;}
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/ClosestPair.h:line10:#pragmaoncefoundinanon-firstline