TNP CHALLENGE 405
CodeChefOpen on judge ↗
Generate the first N rows of Pascal’s triangle. Each row should be printed as an array/list. Find the sum of non-terminal elements of (12N+10)th array. Also print the no. of arrays in which only two elements do not repeat. (Since the sum and no. can be large, compute it modulo 998,244,353.) (Pascal's triangle => To generate A[C] in row R, sum up A’[C] and A’[C-1] from previous row R - 1.)
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