Can't find any announcement for ACL Beginner Contest, so creating this to discuss problems.
C
D
How to solve E?
I tried to make 9 segment tree for each 1 — 9 digits but couldn't find how to do update query where setting everything between l to r to zero when removing digit and to one when adding it.