Duongcvp's blog

By Duongcvp, 5 years ago, In English

Give an array size N (N<=10^5). There are Q(Q<=10^5) queries and 2 types of queries: (0 l r): Increase a[l], a[l],..., a[r] by 1, and (1 l r): Calculate (a[l]*a[l+1]*...*a[r])%(10^6+3).
Can someone help me solve this problem? Thanks.
And sorry because of my poor English.

Full text and comments »

  • Vote: I like it
  • +12
  • Vote: I do not like it