• [1250] Garfield DN Number

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • This problem is pretty easy.
    A[N] is a array contain N(2 <= N <= 10000) integers.
    Garfield define Garfield DN Number as follow:
    There are two integers i, j. 1 <= i < j <= N and the A[i] > [j].
    It means the Garfield DN Number contain two integers.
    Now you have to count all the Garfield DN Numbers.
  • 输入
  • First line contain a integer T(T <= 100), means the test case.
    For each test case, the first integer N, means the array's length.
    And then, this line follow N integers.
  • 输出
  • For each case, count the sum of Garfield DN Number number;
  • 样例输入
  • 2
    2 1 2
    3 3 1 2
    
  • 样例输出
  • 0
    2
    
  • 提示
  • 来源
  • monkeyde17
  • 操作

显示春菜