結果

問題 No.1121 Social Distancing in Cinema
ユーザー kotatsugamekotatsugame
提出日時 2020-07-22 21:52:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 670 bytes
コンパイル時間 604 ms
コンパイル使用メモリ 54,544 KB
実行使用メモリ 6,888 KB
最終ジャッジ日時 2023-09-04 17:51:41
合計ジャッジ時間 4,953 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
5,064 KB
testcase_01 AC 2 ms
5,044 KB
testcase_02 AC 2 ms
5,096 KB
testcase_03 AC 2 ms
5,040 KB
testcase_04 AC 2 ms
5,036 KB
testcase_05 AC 2 ms
5,088 KB
testcase_06 AC 2 ms
5,100 KB
testcase_07 AC 2 ms
5,072 KB
testcase_08 AC 3 ms
5,068 KB
testcase_09 AC 2 ms
5,128 KB
testcase_10 AC 2 ms
5,088 KB
testcase_11 AC 3 ms
5,056 KB
testcase_12 AC 2 ms
5,172 KB
testcase_13 AC 3 ms
5,224 KB
testcase_14 AC 3 ms
5,192 KB
testcase_15 AC 4 ms
5,288 KB
testcase_16 AC 7 ms
5,624 KB
testcase_17 AC 20 ms
6,188 KB
testcase_18 AC 35 ms
6,620 KB
testcase_19 AC 41 ms
6,876 KB
testcase_20 AC 3 ms
5,340 KB
testcase_21 AC 3 ms
5,332 KB
testcase_22 AC 4 ms
5,332 KB
testcase_23 AC 3 ms
5,368 KB
testcase_24 AC 3 ms
5,344 KB
testcase_25 AC 14 ms
6,644 KB
testcase_26 AC 17 ms
6,688 KB
testcase_27 AC 4 ms
6,416 KB
testcase_28 AC 36 ms
6,816 KB
testcase_29 AC 16 ms
6,640 KB
testcase_30 AC 12 ms
5,940 KB
testcase_31 AC 42 ms
6,888 KB
testcase_32 AC 31 ms
6,652 KB
testcase_33 AC 15 ms
6,624 KB
testcase_34 AC 15 ms
6,620 KB
testcase_35 AC 33 ms
6,676 KB
testcase_36 AC 40 ms
6,868 KB
testcase_37 AC 12 ms
6,664 KB
testcase_38 AC 17 ms
6,692 KB
testcase_39 AC 36 ms
6,732 KB
testcase_40 AC 10 ms
6,628 KB
testcase_41 AC 5 ms
6,372 KB
testcase_42 AC 40 ms
6,788 KB
testcase_43 AC 40 ms
6,860 KB
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 AC 3 ms
5,064 KB
testcase_48 AC 3 ms
5,032 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:10:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
   10 | main()
      | ^~~~

ソースコード

diff #

#include<cstdio>
#include<vector>
#include<algorithm>
#include<queue>
using namespace std;
int N;
int X[3<<17],Y[3<<17];
bool ex[555][555],vis[555][555];
int id[555][555];
main()
{
	scanf("%d",&N);
	for(int i=0;i<N;i++)
	{
		scanf("%d%d",&X[i],&Y[i]);
		id[X[i]][Y[i]]=i+1;
	}
	vector<int>ans;
	for(int x=1;x<=500;x++)for(int y=1;y<=500;y++)
	{
		if(!ex[x][y]&&id[x][y]!=0)
		{
			ans.push_back(id[x][y]);
			for(int dx=-9;dx<=9;dx++)for(int dy=-9;dy<=9;dy++)
			{
				if(x+dx>=1&&y+dy>=1&&dx*dx+dy*dy<100)
				{
					ex[x+dx][y+dy]=true;
				}
			}
		}
	}
	printf("%d\n",(int)ans.size());
	for(int i=0;i<ans.size();i++)printf("%d%c",ans[i],i+1==ans.size()?'\n':' ');
}
0