CF1234D Distinct Characters Queries
Description
You are given a string $ s $ consisting of lowercase Latin letters and $ q $ queries for this string.
Recall that the substring $ s[l; r] $ of the string $ s $ is the string $ s_l s_{l + 1} \dots s_r $ . For example, the substrings of "codeforces" are "code", "force", "f", "for", but not "coder" and "top".
There are two types of queries:
- $ 1~ pos~ c $ ( $ 1 \le pos \le |s| $ , $ c $ is lowercase Latin letter): replace $ s_{pos} $ with $ c $ (set $ s_{pos} := c $ );
- $ 2~ l~ r $ ( $ 1 \le l \le r \le |s| $ ): calculate the number of distinct characters in the substring $ s[l; r] $ .
Input Format
N/A
Output Format
N/A