結果

問題 No.202 1円玉投げ
ユーザー srup٩(๑`н´๑)۶srup٩(๑`н´๑)۶
提出日時 2016-10-04 23:02:21
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 279 ms / 5,000 ms
コード長 688 bytes
コンパイル時間 590 ms
コンパイル使用メモリ 67,788 KB
実行使用メモリ 4,908 KB
最終ジャッジ日時 2023-08-23 23:29:34
合計ジャッジ時間 4,410 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
4,528 KB
testcase_01 AC 90 ms
4,908 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 6 ms
4,376 KB
testcase_06 AC 89 ms
4,724 KB
testcase_07 AC 102 ms
4,860 KB
testcase_08 AC 100 ms
4,760 KB
testcase_09 AC 50 ms
4,612 KB
testcase_10 AC 20 ms
4,376 KB
testcase_11 AC 41 ms
4,720 KB
testcase_12 AC 44 ms
4,568 KB
testcase_13 AC 23 ms
4,492 KB
testcase_14 AC 7 ms
4,376 KB
testcase_15 AC 51 ms
4,520 KB
testcase_16 AC 65 ms
4,728 KB
testcase_17 AC 186 ms
4,504 KB
testcase_18 AC 186 ms
4,592 KB
testcase_19 AC 47 ms
4,692 KB
testcase_20 AC 77 ms
4,648 KB
testcase_21 AC 46 ms
4,504 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,380 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 3 ms
4,380 KB
testcase_27 AC 3 ms
4,380 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 2 ms
4,376 KB
testcase_31 AC 3 ms
4,376 KB
testcase_32 AC 3 ms
4,380 KB
testcase_33 AC 3 ms
4,376 KB
testcase_34 AC 3 ms
4,380 KB
testcase_35 AC 279 ms
4,380 KB
testcase_36 AC 81 ms
4,560 KB
testcase_37 AC 111 ms
4,800 KB
testcase_38 AC 275 ms
4,376 KB
testcase_39 AC 2 ms
4,380 KB
testcase_40 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)

vector<int> center[20100];

int main(void){
	int n; cin >> n;
	int ans = 0;
	rep(i, n){
		int cx, cy; cin >> cx >> cy;
		int xl = max(0, cx - 20);
		int xr = cx + 20;
		bool flag = true;
		for (int nx = xl; nx <= xr; ++nx){
			for(auto ny : center[nx]){
				int len = (nx - cx) * (nx - cx) + (ny - cy) * (ny - cy);
        		if(len < 400){//長さの二乗
        			flag = false;
        			break;
        		}
			}
		}
		if(flag){
			ans++;
			center[cx].push_back(cy);
		}
	}

	printf("%d\n", ans);
	return 0;
}
0