Submission #27700853


Source Code Expand

#include<bits/stdc++.h>
#define mod 998244353
using namespace std;
int n, m, f[5005][5005];
int main() {
    scanf("%d%d", &n, &m);
    f[0][0] = 1;
    for(int i = 1; i <= n; i ++)
        for(int j = 1; j <= i; j ++) {
            f[i][j] = (f[i - 1][j - 1] + 1ll * f[i - 1][j] * (j - (i - 1) / m) % mod) % mod;
        }
    for(int i = 1; i <= n; i ++) printf("%d\n", f[n][i]);
    return 0;
}

Submission Info

Submission Time
Task G - Groups
User lahlah
Language C++ (GCC 9.2.1)
Score 600
Code Size 410 Byte
Status AC
Exec Time 79 ms
Memory 70528 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
    6 |     scanf("%d%d", &n, &m);
      |     ~~~~~^~~~~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 600 / 600
Status
AC × 3
AC × 27
Set Name Test Cases
Sample sample_01.txt, sample_02.txt, sample_03.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
random_01.txt AC 43 ms 32812 KiB
random_02.txt AC 25 ms 19948 KiB
random_03.txt AC 44 ms 39984 KiB
random_04.txt AC 75 ms 68936 KiB
random_05.txt AC 65 ms 61904 KiB
random_06.txt AC 24 ms 24280 KiB
random_07.txt AC 18 ms 14404 KiB
random_08.txt AC 43 ms 41156 KiB
random_09.txt AC 58 ms 52928 KiB
random_10.txt AC 14 ms 11660 KiB
random_11.txt AC 9 ms 9532 KiB
random_12.txt AC 40 ms 34700 KiB
random_13.txt AC 4 ms 3712 KiB
random_14.txt AC 2 ms 3656 KiB
random_15.txt AC 2 ms 3644 KiB
random_16.txt AC 29 ms 25972 KiB
random_17.txt AC 31 ms 25996 KiB
random_18.txt AC 33 ms 25952 KiB
random_19.txt AC 77 ms 70528 KiB
random_20.txt AC 77 ms 70456 KiB
random_21.txt AC 77 ms 70404 KiB
random_22.txt AC 79 ms 70340 KiB
random_23.txt AC 75 ms 70456 KiB
random_24.txt AC 77 ms 70340 KiB
sample_01.txt AC 2 ms 3628 KiB
sample_02.txt AC 2 ms 3828 KiB
sample_03.txt AC 2 ms 3888 KiB