Editorial for BSSPC '21 S3 - James's Egirl Discord Status
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Subtask 1
We can simply loop over all
Time Complexity:
Subtask 2
This subtask was created to reward unoptimized solutions close to a full solution that ran in
Subtask 3
We reduce the problem to
Time Complexity:
Alternate solution
Another solution involves dynamic programming. We let
The answer will be
Time Complexity:
Comments