結果
問題 | No.1318 ABCD quadruplets |
ユーザー | googol_S0 |
提出日時 | 2020-12-15 00:29:39 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 407 bytes |
コンパイル時間 | 654 ms |
コンパイル使用メモリ | 81,748 KB |
実行使用メモリ | 841,596 KB |
最終ジャッジ日時 | 2023-10-20 05:23:09 |
合計ジャッジ時間 | 3,995 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 37 ms
53,480 KB |
testcase_01 | AC | 36 ms
53,480 KB |
testcase_02 | AC | 37 ms
53,480 KB |
testcase_03 | AC | 37 ms
53,480 KB |
testcase_04 | AC | 37 ms
53,480 KB |
testcase_05 | AC | 37 ms
53,480 KB |
testcase_06 | AC | 37 ms
53,480 KB |
testcase_07 | AC | 37 ms
53,480 KB |
testcase_08 | AC | 37 ms
53,480 KB |
testcase_09 | AC | 43 ms
59,532 KB |
testcase_10 | AC | 43 ms
59,532 KB |
testcase_11 | AC | 43 ms
59,604 KB |
testcase_12 | AC | 38 ms
53,480 KB |
testcase_13 | AC | 479 ms
235,640 KB |
testcase_14 | MLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
ソースコード
N,M=map(int,input().split()) DP=[[[0]*(M*j+1) for i in range(N+1)] for j in range(5)] DP[0][0][0]=1 for i in range(M+1): DP[1][i*i][i]=1 for i in range(1,4): for j in range(N+1): for k in range(M*i+1): if DP[i][j][k]==0: continue l=0 while l*(l+k)+j<=N and l<=M: DP[i+1][l*(l+k)+j][k+l]+=DP[i][j][k] l+=1 print(*[sum(DP[4][i]) for i in range(N+1)],sep='\n')