92日目
今日はABC174に参加しました。
ABC174
A
# include <bits/stdc++.h>
# define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;
const int INF = 2e9;
int main(){
int x;
cin >> x;
if(x < 30) cout << "No" << endl;
else cout << "Yes" << endl;
}
B
# include <bits/stdc++.h>
# define rep(i,n) for(int i = 0;i < (n);i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;
const int INF = 2e9;
int main(){
ll n,d;
cin >> n >> d;
d *= d;
ll ans = 0;
rep(i,n){
ll x,y;
cin >> x >> y;
x *= x;
y *= y;
if((x+y) <= d)ans++;
}
cout << ans << endl;
}
最後に
今回、C問題を解けなかったのが悔しい。
今度復習して素早く解けるようになりたい。
