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 all(x) x.begin(), x.end() #define Unique(x) x.erase(unique(all(x)), x.end()) template <class T> T SQR(T N) { return (T)N * N; } template <class T> double DIST(T a, T b) { return 1.0 * sqrt(SQR(double(a)) + SQR(double(b))); } template <class T> bool CROSS(pair...
#include "bits/stdc++.h" using namespace ::std; #define all(x) x.begin(), x.end() #define Unique(x) x.erase(unique(all(x)), x.end()) template <class T> T SQR(T N) { return (T)N * N; } template <class T> double DIST(T a, T b) { return 1.0 * sqrt(SQR(double(a)) + SQR(double(b))); } template <class T> bool CROSS(pair...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
676
""" Satwik_Tiwari ;) . 2ND AUGUST , 2020 - SUNDAY """ #=============================================================================================== #importing some useful libraries. from __future__ import division, print_function from fractions import Fraction import sys import os from io import BytesIO, ...
""" Satwik_Tiwari ;) . 2ND AUGUST , 2020 - SUNDAY """ #=============================================================================================== #importing some useful libraries. from __future__ import division, print_function from fractions import Fraction import sys import os from io import BytesIO, ...
[["-", 0, 1, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 3, 4, 0, 652, 3, 4, 0, 652, 63, 22], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 612]]
5
1,179
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define ll long long #define pb push_back #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define ll long long #define pb push_back #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
187
#include <bits/stdc++.h> using namespace std; #define LL long long int #define FASTIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ co...
#include <bits/stdc++.h> using namespace std; #define LL long long int #define FASTIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ co...
[["-", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 31, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
101
#include <bits/stdc++.h> using namespace std; typedef long double ld; // XD #define int long long #define PB push_back #define all(x) (x).begin(), (x).end() #define ii pair<int, int> #define mii map<int, int> #define vi vector<int> #define vii vector<ii> #define F first #define S second #define rep(i, a, b) for (int i...
#include <bits/stdc++.h> using namespace std; typedef long double ld; // XD #define int long long #define PB push_back #define all(x) (x).begin(), (x).end() #define ii pair<int, int> #define mii map<int, int> #define vi vector<int> #define vii vector<ii> #define F first #define S second #define rep(i, a, b) for (int i...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
224
i = int(input()) if i <= 30: print("Yes") else: print("No")
i = int(input()) if i >= 30: print("Yes") else: print("No")
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 20]]
5
27
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int a, b, c, d, ans, tmp; string s; a = b = c = d = ans = tmp = 0; // vector<int>a(); cin >> a; if (a >= 10) { cout << "Yes"; } else { cout << "No"; } }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int a, b, c, d, ans, tmp; string s; a = b = c = d = ans = tmp = 0; // vector<int>a(); cin >> a; if (a >= 30) { cout << "Yes"; } else { cout << "No"; } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
72
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define sz(X) (int)(X).size() #define forn(i, n) for (int i = 0; i < int(n); i++) #define fornr(i, n) for (int i = int(n) - 1; i >= 0; i--) #define forab(i, a, b) for (int i = int(a); i < int(b...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define sz(X) (int)(X).size() #define forn(i, n) for (int i = 0; i < int(n); i++) #define fornr(i, n) for (int i = int(n) - 1; i >= 0; i--) #define forab(i, a, b) for (int i = int(a); i < int(b...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
156
#include <bits/stdc++.h> using namespace std; int32_t main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n; cin >> n; cout << (n >= 0 ? "Yes" : "No"); return 0; }
#include <bits/stdc++.h> using namespace std; int32_t main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n; cin >> n; cout << (n >= 30 ? "Yes" : "No"); return 0; }
[["-", 0, 16, 12, 23, 0, 41, 15, 16, 12, 13], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 12, 13]]
1
61
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define sp " " #define endl "\n" #define MAX 10e9 #define MAXN 100001 #define inf_int 2e9 #define inf_ll 2e18 #define e 1e-9 #define vi vector<int> #define vl vector<ll> #define vc vector<char> #define vs vector<string> #define vpl vector<pair<ll, ll>> #define vpc ve...
#pragma GCC optimize("O3") #include <bits/stdc++.h> #define sp " " #define endl "\n" #define MAX 10e9 #define MAXN 100001 #define inf_int 2e9 #define inf_ll 2e18 #define e 1e-9 #define vi vector<int> #define vl vector<ll> #define vc vector<char> #define vs vector<string> #define vpl vector<pair<ll, ll>> #define vpc ve...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
317
#include <bits/stdc++.h> #define for_int(i, a, b) for (int i = (a); i <= (b); ++i) #define rep_int(i, a, b) for (int i = (a); i >= (b); --i) #define for_ll(i, a, b) for (ll i = (a); i <= (b); ++i) #define rep_ll(i, a, b) for (ll i = (a); i >= (b); --i) #define ull unsigned long long #define ll long long #define db doub...
#include <bits/stdc++.h> #define for_int(i, a, b) for (int i = (a); i <= (b); ++i) #define rep_int(i, a, b) for (int i = (a); i >= (b); --i) #define for_ll(i, a, b) for (ll i = (a); i <= (b); ++i) #define rep_ll(i, a, b) for (ll i = (a); i >= (b); --i) #define ull unsigned long long #define ll long long #define db doub...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
206
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const ll N = 1e6 + 5, inf = 1e18, mod = 1e9 + 7; #define test \ ll testcases; \ cin >> testcase...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const ll N = 1e6 + 5, inf = 1e18, mod = 1e9 + 7; #define test \ ll testcases; \ cin >> testcase...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
315
X = int(input()) print('Yes' if X == 30 else 'No')
X = int(input()) print('Yes' if X >= 30 else 'No')
[["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 60], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 20]]
5
22
// ssenseeeeeeeeeeeeeeeeeeeeeeeeeeeee #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define MX 1000000000 #define endl '\n' #define startt \ ios_base::sync_with_stdio(false); ...
// ssenseeeeeeeeeeeeeeeeeeeeeeeeeeeee #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define MX 1000000000 #define endl '\n' #define startt \ ios_base::sync_with_stdio(false); ...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
73
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int x; cin >> x; if (x == 30) { cout << "Yes"; } else { cout << "No\n"; } } int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); int t = 1; // cin >> t; while (t--) solve(); return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int x; cin >> x; if (x >= 30) { cout << "Yes"; } else { cout << "No\n"; } } int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); int t = 1; // cin >> t; while (t--) solve(); return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
84
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vl = vector<ll>; using ml = map<ll, ll>; #define ff first #define ss second #define endl '\n' #define ins insert #define eb emplace_back #define sz(c) (ll) c.size() #define all(c) begin(c), end(c) #define rall(c) rbegin(...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using vl = vector<ll>; using ml = map<ll, ll>; #define ff first #define ss second #define endl '\n' #define ins insert #define eb emplace_back #define sz(c) (ll) c.size() #define all(c) begin(c), end(c) #define rall(c) rbegin(...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]]
1
157
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <float.h> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #inclu...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdint> #include <cstdio> #include <ctime> #include <deque> #include <float.h> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <numeric> #inclu...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
1,431
/* * John Wick is a man of * focus, commitment & sheer will */ #include <bits/stdc++.h> using namespace std; // -----------------<fast IO>------------------ #define thisIsSpeed \ ios::sync_with_stdio(0); ...
/* * John Wick is a man of * focus, commitment & sheer will */ #include <bits/stdc++.h> using namespace std; // -----------------<fast IO>------------------ #define thisIsSpeed \ ios::sync_with_stdio(0); ...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
990
from sys import stdin,stdout import bisect import math def st(): return list(stdin.readline().strip()) def inp(): return int(stdin.readline()) def li(): return list(map(int,stdin.readline().split())) def mp(): return map(int,stdin.readline().split()) def pr(n): stdout.write(str(n)+"\n") def...
from sys import stdin,stdout import bisect import math def st(): return list(stdin.readline().strip()) def inp(): return int(stdin.readline()) def li(): return list(map(int,stdin.readline().split())) def mp(): return map(int,stdin.readline().split()) def pr(n): stdout.write(str(n)+"\n") def...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
455
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> using namespace std; #define INF 0x3f3f3f #define ll long long #define cio \ ios::sync_with_...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> using namespace std; #define INF 0x3f3f3f #define ll long long #define cio \ ios::sync_with_...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
81
#include <bits/stdc++.h> #include <string> using namespace std; #define ll long long #define pb push_back #define endl '\n' bool cmp(char a, char b) { return a < b; } ll solve() { ll x; cin >> x; if (x >= 30) cout << "YES"; else cout << "NO"; return 0; } int main() { ios_base::sync_with_stdio(false)...
#include <bits/stdc++.h> #include <string> using namespace std; #define ll long long #define pb push_back #define endl '\n' bool cmp(char a, char b) { return a < b; } ll solve() { ll x; cin >> x; if (x >= 30) cout << "Yes"; else cout << "No"; return 0; } int main() { ios_base::sync_with_stdio(false)...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
115
#include <bits/stdc++.h> #include <ctime> #include <random> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //#pragma GCC optimize("-O3") //#pragma GCC optimize("Ofast") //#pragma GCC optimize("unroll-loops") //#pragma GCC target("avx2") #define ll long long #define mp make_pair #defin...
#include <bits/stdc++.h> #include <ctime> #include <random> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //#pragma GCC optimize("-O3") //#pragma GCC optimize("Ofast") //#pragma GCC optimize("unroll-loops") //#pragma GCC target("avx2") #define ll long long #define mp make_pair #defin...
[["-", 0, 16, 12, 23, 0, 41, 15, 16, 17, 60], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 17, 20]]
1
309
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define FASTINOUT \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define FASTINOUT \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
53
package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func main() { scanInit() n := nextInt() if n >= 30 { fmt.Println("Yes") } fmt.Println("No") } // ---- readfunc func scanInit() { const cap = 64 * 1024 var buf = make([]byte, cap) sc.Buffer(buf, cap) sc.Split(bu...
package main import ( "bufio" "fmt" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) func main() { scanInit() n := nextInt() if n >= 30 { fmt.Println("Yes") return } fmt.Println("No") } // ---- readfunc func scanInit() { const cap = 64 * 1024 var buf = make([]byte, cap) sc.Buffer(buf, cap) sc...
[["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38], ["+", 0, 435, 8, 196, 0, 57, 64, 196, 0, 165]]
7
189
#include <bits/stdc++.h> using namespace std; typedef long long int ll; void solve() { int n; cin >> n; if (n >= 39) cout << "Yes\n"; else cout << "No"; } int main() { // cin.sync_with_stdio(false); // cin.tie(0); // cout.tie(0); int t = 1; // cin >> t; while (t--) { solve(); } }
#include <bits/stdc++.h> using namespace std; typedef long long int ll; void solve() { int n; cin >> n; if (n >= 30) cout << "Yes\n"; else cout << "No"; } int main() { // cin.sync_with_stdio(false); // cin.tie(0); // cout.tie(0); int t = 1; // cin >> t; while (t--) { solve(); } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
71
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repr(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define equals(a, b) (fabs((a) - (b)) < EPS) using namespace std; typedef long long ll; t...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define repr(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define FORR(i, m, n) for (int i = (m); i >= (n); --i) #define equals(a, b) (fabs((a) - (b)) < EPS) using namespace std; typedef long long ll; t...
[["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
272
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define pb push_back #define pf push_front #define pof pop_front #define pob pop_back #define mp make_pair #define pll pair<ll, ll> #define pii pair<int, int> #define all(s) s.begin(), s.end() #define vll vector<ll> #defi...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define pb push_back #define pf push_front #define pof pop_front #define pob pop_back #define mp make_pair #define pll pair<ll, ll> #define pii pair<int, int> #define all(s) s.begin(), s.end() #define vll vector<ll> #defi...
[["-", 0, 16, 12, 23, 0, 41, 15, 16, 17, 47], ["-", 0, 16, 12, 23, 0, 41, 15, 16, 12, 13], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 17, 20], ["+", 0, 16, 12, 23, 0, 41, 15, 16, 12, 13]]
1
226
#include <bits/stdc++.h> #define FAST_IO ios_base::sync_with_stdio(false), cin.tie(nullptr) #define setIO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout) #define trav(e, x) for (auto &e : x) #define pb(x) push_back(x) #define eb(x...) emplace_back(x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size(...
#include <bits/stdc++.h> #define FAST_IO ios_base::sync_with_stdio(false), cin.tie(nullptr) #define setIO(i, o) freopen(i, "r", stdin), freopen(o, "w", stdout) #define trav(e, x) for (auto &e : x) #define pb(x) push_back(x) #define eb(x...) emplace_back(x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size(...
[["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]]
1
93
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define debug(val) "[ " << #val " : " << (val) #define space " " #define vi vector<int> #define vl vector<ll> #define vll vector<vector<ll>> #define vii vector<vector<int>> #define PI (double)(atan(1) * 4) #define pb push_back #define pi pair<int,...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define debug(val) "[ " << #val " : " << (val) #define space " " #define vi vector<int> #define vl vector<ll> #define vll vector<vector<ll>> #define vii vector<vector<int>> #define PI (double)(atan(1) * 4) #define pb push_back #define pi pair<int,...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
327
#include <bits/stdc++.h> using namespace std; int a; int main() { cin >> a; if (a <= 30) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int a; int main() { cin >> a; if (a >= 30) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
49
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; // typedef tree<int,null_type,less<int // >,rb_tree_tag,tree_order_statistics_node_update>indexed_set; template <class T1, class T2> ostream &operator<<(o...
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; using namespace std; typedef long long ll; typedef long double ld; // typedef tree<int,null_type,less<int // >,rb_tree_tag,tree_order_statistics_node_update>indexed_set; template <class T1, class T2> ostream &operator<<(o...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
487
print('Yes' if int(input())>30 else 'No')
print('Yes' if int(input())>=30 else 'No')
[["-", 0, 652, 3, 4, 0, 41, 0, 666, 667, 47], ["+", 0, 652, 3, 4, 0, 41, 0, 666, 667, 20]]
5
19
#include <iostream> #include <vector> using namespace std; int main() { int n, d, a, b; int ans = 0; cin >> n >> d; for (int i = 0; i < n; i++) { cin >> a >> b; if (a * a + b * b <= d * d) ans++; } cout << ans << endl; }
#include <iostream> #include <vector> using namespace std; int main() { long long n, d, a, b; int ans = 0; cin >> n >> d; for (int i = 0; i < n; i++) { cin >> a >> b; if (a * a + b * b <= d * 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
79
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; typedef long long ll; #define int ll main() { int n, d; cin >> n >> d; int x[n], y[d]; for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } int ans = 0; for (int i = 0; i < n; i++) { if (x[i] * x[i] + y[i] * y[i] <= d * d...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; typedef long long ll; #define int ll main() { int n, d; cin >> n >> d; int x[n], y[n]; for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } int ans = 0; for (int i = 0; i < n; i++) { if (x[i] * x[i] + y[i] * y[i] <= d * d...
[["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 22]]
1
137
n,d = [int(x) for x in input().split()] x = [] y = [] for i in range(n): x1,y1 = [int(x) for x in input().split()] x.append(x1) y.append(y1) c = 0 for i in range(n): s = x[i] ** 2 + y[i] ** 2 if s < d ** 2: c += 1 print(c)
n,d = [int(x) for x in input().split()] x = [] y = [] for i in range(n): x1,y1 = [int(x) for x in input().split()] x.append(x1) y.append(y1) c = 0 for i in range(n): s = x[i] ** 2 + y[i] ** 2 if s <= d ** 2: c += 1 print(c)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
108
#include <bits/stdc++.h> using namespace std; const unsigned int M = 1000000007; int main() { int n, d; cin >> n >> d; vector<int> x(n), y(n); int ans = 0; for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; if (sqrt(x[i] * x[i] + y[i] * y[i]) <= d) { ans++; } } cout << ans << endl; ret...
#include <bits/stdc++.h> using namespace std; const unsigned int M = 1000000007; int main() { long long n, d; cin >> n >> d; vector<long long> x(n), y(n); int ans = 0; for (long i = 0; i < n; i++) { cin >> x[i] >> y[i]; if (sqrt(x[i] * x[i] + y[i] * y[i]) <= d) { ans++; } } cout << ans <...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 344, 3, 347, 0, 77, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96]]
1
118
n, d = map(int, input().split()) lst = [[int(j) for j in input().split()] for i in range(n)] count = 0 for d in lst: distance = (d[0]**2 + d[1]**2)**0.5 if distance <= d: count += 1 print(count)
n, d = map(int, input().split()) lst = [[int(j) for j in input().split()] for i in range(n)] count = 0 for x in lst: distance = (x[0]**2 + x[1]**2)**0.5 if distance <= d: count += 1 print(count)
[["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["-", 31, 23, 0, 657, 31, 657, 31, 206, 51, 22], ["+", 31, 23, 0, 657, 31, 657, 31, 206, 51, 22], ["-", 31, 23, 0, 657, 12, 657, 31, 206, 51, 22], ["+", 31, 23, 0, 657, 12, 657, 31, 206, 51, 22]]
5
82
N, D = map(int, input().split()) count = 0 for i in range(N): x, y = map(int, input().split()) d = sqrt(x**2 + y**2) if d<=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()) d = math.sqrt(x**2 + y**2) if d<=D: count += 1 print(count)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 500, 22], ["+", 0, 1, 0, 662, 12, 652, 63, 319, 0, 131]]
5
67
N, D = map(int, input().split()) i = 0 count = 0 while (i < N): p, q = map(int, input().split()) d = math.sqrt(p*p + q*q) if (d <= D): count+= 1 i+= 1 print(i)
import math N, D = map(int, input().split()) i = 0 count = 0 while (i < N): p, q = map(int, input().split()) d = math.sqrt(p*p + q*q) if (d <= D): count+= 1 i+= 1 print(count)
[["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
76
#include <iostream> using namespace std; int main() { int n, d, x, y, a = 0; cin >> n >> d; for (int i = 1; i <= n; i++) { cin >> x >> y; if (x * x + y * y <= d * d) a++; } cout << a << endl; }
#include <iostream> using namespace std; int main() { long long int n, d, x, y, a = 0; cin >> n >> d; for (int i = 1; i <= n; i++) { cin >> x >> y; if (x * x + y * y <= d * d) a++; } cout << a << endl; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
76
#include <bits/stdc++.h> using namespace std; int main() { int N, D, sum = 0; cin >> N >> D; for (int i = 0; i < N; i++) { int a, b, d2; cin >> a >> b; d2 = a * a + b * b; if (d2 <= D * D) { sum++; } } cout << sum << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int64_t N, D, sum = 0; cin >> N >> D; for (int i = 0; i < N; i++) { int64_t a, b, d2; cin >> a >> b; d2 = a * a + b * b; if (d2 <= D * D) { sum++; } } cout << sum << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40]]
1
85
n ,d = map(int,input().split()) ans = 0 for i in range(n): x,y = map(int,input().split()) if d**2 <= x**2 + y**2 : ans += 1 print(ans)
n ,d = map(int,input().split()) ans = 0 for i in range(n): x,y = map(int,input().split()) if d**2 >= x**2 + y**2 : ans += 1 print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20]]
5
63
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { int n, d; cin >> n >> d; int x[n]; int y[n]; for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } int sum = 0; for (int i = 0; i < n; i++) { int a = (x[i] * x[i]) + (y[i] * y[i]); a = sqrt(a); if (a ==...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { int n, d; cin >> n >> d; double x[n]; double y[n]; for (int i = 0; i < n; i++) { cin >> x[i] >> y[i]; } int sum = 0; for (int i = 0; i < n; i++) { double a = (x[i] * x[i]) + (y[i] * y[i]); a = sqrt(a); ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
142
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pii pair<int, int> #define pll pair<long long, long long> #define pb push_back #define ll long long #define ld long double #define precision(x, d) cout << fixed << setprecision(d) << x #define fill(a, b) memset((a), (b), sizeof((a...
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pii pair<int, int> #define pll pair<long long, long long> #define pb push_back #define ll long long #define ld long double #define precision(x, d) cout << fixed << setprecision(d) << x #define fill(a, b) memset((a), (b), sizeof((a...
[["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 78]]
1
211
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define all(x) (x).begin(), (x).end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define repd(i, n) for (ll i = n - 1; i >= 0; i--) #define rep2(i, s, n) for (l...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) #define all(x) (x).begin(), (x).end() #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define repd(i, n) for (ll i = n - 1; i >= 0; i--) #define rep2(i, s, n) for (l...
[["-", 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
143
#include <cmath> #include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; int a, b, f = 0; for (int x = 0; x < n; x++) { cin >> a >> b; a *= a; b *= b; double z = sqrt(a + b); if (z <= d) { f++; } } cout << f; }
#include <cmath> #include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; long long a, b, f = 0; for (int x = 0; x < n; x++) { cin >> a >> b; a *= a; b *= b; long double z = sqrt(a + b); if (z <= d) { f++; } } cout << f; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96]]
1
89
N,D=map(int, input().split()) A = 0 for i in range(N): X,Y=map(int, input().split()) if (D*D) >= (X*X)+(Y*Y): A +=1 print(A) print(A)
N,D=map(int, input().split()) A = 0 for i in range(N): X,Y=map(int, input().split()) if (D*D) >= (X*X)+(Y*Y): A +=1 print(A)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
73
N, D = map(int, input().split()) X = [list(map(int, input().split())) for l in range(N)] count = 0 for i in range(N): if (X[i][0])**2 + (X[i][1])**2 - D**2 >= 0: count = count + 1 print(count)
N, D = map(int, input().split()) X = [list(map(int, input().split())) for l in range(N)] count = 0 for i in range(N): if (X[i][0])**2 + (X[i][1])**2 - D**2 <= 0: count = count + 1 print(count)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
93
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int D = scan.nextInt(); int count = 0; int a, b; double c; for (int i = 0; i < N; i++) { a = scan.nextInt(); b = scan.nextInt(...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int D = scan.nextInt(); int count = 0; long a, b; double c; for (int i = 0; i < N; i++) { a = scan.nextLong(); b = scan.nextLo...
[["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22], ["+", 8, 196, 0, 1, 0, 11, 12, 492, 141, 22]]
3
137
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { long long x, y; cin >> x >> y; double dis = (sqrt(x * x + y * y)); if (ceil(dis) <= d) { ans = +1; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { long long x, y; cin >> x >> y; double dis = (sqrt(x * x + y * y)); if (ceil(dis) <= d) { ans += 1; } } cout << ans << endl; }
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]]
1
93
x,y = map(int,input().split()) y =y**2 count=0 for i in range(x): a,b = map(int,input().split()) if a**2+b**2 <y: count+=1; print(count)
x,y = map(int,input().split()) y =y**2 count=0 for i in range(x): a,b = map(int,input().split()) if a**2+b**2 <=y: count+=1; print(count)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
67
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long D = sc.nextLong(); long count = 0; for (int i = 0; i < N; i++) { long a = sc.nextLong(); long b = sc.nextLong(); double value...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long N = sc.nextLong(); long D = sc.nextLong(); long count = 0; for (int i = 0; i < N; i++) { long a = sc.nextLong(); long b = sc.nextLong(); double value...
[["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 19]]
3
151
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define pb push_back #define pp pop_back #define f first #define s second #define sz(a) (int)((a).size()) #define NoType ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL) #define mp make_pair ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define pb push_back #define pp pop_back #define f first #define s second #define sz(a) (int)((a).size()) #define NoType ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL) #define mp make_pair ...
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40]]
1
225
#include <bits/stdc++.h> using namespace std; int main(void) { int cnt = 0, n, d; cin >> n >> d; long long x, y; for (int i = 0; i < n; ++i) { cin >> x >> y; if (x * x + y * y <= d * d) ++cnt; } cout << cnt << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main(void) { int cnt = 0, n, d; cin >> n >> d; long long x, y; for (int i = 0; i < n; ++i) { cin >> x >> y; if (sqrt(x * x + y * y) <= d) ++cnt; } cout << cnt << endl; return 0; }
[["+", 0, 57, 15, 339, 51, 16, 31, 2, 63, 22], ["+", 15, 339, 51, 16, 31, 2, 3, 4, 0, 24], ["+", 15, 339, 51, 16, 31, 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
82
n, d = list(map(int, input().split())) count = 0 for _ in range(n): x, y = list(map(int, input().split())) if (x**2 + y**2) <= d**2: ++count print(count)
n, d = list(map(int, input().split())) count = 0 for _ in range(n): x, y = list(map(int, input().split())) if (x**2 + y**2) <= d**2: count+=1 print(count)
[["-", 0, 57, 64, 196, 0, 1, 0, 664, 17, 72], ["-", 64, 196, 0, 1, 0, 664, 28, 664, 17, 72], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 17, 107], ["+", 0, 57, 64, 196, 0, 1, 0, 677, 12, 612]]
5
71
import math n, d = list(map(int, input().split())) count = 0 for _ in range(n): x, y = list(map(int, input().split())) if math.sqrt(x**2 + y**2) >= d: count += 1 print(count)
import math n, d = list(map(int, input().split())) count = 0 for _ in range(n): x, y = list(map(int, input().split())) if math.sqrt(x**2 + y**2) <= d: count += 1 print(count)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 20], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
74
n, d = map(int, input().split()) cnt = 0 for _ in range(n): x, y = map(int, input().split()) if (x * x + y * y <= d): cnt = cnt + 1 print(cnt)
n, d = map(int, input().split()) cnt = 0 for _ in range(n): x, y = map(int, input().split()) if (x * x + y * y <= d * d): cnt = cnt + 1 print(cnt)
[["+", 0, 57, 15, 23, 0, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 12, 22]]
5
65
#a問題 # x=int(input()) # # if x>=30: # print("Yes") # else: # print("No") #b問題 n,d = (int(y) for y in input().split()) x=[] count=0 for i in range(n): n, m = (int(y) for y in input().split()) s=n**2+m**2 if s<(d**2): count+=1 print(count)
#a問題 # x=int(input()) # # if x>=30: # print("Yes") # else: # print("No") #b問題 n,d = (int(y) for y in input().split()) x=[] count=0 for i in range(n): n, m = (int(y) for y in input().split()) s=n**2+m**2 # print(s) if s<=(d**2): count+=1 print(count)
[["-", 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> #include <vector> using namespace std; int main() { int N, D; cin >> N >> D; vector<int> X(N), Y(N); vector<double> dist(N); int ans = 0; for (int i = 0; i < N; i++) { cin >> X.at(i) >> Y.at(i); dist.at(i) = pow(X.at(i) * X.at(i) + Y.at(i) * Y.at(i), 0.5); i...
#include <cmath> #include <iostream> #include <vector> using namespace std; int main() { double N, D; cin >> N >> D; vector<double> X(N), Y(N); vector<double> dist(N); int ans = 0; for (int i = 0; i < N; i++) { cin >> X.at(i) >> Y.at(i); dist.at(i) = pow(X.at(i) * X.at(i) + Y.at(i) * Y.at(i), 0.5);...
[["-", 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
150
#include <bits/stdc++.h> #define ll long long inline int roundup(int a, int b) { return (((a + (b - 1)) / b)); } using namespace std; signed main(void) { int x, y; int n, d, count = 0; cin >> n >> d; int d_sq = d * d; for (int i = 0; i < n; i++) { cin >> x >> y; if (x * x + y * y <= d_sq) { cou...
#include <bits/stdc++.h> #define ll long long inline int roundup(int a, int b) { return (((a + (b - 1)) / b)); } using namespace std; signed main(void) { ll x, y; ll n, d, count = 0; cin >> n >> d; ll d_sq = d * d; for (int i = 0; i < n; i++) { cin >> x >> y; if ((x * x + y * y) <= d_sq) { coun...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25]]
1
122
#include <bits/stdc++.h> using namespace std; #define Vsort(a) sort(a.bigin(), a.end()) #define rep(i, n) for (int i = 0; i < (n); i++) int main() { long long int n, d; long long int a, b, c, count = 0; cin >> n >> d; vector<long long int> x(n); vector<long long int> y(n); for (int i = 0; i < n; i++) { ...
#include <bits/stdc++.h> using namespace std; #define Vsort(a) sort(a.bigin(), a.end()) #define rep(i, n) for (int i = 0; i < (n); i++) int main() { long long int n, d; long long int a, b, count = 0; double c; cin >> n >> d; vector<long long int> x(n); vector<long long int> y(n); for (int i = 0; i < n; ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 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, 30, 0, 14, 8, 9, 0, 43, 49, 22]]
1
162
#include <bits/stdc++.h> #define ll long long #define endl "\n" #define INF 2e9 using namespace std; const int N = 1e6 + 1; const int mod = 1e9 + 7; ll fastexp(ll base, ll exp) { base %= mod; ll ans = 1; while (exp > 0) { if (exp & 1) { ans *= base; ans %= mod; } base *= base; base %= ...
#include <bits/stdc++.h> #define ll long long #define endl "\n" #define INF 2e9 using namespace std; const int N = 1e6 + 1; const int mod = 1e9 + 7; ll fastexp(ll base, ll exp) { base %= mod; ll ans = 1; while (exp > 0) { if (exp & 1) { ans *= base; ans %= mod; } base *= base; base %= ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96]]
1
256
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; int cnt = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; x = abs(x); y = abs(y); if (sqrt((x * x) + (y * y)) <= d) { cnt++; } } cout << cnt; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { double n, d; cin >> n >> d; int cnt = 0; for (int i = 0; i < n; i++) { double x, y; cin >> x >> y; x = abs(x); y = abs(y); if (sqrt((x * x) + (y * y)) <= d) { cnt++; } } cout << cnt; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40]]
1
100
#include <bits/stdc++.h> using namespace std; #define ll long long // #define endl '\n' void max_self(int &a, int b) { a = max(a, b); } void min_self(int &a, int b) { a = min(a, b); } void solve() { ll n, d; cin >> n >> d; int cnt = 0; d = d * d; for (int i = 0; i < n; i++) { ll x, y; cin >> x >> y...
#include <bits/stdc++.h> using namespace std; #define ll long long // #define endl '\n' void max_self(int &a, int b) { a = max(a, b); } void min_self(int &a, int b) { a = min(a, b); } void solve() { ll n, d; cin >> n >> d; int cnt = 0; d = d * d; for (int i = 0; i < n; i++) { ll x, y; cin >> x >> y...
[["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
189
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N, D, count = 0; double dist; cin >> N >> D; vector<double> x(N), y(N); rep(i, N) cin >> x[i] >> y[i]; rep(i, N) { if (x[i] >= D || y[i] >= D) continue; di...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int N, D, count = 0; double dist; cin >> N >> D; vector<double> x(N), y(N); rep(i, N) cin >> x[i] >> y[i]; rep(i, N) { if (x[i] > D || y[i] > D) continue; dist...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47]]
1
143
import math i = input().split() print(i) n = int(i[0]) D = int(i[1]) num_list = [] count = 0 for i in range(n): num_list.append(list(map(int,input().split()))) for j in num_list: x = j[0] y = j[1] dist = math.sqrt(x ** 2 + y ** 2) if dist <= D: count += 1 print(count)
import math i = input().split() n = int(i[0]) D = int(i[1]) num_list = [] count = 0 for i in range(n): num_list.append(list(map(int,input().split()))) for j in num_list: x = j[0] y = j[1] dist = math.sqrt(x ** 2 + y ** 2) if dist <= D: count += 1 print(count)
[["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
111
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; const ll INF = 100000000; #define rep1(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, k, n) for (ll i = k; i < (n); i++) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; const ll INF = 100000000; #define rep1(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, k, n) for (ll i = k; i < (n); i++) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]]
1
181
j=0 N,D=map(int,input().split()) for i in range(N): X,Y=map(int,input().split()) if (X**2+Y**2)**0.5<=D: j=j+1 print(i)
j=0 N,D=map(int,input().split()) for i in range(N): X,Y=map(int,input().split()) if (X**2+Y**2)**0.5<=D: j=j+1 print(j)
[["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22]]
5
67
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; if (x * x + y * y <= d * d) ans++; } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long 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; return 0; }
[["-", 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
86
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; if (x * x + y * y <= d * d) { ans++; } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long 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; return 0; }
[["-", 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], ["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 7, 8, 9, 0, 57, 64, 9,...
1
88
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; if (x * x + y * y <= d * d) { ans++; } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long 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; return 0; }
[["-", 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
88
#include <bits/stdc++.h> using namespace std; using ll = long long; using st = string; using P = pair<int, int>; #define rep(i, n) for (int i = 0; i < (n); i++) #define chmax(x, y) \ { x = max(x, y); } #define chmin(x, y) ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using st = string; using P = pair<int, int>; #define rep(i, n) for (int i = 0; i < (n); i++) #define chmax(x, y) \ { x = max(x, y); } #define chmin(x, y) ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78]]
1
168
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define INF 100000000 #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define repp(i, n, s) for (int i = (int)(n); i >= (int)(s); i--) #define mp make_pair ll mod = 1000000007; ll mod2 = 9...
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define INF 100000000 #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define repp(i, n, s) for (int i = (int)(n); i >= (int)(s); i--) #define mp make_pair ll mod = 1000000007; ll mod2 = 9...
[["-", 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, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 39, 78]]
1
139
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define INF 100000000 #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define repp(i, n, s) for (int i = (int)(n); i >= (int)(s); i--) #define mp make_pair ll mod = 1000000007; ll mod2 = 9...
//#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define INF 100000000 #define rep(i, s, n) for (int i = (int)(s); i < (int)(n); i++) #define repp(i, n, s) for (int i = (int)(n); i >= (int)(s); i--) #define mp make_pair ll mod = 1000000007; ll mod2 = 9...
[["-", 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, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 9, 0, 43, 39, 78]]
1
138
N,D = map(int,input().split()) xy = [] for i in range(N): x,y = map(int,input().split()) xy.append([x,y]) ans = 0 for i in range(N): x = xy[i][0] y = xy[i][1] if(D >= (x*x + y*y) / D): ans+=1 print(ans)
N,D = map(int,input().split()) xy = [] for i in range(N): x,y = map(int,input().split()) xy.append([x,y]) ans = 0 for i in range(N): x = xy[i][0] y = xy[i][1] if(D*D >= (x*x + y*y)): ans+=1 print(ans)
[["+", 0, 57, 15, 23, 0, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 23, 0, 666, 0, 657, 12, 22], ["-", 0, 57, 15, 23, 0, 666, 0, 657, 17, 85], ["-", 0, 57, 15, 23, 0, 666, 0, 657, 12, 22]]
5
107
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <iterator> #include <list> #include <map> #include <memory> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define rep(i, n) for (i = 0; i < n; i++) using namespace std; int p[200000][2]; int mai...
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <iterator> #include <list> #include <map> #include <memory> #include <queue> #include <set> #include <stack> #include <utility> #include <vector> #define rep(i, n) for (i = 0; i < n; i++) using namespace std; long long p[200000][2]; i...
[["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96]]
1
164
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define ll long long #define ii pair<int, int> #define vi vector<int> #define vll vector<ll> #define vii vector<ii> const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3f...
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define ff first #define ss second #define all(x) (x).begin(), (x).end() #define ll long long #define ii pair<int, int> #define vi vector<int> #define vll vector<ll> #define vii vector<ii> const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3f...
[["-", 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
165
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n, k, cnt = 0, p; cin >> n >> k; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; p = (x * x) + (y * y); if (p <= k * k) cnt++; } cout << cnt << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll n, k, cnt = 0, p; cin >> n >> k; for (ll i = 0; i < n; i++) { ll x, y; cin >> x >> y; p = (x * x) + (y * y); if (p <= k * k) cnt++; } cout << cnt << endl; return 0; }
[["-", 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
93
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; int cnt = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; int dis = 0; if (sqrt(x * x + y * y) <= d) cnt++; } cout << cnt; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; int cnt = 0; for (int i = 0; i < n; i++) { long long x, y; cin >> x >> y; int dis = 0; if (sqrt(x * x + y * y) <= d) cnt++; } cout << cnt; return 0; }
[["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96]]
1
85
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 52, 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
115
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 52, 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], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 44]]
1
115
#include <algorithm> #include <cstdio> #include <iostream> #include <locale.h> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> using namespace std; int main() { int n, d, x, y, ans = 0; scanf("%d %d", &n, &d); for (int i = 0; i < n; i++) { scanf("%d %d",...
#include <algorithm> #include <cstdio> #include <iostream> #include <locale.h> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> using namespace std; int main() { long long int n, d, x, y, ans = 0; scanf("%lld %lld", &n, &d); for (int i = 0; i < n; i++) { ...
[["+", 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
115
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()) count = 0 for i in range(N): if(D**2 >= X[i]**2 + Y[i]**2): count += 1 print(count)
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()) count = 0 for i in range(N): if(D**2 >= X[i]**2 + Y[i]**2): count += 1 print(count)
[["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25]]
5
97
n,d = map(int,input().split()) ans = 0 for i in range(n): x, y = map(int,input().split()) if (x**2+y**2)**0.05 <= d: 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**2+y**2)**0.5 <= d: ans += 1 print(ans)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 12, 531], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 531]]
5
65
#include <iostream> int main() { long long n, d; long long d2; std::cin >> n >> d; d2 = d * d; int ans = 0; for (int i = 0; i < n; i++) { int x, y; std::cin >> x >> y; long long dist2 = x * x + y * y; if (dist2 <= d2) ans++; } std::cout << ans << std::endl; return 0; }
#include <iostream> int main() { long long n, d, d2; std::cin >> n >> d; d2 = d * d; int ans = 0; for (int i = 0; i < n; i++) { long long x, y; std::cin >> x >> y; long long dist2 = x * x + y * y; if (dist2 <= d2) ans++; } std::cout << ans << std::endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96]]
1
100
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 0; i <= n; i++) #define ll long long using namespace std; int keta(int n) { int res; for (int i = 0; i < 100; i++) { n = n / 10; if (n == 0) { res = i + 1; break; } } return res; } s...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 0; i <= n; i++) #define ll long long using namespace std; int keta(int n) { int res; for (int i = 0; i < 100; i++) { n = n / 10; if (n == 0) { res = i + 1; break; } } return res; } i...
[["-", 36, 36, 0, 30, 0, 14, 39, 86, 0, 156], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 8, 9, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 14, 8, 9, 0, 43, 39, 78]]
1
141
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { int n, d; cin >> n >> d; int x[n], y[n]; double k; ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) int main() { int n, d; cin >> n >> d; long long int x[n], y[n]; d...
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 11, 12, 2, 3, 4, 0, 16, 17, 140], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 48]]
1
130
N, D = map(int, input().split()) num = [input().split() for _ in range(N)] X = [] Y = [] count = 0 for n in num: X.append(int(n[0])) Y.append(int(n[1])) for x, y in zip(X, Y): dist = x**2 + y**2 if dist <= D**2: count += 1
N, D = map(int, input().split()) num = [input().split() for _ in range(N)] X = [] Y = [] count = 0 for n in num: X.append(int(n[0])) Y.append(int(n[1])) for x, y in zip(X, Y): dist = x**2 + y**2 if dist <= D**2: count += 1 print(count)
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
105
n,d = map(int,input().split()) ans = 0 for _ in range(n) : x,y = map(int,input().split()) distance = (x**2 + y**2)**1/2 if distance <= d : ans += 1 print(ans)
n,d = map(int,input().split()) ans = 0 for _ in range(n) : x,y = map(int,input().split()) distance = (x**2 + y**2)**0.5 if distance <= d : ans += 1 print(ans)
[["-", 0, 1, 0, 662, 12, 657, 31, 657, 12, 612], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 85], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 531]]
5
70
#include <bits/stdc++.h> using namespace std; #define ll long long #define PI 3.14159265359 #define rep(i, n) for (int i = 0; i < (n); i++) int main() { ll n, d, ans = 0; vector<ll> x(200010), y(200010); cin >> n >> d; rep(i, n) cin >> x[i] >> y[i]; rep(i, n) { ll hoge = x[i] * x[i] + y[i] * y[i]; i...
#include <bits/stdc++.h> using namespace std; #define ll long long #define PI 3.14159265359 #define rep(i, n) for (int i = 0; i < (n); i++) int main() { ll n, d, ans = 0; vector<ll> x(200010), y(200010); cin >> n >> d; rep(i, n) cin >> x[i] >> y[i]; rep(i, n) { ll hoge = x[i] * x[i] + y[i] * y[i]; i...
[["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]]
1
123
#include <bits/stdc++.h> using namespace std; int main() { int N; long long D, count = 0; cin >> N >> D; 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; }
#include <bits/stdc++.h> using namespace std; int main() { int N; long long D, count = 0; cin >> N >> D; 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, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72]]
1
82
#include <bits/stdc++.h> using namespace std; int main() { int N; long long D, count = 0; cin >> N >> D; 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; }
#include <bits/stdc++.h> using namespace std; int main() { int N; long long D, count = 0; cin >> N >> D; 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; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
82
#include <bits/stdc++.h> #include <cmath> #include <vector> using namespace std; int main() { int n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { long long x, y; cin >> x >> y; if (d * d >= x * x + y * y) { ans = ans + 1; } } cout << ans << endl; }
#include <bits/stdc++.h> #include <cmath> #include <vector> using namespace std; int main() { long long n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { long long x, y; cin >> x >> y; if (d * d >= x * x + y * y) { ans = ans + 1; } } cout << ans << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96]]
1
88
#include <bits/stdc++.h> using namespace std; int main() { int n, D, X, Y, c, e, count = 0; cin >> n >> D; for (int i = 0; i < n; i++) { cin >> X >> Y; if (X * X + Y * Y <= D * D) { count++; } } cout << count << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { long long n, D, X, Y, c, e, count = 0; cin >> n >> D; for (long long i = 0; i < n; i++) { cin >> X >> Y; if (X * X + Y * Y <= D * 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], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96]]
1
85
N,D=map(int,input().split()) cnt=0 for idx in range(N-1): X,Y=map(int,input().split()) if X**2+Y**2<=D**2: cnt=cnt+1 print(cnt)
N,D=map(int,input().split()) cnt=0 for idx in range(N): X,Y=map(int,input().split()) if X**2+Y**2<=D**2: cnt=cnt+1 print(cnt)
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
67
N,D = (int(x) for x in input().split()) count = 0 for i in range(N): x,y = (int(z) for z in input().split()) sqdist = x**2 + y**2 if sqdist < D**2: count += 1 print(count)
N,D = (int(x) for x in input().split()) count = 0 for i in range(N): x,y = (int(z) for z in input().split()) dist = x**2 + y**2 if dist <= D**2: count += 1 print(count)
[["-", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]]
5
74
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; int a[n], b[n]; for (int i = 0; i < n; ++i) { cin >> a[i] >> b[i]; } int cnt = 0; for (int i = 0; i < n; ++i) { float x = sqrt((a[i] * a[i]) + (b[i] * b[i])); if (x <= d) { cnt++; } } cout << cnt;...
#include <bits/stdc++.h> using namespace std; int main() { int n, d; cin >> n >> d; double a[n], b[n]; for (int i = 0; i < n; ++i) { cin >> a[i] >> b[i]; } int cnt = 0; for (int i = 0; i < n; ++i) { long double x = sqrt((a[i] * a[i]) + (b[i] * b[i])); if (x <= d) { cnt++; } } cou...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 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
131
n, d = map(int, input().split()) cnt = 0 for i in range(n): Z = list(map(int, input().split())) X = Z[0] Y = Z[1] if X**2 + Y**2 <= D**2: cnt += 1 print(cnt)
n, d = map(int, input().split()) cnt = 0 for i in range(n): Z = list(map(int, input().split())) X = Z[0] Y = Z[1] if X**2 + Y**2 <= d**2: cnt += 1 print(cnt)
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22]]
5
76
#include <math.h> #include <stdio.h> int main() { int N, D; float x, y; int count = 0; scanf("%d %d", &N, &D); while (N--) { scanf("%f %f", &x, &y); if (sqrt(pow(x, 2) + pow(y, 2)) < D) count++; } printf("%d\n", count); }
#include <math.h> #include <stdio.h> int main() { int N, D; float x, y; int count = 0; scanf("%d %d", &N, &D); while (N--) { scanf("%f %f", &x, &y); if (sqrt(pow(x, 2) + pow(y, 2)) <= D) count++; } printf("%d\n", count); }
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19]]
0
92
#include <iostream> using namespace std; int main() { int n, d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; if (x * x + y * y <= d * d) ans++; } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { int n; long long d; cin >> n >> d; int ans = 0; for (int i = 0; i < n; i++) { long long x, y; cin >> x >> y; if (x * x + y * y <= d * d) ans++; } cout << ans << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 39, 86, 0, 96]]
1
81