結果

問題 No.616 へんなソート
ユーザー %20%20
提出日時 2017-12-16 03:01:03
言語 cLay
(20240104-1)
結果
AC  
実行時間 69 ms / 2,000 ms
コード長 204 bytes
コンパイル時間 2,795 ms
コンパイル使用メモリ 173,408 KB
実行使用メモリ 56,872 KB
最終ジャッジ日時 2023-09-18 23:49:47
合計ジャッジ時間 5,891 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
56,736 KB
testcase_01 AC 40 ms
56,616 KB
testcase_02 AC 39 ms
56,732 KB
testcase_03 AC 39 ms
56,736 KB
testcase_04 AC 39 ms
56,796 KB
testcase_05 AC 39 ms
56,636 KB
testcase_06 AC 39 ms
56,624 KB
testcase_07 AC 39 ms
56,576 KB
testcase_08 AC 41 ms
56,732 KB
testcase_09 AC 39 ms
56,552 KB
testcase_10 AC 39 ms
56,580 KB
testcase_11 AC 40 ms
56,600 KB
testcase_12 AC 40 ms
56,804 KB
testcase_13 AC 55 ms
56,572 KB
testcase_14 AC 39 ms
56,668 KB
testcase_15 AC 39 ms
56,568 KB
testcase_16 AC 40 ms
56,544 KB
testcase_17 AC 53 ms
56,584 KB
testcase_18 AC 45 ms
56,568 KB
testcase_19 AC 44 ms
56,668 KB
testcase_20 AC 39 ms
56,868 KB
testcase_21 AC 40 ms
56,548 KB
testcase_22 AC 41 ms
56,560 KB
testcase_23 AC 39 ms
56,872 KB
testcase_24 AC 40 ms
56,560 KB
testcase_25 AC 39 ms
56,640 KB
testcase_26 AC 41 ms
56,740 KB
testcase_27 AC 41 ms
56,792 KB
testcase_28 AC 69 ms
56,608 KB
testcase_29 AC 68 ms
56,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll N,K;
mint d[301][44851],t,x;
{
	rd(N,K);
	d[1][0]=1;
	for(ll i=2;i<=N;++i){
		for(ll j=t=0;j<=i*(i-1)/2;++j){
			t+=d[i-1][j];
			if(j>=i)t-=d[i-1][j-i];
			d[i][j]=t;
		}
	}
	x+=d[N][0..K];
	wt(x);
}
0