結果

問題 No.202 1円玉投げ
ユーザー kotatsugamekotatsugame
提出日時 2020-03-01 17:33:30
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 553 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 73,820 KB
実行使用メモリ 30,000 KB
最終ジャッジ日時 2023-08-24 00:07:11
合計ジャッジ時間 7,500 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 11 ms
26,828 KB
testcase_03 AC 10 ms
27,020 KB
testcase_04 AC 10 ms
26,828 KB
testcase_05 RE -
testcase_06 AC 64 ms
29,272 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 25 ms
27,544 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 15 ms
27,092 KB
testcase_15 RE -
testcase_16 AC 68 ms
29,952 KB
testcase_17 AC 67 ms
29,944 KB
testcase_18 AC 67 ms
29,960 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 AC 10 ms
26,904 KB
testcase_23 RE -
testcase_24 AC 11 ms
26,888 KB
testcase_25 RE -
testcase_26 AC 11 ms
27,052 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 10 ms
26,824 KB
testcase_32 AC 11 ms
27,004 KB
testcase_33 RE -
testcase_34 AC 12 ms
26,856 KB
testcase_35 AC 68 ms
30,000 KB
testcase_36 RE -
testcase_37 RE -
testcase_38 AC 71 ms
29,960 KB
testcase_39 AC 10 ms
26,880 KB
testcase_40 AC 9 ms
26,820 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:7:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    7 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int N;
vector<pair<int,int> >A[1001][1001];
main()
{
	cin>>N;
	int ans=0;
	for(;N--;)
	{
		int x,y;cin>>x>>y;
		bool ok=true;
		for(int lx=max(0,x/20-1),rx=min(2000,x/20+1);lx<=rx;lx++)
		{
			for(int ly=max(0,y/20-1),ry=min(2000,y/20+1);ly<=ry;ly++)
			{
				for(pair<int,int>p:A[lx][ly])
				{
					int dx=p.first-x,dy=p.second-y;
					if(dx*dx+dy*dy<400)ok=false;
				}
			}
		}
		if(ok)
		{
			ans++;
			A[x/20][y/20].push_back(make_pair(x,y));
		}
	}
	cout<<ans<<endl;
}
0