結果

問題 No.202 1円玉投げ
ユーザー TwizzTwizz
提出日時 2017-06-06 20:23:06
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 251 ms / 5,000 ms
コード長 819 bytes
コンパイル時間 1,246 ms
コンパイル使用メモリ 146,568 KB
実行使用メモリ 5,792 KB
最終ジャッジ日時 2023-08-23 23:33:10
合計ジャッジ時間 5,165 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
5,424 KB
testcase_01 AC 89 ms
5,792 KB
testcase_02 AC 2 ms
4,504 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 6 ms
4,376 KB
testcase_06 AC 87 ms
5,268 KB
testcase_07 AC 99 ms
5,460 KB
testcase_08 AC 99 ms
5,400 KB
testcase_09 AC 52 ms
4,972 KB
testcase_10 AC 21 ms
4,408 KB
testcase_11 AC 43 ms
4,788 KB
testcase_12 AC 43 ms
4,768 KB
testcase_13 AC 23 ms
4,644 KB
testcase_14 AC 7 ms
4,376 KB
testcase_15 AC 49 ms
4,872 KB
testcase_16 AC 63 ms
5,304 KB
testcase_17 AC 169 ms
5,200 KB
testcase_18 AC 167 ms
5,256 KB
testcase_19 AC 45 ms
4,912 KB
testcase_20 AC 78 ms
5,208 KB
testcase_21 AC 46 ms
4,832 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 3 ms
4,376 KB
testcase_26 AC 3 ms
4,376 KB
testcase_27 AC 3 ms
4,376 KB
testcase_28 AC 3 ms
4,376 KB
testcase_29 AC 3 ms
4,376 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 3 ms
4,376 KB
testcase_33 AC 3 ms
4,376 KB
testcase_34 AC 2 ms
4,380 KB
testcase_35 AC 248 ms
4,788 KB
testcase_36 AC 79 ms
5,136 KB
testcase_37 AC 107 ms
5,628 KB
testcase_38 AC 251 ms
4,828 KB
testcase_39 AC 2 ms
4,376 KB
testcase_40 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include"bits/stdc++.h"

//#include<bits/stdc++.h>
using namespace std;
#define print(x) cout<<x<<endl;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define REP(i,a) for(int i=0;i<a;i++)
typedef long long ll;
typedef pair<int, int> PI;
typedef pair<int, PI> V;
typedef vector<int> VE;
const ll mod = 100000000000;

int n, x[100002], y[100002];
bool now[100002];
VE center[20100];
int main() {
	cin >> n;
	bool flag = 1;
	int count = 0;
	REP(i, n)cin >> x[i] >> y[i];
	REP(i, n) {
		int xl = max(0, x[i] - 20);
		int xr = x[i] + 20;
		flag = 1;
		for (int nx = xl; nx <= xr; nx++) {
			for (auto ny : center[nx]) {
				ll dist = pow(x[i] - nx, 2) + pow(y[i] - ny, 2);
				if (dist < 400) {
					flag = 0;
					break;
				}
			}
		}
		if (flag) {
			count++;
			center[x[i]].push_back(y[i]);
		}
	}
	print(count);
	return 0;
}
0