結果

問題 No.202 1円玉投げ
ユーザー IJMP320
提出日時 2015-05-04 00:04:02
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 1,118 bytes
コンパイル時間 1,272 ms
コンパイル使用メモリ 158,828 KB
実行使用メモリ 394,240 KB
最終ジャッジ日時 2024-12-22 06:39:26
合計ジャッジ時間 14,891 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define FOR(i,a,n) for(int i=a;i<(int)(n);i++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define MP(a,b) make_pair(a,b)
#define PB(a) push_back(a)
#define F first
#define S second
const int INF = 2000000000;
const int DX[4]={0,1,0,-1}, DY[4]={-1,0,1,0};
struct P{int x;int y;P(int X=0,int Y=0){x=X;y=Y;}};

bool p[20001][20001];
int main() {
    memset(p,0,sizeof(p));
    int N;
    cin >> N;
    int ans = 0;
    REP(i,N) {
        int x,y;
        cin >> x >> y;
        bool f=true;
        FOR(a,y-30,60) {
            FOR(b,x-30,60) {
                if(a>=0 && a<20000 && b>=0 && b<20000) {
                    if(p[a][b]) {
                        double d = sqrt(pow(y-a,2)+pow(x-b,2));
                        if(d<20.0) {
                            f=false;
                            goto next;
                        }
                    }
                }
            }
        }
        next:;
        if(f) ans++;
        p[y][x]=f;
    }
    cout << ans << endl;
    return 0;
}
0