結果

問題 No.1265 Balloon Survival
ユーザー tailstails
提出日時 2020-10-23 23:34:03
言語 cLay
(20240104-1)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 5,109 ms
コンパイル使用メモリ 208,076 KB
実行使用メモリ 22,052 KB
最終ジャッジ日時 2023-09-19 01:41:37
合計ジャッジ時間 8,328 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
11,636 KB
testcase_01 AC 3 ms
11,584 KB
testcase_02 AC 2 ms
7,560 KB
testcase_03 AC 3 ms
11,792 KB
testcase_04 AC 3 ms
11,584 KB
testcase_05 AC 3 ms
11,652 KB
testcase_06 AC 4 ms
11,588 KB
testcase_07 AC 4 ms
11,556 KB
testcase_08 AC 3 ms
11,652 KB
testcase_09 AC 3 ms
11,708 KB
testcase_10 AC 3 ms
11,556 KB
testcase_11 AC 3 ms
11,724 KB
testcase_12 AC 3 ms
11,544 KB
testcase_13 AC 3 ms
11,716 KB
testcase_14 AC 9 ms
12,140 KB
testcase_15 AC 8 ms
12,008 KB
testcase_16 AC 5 ms
11,788 KB
testcase_17 AC 32 ms
17,640 KB
testcase_18 AC 6 ms
11,744 KB
testcase_19 AC 5 ms
11,752 KB
testcase_20 AC 9 ms
12,024 KB
testcase_21 AC 17 ms
14,664 KB
testcase_22 AC 12 ms
12,280 KB
testcase_23 AC 12 ms
14,324 KB
testcase_24 AC 59 ms
21,756 KB
testcase_25 AC 60 ms
21,860 KB
testcase_26 AC 60 ms
21,796 KB
testcase_27 AC 59 ms
21,836 KB
testcase_28 AC 59 ms
21,796 KB
testcase_29 AC 59 ms
21,904 KB
testcase_30 AC 60 ms
21,832 KB
testcase_31 AC 60 ms
21,924 KB
testcase_32 AC 60 ms
21,780 KB
testcase_33 AC 59 ms
22,052 KB
testcase_34 AC 3 ms
11,588 KB
testcase_35 AC 3 ms
11,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll n,w,x[1000],y[1000],z[1000];
int ai[500000],aj[500000];ll ad[500000];
{
	rd(n,(x,y)(n));
	int k=0;
	rep(i,n)rep(j,i)ai[k]=i,aj[k]=j,ad[k]=(x[j]-x[i])**2+(y[j]-y[i])**2,++k;
	sortA(k,ad,ai,aj);
	rep(l,k){
		int i=ai[l];
		int j=aj[l];
		if(j==0){
			if(!z[i]){
				z[i]=1;
				w+=1;
			}
		}else{
			if(!z[i]&&!z[j]){
				z[i]=z[j]=1;
			}
		}
	}
	wt(w);
}
0