Solution: COCI 2015-2016 #6 Problem SAN
Problem Analysis: Digit DP
Before explaining the correct solution, let's first discuss the partial score approach.
For 50% of the data, where (1 \le L, R \le 10^6), a brute force simulation might be feasible. However, since we don't know the exact positions where each number appears, directly simulating with a 2D array is likely to cause memory ...
Posted on Thu, 28 May 2026 19:36:55 +0000 by Fawkman
Introduction to Digit Dynamic Programming
When solving counting problems over large numerical ranges, traditional anumeration becomes inefficient due to redundant computations. Consider counting processes from 7000 to 7999, 8000 to 8999, and 9000 to 9999. These intervals share a common pattern: the lower three digits cycle from 000 to 999, with only the thousand's digit varying. This o ...
Posted on Wed, 20 May 2026 18:55:12 +0000 by cbrooks