Count the equal task splits in which Alpha wins, modulo 998244353.
A company maintains n x m tasks: departments 1..n and complexity levels 1..m, with exactly one task (d, c) per pair. Two managers, Alpha and Beta, split the tasks equally ((n x m)/2 each). A task (a, x) owned by Alpha can cover a Beta task (b, y) if at least one of these holds: (1) Central Office Advantage: a == 1, b != 1, x >= y; (2) Same Department Seniority: a == b, x > y; (3) Expert-Level Override: x == m, y < m, b != 1. Alpha wins if there is a one-to-one assignment from Beta's tasks to Alpha's tasks such that every assigned Alpha task covers its matched Beta task. Count the number of different equal splits where Alpha wins, modulo 998244353.
Format · Constraints: 1 <= n, m <= 500; m is even; n x m <= 20; n x m is even. Samples: (1,2) -> 1; (2,2) -> 2.
Community answers
Related courses


