結果
問題 | No.1492 01文字列と転倒 |
ユーザー | googol_S0 |
提出日時 | 2021-04-30 21:26:26 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 386 bytes |
コンパイル時間 | 469 ms |
コンパイル使用メモリ | 87,020 KB |
実行使用メモリ | 848,028 KB |
最終ジャッジ日時 | 2023-09-26 04:24:31 |
合計ジャッジ時間 | 3,077 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
71,412 KB |
testcase_01 | AC | 71 ms
71,500 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 | -- | - |
ソースコード
N,mod=map(int,input().split()) DP=[[[0]*(N*N+1) for i in range(N+2)] for j in range(2*N+1)] DP[0][0][0]=1 for i in range(2*N): for j in range(N+1): if (i-j)>j: continue for k in range(N*(N-1)+1): DP[i+1][j+1][k+(i-j)]=(DP[i+1][j+1][k+(i-j)]+DP[i][j][k])%mod DP[i+1][j][k]=(DP[i+1][j][k]+DP[i][j][k])%mod print(*[DP[N*2][N][i] for i in range(N*N+1)],sep='\n')