結果

問題 No.1596 Distance Sum in 2D Plane
ユーザー tailstails
提出日時 2021-07-09 22:12:58
言語 cLay
(20231016-1)
結果
AC  
実行時間 35 ms / 2,000 ms
コード長 203 bytes
コンパイル時間 4,345 ms
コンパイル使用メモリ 181,876 KB
実行使用メモリ 10,884 KB
最終ジャッジ日時 2023-09-19 02:29:45
合計ジャッジ時間 7,832 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 8 ms
6,440 KB
testcase_01 AC 12 ms
9,072 KB
testcase_02 AC 35 ms
10,416 KB
testcase_03 AC 33 ms
9,272 KB
testcase_04 AC 30 ms
7,484 KB
testcase_05 AC 32 ms
8,776 KB
testcase_06 AC 32 ms
9,044 KB
testcase_07 AC 32 ms
9,192 KB
testcase_08 AC 30 ms
7,920 KB
testcase_09 AC 33 ms
9,896 KB
testcase_10 AC 33 ms
10,052 KB
testcase_11 AC 26 ms
10,628 KB
testcase_12 AC 26 ms
10,884 KB
testcase_13 AC 26 ms
10,616 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,376 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

{
	Comb<Mint>c;
	Mint@n,r;
	ll@m;
	rep(m){
		ll@t;
		Mint@x,@y;
		if(t==1){
			r+=c.C(x+y,x)*c.C((n-x-1)+(n-y),(n-x-1));
		}else{
			r+=c.C(x+y,x)*c.C((n-x)+(n-y-1),(n-x));
		}
	}
	wt(2n*c.C(2n,n)-r);
}
0