結果

問題 No.202 1円玉投げ
ユーザー latte0119latte0119
提出日時 2015-05-04 00:04:43
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 715 bytes
コンパイル時間 1,151 ms
コンパイル使用メモリ 149,380 KB
実行使用メモリ 9,360 KB
最終ジャッジ日時 2023-08-23 21:44:14
合計ジャッジ時間 4,266 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
9,148 KB
testcase_01 AC 90 ms
9,056 KB
testcase_02 AC 2 ms
4,444 KB
testcase_03 AC 2 ms
4,588 KB
testcase_04 AC 2 ms
4,452 KB
testcase_05 AC 6 ms
4,728 KB
testcase_06 AC 105 ms
8,032 KB
testcase_07 WA -
testcase_08 AC 122 ms
8,500 KB
testcase_09 AC 57 ms
6,772 KB
testcase_10 AC 19 ms
5,504 KB
testcase_11 AC 45 ms
6,324 KB
testcase_12 AC 47 ms
6,372 KB
testcase_13 AC 22 ms
5,612 KB
testcase_14 AC 6 ms
4,832 KB
testcase_15 AC 55 ms
6,628 KB
testcase_16 AC 44 ms
9,164 KB
testcase_17 AC 50 ms
9,144 KB
testcase_18 AC 50 ms
9,360 KB
testcase_19 AC 51 ms
6,600 KB
testcase_20 AC 92 ms
7,648 KB
testcase_21 AC 50 ms
6,484 KB
testcase_22 AC 2 ms
4,496 KB
testcase_23 AC 2 ms
4,424 KB
testcase_24 AC 2 ms
4,592 KB
testcase_25 WA -
testcase_26 AC 2 ms
4,560 KB
testcase_27 AC 2 ms
4,588 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 3 ms
4,512 KB
testcase_31 AC 2 ms
4,448 KB
testcase_32 AC 2 ms
4,488 KB
testcase_33 AC 2 ms
4,624 KB
testcase_34 AC 3 ms
4,584 KB
testcase_35 AC 54 ms
9,044 KB
testcase_36 AC 47 ms
9,092 KB
testcase_37 AC 130 ms
8,632 KB
testcase_38 AC 57 ms
9,104 KB
testcase_39 AC 2 ms
4,488 KB
testcase_40 AC 2 ms
4,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int N;
set<int>S[20001];
int main(){
    scanf("%d",&N);
    for(int _=0;_<N;_++){
        int x,y;
        scanf("%d%d",&x,&y);
        bool flag=true;
        for(int i=max(x-20,0);i<min(20000,x+20)&&flag;i++){
            set<int>::iterator it;
            it=S[i].lower_bound(y-20);
            for(;it!=S[i].end();it++){
                if(*it>y+20)break;
                if(hypot(i-x,*it-y)<20){
                    flag=false;
                    break;
                }
            }
        }

        if(flag){
            S[x].insert(y);
        }
    }

    int ans=0;
    for(int i=0;i<=20000;i++)ans+=S[i].size();
    printf("%d\n",ans);

    return 0;
}
0