結果

問題 No.1144 Triangles
ユーザー tailstails
提出日時 2020-08-03 18:04:45
言語 cLay
(20240104-1)
結果
AC  
実行時間 152 ms / 3,000 ms
コード長 305 bytes
コンパイル時間 4,996 ms
コンパイル使用メモリ 208,744 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-19 00:55:16
合計ジャッジ時間 9,405 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 152 ms
4,376 KB
testcase_05 AC 150 ms
4,376 KB
testcase_06 AC 150 ms
4,380 KB
testcase_07 AC 150 ms
4,380 KB
testcase_08 AC 150 ms
4,384 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 1 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 1 ms
4,380 KB
testcase_14 AC 137 ms
4,380 KB
testcase_15 AC 136 ms
4,380 KB
testcase_16 AC 144 ms
4,380 KB
testcase_17 AC 145 ms
4,376 KB
testcase_18 AC 144 ms
4,376 KB
testcase_19 AC 11 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 140 ms
4,380 KB
testcase_23 AC 9 ms
4,380 KB
testcase_24 AC 138 ms
4,376 KB
testcase_25 AC 44 ms
4,380 KB
testcase_26 AC 5 ms
4,380 KB
testcase_27 AC 57 ms
4,376 KB
testcase_28 AC 30 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll n,r,s,t,x,y,a[2d3],b[2d3],c[2d3],d[2d3],e[2d3];
{
	rd(n,(a,b)(n));
	rep(i,n){
		rep(j,i){
			x=a[j]-a[i];
			y=b[j]-b[i];
			if(y<0|!y&0>x)(x,y)*=-1;
			c[j]=x;
			d[j]=y;
			e[j]=y?MD*x/y:2d13;
		}
		sortA(i,e,c,d);
		s=t=0;
		rep(j,i){
			r+=t*c[j]-s*d[j];
			s+=c[j];
			t+=d[j];
		}
	}
	wt(r%MD);
}
0