Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,25 @@
departmentNumbers
=validRows(
LAMBDA(ab,
LET(
x, INDEX(ab, 0, 1),
y, INDEX(ab, 0, 2),
z, 12 - (x + y),
IF(y <> z,
IF(1 <= z,
IF(7 >= z,
CHOOSE({1, 2, 3}, x, y, z),
NA()
),
NA()
),
NA()
)
)
)(
cartesianProduct({2;4;6})(
SEQUENCE(7, 1, 1, 1)
)
)
)

View file

@ -0,0 +1,43 @@
cartesianProduct
=LAMBDA(xs,
LAMBDA(ys,
LET(
ny, ROWS(ys),
ixs, SEQUENCE(ROWS(xs) * ny, 2, 1, 1),
IF(0 <> MOD(ixs, 2),
INDEX(xs,
1 + QUOTIENT(ixs, ny * 2)
),
LET(
r, MOD(QUOTIENT(ixs, 2), ny),
INDEX(ys, IF(0 = r, ny, r))
)
)
)
)
)
validRows
=LAMBDA(xs,
LET(
ixs, SEQUENCE(ROWS(xs), 1, 1, 1),
valids, FILTER(
ixs,
LAMBDA(i,
NOT(ISNA(INDEX(xs, i)))
)(ixs)
),
INDEX(
xs,
valids,
SEQUENCE(
1,
COLUMNS(xs)
)
)
)
)