小珂最近有一个麻烦,就是要统计一下指定区域中有几个方格被染黑了.表格的布局及表格各个位置的坐标如下所示.有三种操作命令,BLACK x,y,l 表示把以坐标(x,y)为左上角顶点,(x+l-1,y+l-1)为右下角顶点的矩形染黑。WHITE x,y,l 表示吧指定区域染白。TEST x,y,l 表示计算指定区域的黑块的个数。说明:如果 x,y,x+l-1 ,y+l-1超出图表的范围,就只计算图表内部的。输入第一行有一个整数n(0<n<100),表示有n条命令,随后的n行有n个指令。输出遇到TEST命令,把结果输出并换行。样例输入5
BLACK 1 1 2
BLACK 2 2 2
T...
      
      
      
      
          
One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measure is 5, since D is greater than four letters to its right and E is greater than one letter to its right. ...
      
      
      
      
          
#include <stdio.h>int main(){  int m,a,b,c,d;  while(scanf("%d",&m)&&m!=0)  {    if(m>0&&m<=4)    printf("%d\n",m);    else    {      a=2;      b=3;      c=4;      d=a+c;      while(m-6>=0)      {        a=b;        b=c;        c=d;        d=a+c;        m--;      }      prin...