-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathF-FE!N 2
More file actions
65 lines (58 loc) · 2.08 KB
/
F-FE!N 2
File metadata and controls
65 lines (58 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//////////////// PRANTA KUMER PANDIT ///////////////
// Test Case Less Template ||
// ||
// BANGLADESH UNIVERSITY OF BUSINESS AND TECHNOLOGY ||
// INTAKE 52 ||
// DEPARTMENT OF CSE ||
//||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// So, WELCOME TO ISHAN'S PERADISE //
// (-.-) Want to be a Secret tool of next ICPC (-.-) //
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl
#define all(x) (x).begin(), (x).end()
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*b)/__gcd(a,b)
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int lol;
cin >> lol;
if (lol < 1 || lol > 100) return 1;
while (lol--) {
int n;
ll d, x, y;
cin >> n >> d >> x >> y;
if (n < 1 || n > 100000 || d < 0 || d > 1e9 || abs(x) > 1e9 || abs(y) > 1e9) {
continue;
}
vector<int> standing;
standing.reserve(n);
for (int i = 1; i <= n; ++i) {
ll xi, yi;
cin >> xi >> yi;
if (abs(xi) > 1e9 || abs(yi) > 1e9) continue;
ll dx = xi - x;
ll dy = yi - y;
if (dx * dx + dy * dy > d * d) {
standing.pb(i);
}
}
if (standing.empty()) {
cout << "FE!N\n";
} else {
cout << standing.size() << '\n';
for (size_t i = 0; i < standing.size(); ++i) {
cout << standing[i];
if (i < standing.size() - 1) cout << ' ';
}
cout << '\n';
}
}
return 0;
}
// THANKS //