123456789101112131415161718 |
- #include<stdio.h>
- #include<math.h>
- int main()
- {
- int x, y, x1, y1;
- double PI = 4.0 * atan(1.0);
- while(~scanf("%d%d%d%d", &x, &y, &x1, &y1))
- {
- x1 -= x,y1 -= y;
- double R = asin(y1 / sqrt((x1 * x1) + (y1 * y1)));
- if (x1 < 0) R = -R - PI;
- double c = R * 360 / 2 / PI;
- printf("%d\n", (110 - (int) c) % 360 / 40 + 1);
- }
- return 0;
- }
|