• [B] RangeQuery

  • 时间限制: 2000 ms 内存限制: 65535 K
  • 问题描述
  • Now you are given a sequence which contains n integers, we called it a1, a2, a3, ..., an

  • 输入
  • Input starts with an integer T(T <= 20)
    For each test case, first line there is an integer n (1 <= n <= 100000).
    Next line contains n integers (1 <= ai <= 100000).
  • 输出
  • For each test case, print the value of expression.
  • 样例输入
  • 2
    4
    1 3 2 3
    3
    13 7 6
  • 样例输出
  • 18
    45
  • 提示
  • 来源
  • Alex@NBUT
  • 操作

显示春菜