Linear Combination
You are given an integer sequence $A_1, A_2, \ldots, A_N$. Find the number of integer sequences $X_1, X_2, \ldots, X_N$ such that - $0 \le X_i \lt 239$ for each valid $i$ - $X_i \neq X_j$ for each valid $i \neq j$ - $(X_1 \cdot A_1) + (X_2 \cdot A_2) + \ldots + (X_N \cdot A_N)$ is divisible by $239$ Since the answer may be large, compute it modulo $998,244,353$. ### Input - The first lin
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start