結果

問題 No.202 1円玉投げ
ユーザー chocoruskchocorusk
提出日時 2018-12-14 10:25:25
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 644 ms / 5,000 ms
コード長 740 bytes
コンパイル時間 1,640 ms
コンパイル使用メモリ 95,228 KB
実行使用メモリ 395,820 KB
最終ジャッジ日時 2023-08-23 23:57:15
合計ジャッジ時間 12,811 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 268 ms
128,788 KB
testcase_01 AC 465 ms
395,820 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 318 ms
369,852 KB
testcase_06 AC 592 ms
395,572 KB
testcase_07 AC 621 ms
395,684 KB
testcase_08 AC 620 ms
395,508 KB
testcase_09 AC 473 ms
395,580 KB
testcase_10 AC 402 ms
395,316 KB
testcase_11 AC 468 ms
395,436 KB
testcase_12 AC 466 ms
395,524 KB
testcase_13 AC 397 ms
395,364 KB
testcase_14 AC 327 ms
377,832 KB
testcase_15 AC 471 ms
395,584 KB
testcase_16 AC 293 ms
215,056 KB
testcase_17 AC 237 ms
60,684 KB
testcase_18 AC 237 ms
60,676 KB
testcase_19 AC 473 ms
395,508 KB
testcase_20 AC 560 ms
395,608 KB
testcase_21 AC 458 ms
395,480 KB
testcase_22 AC 71 ms
173,768 KB
testcase_23 AC 71 ms
173,896 KB
testcase_24 AC 6 ms
22,204 KB
testcase_25 AC 6 ms
22,516 KB
testcase_26 AC 5 ms
4,376 KB
testcase_27 AC 4 ms
4,376 KB
testcase_28 AC 2 ms
4,376 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 62 ms
165,984 KB
testcase_31 AC 3 ms
5,576 KB
testcase_32 AC 128 ms
202,808 KB
testcase_33 AC 8 ms
13,648 KB
testcase_34 AC 7 ms
10,556 KB
testcase_35 AC 230 ms
44,300 KB
testcase_36 AC 324 ms
201,176 KB
testcase_37 AC 644 ms
395,608 KB
testcase_38 AC 239 ms
43,140 KB
testcase_39 AC 22 ms
63,160 KB
testcase_40 AC 17 ms
40,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
bool dame[20041][20041];
int main()
{
	vector<P> r;
	for(int i=-20; i<=20; i++){
		for(int j=-20; j<=20; j++){
			if(i*i+j*j<400) r.push_back({i, j});
		}
	}
	int n;
	cin>>n;
	int ans=0;
	for(int i=0; i<n; i++){
		int x, y; cin>>x>>y;
		x+=20, y+=20;
		if(dame[x][y]) continue;
		ans++;
		for(auto p:r) dame[x+p.first][y+p.second]=1;
	}
	cout<<ans<<endl;
	return 0;
}
0