結果

問題 No.202 1円玉投げ
ユーザー fumofumofunifumofumofuni
提出日時 2021-01-14 20:41:07
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,429 bytes
コンパイル時間 2,020 ms
コンパイル使用メモリ 205,404 KB
実行使用メモリ 9,600 KB
最終ジャッジ日時 2023-08-24 00:17:57
合計ジャッジ時間 40,463 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4,620 ms
9,600 KB
testcase_01 AC 3,683 ms
9,540 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 155 ms
4,380 KB
testcase_06 AC 3,162 ms
7,944 KB
testcase_07 AC 3,471 ms
8,552 KB
testcase_08 AC 3,463 ms
8,432 KB
testcase_09 AC 1,792 ms
6,532 KB
testcase_10 AC 680 ms
4,756 KB
testcase_11 AC 1,453 ms
5,864 KB
testcase_12 AC 1,510 ms
6,000 KB
testcase_13 AC 758 ms
4,932 KB
testcase_14 AC 188 ms
4,380 KB
testcase_15 AC 1,732 ms
6,560 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=(n)-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define pb push_back
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define rev(x) reverse(x);
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={-1,0,1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
int main(){
    ll n;cin >> n;
    set<pl> st;
    rep(i,n){
        ll x,y;cin >> x >> y;
        bool ok=true;
        for(int i=-20;i<=20;i++){
            for(int j=-20;j<=20;j++){
                if(i*i+j*j>=400)continue;
                if(st.count({x+i,y+j})){
                    ok=false;i=100;j=100;
                }
            }
        }
        if(ok)st.ins({x,y});
    }
    cout << st.size() <<endl;
}
0