Mercurial > repo
view MaFV @ 5429:021db8d79835
<oerjan> ` rm test*
author | HackBot |
---|---|
date | Sat, 06 Jun 2015 16:22:47 +0000 |
parents | dfde36387791 |
children |
line wrap: on
line source
#include <stdio.h> int c; void s() { unsigned int m = 0xFFFF; #define F(m,n,v,c,b) \ for (int v = 0; v < 16; v++) { \ if ((m & (1 << v)) && (c)) { \ unsigned int n = m - (1 << v); \ b \ } \ } #define L(m,n,v,e,b) \ { \ int v = e; \ if (v >= 0 && v < 16 && (m & (1 << v))) { \ unsigned int n = m - (1 << v); \ b; \ } \ } F(m,n, a1, 1, F(n,m, a4, a1<a4, F(m,n, d1, a1<d1 && a4<d1, F(n,m, a2, 1, L(m,n, a3, 30-a1-a2-a4, F(n,m, b1, 1, L(m,n, c1, 30-a1-b1-d1, F(n,m, b2, 1, F(m,n, d4, a1<d4, L(n,m, c3, 30-a1-b2-d4, F(m,n, b3, 1, L(n,m, b4, 30-b1-b2-b3, L(m,n, d3, 30-a3-b3-c3, L(n,m, d2, 30-d1-d3-d4, L(m,n, c4, 30-a4-b4-d4, L(n,m, c2, 30-d1-b3-a4, c++; // printf("%X%X%X%X\\%X%X%X%X\\%X%X%X%X\\%X%X%X%X\n",a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4,d1,d2,d3,d4); )))))))))))))))) } int main() { s(); printf("%d\n", c); }