Editorial for DMOPC '17 Contest 3 P4 - Solitaire Logic
Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
For
Time Complexity:
Consider a card with value
For the next
So it is enough to consider these two subarrays containing all cards with value between
Time Complexity:
For the final subtask,
Time Complexity:
Comments