/* -*- coding: utf-8 -*- * * 2352.cc: No.2352 Sharpened Knife in Fall - yukicoder */ #include #include #include using namespace std; /* constant */ const int MAX_K = 100000; const double PI = acos(-1.0); const int CNT = 100; /* typedef */ /* global variables */ double ls[MAX_K]; /* subroutines */ double area(double r, double th) { return r * r * (th - sin(th) * cos(th)); } double calc(double r, double s) { double th0 = 0.0, th1 = PI / 2; for (int cnt = 0; cnt < CNT; cnt++) { double th = (th0 + th1) / 2; if (area(r, th) < s) th0 = th; else th1 = th; } return th0; } /* main */ int main() { int r, k; scanf("%d%d", &r, &k); int h = k / 2; double s = PI * r * r / (k + 1); for (int i = 0; i < h; i++) { double th = calc(r, s * (i + 1)); double li = r * cos(th); ls[i] = -li, ls[k - 1 - i] = li; } for (int i = 0; i < k; i++) printf("%.12lf\n", ls[i]); return 0; }