結果

問題 No.202 1円玉投げ
ユーザー なおなお
提出日時 2015-05-03 23:51:49
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 837 ms / 5,000 ms
コード長 795 bytes
コンパイル時間 1,050 ms
コンパイル使用メモリ 144,140 KB
実行使用メモリ 317,060 KB
最終ジャッジ日時 2023-08-23 21:40:23
合計ジャッジ時間 11,497 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 290 ms
7,744 KB
testcase_01 AC 837 ms
317,060 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 48 ms
26,596 KB
testcase_06 AC 597 ms
214,148 KB
testcase_07 AC 672 ms
229,836 KB
testcase_08 AC 677 ms
230,820 KB
testcase_09 AC 382 ms
157,820 KB
testcase_10 AC 163 ms
79,740 KB
testcase_11 AC 315 ms
137,128 KB
testcase_12 AC 324 ms
139,140 KB
testcase_13 AC 180 ms
87,032 KB
testcase_14 AC 56 ms
30,184 KB
testcase_15 AC 365 ms
154,140 KB
testcase_16 AC 293 ms
9,900 KB
testcase_17 AC 276 ms
8,416 KB
testcase_18 AC 276 ms
8,416 KB
testcase_19 AC 344 ms
147,068 KB
testcase_20 AC 547 ms
201,172 KB
testcase_21 AC 342 ms
146,276 KB
testcase_22 AC 4 ms
4,376 KB
testcase_23 AC 4 ms
4,376 KB
testcase_24 AC 4 ms
4,376 KB
testcase_25 AC 4 ms
4,376 KB
testcase_26 AC 11 ms
7,352 KB
testcase_27 AC 12 ms
7,428 KB
testcase_28 AC 4 ms
4,376 KB
testcase_29 AC 4 ms
4,376 KB
testcase_30 AC 11 ms
7,372 KB
testcase_31 AC 4 ms
4,380 KB
testcase_32 AC 12 ms
7,296 KB
testcase_33 AC 6 ms
4,864 KB
testcase_34 AC 5 ms
4,380 KB
testcase_35 AC 277 ms
9,252 KB
testcase_36 AC 275 ms
5,712 KB
testcase_37 AC 720 ms
239,040 KB
testcase_38 AC 280 ms
9,564 KB
testcase_39 AC 2 ms
4,380 KB
testcase_40 AC 3 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n)           for(int(i)=0;(i)<(n);++(i))
#define FOR(i, f, t)        for(int(i)=(f);(i)<(t);(++i))
const int MOD = int(1e9+9);

bool f[22222][22222];
int c = 0;

int main(){
    int n;
    cin >> n;
    REP(i,n){
        int xx,yy;
        cin >> xx >> yy;
        bool b = true;
        for(int y = -19; y <= 19; y++){
            for(int x = -19; x <= 19; x++){
                int mx = xx + x, my = yy + y;
                if(mx < 0 || mx > 20000 || my < 0 || my > 20000) continue;
                if(f[my][mx] && (mx-xx)*(mx-xx)+(my-yy)*(my-yy) < 400){
                    b = false;
                }
            }
        }
        if(b) f[yy][xx] = true, c++;
    }
    cout << c << endl;
    return 0;
}
0