#include #define cx 1000000 #define span 1000 typedef unsigned char uc; uc * se(uc * beg, int const cc){ short h[256]; int E=0; {int j=256; while(j--) h[j] = 0;} {//Initialize histogram and E. uc * x = beg; int j=span; while(j--) {short * b = h+*x++; E += *b; ++*b;}} {int j=cc-span; uc * re = beg, * fe = re+span; while(j--){ {short * b = h+*fe++; E += *b; ++*b;} {short * b = h+*re++; --*b; E -= *b;} if(E < 2000) return(re);}} if(0){int j; for(j=0; j<256; ++j) { if(!(j%10)) printf("\n"); printf("%5d", h[j]);} printf("\nE=-%d", E);} return 0;} uc d[cx]; int main(){ void makeVE(uc * p, int cc, int m){ int j; for(j=0; j