Problem 552 · Hard

Student Attendance Record II

Count the number of length-n attendance records over {P, A, L} that are rewardable — containing fewer than 2 absences and never 3 or more consecutive late days — modulo 10^9 + 7.

Open the interactive visualisation