結果

問題 No.202 1円玉投げ
ユーザー furafura
提出日時 2020-06-08 09:17:40
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 771 ms / 5,000 ms
コード長 484 bytes
コンパイル時間 2,674 ms
コンパイル使用メモリ 198,200 KB
実行使用メモリ 303,768 KB
最終ジャッジ日時 2023-08-24 00:13:28
合計ジャッジ時間 11,414 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 215 ms
7,992 KB
testcase_01 AC 771 ms
303,768 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 47 ms
26,472 KB
testcase_06 AC 551 ms
209,224 KB
testcase_07 AC 623 ms
224,280 KB
testcase_08 AC 638 ms
225,524 KB
testcase_09 AC 352 ms
155,628 KB
testcase_10 AC 149 ms
79,352 KB
testcase_11 AC 289 ms
135,516 KB
testcase_12 AC 298 ms
137,848 KB
testcase_13 AC 163 ms
86,620 KB
testcase_14 AC 51 ms
30,232 KB
testcase_15 AC 345 ms
152,172 KB
testcase_16 AC 213 ms
10,124 KB
testcase_17 AC 201 ms
8,284 KB
testcase_18 AC 203 ms
8,264 KB
testcase_19 AC 320 ms
145,296 KB
testcase_20 AC 500 ms
197,076 KB
testcase_21 AC 313 ms
144,612 KB
testcase_22 AC 3 ms
4,376 KB
testcase_23 AC 3 ms
4,376 KB
testcase_24 AC 3 ms
4,380 KB
testcase_25 AC 3 ms
4,380 KB
testcase_26 AC 10 ms
7,532 KB
testcase_27 AC 10 ms
7,664 KB
testcase_28 AC 3 ms
4,376 KB
testcase_29 AC 4 ms
4,376 KB
testcase_30 AC 11 ms
7,620 KB
testcase_31 AC 4 ms
4,380 KB
testcase_32 AC 11 ms
7,504 KB
testcase_33 AC 6 ms
5,012 KB
testcase_34 AC 4 ms
4,376 KB
testcase_35 AC 204 ms
9,484 KB
testcase_36 AC 198 ms
5,844 KB
testcase_37 AC 691 ms
233,676 KB
testcase_38 AC 205 ms
9,484 KB
testcase_39 AC 3 ms
4,380 KB
testcase_40 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	int n; scanf("%d",&n);

	int ans=0;
	static bool f[20001][20001];
	rep(i,n){
		int x,y; scanf("%d%d",&x,&y);
		bool ok=true;
		for(int y2=max(y-20,0);y2<=min(y+20,20000);y2++){
			for(int x2=max(x-20,0);x2<=min(x+20,20000);x2++){
				if(f[y2][x2] && (x-x2)*(x-x2)+(y-y2)*(y-y2)<400){
					ok=false;
				}
			}
		}
		if(ok) f[y][x]=true, ans++;
	}
	printf("%d\n",ans);

	return 0;
}
0