We are out of plots for the questions.So, let's get to the point of what is asked.
There is an array, A of N elements whose values are initialized to 1. Now, you are given Q queries where each query has two values L and R which denote the index range between which the values are updated by multiplying each of them by 21, 22 , 23 ,24 , .... ,2 R - L + 1 serially i.e; AL = AL x 21 , AL+1 = AL+1 x 22 , AL+2 = AL+2 x 23 and so on till AR = AR x 2R-L+1
Output the final array.
As the values can be large find the values MOD 1000003.
Input Format:
First line contains two integers N and Q. Each of next Q lines contains two integers L and R, denoting the left and right index ( inclusive) between which update is done.
Output Format:
Output N integers ith of which denotes the value, Ai
Constraints:
1 <= N, Q <= 105
1 <= L <= R <= N