Contest Duration: - (local time) (100 minutes) Back to Home

Submission #17752380

Source Code Expand

Copy
import sys
import numpy as np
import numba
from numba import njit, b1, i4, i8, f8

MOD = 998_244_353

@njit((i8, i8), cache=True)
def main(N, K):
dp = np.zeros((N + 1, 2 * N + 1), np.int64)  # 個数、和
dp[0, 0] = 1
for n in range(1, N + 1):
for s in range(n, 0, -1):
x = dp[n - 1, s - 1]
# 1 を使わない
x += dp[n, 2 * s]
if x >= MOD:
x -= MOD
dp[n, s] = x
return dp[N, K]

a, b = map(int, read().split())

print(main(a, b))

#### Submission Info

Submission Time 2020-10-31 21:11:24+0900 D - Number of Multisets maspy Python (3.8.2) 600 665 Byte AC 581 ms 246272 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 600 / 600
Status
 AC × 2
 AC × 50
Set Name Test Cases
Sample example_00, example_01
All example_00, example_01, handmade_00, handmade_01, handmade_02, handmade_03, handmade_04, handmade_05, handmade_06, handmade_07, max_random2_00, max_random2_01, max_random2_02, max_random2_03, max_random2_04, max_random2_05, max_random2_06, max_random2_07, max_random2_08, max_random2_09, max_random_00, max_random_01, max_random_02, max_random_03, max_random_04, max_random_05, max_random_06, max_random_07, max_random_08, max_random_09, random_00, random_01, random_02, random_03, random_04, random_05, random_06, random_07, random_08, random_09, small_00, small_01, small_02, small_03, small_04, small_05, small_06, small_07, small_08, small_09
Case Name Status Exec Time Memory
example_00 AC 500 ms 105252 KB
example_01 AC 557 ms 205544 KB
handmade_00 AC 563 ms 246272 KB
handmade_01 AC 564 ms 240436 KB
handmade_02 AC 555 ms 205324 KB
handmade_03 AC 483 ms 106532 KB
handmade_04 AC 475 ms 105652 KB
handmade_05 AC 475 ms 105736 KB
handmade_06 AC 574 ms 234768 KB
handmade_07 AC 473 ms 106308 KB
max_random2_00 AC 581 ms 241648 KB
max_random2_01 AC 568 ms 242768 KB
max_random2_02 AC 564 ms 244420 KB
max_random2_03 AC 558 ms 243620 KB
max_random2_04 AC 563 ms 239048 KB
max_random2_05 AC 568 ms 245516 KB
max_random2_06 AC 557 ms 238108 KB
max_random2_07 AC 567 ms 246056 KB
max_random2_08 AC 580 ms 243324 KB
max_random2_09 AC 575 ms 245780 KB
max_random_00 AC 571 ms 241704 KB
max_random_01 AC 574 ms 243224 KB
max_random_02 AC 565 ms 244940 KB
max_random_03 AC 562 ms 243220 KB
max_random_04 AC 571 ms 238328 KB
max_random_05 AC 561 ms 245512 KB
max_random_06 AC 563 ms 237484 KB
max_random_07 AC 581 ms 245988 KB
max_random_08 AC 573 ms 243572 KB
max_random_09 AC 567 ms 245932 KB
random_00 AC 500 ms 113208 KB
random_01 AC 482 ms 106244 KB
random_02 AC 472 ms 106084 KB
random_03 AC 495 ms 130540 KB
random_04 AC 552 ms 210524 KB
random_05 AC 495 ms 129776 KB
random_06 AC 495 ms 118220 KB
random_07 AC 520 ms 146876 KB
random_08 AC 508 ms 152916 KB
random_09 AC 475 ms 105440 KB
small_00 AC 481 ms 105972 KB
small_01 AC 488 ms 105992 KB
small_02 AC 477 ms 106452 KB
small_03 AC 472 ms 105908 KB
small_04 AC 482 ms 105204 KB
small_05 AC 486 ms 105796 KB
small_06 AC 497 ms 106332 KB
small_07 AC 487 ms 105388 KB
small_08 AC 492 ms 105672 KB
small_09 AC 479 ms 106064 KB