Two Much

0

0 votes
Medium
Problem

We are out of plots for the questions.So, let's get to the point of what is asked.

There is an array, of elements whose values are initialized to 1. Now, you are given queries where each query has two values and which denote the index range between which the values are updated by multiplying each of them by 21, 2, 23 ,24 , .... ,2 R - L + 1  serially  i.e; AL = AL x 2 ,  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 and . Each of next lines contains two integers and , denoting the left and right index ( inclusive)  between which update is done.

Output Format:

Output integers ith  of which denotes the value, Ai

Constraints:

1 <= <= 105                                

1 <= <= <=

Sample Input
5 3
1 3
4 5
1 2
Sample Output
4 16 8 2 4 
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?