#include "tools.h"

int main(int argc, char **argv) {
    int n = atoi(argv[1]);
    srand(atoi(argv[2]));

    int k = 2 + rand() % 999;
    int r = 1 + rand() % (k - 1);

    vector<Hair> hair(n);

    double left_angle = 3 * PI / 4;
    double right_angle = 9 * PI / 4;

    double step = (right_angle - left_angle) / (n - 1);

    int i = 0;
    int mid = n / 2;
    for (double a = left_angle; i < n; a += step, i++) {
        hair[i].xh = r * cos(a);
        hair[i].yh = r * sin(a);
        hair[i].xs = r * (i - mid);
        hair[i].ys = -k;
    }

    printf("%d %d\n%d\n", r, k, n);

    random_shuffle(hair.begin(), hair.end());
    for (int i = 0; i < n; i++) {
        hair[i].print();
    }
    return 0;
}