Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define ll long long
- using namespace std;
- const double PI = acos(-1);
- int main()
- {
- int q, n, ch, kol, nom;
- double r1, r2, r3, r4, angel, x, y;
- cin >> q;
- for (int i = 0; i < q; i++)
- {
- cin >> n >> r1 >> r2 >> r3;
- cin >> ch;
- kol = 0;
- for (int k = 0; k < ch; k++)
- {
- cin >> x >> y;
- r4 = sqrt(x * x + y * y);
- angel = acos(x / r4);
- if (y < 0)
- angel = 2 * PI - angel;
- nom = angel * ch / (2 * PI) + 1;
- if (r4 > r3)
- kol += 0;
- if (r4 <= r3 && r4 > r2)
- kol += nom;
- if (r4 <= r2 && r4 > r1)
- kol += nom * 2;
- if (r4 <= r1)
- kol += 50;
- }
- cout << kol << "\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement