代码拉取完成,页面将自动刷新
const A = [
[0, 1], [0, 2], [0, 3], [1, 0], [1, 2], [1, 3],
[2, 0], [2, 1], [2, 3], [3, 0], [3, 1], [3, 2],
];
const B = [
[0, 1, 2], [0, 1, 3], [0, 2, 1], [0, 2, 3], [0, 3, 1], [0, 3, 2],
[1, 0, 2], [1, 0, 3], [1, 2, 0], [1, 2, 3], [1, 3, 0], [1, 3, 2],
[2, 0, 1], [2, 0, 3], [2, 1, 0], [2, 1, 3], [2, 3, 0], [2, 3, 1],
[3, 0, 1], [3, 0, 2], [3, 1, 0], [3, 1, 2], [3, 2, 0], [3, 2, 1],
];
const FS = [
(p, n) => p & n,
(p, n) => ~p & n,
(p, n) => p & ~n,
(p, n) => ~p & ~n,
(p, n) => p | n,
(p, n) => ~p | n,
(p, n) => p | ~n,
(p, n) => ~p | ~n,
(p, n) => p ^ n,
(p, n) => ~p ^ n,
(p, n) => p ^ ~n,
(p, n) => ~p ^ ~n,
]
let x, y, z, a, b, c;
/*
x:'0',y:'1',z:'_',a:'0',b:'1',c:'2'
(x,a) -> (x,a)
(x,b) -> (y,a)
(x,c) -> (x,b)
(y,a) -> (y,b)
(y,b) -> (x,c)
(y,c) -> (y,c)
(z,a) -> (z,a)
(z,b) -> (x,b)
(z,c) -> (z,c)
*/
const ck = (f1, f2, p1, n1, p2, n2) => (f1(p1, n1) === p2) && (f2(p1, n1) === n2);
(() => {
let count = 0;
for (const p of A) {
for (const n of B) {
// [x, y, z] = p;
[x, y] = p;
[a, b, c] = n;
let rd = [
[x, a, x, a], [x, b, y, a], [x, c, x, b],
[y, a, y, b], [y, b, x, c], [y, c, y, c],
// [z, a, z, a], [z, b, z, b], [z, c, z, c],
]
for (const f1 of FS) {
for (const f2 of FS) {
if (rd.some(k => !ck(f1, f2, k[0], k[1], k[2], k[3]))) continue;
count++;
console.log(`x:${x.toString(2)},y:${y.toString(2)},` +
`a:${a.toString(2)},b:${b.toString(2)},c:${c.toString(2)}`);
console.log(`f1:${f1.toString()}\nf2:${f2.toString()}`)
// if (count > 20) return null;
}
}
}
}
console.log('count:', count);
})();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。