結果

問題 No.202 1円玉投げ
ユーザー mint6421mint6421
提出日時 2019-08-19 21:58:05
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 712 ms / 5,000 ms
コード長 1,111 bytes
コンパイル時間 1,532 ms
コンパイル使用メモリ 172,984 KB
実行使用メモリ 10,776 KB
最終ジャッジ日時 2023-08-24 00:04:03
合計ジャッジ時間 11,988 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 382 ms
10,624 KB
testcase_01 AC 627 ms
10,760 KB
testcase_02 AC 3 ms
4,780 KB
testcase_03 AC 3 ms
4,748 KB
testcase_04 AC 3 ms
4,952 KB
testcase_05 AC 24 ms
5,132 KB
testcase_06 AC 546 ms
9,040 KB
testcase_07 AC 641 ms
9,712 KB
testcase_08 AC 653 ms
9,716 KB
testcase_09 AC 299 ms
7,600 KB
testcase_10 AC 98 ms
6,008 KB
testcase_11 AC 231 ms
6,984 KB
testcase_12 AC 236 ms
6,992 KB
testcase_13 AC 111 ms
5,880 KB
testcase_14 AC 28 ms
5,200 KB
testcase_15 AC 280 ms
7,460 KB
testcase_16 AC 354 ms
10,776 KB
testcase_17 AC 437 ms
10,768 KB
testcase_18 AC 435 ms
10,680 KB
testcase_19 AC 257 ms
7,196 KB
testcase_20 AC 481 ms
8,932 KB
testcase_21 AC 255 ms
7,200 KB
testcase_22 AC 6 ms
5,028 KB
testcase_23 AC 6 ms
5,044 KB
testcase_24 AC 6 ms
4,824 KB
testcase_25 AC 6 ms
4,868 KB
testcase_26 AC 7 ms
4,828 KB
testcase_27 AC 7 ms
4,920 KB
testcase_28 AC 6 ms
4,940 KB
testcase_29 AC 6 ms
4,908 KB
testcase_30 AC 6 ms
4,976 KB
testcase_31 AC 6 ms
5,060 KB
testcase_32 AC 6 ms
4,972 KB
testcase_33 AC 6 ms
4,832 KB
testcase_34 AC 6 ms
4,916 KB
testcase_35 AC 379 ms
10,640 KB
testcase_36 AC 355 ms
10,764 KB
testcase_37 AC 712 ms
10,244 KB
testcase_38 AC 377 ms
10,628 KB
testcase_39 AC 3 ms
4,780 KB
testcase_40 AC 4 ms
4,772 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define inf INT_MAX
#define INF LLONG_MAX
#define ll long long
#define ull unsigned long long
#define M (int)(1e9+7)
#define P pair<int,int>
#define PLL pair<ll,ll>
#define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++)
#define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--)
#define rep(i,n) FOR(i,0,n)
#define rrep(i,n) RFOR(i,n,0)
#define all(a) a.begin(),a.end()
#define IN(a,n) rep(i,n){ cin>>a[i]; }
const int vx[4] = {0,1,0,-1};
const int vy[4] = {1,0,-1,0};
#define PI 3.14159265
#define F first
#define S second
#define PB push_back
#define EB emplace_back
#define int ll
#define vi vector<int>



signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  cin>>n;
  vector<P> v(n);
  rep(i,n){
    cin>>v[i].F>>v[i].S;
    v[i].F+=20;
  }

  set<int> d[30000];
  int ans=0;

  rep(i,n){
    bool flag=true;
    FOR(x,-19,20){
      FOR(y,-19,20){
        if(x*x+y*y>=400) continue;
        flag&=(d[v[i].F+x].find(v[i].S+y)==d[v[i].F+x].end());
      }
    }
    if(flag){
      d[v[i].F].insert(v[i].S);
      ans++;
    }
  }


  cout<<ans<<endl;

}
0