Processing math: 100%
Range update - MarisaOJ: Marisa Online Judge

Range update

Time limit: 1000 ms
Memory limit: 256 MB
Given an array A consists of n zero. You are also given q queries, each of the form (l,r) which means to increment Al,Al+1,...,Ar by 1. ### Input - The first line contains 2 integers n,q. - Next q lines, each line contains 2 integers l,r. ### Output - Print array A after q queries. ### Constraints - 1≤n,q≤105. - 1≤l,r≤n. ### Example Input: 43132412 Output: 2321