CF266E More Queries to Array...
Description
You've got an array, consisting of $ n $ integers: $ a_{1},a_{2},...,a_{n} $ . Your task is to quickly run the queries of two types:
1. Assign value $ x $ to all elements from $ l $ to $ r $ inclusive. After such query the values of the elements of array $ a_{l},a_{l+1},...,a_{r} $ become equal to $ x $ .
2. Calculate and print sum , where $ k $ doesn't exceed $ 5 $ . As the value of the sum can be rather large, you should print it modulo $ 1000000007 (10^{9}+7) $ .
Input Format
The first line contains two integers $ n $ and $ m $ ( $ 1
Output Format
For each query to calculate the sum print an integer — the required sum modulo $ 1000000007 (10^{9}+7) $ .