/**
* Author: Ulf Lundstrom
* Date: 2009-04-07
* License: CC0
* Source: My geometric reasoning
* Description: Returns the shortest distance on the sphere with radius radius between the points
* with azimuthal angles (longitude) f1 ($\phi_1$) and f2 ($\phi_2$) from x axis and zenith angles
* (latitude) t1 ($\theta_1$) and t2 ($\theta_2$) from z axis (0 = north pole). All angles measured
* in radians. The algorithm starts by converting the spherical coordinates to cartesian coordinates
* so if that is what you have you can use only the two last rows. dx*radius is then the difference
* between the two points in the x direction and d*radius is the total distance between the points.
* Status: tested on kattis:airlinehub
*/#pragma once
doublesphericalDistance(doublef1,doublet1,doublef2,doublet2,doubleradius){doubledx=sin(t2)*cos(f2)-sin(t1)*cos(f1);doubledy=sin(t2)*sin(f2)-sin(t1)*sin(f1);doubledz=cos(t2)-cos(t1);doubled=sqrt(dx*dx+dy*dy+dz*dz);returnradius*2*asin(d/2);}
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/sphericalDistance.h:line14:#pragmaoncefoundinanon-firstline