buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> using namespace std; #define lli long long int #define mp(a, b) make_pair(a, b) #define pb(a) push_back(a) #define fr(i, n) for (i = 0; i < n; i++) #define F first #define S second #define fast std::ios_base::sync_with_stdio(false) #define mod 1000000007 #define pi 3.14159265 int main() { fas...
#include <bits/stdc++.h> using namespace std; #define lli long long int #define mp(a, b) make_pair(a, b) #define pb(a) push_back(a) #define fr(i, n) for (i = 0; i < n; i++) #define F first #define S second #define fast std::ios_base::sync_with_stdio(false) #define mod 1000000007 #define pi 3.14159265 int main() { fas...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]]
1
140
#include <cmath> #include <iostream> using namespace std; int main() { int c; long long x, y, d, n; c = 0; cin >> n >> d; while (--n) { cin >> x >> y; if (sqrt(x * x + y * y) <= d) { c++; } } cout << c; return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { int c; long long x, y, d, n; c = 0; cin >> n >> d; while (n--) { cin >> x >> y; if (sqrt(x * x + y * y) <= d) { c++; } } cout << c; return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 27, 17, 68], ["+", 8, 9, 0, 52, 15, 339, 51, 27, 17, 68]]
1
77
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); long long d, n, c = 0; double a, b; cin >> n >> d; while (n--) { cin >> a >> b; if (sqrt(a * a + b * b) <= d) c++; cout << c << '\n'; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); long long d, n, c = 0; double a, b; cin >> n >> d; while (n--) { cin >> a >> b; if (sqrt(a * a + b * b) <= d) c++; } cout << c << '\n'; return 0; }
[["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
1
96
#include <bits/stdc++.h> using namespace std; int main() { int N, D; cin >> N >> D; int count = 0; while (N--) { long x, y, distance; cin >> x >> y; distance = sqrt(x * x + y * y); if (distance <= D) count++; } cout << count; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int N, D; cin >> N >> D; int count = 0; while (N--) { long x, y; double distance; cin >> x >> y; distance = sqrt(x * x + y * y); if (distance <= D) count++; } cout << count; return 0; }
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 0, 21], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 0, 35], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40]]
1
77
#include <algorithm> #include <bitset> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespa...
#include <algorithm> #include <bitset> #include <cstring> #include <deque> #include <functional> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <utility> #include <vector> using namespa...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78]]
1
181
#include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <vector> #define ll long long #define int long long #define ld long double #define endl "\n" #defi...
#include <algorithm> #include <cmath> #include <cstring> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <vector> #define ll long long #define int long long #define ld long double #define endl "\n" #defi...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
287
#include <bits/stdc++.h> using namespace std; // #define cerr if(false)cerr typedef long long ll; typedef vector<ll> vll; typedef pair<ll, ll> ii; typedef vector<vector<ll>> vvll; typedef vector<pair<ll, ll>> vii; typedef long double ld; typedef vector<ld> vld; typedef vector<vector<ld>> vvld; typedef vector<bool> vbl;...
#include <bits/stdc++.h> using namespace std; // #define cerr if(false)cerr typedef long long ll; typedef vector<ll> vll; typedef pair<ll, ll> ii; typedef vector<vector<ll>> vvll; typedef vector<pair<ll, ll>> vii; typedef long double ld; typedef vector<ld> vld; typedef vector<vector<ld>> vvld; typedef vector<bool> vbl;...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 51, 2, 63, 346, 3, 347, 0, 77, 39, 40], ["+", 51, 2, 63, 346, 3, 347, 0, 77, 39, 78]]
1
474
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException, NumberFormatException { try { FastScanner sc = new FastScanner(); int n = sc.nextI...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.math.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException, NumberFormatException { try { FastScanner sc = new FastScanner(); long n = sc.next...
[["-", 0, 246, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 246, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 7, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 7, 8, 196, 0, 503, 39, 506, 0, 96]]
3
437
#include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; int ans = 0; while (n > 0) { long x, y; cin >> x >> y; if (x * x + y * y <= d * d) ans++; n--; } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { long n, d; cin >> n >> d; int ans = 0; while (n > 0) { long x, y; cin >> x >> y; if (x * x + y * y <= d * d) ans++; n--; } cout << ans << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
76
#include <cmath> #include <iostream> using namespace std; int main() { int x, y, N, D, count = 0; scanf("%d%d", &N, &D); while (N--) { scanf("%d%d", &x, &y); if (sqrt(x * x + y * y) <= (double)D) count++; } printf("%d", count); return 0; }
#include <cmath> #include <iostream> using namespace std; int main() { long int x, y, N, D, count = 0; scanf("%ld%ld", &N, &D); while (N--) { scanf("%ld%ld", &x, &y); if (sqrt(x * x + y * y) <= (double)D) count++; } printf("%ld", count); return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
93
//#pragma warning(disable:4996) #include <algorithm> #include <bitset> #include <cassert> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> //#include <b...
//#pragma warning(disable:4996) #include <algorithm> #include <bitset> #include <cassert> #include <functional> #include <iomanip> #include <iostream> #include <limits.h> #include <map> #include <math.h> #include <queue> #include <random> #include <set> #include <stack> #include <string> #include <vector> //#include <b...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
242
#include <bits/stdc++.h> #include <math.h> #include <stdio.h> #include <string.h> using namespace std; int main() { long long int a, b, x, y, jum = 0; scanf("%lld %lld", &a, &b); for (long long int i = 0; i < a; i++) { scanf("%lld %lld", &x, &y); if (abs(x * x) + abs(y * y) >= b * b) { jum++; ...
#include <bits/stdc++.h> #include <math.h> #include <stdio.h> #include <string.h> using namespace std; int main() { long long int a, b, x, y, jum = 0; scanf("%lld %lld", &a, &b); for (long long int i = 0; i < a; i++) { scanf("%lld %lld", &x, &y); if ((x * x) + (y * y) <= b * b) { jum++; } } ...
[["-", 15, 339, 51, 16, 31, 16, 31, 2, 63, 22], ["-", 15, 339, 51, 16, 31, 16, 12, 2, 63, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
116
import numpy as np n, d = (int(i) for i in input().split()) xy = [[int(i) for i in input().split()] for i in range(n)] ans = 0 for i in range(n-1): x0 = xy[i][0] y0 = xy[i][1] l = np.sqrt(x0**2 + y0**2) if l <= d: ans += 1 print(ans)
import numpy as np n, d = (int(i) for i in input().split()) xy = [[int(i) for i in input().split()] for i in range(n)] ans = 0 for i in range(n): x = xy[i][0] y = xy[i][1] l = np.sqrt(x**2 + y**2) if l <= d: ans += 1 print(ans)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 12, 652, 3, 4, 0, 657, 31, 657, 31, 22], ["+", 12, 652, 3, 4, 0, 657, 31, 657, 31, 22], ["-", 12, 652, 3, 4, 0, 657, 12, 657, 31, 22], ["+...
5
108
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n; int d; cin >> n >> d; int count = 0; while (n--) { ll x, y; cin >> x >> y; ll ans = (x * x + y * y); if (ans <= d * d) { count++; } } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n, d; cin >> n >> d; ll count = 0; while (n--) { ll x, y; cin >> x >> y; ll ans = (x * x + y * y); if (ans <= d * d) { count++; } } cout << count << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21]]
1
82
n,d = gets.split.map(&:to_i) cnt = 0 for i in 0...n a,b = gets.split.map(&:to_i) if a*a+b*b<=d cnt += 1 end end puts cnt
n,d = gets.split.map(&:to_i) cnt = 0 for i in 0...n a,b = gets.split.map(&:to_i) if a*a+b*b<=d*d cnt += 1 end end puts cnt
[["+", 8, 170, 0, 121, 15, 738, 12, 738, 17, 48], ["+", 8, 170, 0, 121, 15, 738, 12, 738, 12, 22]]
4
52
import java.io.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.lang.*; import java.math.BigInteger; import java.util.StringTokenizer; public class Main { static InputReader...
import java.io.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.lang.*; import java.math.BigInteger; import java.util.StringTokenizer; public class Main { static InputReader...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 511, 0, 512], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 0, 52, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 52, 8, 196, 0, 503, 39, 506, 0, 96]]
3
454
#include <bits/stdc++.h> using namespace std; int main() { long long int n, d; cin >> n >> d; long long int ans = 0; long long int a, b; for (int i = 0; i < n; i++) { cin >> a >> b; long long int temp = (a * a) + (b * b); long long int temp2 = sqrt(temp); ans += (temp2 <= d); } cout << ans...
#include <bits/stdc++.h> using namespace std; int main() { long long int n, d; cin >> n >> d; long long int ans = 0; long long int a, b; for (int i = 0; i < n; i++) { cin >> a >> b; long long int temp = (a * a) + (b * b); double temp2 = sqrt(temp); ans += (temp2 <= d); } cout << ans << end...
[["-", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 7, 8, 9, 0, 43, 39, 86, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40]]
1
102
#include <bits/stdc++.h> using namespace std; int main() { int N, D; cin >> N >> D; int count = 0; long double d = 0; for (int i = 0; i < N; i++) { long int x, y; cin >> x >> y; d = (x * x + y * y); if (d <= D * D) { count = count + 1; } } cout << count << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int N, D; cin >> N >> D; int count = 0; long double d = 0; for (int i = 0; i < N; i++) { long int x, y; cin >> x >> y; d = sqrt(x * x + y * y); if (d <= D) { count = count + 1; } } cout << count << endl; return 0; }
[["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 48]]
1
99
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n, d, c = 0; ; cin >> n >> d; ll u = d * d; for (ll i = 0; i < n; i++) { ll x, y; cin >> x >> y; if (((x * x) + (y * y)) == u) { c++; } } cout << c; }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n, d, c = 0; ; cin >> n >> d; ll u = d * d; for (ll i = 0; i < n; i++) { ll x, y; cin >> x >> y; if (((x * x) + (y * y)) <= u) { c++; } } cout << c; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
92
#include <math.h> #include <stdio.h> int main(void) { long long int n, d, a, b, s, i, count; ; s = 0; count = 0; scanf("%d %d", &n, &d); for (i = 0; i < n; i++) { scanf("%d %d", &a, &b); s = a * a + b * b; if (d * d >= s) count++; } printf("%d", count); return 0; }
#include <math.h> #include <stdio.h> int main(void) { long long int n, d, a, b, s, i, count; ; s = 0; count = 0; scanf("%lld %lld", &n, &d); for (i = 0; i < n; i++) { scanf("%lld %lld", &a, &b); s = a * a + b * b; if (d * d >= s) count++; } printf("%lld", count); return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
111
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; vector<int> a(n), b(n); for (int i = 0; i < n; i++) { cin >> a.at(i) >> b.at(i); } int count = 0; for (int i = 0; i < n; i++) { int64_t x = a.at(i) * a.at(i) + b.at(i) * b.at(i); if (x <= d * d) count++;...
#include <bits/stdc++.h> using namespace std; int main() { int64_t n, d; cin >> n >> d; vector<int64_t> a(n), b(n); for (int i = 0; i < n; i++) { cin >> a.at(i) >> b.at(i); } int count = 0; for (int i = 0; i < n; i++) { int64_t x = a.at(i) * a.at(i) + b.at(i) * b.at(i); if (x <= d * d) ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40]]
1
138
#include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; int a, b, res = 0; for (int i = 0; i < n; i++) { cin >> a >> b; if (a * a + b * b <= d * d) res++; } cout << res; return 0; }
#include <iostream> using namespace std; int main() { long int n, d; cin >> n >> d; long int a, b, res = 0; for (int i = 1; i <= n; i++) { cin >> a >> b; if ((a * a + b * b) <= d * d) res++; } cout << res; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25]]
1
78
#include <bits/stdc++.h> using namespace std; int main() { int n, d, x, y, ans = 0; cin >> n >> d; while (n--) { cin >> x >> y; if ((x * x) + (y * y) <= d * d) ans += 1; } cout << ans; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n, d, x, y, ans = 0; cin >> n >> d; while (n--) { cin >> x >> y; if ((x * x) + (y * y) <= d * d) ans += 1; } cout << ans; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
70
N,D = map(int,input().split()) array = list(list(map(int,input().split()))for _ in range(N)) count = 0 for i in array: print(i) if i[0]**2+i[1]**2<=D**2: count += 1 print(count)
N,D = map(int,input().split()) array = list(list(map(int,input().split()))for _ in range(N)) count = 0 for i in array: if i[0]**2+i[1]**2<=D**2: count += 1 print(count)
[["-", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
81
#include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; int x, y; int j = 0; for (int i = 0; i < n; i++) { cin >> x >> y; if (x * x + y * y <= d * d) { j++; } } cout << j << "\n"; return 0; }
#include <iostream> using namespace std; int main() { long int n, d; cin >> n >> d; long int x, y; int j = 0; for (int i = 0; i < n; i++) { cin >> x >> y; if (x * x + y * y <= d * d) { j++; } } cout << j << "\n"; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { int N; long long D; cin >> N >> D; long long x, y; int count = 0; for (int i = 0; i < N; i++) { cin >> x >> y; if (x * x + y * y <= D) count++; } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; long long D; cin >> N >> D; long long x, y; int count = 0; for (int i = 0; i < N; i++) { cin >> x >> y; if (x * x + y * y <= D * D) count++; } cout << count << endl; }
[["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]]
1
79
#include <bits/stdc++.h> using namespace std; int64_t N, D; int main() { cin >> N >> D; D = D * D; int ans = 0; for (int i = 0; i < N; i++) { int x, y; cin >> x >> y; if (x * x + y * y <= D) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int64_t N, D; int main() { cin >> N >> D; D = D * D; int ans = 0; for (int i = 0; i < N; i++) { int64_t x, y; cin >> x >> y; if (x * x + y * y <= D) ans++; } cout << ans << endl; return 0; }
[["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { int n, d, c = 0; cin >> n >> d; while (n--) { long long x, y, ans; cin >> x >> y; ans = sqrt(abs(x * x) + abs(y * y)); if (ans <= d) c++; // cout<<ans<<endl; } cout << c; }
#include <bits/stdc++.h> using namespace std; int main() { int n, d, c = 0; cin >> n >> d; while (n--) { long long x, y; double ans; cin >> x >> y; ans = sqrt(abs(x * x) + abs(y * y)); if (ans <= d) c++; // cout<<ans<<endl; } cout << c; }
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 0, 21], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 0, 35], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40]]
1
81
#include <bits/stdc++.h> using namespace std; int main() { long long int N; long double D; cin >> N >> D; long long int ct = 0; while (N--) { long long int x, y; cin >> x >> y; long double R, ans; R = (x * x + y * y); if (R * R <= D * D) ct++; } cout << ct << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long int N; long double D; cin >> N >> D; long long int ct = 0; while (N--) { long long int x, y; cin >> x >> y; long double R; R = (x * x + y * y); if (R <= D * D) ct++; } cout << ct << endl; }
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 0, 21], ["-", 8, 9, 0, 52, 8, 9, 0, 43, 49, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48]]
1
91
#include <bits/stdc++.h> using namespace std; int main() { long long int n, d; cin >> n >> d; long long int ans = 0; for (long long int i = 0, a, b; i < n; i++) { cin >> a >> b; long long int dis = sqrt(a * a + b * b); if (dis <= d) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long int n, d; cin >> n >> d; long long int ans = 0; for (long long int i = 0, a, b; i < n; i++) { cin >> a >> b; long long int dis = a * a + b * b; if (dis <= d * d) ans++; } cout << ans << endl; return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 48]]
1
94
#include <bits/stdc++.h> using namespace std; #define endl '\n' int32_t main() { int a, b, cnt = 0; cin >> a >> b; while (a--) { int x, y; cin >> x >> y; if (x * x + y * y <= b * b) cnt++; } cout << cnt; return 0; }
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' int32_t main() { int a, b, cnt = 0; cin >> a >> b; while (a--) { int x, y; cin >> x >> y; if (x * x + y * y <= b * b) cnt++; } cout << cnt; return 0; }
[["+", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148]]
1
72
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define IOS ...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; #define IOS ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
157
#include <bits/stdc++.h> using namespace std; int main() { long long N, D; cin >> N >> D; int count = 0; for (int i = 0; i < N; i++) { long long X, Y; cin >> X >> Y; if (X ^ 2 + Y ^ 2 <= D ^ 2) { count++; } } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long N, D; cin >> N >> D; int count = 0; for (int i = 0; i < N; i++) { long long X, Y; cin >> X >> Y; if (X * X + Y * Y <= D * D) { count++; } } cout << count << endl; }
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 140], ["-", 51, 16, 31, 16, 31, 16, 12, 16, 31, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 140], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 13], ["+", 15, 339, 51, 16, 31, 16, ...
1
82
#include <bits/stdc++.h> using namespace std; int main() { int n; long long d; cin >> n >> d; d *= d; int ans = 0; long long x, y; while (n--) { cin >> x >> y; long long sq = x * x + y * y; if (d <= sq) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n; long long d; cin >> n >> d; d *= d; int ans = 0; long long x, y; while (n--) { cin >> x >> y; long long sq = x * x + y * y; if (d >= sq) ans++; } cout << ans << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
83
#include <iostream> using ll = long long; using namespace std; int main(void) { int n; cin >> n; int d; cin >> d; int res = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; if (x * x + y * y <= d * d) { res++; } } cout << res << endl; }
#include <iostream> using ll = long long; using namespace std; int main(void) { ll n; cin >> n; ll d; cin >> d; int res = 0; for (int i = 0; i < n; i++) { ll x, y; cin >> x >> y; if (x * x + y * y <= d * d) { res++; } } cout << res << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78]]
1
90
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; using namespace std; int main() { int n, d, cnt = 0; cin >> n >> ...
#include <algorithm> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <string> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; using namespace std; int main() { ll n, d, cnt = 0; cin >> n >> d...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 14, 8, 9, 0, 43, 39, 78]]
1
111
#include "bits/stdc++.h" #define rep(i, j) for (int i = 0; i < j; i++) #define srep(i, j, k) for (int i = j; i < k; i++) using namespace std; using ll = long long; using P = pair<ll, ll>; using ull = unsigned long long; ll gcd(ll x, ll y); int fac(ll n, vector<int> num); template <class T> inline bool chmax(T &a, T b...
#include "bits/stdc++.h" #define rep(i, j) for (int i = 0; i < j; i++) #define srep(i, j, k) for (int i = j; i < k; i++) using namespace std; using ll = long long; using P = pair<ll, ll>; using ull = unsigned long long; ll gcd(ll x, ll y); int fac(ll n, vector<int> num); template <class T> inline bool chmax(T &a, T b...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 14, 8, 9, 0, 43, 39, 78]]
1
934
#include <algorithm> #include <iostream> #define flush fflush(stdout) using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> Pl; const int mod = (int)1e9 + 7, INF = (int)1e9; const int di[4] = {1, 0, -1, 0}, dj[4] = {0, 1, 0, -1}; int main(void) { int n, i, ans; ll d, x, y; an...
#include <algorithm> #include <iostream> #define flush fflush(stdout) using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> Pl; const int mod = (int)1e9 + 7, INF = (int)1e9; const int di[4] = {1, 0, -1, 0}, dj[4] = {0, 1, 0, -1}; int main(void) { int n, i, ans; ll d, x, y; an...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
182
#include <bits/stdc++.h> using namespace std; typedef int64_t ll; int main() { ll N, D; cin >> N >> D; ll ans = 0; for (ll i = 0; i < N; i++) { ll X, Y; cin >> X >> Y; if (X * Y <= D * D) ans++; } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; typedef int64_t ll; int main() { ll N, D; cin >> N >> D; ll ans = 0; for (ll i = 0; i < N; i++) { ll X, Y; cin >> X >> Y; if (X * X + Y * Y <= D * D) ans++; } cout << ans << endl; }
[["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 48]]
1
78
import math def dist(x,y): return math.sqrt(x**2+y**2) n,d=map(int,input().split()) i=0 for _ in range(d): x,y=map(int,input().split()) if dist(x,y)<=d: i+=1 print(i)
import math def dist(x,y): return math.sqrt(x**2+y**2) n,d=map(int,input().split()) i=0 for _ in range(n): x,y=map(int,input().split()) if dist(x,y)<=d: i+=1 print(i)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22]]
5
83
n,d = map(int,input().split()) cnt = 0 for i in raneg(n): p,q = map(int,input().split()) cnt += p*p+q*q <= d*d print(cnt)
n,d = map(int,input().split()) cnt = 0 for i in range(n): p,q = map(int,input().split()) cnt += p*p+q*q <= d*d print(cnt)
[["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22]]
5
60
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <unordered_set> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n, d, x, y; cin >> n >> d; ll ans = 0; while (n--) { cin >> x >> y; if (x * x + y * y >= d * d)...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <unordered_set> #define ll long long using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n, d, x, y; cin >> n >> d; ll ans = 0; while (n--) { cin >> x >> y; if (x * x + y * y <= d * d)...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
96
#include <stdio.h> #include <unistd.h> int main() { int ans; int n; int d; int x, y; ans = 0; scanf("%d %d", &n, &d); while (n) { scanf("%d %d", &x, &y); if (((x * x) + (y * y)) <= (d * d)) ans++; n--; } printf("%d", ans); }
#include <stdio.h> #include <unistd.h> int main() { int ans; int n; long d; long x, y; ans = 0; scanf("%d %ld", &n, &d); while (n) { scanf("%ld %ld", &x, &y); if (((x * x) + (y * y)) <= (d * d)) ans++; n--; } printf("%d", ans); }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
97
n,d=map(int,input().split()) x=[0]*n y=[0]*n for i in range(n): x[i],y[i]=map(int,input().split()) ans=0 for i in range(n): if x[i]**2+y[i]**2<=d: ans+=1 print(ans)
n,d=map(int,input().split()) x=[0]*n y=[0]*n for i in range(n): x[i],y[i]=map(int,input().split()) ans=0 for i in range(n): if x[i]**2+y[i]**2<=d**2: ans+=1 print(ans)
[["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 578], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]]
5
95
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int d = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { int x = sc.nextInt(); int y = sc.nextInt(); if (Math.sqrt((x * x + y * y)) <= d)...
import java.util.*; class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int d = sc.nextInt(); int count = 0; for (int i = 0; i < n; i++) { int x = sc.nextInt(); int y = sc.nextInt(); if (Math.sqrt(((double)x * x + (doub...
[["+", 0, 23, 0, 16, 31, 16, 31, 74, 0, 24], ["+", 0, 16, 31, 16, 31, 74, 39, 511, 0, 512], ["+", 0, 23, 0, 16, 31, 16, 31, 74, 0, 25], ["+", 0, 23, 0, 16, 12, 16, 31, 74, 0, 24], ["+", 0, 16, 12, 16, 31, 74, 39, 511, 0, 512], ["+", 0, 23, 0, 16, 12, 16, 31, 74, 0, 25]]
3
130
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Double D = sc.nextDouble(); Double[][] X = new Double[N][2]; for (int i = 0; i < N * 2; i++) { if (i % 2 == 0) { X[i / 2][0] = sc.nextDo...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); Double D = sc.nextDouble(); Double[][] X = new Double[N][2]; for (int i = 0; i < N * 2; i++) { if (i % 2 == 0) { X[i / 2][0] = sc.nextDo...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 19]]
3
216
x,y=map(int,input().split()) count=0 for i in range(x): a,b=map(int,input().split()) dist=pow((pow(x,2)+pow(y,2)),0.5) if dist<=y: count+=1 print(count)
n,d=map(int,input().split()) count=0 for i in range(n): x,y=map(int,input().split()) dist=pow((pow(x,2)+pow(y,2)),0.5) if dist<=d: count+=1 print(count)
[["-", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 662, 31, 684, 0, 22], ["+", 8, 196, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, ...
5
77
#include <bits/stdc++.h> using namespace std; int main() { int answer = 0; int N, D; int x, y; cin >> N >> D; for (int i = 0; i < N; i++) { cin >> x >> y; if (x * x + y * y <= D * D) { answer++; } } cout << answer << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long answer = 0; long N, D; long x, y; cin >> N >> D; for (int i = 0; i < N; i++) { cin >> x >> y; if (x * x + y * y <= D * D) { answer++; } } cout << answer << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
80
#include <cmath> #include <cstdio> using namespace std; int main(void) { long int num, distance, count; count = 0; scanf("%ld %ld", &num, &distance); for (int i = 0; i < num; i++) { long int x, y, result; scanf("%ld %ld", &x, &y); result = sqrt(x * x + y * y); if (result <= distance) { c...
#include <cmath> #include <cstdio> using namespace std; int main(void) { long int num, distance, count; count = 0; scanf("%ld %ld", &num, &distance); for (int i = 0; i < num; i++) { long int x, y, result; scanf("%ld %ld", &x, &y); result = ceil(sqrt(x * x + y * y)); if (result <= distance) { ...
[["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]]
1
113
#include <bits/stdc++.h> using namespace std; int main() { int t, n, x, y, c, d; cin >> t >> d; vector<pair<int, int>> st; c = 0; while (t--) { cin >> x >> y; st.push_back(make_pair(x, y)); } for (auto i = st.begin(); i != st.end(); i++) { if (sqrt((i->first * i->first) + (i->second * i->secon...
#include <bits/stdc++.h> using namespace std; int main() { int t, n, x, y, c, d; cin >> t >> d; vector<pair<long long int, long long int>> st; c = 0; while (t--) { cin >> x >> y; st.push_back(make_pair(x, y)); } for (auto i = st.begin(); i != st.end(); i++) { if (sqrt((i->first * i->first) + (...
[["+", 39, 344, 3, 347, 0, 77, 39, 86, 0, 96]]
1
129
#include <iostream> using namespace std; int main() { int n, x, y, d; int cnt = 0; cin >> n >> d; d *= d; while (n--) { cin >> x >> y; if (x * x + y * y <= d) cnt++; } cout << cnt; return 0; }
#include <iostream> using namespace std; int main() { long long n, x, y, d; int cnt = 0; cin >> n >> d; d *= d; while (n--) { cin >> x >> y; if (x * x + y * y <= d) cnt++; } cout << cnt; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
71
N,D=map(int, input().split()) a=0 for i in str(N): x,y=map(int, input().split()) if x*x+y*y<=D*D: a+=1 else: pass print(a)
N,D=map(int, input().split()) a=0 for i in range(N): x,y=map(int, input().split()) if x*x+y*y<=D*D: a+=1 else: pass print(a)
[["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22]]
5
66
import numpy as np N, D = list(map(int, input().split())) cnt = 0 for n in range(0, N): x, y = list(map(int, input().split())) if (x*x + y*y) >= D*D: cnt += 1 print(cnt)
import numpy as np N, D = list(map(int, input().split())) cnt = 0 for n in range(0, N): x, y = list(map(int, input().split())) if (x*x + y*y) <= D*D: cnt += 1 print(cnt)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
77
[N, D] = input().split() s = 0 D = int(D) D = D**2 for i in range(N): [X, Y] = input().split() X = int(X) Y = int(Y) Z = X**2 + Y**2 if Z <= D: s += 1 print(s)
[N, D] = input().split() s = 0 N = int(N) D = int(D) D = D**2 for i in range(N): [X, Y] = input().split() X = int(X) Y = int(Y) Z = X**2 + Y**2 if Z <= D: s += 1 print(s)
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
81
#include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; int x, y; int counter = 0; for (int i = 1; i <= n; i++) { cin >> x >> y; if ((x * x + y * y) <= (d * d)) { counter++; } } cout << counter << endl; return 0; }
#include <iostream> using namespace std; int main() { long int n, d; cin >> n >> d; long int x, y; int counter = 0; for (int i = 1; i <= n; i++) { cin >> x >> y; if ((x * x + y * y) <= (d * d)) { counter++; } } cout << counter << endl; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
87
#include <cmath> #include <iostream> using namespace std; int main() { int n, d, ans = 0; cin >> n >> d; int x, y; for (int i = 0; i < n; i++) { cin >> x >> y; if (sqrt(x * x + y * y) <= d) ans++; } cout << ans << endl; }
#include <cmath> #include <iostream> using namespace std; int main() { long long n, d, ans = 0; cin >> n >> d; long long x, y; for (int i = 0; i < n; i++) { cin >> x >> y; if (sqrt(x * x + y * y) <= d) ans++; } cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
80
#include <bits/stdc++.h> using namespace std; int main(void) { int N, D; cin >> N >> D; long long x[210000]; long long y[210000]; for (int i = 0; i < N; i++) cin >> x[i] >> y[i]; long long dis2; long long count = 0; long long DD = D * D; for (int i = 0; i < N; i++) { dis2 = x[i] * x[i] + y...
#include <bits/stdc++.h> using namespace std; int main(void) { long long N, D; cin >> N >> D; long long x[210000]; long long y[210000]; for (int i = 0; i < N; i++) cin >> x[i] >> y[i]; long long dis2; long long count = 0; long long DD = D * D; for (int i = 0; i < N; i++) { dis2 = x[i] * x[...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
135
#include <iostream> #include <math.h> using namespace std; int main() { int N, D; int X, Y; double dd; double num; int count = 0; cin >> N >> D; for (int i = 0; i < N; i++) { cin >> X >> Y; num = X * X + Y * Y; dd = sqrt(num); if (dd <= D) { count++; } } cout << count; }
#include <iostream> #include <math.h> using namespace std; int main() { long N, D; long X, Y; double dd; double num; int count = 0; cin >> N >> D; for (int i = 0; i < N; i++) { cin >> X >> Y; num = X * X + Y * Y; dd = sqrt(num); if (dd <= D) { count++; } } cout << count; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
95
st = input().split() n = int(st[0]) d = int(st[1]) c = 0 for i in ramge(n): middle = input().split() x = int(middle[0]) y = int(middle[1]) if x**2 + y**2 <= d**2: c+=0 print(c)
st = input().split() n = int(st[0]) d = int(st[1]) c = 0 for i in range(n): middle = input().split() x = int(middle[0]) y = int(middle[1]) if x**2 + y**2 <= d**2: c+=1 print(c)
[["-", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 7, 12, 652, 63, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612]]
5
85
#include <bits/stdc++.h> #include <cmath> using namespace std; int main() { int N, D; int count = 0; int s = 0; cin >> N >> D; vector<double> x(N); vector<double> y(N); for (int i = 0; i < N; i++) { cin >> x.at(i) >> y.at(i); } for (double i = 0; i < N; i++) { s = sqrt(x.at(i) * x.at(i) + y.a...
#include <bits/stdc++.h> #include <cmath> using namespace std; int main() { double N, D; int count = 0; double s = 0; cin >> N >> D; vector<double> x(N); vector<double> y(N); for (double i = 0; i < N; i++) { cin >> x.at(i) >> y.at(i); } for (double i = 0; i < N; i++) { s = sqrt(x.at(i) * x.at...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40]]
1
151
#include <cmath> #include <iostream> using namespace std; int main() { int n; float max_distance; int count = 0; cin >> n >> max_distance; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; if ((sqrt(x * x + y * y)) <= max_distance) { count++; } } cout << count << endl; retu...
#include <cmath> #include <iostream> using namespace std; int main() { int n; long double max_distance; int count = 0; cin >> n >> max_distance; for (int i = 0; i < n; i++) { long double x, y; cin >> x >> y; if ((sqrt(x * x + y * y)) <= max_distance) { count++; } } cout << count <<...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 39, 40], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 39, 40]]
1
89
#include <algorithm> #include <bits/stdc++.h> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; // for loop #define F(i, L, R) for (long i = L;...
#include <algorithm> #include <bits/stdc++.h> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; // for loop #define F(i, L, R) for (long i = L;...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59]]
1
367
N, D = map(int, input() .split()) ans = 0 for i in range (N): X, Y = map(int, input() .split()) if X^2 + Y^2 <= D^2: ans = ans + 1 print (ans)
N, D = map(int, input() .split()) ans = 0 for i in range (N): X, Y = map(int, input() .split()) if X*X + Y*Y <= D*D: ans = ans + 1 print (ans)
[["-", 0, 57, 15, 666, 0, 657, 31, 657, 17, 140], ["-", 15, 666, 0, 657, 31, 657, 12, 657, 31, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 657, 17, 48], ["+", 0, 57, 15, 666, 0, 657, 31, 657, 12, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 140], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612], ["+", 0, 57, 15, 666, 0, 65...
5
65
import java.math.BigInteger; import java.util.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N =...
import java.math.BigInteger; import java.util.*; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Scanner; class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N =...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 19]]
3
248
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e5 + 10; const ll mod = 1e9 + 7; int n, m; int a[maxn], b[maxn]; double c[maxn]; int ans = 0; void solve() { cin >> n >> m; for (int i = 1; i <= n; i++) { cin >> a[i] >> b[i]; c[i] = sqrt(a[i] * a[i] + b[i] * b[i]); ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 1e6 + 10; const ll mod = 1e9 + 7; int n, m; ll a[maxn], b[maxn]; double c[maxn]; int ans = 0; void solve() { cin >> n >> m; for (int i = 1; i <= n; i++) { cin >> a[i] >> b[i]; c[i] = sqrt(a[i] * a[i] + b[i] * b[i]); /...
[["-", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78]]
1
175
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, d; double x, y; cin >> n >> d; int count = 0; for (int i = 0; i < n; i++) { cin >> x >> y; ll dist = sqrt(((x * x) + (y * y))); if (dis...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, d; double x, y; cin >> n >> d; int count = 0; for (int i = 0; i < n; i++) { cin >> x >> y; double dist = sqrt(((x * x) + (y * y))); if ...
[["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40]]
1
119
#include <math.h> #include <stdio.h> int main(void) { int n, d; scanf("%d %d", &n, &d); int ret = 0; for (int i = 0; i < n; i++) { int x, y; scanf("%d %d", &x, &y); if (d >= sqrt(x * x + y * y)) { ret++; } } printf("%d\n", ret); return 0; }
#include <math.h> #include <stdio.h> int main(void) { long n, d; scanf("%ld %ld", &n, &d); int ret = 0; for (int i = 0; i < n; i++) { long x, y; scanf("%ld %ld", &x, &y); if (d >= sqrt(x * x + y * y)) { ret++; } } printf("%d\n", ret); return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96]]
0
101
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, d, t; int ans = 0; ll x, y; cin >> n >> d; for (int i = 0; i < n; i++) { cin >> x >> y; t = x * x + y * y; if (t < d * d) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, d, t; int ans = 0; ll x, y; cin >> n >> d; for (int i = 0; i < n; i++) { cin >> x >> y; t = x * x + y * y; if (t <= d * d) ans++; } cout << ans << endl; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
92
N, D = map(int, input().split()) list1 = [0] * N list2 = [0] * N count = 0 for i in range(N): list1[i], list2[i] = map(int, input().split()) for i in range(N): if list1[i]**2 + list2[i]**2 >= D**2: count += 1 else: continue print(count)
N, D = map(int, input().split()) list1 = [0] * N list2 = [0] * N count = 0 for i in range(N): list1[i], list2[i] = map(int, input().split()) for i in range(N): if list1[i]**2 + list2[i]**2 <= D**2: count += 1 else: continue print(count)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
100
#include <bits/stdc++.h> using namespace std; int n; int x, y; int d; int main(void) { cin >> n >> d; d *= d; int ans = 0; for (int i = 0; i < n; i++) { cin >> x >> y; if (x * x + y * y <= d) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; long long n, x, y, d; int main(void) { cin >> n >> d; d *= d; int ans = 0; for (int i = 0; i < n; i++) { cin >> x >> y; if (x * x + y * y <= d) ans++; } cout << ans << endl; return 0; }
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { long double n, m; cin >> n >> m; long double sum = 0; for (long double i = 0; i < n; i++) { long double a, b; cin >> a >> b; long double c = sqrt((a * a) + (b * b)); if (c == m) sum++; } cout << sum; }
#include <bits/stdc++.h> using namespace std; int main() { long double n, m; cin >> n >> m; long double sum = 0; for (long double i = 0; i < n; i++) { long double a, b; cin >> a >> b; long double c = sqrt((a * a) + (b * b)); if (c <= m) sum++; } cout << sum; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
91
n, d = [int(i) for i in input().split()] res = 0 d = d**2 for _ in range(n): x, y = [int(i) for i in input().split()] if x**2 + y**2 >= d: res += 1 print(res)
n, d = [int(i) for i in input().split()] res = 0 d = d**2 for _ in range(n): x, y = [int(i) for i in input().split()] if x**2 + y**2 <= d: res += 1 print(res)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
74
#include <bits/stdc++.h> using namespace std; #define debug(x) cout << #x << "=" << x << '\n' #define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << '\n' #define forn(i, a, b) for (int i = int(a); i < int(b); i++) #define forn_r(i, b, a) for (int i = int(b); i > int(a); i--) #define printArray(arr, le...
#include <bits/stdc++.h> using namespace std; #define debug(x) cout << #x << "=" << x << '\n' #define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << '\n' #define forn(i, a, b) for (int i = int(a); i < int(b); i++) #define forn_r(i, b, a) for (int i = int(b); i > int(a); i--) #define printArray(arr, le...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
155
import math n, d = map(int, input().split()) p = 0 for i in range(n): x, y = map(int, input().split()) if sqrt(pow(abs(x),2)+pow(abs(y),2)) <= d : p += 1 print(p)
from math import * n, d = map(int, input().split()) p = 0 for i in range(n): x, y = map(int, input().split()) if sqrt(pow(abs(x),2)+pow(abs(y),2)) <= d : p += 1 print(p)
[["-", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 314], ["+", 36, 36, 36, 36, 0, 656, 0, 686, 0, 487], ["+", 36, 36, 0, 656, 0, 686, 0, 690, 0, 48]]
5
78
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, ans, i, x, y, d, z; ans = 0; cin >> n >> d; d = d * d; for (i = 0; i < n; i++) { cin >> x >> y; z = x * x + y * y; if (z < d) { ans += 1; } } cout << ans; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, ans, i, x, y, d, z; ans = 0; cin >> n >> d; d = d * d; for (i = 0; i < n; i++) { cin >> x >> y; z = x * x + y * y; if (z <= d) { ans += 1; } } cout << ans; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
95
#include <stdio.h> int main(void) { long int n = 0; long int d = 0; scanf("%d", &n); scanf("%d", &d); long int x = 0; long int y = 0; long int i = 0; long int q = 0; for (; i < n; i++) { scanf("%d", &x); scanf("%d", &y); if (((x * x) + (y * y)) <= (d * d)) { q++; } } prin...
#include <stdio.h> int main(void) { long int n = 0; long int d = 0; scanf("%ld", &n); scanf("%ld", &d); long int x = 0; long int y = 0; long int i = 0; long int q = 0; for (; i < n; i++) { scanf("%ld", &x); scanf("%ld", &y); if (((x * x) + (y * y)) <= (d * d)) { q++; } } ...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
136
#include <math.h> #include <stdio.h> int main() { int n, d; int cont = 0; scanf("%d %d", &n, &d); for (int i = 0; i < n; ++i) { int x, y; scanf("%d %d", &x, &y); double op = ((x * x) + (y * y)); op = sqrt(op); if (op <= d) { cont += 1; } } printf("%d\n", cont); return 0; }
#include <math.h> #include <stdio.h> int main() { double n, d; int cont = 0; scanf("%lf %lf", &n, &d); for (int i = 0; i < n; ++i) { double x, y; scanf("%lf %lf", &x, &y); double op = ((x * x) + (y * y)); op = sqrt(op); if (op <= d) { cont += 1; } } printf("%d\n", cont); retu...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40]]
0
116
#include <bits/stdc++.h> using namespace std; int main() { int N, D; int X, Y; int count = 0; cin >> N >> D; for (int i = 0; i < N; i++) { cin >> X >> Y; if (D >= sqrt(X * X + Y * Y)) { count += 1; } } cout << count << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long N, D; long X, Y; int count = 0; cin >> N >> D; for (int i = 0; i < N; i++) { cin >> X >> Y; if (D >= sqrt(X * X + Y * Y)) { count += 1; } } cout << count << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
82
N,D=map(int,input().split()) X=[] Y=[] for i in range(N): x,y=input().split() X.append(int(x)) Y.append(int(y)) import math def get_distance(x,y): d=math.sqrt(((x)**2+(y)**2)) return d a=0 for i in range(N+1): distance=get_distance(x=X[i],y=Y[i]) if distance<=D: a+=1 print(a)
N,D=map(int,input().split()) X=[] Y=[] for i in range(N): x,y=input().split() X.append(int(x)) Y.append(int(y)) import math def get_distance(x,y): d=math.sqrt(((x)**2+(y)**2)) return d a=0 for i in range(N): distance=get_distance(x=X[i],y=Y[i]) if distance<=D: a+=1 print(a)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
136
n,d = map(int,input().split()) i=0 num_list=[] for k in range(n): num_list.append(list(map(int,input().split()))) for j in range(n): if num_list[j][0]**2 + num_list[j][1]**2 <= d: i = i + 1 print(i)
n,d = map(int,input().split()) i=0 num_list=[] for k in range(n): num_list.append(list(map(int,input().split()))) for j in range(n): if num_list[j][0]**2 + num_list[j][1]**2 <= d**2: i = i + 1 print(i)
[["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 578], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 612]]
5
91
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int count = 0; ll n, d; cin >> n >> d; while (n--) { ll x, y; cin >> x >> y; if (x < 0) x = -x; if (y < 0) y = -y; double dd = sqrt(x * x + y * y); // cout<<dd<<endl; if (dd < d) count++...
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { int count = 0; ll n, d; cin >> n >> d; while (n--) { ll x, y; cin >> x >> y; if (x < 0) x = -x; if (y < 0) y = -y; double dd = sqrt(x * x + y * y); // cout<<dd<<endl; if (dd <= d) count+...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
99
N, D = input().split() x = [0] * N y = [0] * N for i in range(N): x[i], y[i] = map(int, input().split()) counter = 0 for i in range(N): dist = x[i] * x[i] + y[i] * y[i] if dist <= D*D: counter += 1 print(counter)
N, D = map(int, input().split()) x = [0] * N y = [0] * N for i in range(N): x[i], y[i] = map(int, input().split()) counter = 0 for i in range(N): dist = x[i] * x[i] + y[i] * y[i] if dist <= D*D: counter += 1 print(counter)
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
101
#include <bits/stdc++.h> #define rep(a, b, c) for (int a = b; a <= c; a++) #define per(a, b, c) for (int a = b; a >= c; a--) #define ios \ ; \ ios::sync_with_stdio(false); ...
#include <bits/stdc++.h> #define rep(a, b, c) for (int a = b; a <= c; a++) #define per(a, b, c) for (int a = b; a >= c; a--) #define ios \ ; \ ios::sync_with_stdio(false); ...
[["-", 0, 14, 8, 9, 0, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 39, 78]]
1
318
#include <algorithm> #include <bits/stdc++.h> #define ll long long using namespace std; void solve() { int n, d; cin >> n >> d; int x, y; int ans = 0; for (int i = 0; i < n; i++) { cin >> x >> y; if ((x * x) + (y * y) <= (d * d)) { ans++; } } cout << ans; return; /*ll k; cin>>k;...
#include <algorithm> #include <bits/stdc++.h> #define ll long long using namespace std; void solve() { ll n, d; cin >> n >> d; ll x, y; int ans = 0; for (ll i = 0; i < n; i++) { cin >> x >> y; if ((x * x) + (y * y) <= (d * d)) { ans++; } } cout << ans; return; /*ll k; cin>>k; ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78]]
1
120
#include <algorithm> #include <iostream> #include <list> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { double x, c, d; long a = 0, y; cin >> y >> x; for (int i = 0; i < y; i++) { cin >> c >> d; double tmp; c = pow(c, 2); d = pow(d, 2);...
#include <algorithm> #include <iostream> #include <list> #include <math.h> #include <stdio.h> #include <string> #include <vector> using namespace std; int main() { double x, c, d; long a = 0, y; cin >> y >> x; for (int i = 0; i < y; i++) { cin >> c >> d; double tmp; c = pow(c, 2); d = pow(d, 2);...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
116
#include <bits/stdc++.h> using namespace std; int main() { int n, d, sum = 0; long long int x, y; cin >> n >> d; for (int i = 1; i < n; i++) { cin >> x >> y; if (sqrt(x * x + y * y) <= d) sum++; } cout << sum << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, d, sum = 0; long long int x, y; cin >> n >> d; for (int i = 0; i < n; i++) { cin >> x >> y; if (sqrt(x * x + y * y) <= d) sum++; } cout << sum << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
80
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int D = sc.nextInt(); int[] X = new int[N]; int[] Y = new int[N]; for (int i = 0; i < N; i++) { X[i] = sc.nextInt(); Y[i] = sc.nextInt(...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); int D = sc.nextInt(); long[] X = new long[N]; long[] Y = new long[N]; for (int i = 0; i < N; i++) { X[i] = sc.nextInt(); Y[i] = sc.next...
[["-", 8, 196, 0, 503, 39, 224, 468, 506, 0, 507], ["+", 8, 196, 0, 503, 39, 224, 468, 506, 0, 96], ["-", 0, 503, 49, 200, 51, 227, 39, 506, 0, 507], ["+", 0, 503, 49, 200, 51, 227, 39, 506, 0, 96]]
3
182
#include <bits/stdc++.h> using namespace std; #define ll long long int void solution() { ll n, d; cin >> n >> d; ll counter = 0, p = 0; for (ll i = 0; i < n; ++i) { ll x, y; cin >> x >> y; p = sqrt(pow(x, 2) + pow(y, 2)); if (p >= d) counter++; } cout << counter << '\n'; } int main() {...
#include <bits/stdc++.h> using namespace std; #define ll double void solution() { ll n, d; cin >> n >> d; ll counter = 0, p = 0; for (ll i = 0; i < n; ++i) { ll x, y; cin >> x >> y; p = sqrt(pow(x, 2) + pow(y, 2)); if (p <= d) counter++; } cout << counter << '\n'; } int main() { ios_...
[["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
140
#include <cmath> #include <iostream> using namespace std; int main() { int i, n, d, a, b, count = 0; cin >> n >> d; for (i = 0; i < n; i++) { cin >> a >> b; if (sqrt(a * a + b * b) <= d) count++; } cout << count; }
#include <cmath> #include <iostream> using namespace std; int main() { double i, n, d, a, b, count = 0; cin >> n >> d; for (i = 0; i < n; i++) { cin >> a >> b; if (sqrt(a * a + b * b) <= d) count++; } cout << count; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13]]
1
78
#include <bits/stdc++.h> #include <random> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep1(i, n) for (int i = 1; i <= (n); ++i) using namespace std; using ll = long long; using P = pair<ll, ll>; using ull = unsigned long long; const ll K_MAX = 1e5 + 5; const ll Lmax = ll(1e18); const ll INF = 1e6; const i...
#include <bits/stdc++.h> #include <random> #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep1(i, n) for (int i = 1; i <= (n); ++i) using namespace std; using ll = long long; using P = pair<ll, ll>; using ull = unsigned long long; const ll K_MAX = 1e5 + 5; const ll Lmax = ll(1e18); const ll INF = 1e6; const i...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 14, 8, 9, 0, 43, 39, 78]]
1
150
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define mii map<int, int> #define mll map<ll, ll> #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> #define vd vector<double> #define vll vector<ll> #define fi first #define se second #define si set<int> #d...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define mii map<int, int> #define mll map<ll, ll> #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> #define vd vector<double> #define vll vector<ll> #define fi first #define se second #define si set<int> #d...
[["-", 0, 14, 8, 9, 0, 37, 0, 16, 17, 72], ["+", 8, 9, 0, 37, 0, 16, 12, 16, 17, 48]]
1
271
#include <iostream> #include <math.h> using namespace std; int main() { int N; cin >> N; int D; cin >> D; int X[N] = {}; int Y[N] = {}; int i; int count = 0; for (i = 0; i <= N - 1; i++) { cin >> X[i] >> Y[i]; } for (i = 0; i <= N - 1; i++) { if (X[i] * X[i] + Y[i] * Y[i] <= D * D) { ...
#include <iostream> #include <math.h> using namespace std; int main() { int N; cin >> N; long long D; cin >> D; long long X[N] = {}; long long Y[N] = {}; int i; int count = 0; for (i = 0; i <= N - 1; i++) { cin >> X[i] >> Y[i]; } for (i = 0; i <= N - 1; i++) { if (X[i] * X[i] + Y[i] * Y[i]...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
136
#include <cstdio> #define int long long signed main() { int n, d, cnt = 0; scanf("%lld%lld", &n, &d); for (register int i = 1; i <= n; ++i) { int x, y; scanf("%lld%lld", &x, &y); if (x * x + y * y >= d * d) ++cnt; // printf("%d\n",i); } printf("%d\n", cnt); return 0; }
#include <cstdio> #define int long long signed main() { int n, d, cnt = 0; scanf("%lld%lld", &n, &d); for (register int i = 1; i <= n; ++i) { int x, y; scanf("%lld%lld", &x, &y); if (x * x + y * y <= d * d) ++cnt; // printf("%d\n",i); } printf("%d\n", cnt); return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
99
n,d=map(int,input().split()) c=0 p=d*d for j in range(n): x,y=map(int,input().split()) if (x**2) + (y**2)==p: c=c+1 print(c)
n,d=map(int,input().split()) c=0 p=d*d for j in range(n): x,y=map(int,input().split()) if (x**2) + (y**2)<=p: c=c+1 print(c)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
72
#include <bits/stdc++.h> using namespace std; int main() { long long n, d, x, y, s, t, i, f, r, a; scanf("%lld %lld", &n, &d); f = 0; for (i = 1; i <= n; i++) { scanf("%lld %lld", &x, &y); if (x < 0) { x = x * -1; } if (y < 0) { y = y * -1; } s = x * x; t = y * y; r =...
#include <bits/stdc++.h> using namespace std; int main() { long long n, d, x, y, s, t, i, f, r; double a; scanf("%lld %lld", &n, &d); f = 0; for (i = 1; i <= n; i++) { scanf("%lld %lld", &x, &y); if (x < 0) { x = x * -1; } if (y < 0) { y = y * -1; } s = x * x; t = y * y...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 12, 2, 3, 4, 0, 74, 39, 77, 39, 40], ["+", 0, 11, 12, 2, 3, 4, 0, 74, 0, 25]]
1
160
n,d=map(int,input().split()) count=0 for i in range(n): x,y = map(int, input().split()) if x**2+y**2<=d**2: a.count=+1 print(a)
n,d=map(int,input().split()) count=0 for i in range(n): x,y = map(int, input().split()) if x**2+y**2<=d**2: count+=1 print(count)
[["-", 64, 196, 0, 1, 0, 662, 31, 319, 500, 22], ["-", 64, 196, 0, 1, 0, 662, 31, 319, 0, 131], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["-", 64, 196, 0, 1, 0, 662, 12, 664, 17, 72], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
66
import math n,d=map(int,input().split()) count=0 for i in range(n): x,y = map(int, input().split()) if math.sqrt((x**2)+(y**2))<=d: count=+1 print(count)
import math n,d=map(int,input().split()) count=0 for i in range(n): x,y = map(int, input().split()) if math.sqrt((x**2)+(y**2))<=d: count+=1 print(count)
[["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["-", 64, 196, 0, 1, 0, 662, 12, 664, 17, 72], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107]]
5
73
#include <math.h> #include <stdio.h> double dist(double x, double y); double dist(double x, double y) { return sqrt(x * x + y * y); } int main(void) { int n; int a; double x, y; int sum = 0; int i; scanf("%d", &n); scanf("%d", &a); for (i = 1; i <= n; i++) { scanf("%d", &x); scanf("%d", &y); ...
#include <math.h> #include <stdio.h> double dist(double x, double y); double dist(double x, double y) { return sqrt(x * x + y * y); } int main(void) { int n; int a; double x, y; int sum = 0; int i; scanf("%d", &n); scanf("%d", &a); for (i = 1; i <= n; i++) { scanf("%lf", &x); scanf("%lf", &y);...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
146
n,d = map(int,input().split()) l = [] for i in range(n): x,y = map(int,input().split()) l.append([x,y]) ans = 0 for j in l: if j[0]**2 + j[1]**2 < d**2: ans += 1 print(ans)
n,d = map(int,input().split()) l = [] for i in range(n): x,y = map(int,input().split()) l.append([x,y]) ans = 0 for j in l: if j[0]**2 + j[1]**2 <= d**2: ans += 1 print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
88
#include <cmath> #include <iostream> using namespace std; int main() { int N, D; cin >> N >> D; // DEBUG // cout << N << " " << D << endl; int count = 0; int x, y; for (int i = 0; i < N; i++) { cin >> x >> y; if (sqrt(x * x + y * y) <= D) { count++; } } cout << count << endl; ...
#include <cmath> #include <iostream> using namespace std; int main() { int N, D; cin >> N >> D; int count = 0; long x, y; for (int i = 0; i < N; i++) { cin >> x >> y; if (sqrt(x * x + y * y) <= D) { count++; } } cout << count << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
88