結果

問題 No.2355 Unhappy Back Dance
ユーザー tailstails
提出日時 2023-06-16 22:46:42
言語 cLay
(20240104-1)
結果
AC  
実行時間 212 ms / 6,000 ms
コード長 385 bytes
コンパイル時間 5,457 ms
コンパイル使用メモリ 208,748 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-06 21:20:58
合計ジャッジ時間 10,074 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,384 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 60 ms
4,376 KB
testcase_07 AC 92 ms
4,380 KB
testcase_08 AC 87 ms
4,380 KB
testcase_09 AC 123 ms
4,380 KB
testcase_10 AC 116 ms
4,380 KB
testcase_11 AC 133 ms
4,384 KB
testcase_12 AC 126 ms
4,380 KB
testcase_13 AC 129 ms
4,376 KB
testcase_14 AC 124 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 206 ms
4,376 KB
testcase_17 AC 211 ms
4,376 KB
testcase_18 AC 211 ms
4,380 KB
testcase_19 AC 203 ms
4,380 KB
testcase_20 AC 212 ms
4,380 KB
testcase_21 AC 87 ms
4,376 KB
testcase_22 AC 16 ms
4,380 KB
testcase_23 AC 18 ms
4,380 KB
testcase_24 AC 197 ms
4,376 KB
testcase_25 AC 102 ms
4,380 KB
testcase_26 AC 102 ms
4,376 KB
testcase_27 AC 80 ms
4,380 KB
testcase_28 AC 3 ms
4,376 KB
testcase_29 AC 5 ms
4,380 KB
testcase_30 AC 155 ms
4,376 KB
testcase_31 AC 114 ms
4,384 KB
testcase_32 AC 13 ms
4,380 KB
testcase_33 AC 62 ms
4,376 KB
testcase_34 AC 2 ms
4,380 KB
testcase_35 AC 3 ms
4,380 KB
testcase_36 AC 76 ms
4,380 KB
testcase_37 AC 40 ms
4,380 KB
testcase_38 AC 50 ms
4,380 KB
testcase_39 AC 38 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,x[n],y[],d[],z=0;
double a[];
rd((x,y)(n));
rep(i,n){
	rep(j,n){
		if(i!=j){
			a[j]=atan2(y[j]-y[i],x[j]-x[i]);
		}
	}
	a[i]=a[n-1];
	sortA_index(n-1,a,d);
	rep(k,n-2){
		if(a[k]==a[k+1]){
			ll j1=d[k],j2=d[k+1];
			if(j1==i){
				j1=n-1;
			}
			if(j2==i){
				j2=n-1;
			}
			if((y[j1]-y[i])*(x[j2]-x[i])==(y[j2]-y[i])*(x[j1]-x[i])){
				z+=1;
				break;
			}
		}
	}
}
wt(z);
0