1063: Number of Valid Subarrays

Problem Statement