0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AtCoder 生活 93日目

Posted at

前回

92日目

今日はABC174に参加しました。

スクリーンショット 2020-08-02 22.41.25.png

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問題を解けなかったのが悔しい。
今度復習して素早く解けるようになりたい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?