Anonymous user
Cartesian product of two or more lists: Difference between revisions
Cartesian product of two or more lists (view source)
Revision as of 00:16, 25 November 2021
, 2 years ago→{{header|Action!}}
(Added solution for Action!) |
|||
Line 52:
DEFINE MAX_RESULT="100"
DEFINE PTR="CARD"
PROC PrintInput(CARD ARRAY a INT count)▼
INT i,j,n
INT ARRAY tmp
Line 89 ⟶ 91:
RETURN
PROC Product(
INT ARRAY r INT POINTER groups)
INT ARRAY ind(MAX_COUNT),tmp
Line 129 ⟶ 131:
RETURN
PROC Test(
INT groups
Line 147 ⟶ 149:
a6=[3 4 14 23],a7=[2 0 1],
a8=[3 1 2 3],a9=[1 30],a10=[2 500 100]
a(0)=a1 a(1)=a2 Test(a,2)
|