Interval Sum(LintCode 206):

Problem