結果

問題 No.1492 01文字列と転倒
ユーザー rtyurtyu
提出日時 2021-10-19 14:06:02
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 510 bytes
コンパイル時間 534 ms
コンパイル使用メモリ 66,816 KB
実行使用メモリ 814,704 KB
最終ジャッジ日時 2023-10-20 10:46:20
合計ジャッジ時間 2,804 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
11,800 KB
testcase_01 AC 6 ms
20,008 KB
testcase_02 MLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

long long d[209][109][10009];

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n; long long md; cin >> n >> md;
	d[0][0][0] = 1;
	for (int i = 1; i <= 2 * n; i++)
		for (int j = 0; j <= i / 2; j++)
			for (int k = 0; k <= n * n; k++) {
				if (k >= j) d[i][j][k] = d[i - 1][j][k - j];
				if (j) d[i][j][k] = (d[i][j][k] + d[i - 1][j - 1][k]) % md;
			}
	for (int i = 0; i <= n * n; i++)
		cout << d[2 * n][n][i] << '\n';
	return 0;
}
0