// URL: https://yukicoder.me/problems/no/724 import std.algorithm, std.array, std.container, std.math, std.range, std.typecons, std.string; version(unittest) {} else void main() { int n; double a, b; io.getV(n, a, b); auto c = (a+b)/2, d = (a*b).sqrt, eps = 1.0e-12L; struct Cir { real x, y, r; this(double x) { this.x = x; y = (d^^2 * (1 - (x-c)^^2/c^^2)).sqrt; r = ((x-a)^^2 + y^^2).sqrt - a; } } Cir e; if (n%2 == 1) { e = Cir(a+b); n = (n-1)/2; } else { auto calc1(double x) { auto e = Cir(x); return e.r - e.y; } auto bs = iota(0.0, a+b, eps).map!(x => tuple(x, calc1(x))).assumeSorted!"a[1] tuple(x2, calc(e, x2))).assumeSorted!"a[1]