結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,012 KB
testcase_01 AC 2 ms
5,000 KB
testcase_02 AC 3 ms
5,048 KB
testcase_03 AC 2 ms
5,000 KB
testcase_04 AC 2 ms
5,068 KB
testcase_05 AC 2 ms
5,032 KB
testcase_06 AC 3 ms
4,984 KB
testcase_07 AC 3 ms
5,044 KB
testcase_08 AC 2 ms
4,988 KB
testcase_09 AC 2 ms
4,992 KB
testcase_10 AC 2 ms
5,100 KB
testcase_11 AC 3 ms
5,032 KB
testcase_12 AC 2 ms
5,084 KB
testcase_13 AC 3 ms
5,052 KB
testcase_14 AC 3 ms
5,180 KB
testcase_15 AC 4 ms
5,304 KB
testcase_16 AC 7 ms
5,564 KB
testcase_17 AC 20 ms
6,184 KB
testcase_18 AC 35 ms
6,576 KB
testcase_19 AC 42 ms
6,892 KB
testcase_20 AC 4 ms
5,360 KB
testcase_21 AC 4 ms
5,324 KB
testcase_22 AC 4 ms
5,328 KB
testcase_23 AC 3 ms
5,328 KB
testcase_24 AC 3 ms
5,308 KB
testcase_25 AC 14 ms
6,668 KB
testcase_26 AC 17 ms
6,652 KB
testcase_27 AC 5 ms
6,380 KB
testcase_28 AC 37 ms
6,780 KB
testcase_29 AC 17 ms
6,648 KB
testcase_30 AC 13 ms
5,984 KB
testcase_31 AC 41 ms
6,844 KB
testcase_32 AC 32 ms
6,588 KB
testcase_33 AC 16 ms
6,652 KB
testcase_34 AC 16 ms
6,644 KB
testcase_35 AC 34 ms
6,684 KB
testcase_36 AC 40 ms
6,840 KB
testcase_37 AC 12 ms
6,580 KB
testcase_38 AC 18 ms
6,576 KB
testcase_39 AC 36 ms
6,756 KB
testcase_40 AC 11 ms
6,584 KB
testcase_41 AC 6 ms
6,332 KB
testcase_42 WA -
testcase_43 WA -
testcase_44 AC 40 ms
6,796 KB
testcase_45 AC 40 ms
6,768 KB
testcase_46 WA -
testcase_47 AC 2 ms
5,064 KB
testcase_48 AC 2 ms
5,036 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 y=1;y<=500;y++)for(int x=1;x<=500;x++)
	{
		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