int w,h,n,m,ld,min,i,j,k; void dot(int list[w*h][w*h], int H[w*h][w*h]){ int tmp[w*h][w*h],ans=0; for(i=0;itmp[j+1]?(tmp[j]-tmp[j+1]):(tmp[j+1]-tmp[j]); min=tmp[j]>tmp[j+1]?tmp[j+1]:tmp[j]; for(k=0;k