Skip to content

Instantly share code, notes, and snippets.

@jianminchen
Created November 19, 2016 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jianminchen/2d3622a096c51b0afe81fd60ca9865ef to your computer and use it in GitHub Desktop.
Save jianminchen/2d3622a096c51b0afe81fd60ca9865ef to your computer and use it in GitHub Desktop.
HackerRank university codesprint - Test case 50, 20 1860 - check w[49,6, 282] is not true, then, is true -> return
This file has been truncated, but you can view the full file.
w[p, sum, diffsum] is not true w[0,0,0]
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 50
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=0
D-set A[p]=i, A[p]=0 where p=0 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 1
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,1)
w[p, sum, diffsum] is not true w[1,0,0]
i=A[p-1], p=1, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 49
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=1
D-set A[p]=i, A[p]=0 where p=1 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 2
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,2)
w[p, sum, diffsum] is not true w[2,0,0]
i=A[p-1], p=2, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 48
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=2
D-set A[p]=i, A[p]=0 where p=2 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 3
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,3)
w[p, sum, diffsum] is not true w[3,0,0]
i=A[p-1], p=3, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 47
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=3
D-set A[p]=i, A[p]=0 where p=3 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 4
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,4)
w[p, sum, diffsum] is not true w[4,0,0]
i=A[p-1], p=4, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 46
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=4
D-set A[p]=i, A[p]=0 where p=4 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 5
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,5)
w[p, sum, diffsum] is not true w[5,0,0]
i=A[p-1], p=5, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 45
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=5
D-set A[p]=i, A[p]=0 where p=5 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 6
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,6)
w[p, sum, diffsum] is not true w[6,0,0]
i=A[p-1], p=6, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 44
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=6
D-set A[p]=i, A[p]=0 where p=6 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 7
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,7)
w[p, sum, diffsum] is not true w[7,0,0]
i=A[p-1], p=7, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 43
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=7
D-set A[p]=i, A[p]=0 where p=7 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 8
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,8)
w[p, sum, diffsum] is not true w[8,0,0]
i=A[p-1], p=8, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 42
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=8
D-set A[p]=i, A[p]=0 where p=8 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 9
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,9)
w[p, sum, diffsum] is not true w[9,0,0]
i=A[p-1], p=9, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 41
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=9
D-set A[p]=i, A[p]=0 where p=9 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 10
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,10)
w[p, sum, diffsum] is not true w[10,0,0]
i=A[p-1], p=10, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 40
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=10
D-set A[p]=i, A[p]=0 where p=10 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 11
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,11)
w[p, sum, diffsum] is not true w[11,0,0]
i=A[p-1], p=11, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 39
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=11
D-set A[p]=i, A[p]=0 where p=11 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 12
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,12)
w[p, sum, diffsum] is not true w[12,0,0]
i=A[p-1], p=12, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 38
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=12
D-set A[p]=i, A[p]=0 where p=12 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 13
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,13)
w[p, sum, diffsum] is not true w[13,0,0]
i=A[p-1], p=13, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 37
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=13
D-set A[p]=i, A[p]=0 where p=13 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 14
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,14)
w[p, sum, diffsum] is not true w[14,0,0]
i=A[p-1], p=14, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 36
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=14
D-set A[p]=i, A[p]=0 where p=14 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 15
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,15)
w[p, sum, diffsum] is not true w[15,0,0]
i=A[p-1], p=15, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 35
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=15
D-set A[p]=i, A[p]=0 where p=15 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 16
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,16)
w[p, sum, diffsum] is not true w[16,0,0]
i=A[p-1], p=16, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 34
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=16
D-set A[p]=i, A[p]=0 where p=16 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 17
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,17)
w[p, sum, diffsum] is not true w[17,0,0]
i=A[p-1], p=17, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 33
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=17
D-set A[p]=i, A[p]=0 where p=17 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 18
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,18)
w[p, sum, diffsum] is not true w[18,0,0]
i=A[p-1], p=18, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 32
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=18
D-set A[p]=i, A[p]=0 where p=18 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 19
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,19)
w[p, sum, diffsum] is not true w[19,0,0]
i=A[p-1], p=19, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 31
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=19
D-set A[p]=i, A[p]=0 where p=19 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 20
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,20)
w[p, sum, diffsum] is not true w[20,0,0]
i=A[p-1], p=20, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 30
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=20
D-set A[p]=i, A[p]=0 where p=20 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 21
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,21)
w[p, sum, diffsum] is not true w[21,0,0]
i=A[p-1], p=21, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 29
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=21
D-set A[p]=i, A[p]=0 where p=21 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 22
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,22)
w[p, sum, diffsum] is not true w[22,0,0]
i=A[p-1], p=22, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 28
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=22
D-set A[p]=i, A[p]=0 where p=22 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 23
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,23)
w[p, sum, diffsum] is not true w[23,0,0]
i=A[p-1], p=23, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 27
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=23
D-set A[p]=i, A[p]=0 where p=23 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 24
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,24)
w[p, sum, diffsum] is not true w[24,0,0]
i=A[p-1], p=24, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 26
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=24
D-set A[p]=i, A[p]=0 where p=24 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 25
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,25)
w[p, sum, diffsum] is not true w[25,0,0]
i=A[p-1], p=25, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 25
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=25
D-set A[p]=i, A[p]=0 where p=25 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 26
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,26)
w[p, sum, diffsum] is not true w[26,0,0]
i=A[p-1], p=26, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 24
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=26
D-set A[p]=i, A[p]=0 where p=26 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 27
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,27)
w[p, sum, diffsum] is not true w[27,0,0]
i=A[p-1], p=27, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 23
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=27
D-set A[p]=i, A[p]=0 where p=27 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 28
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,28)
w[p, sum, diffsum] is not true w[28,0,0]
i=A[p-1], p=28, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 22
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=28
D-set A[p]=i, A[p]=0 where p=28 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 29
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,29)
w[p, sum, diffsum] is not true w[29,0,0]
i=A[p-1], p=29, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 21
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=29
D-set A[p]=i, A[p]=0 where p=29 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 30
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,30)
w[p, sum, diffsum] is not true w[30,0,0]
i=A[p-1], p=30, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 20
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=30
D-set A[p]=i, A[p]=0 where p=30 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 31
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,31)
w[p, sum, diffsum] is not true w[31,0,0]
i=A[p-1], p=31, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 19
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=31
D-set A[p]=i, A[p]=0 where p=31 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 32
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,32)
w[p, sum, diffsum] is not true w[32,0,0]
i=A[p-1], p=32, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 18
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=32
D-set A[p]=i, A[p]=0 where p=32 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 33
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,33)
w[p, sum, diffsum] is not true w[33,0,0]
i=A[p-1], p=33, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 17
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=33
D-set A[p]=i, A[p]=0 where p=33 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 34
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,34)
w[p, sum, diffsum] is not true w[34,0,0]
i=A[p-1], p=34, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 16
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=34
D-set A[p]=i, A[p]=0 where p=34 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 35
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,35)
w[p, sum, diffsum] is not true w[35,0,0]
i=A[p-1], p=35, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 15
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=35
D-set A[p]=i, A[p]=0 where p=35 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 36
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,36)
w[p, sum, diffsum] is not true w[36,0,0]
i=A[p-1], p=36, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 14
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=36
D-set A[p]=i, A[p]=0 where p=36 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 37
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,37)
w[p, sum, diffsum] is not true w[37,0,0]
i=A[p-1], p=37, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 13
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=37
D-set A[p]=i, A[p]=0 where p=37 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 38
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,38)
w[p, sum, diffsum] is not true w[38,0,0]
i=A[p-1], p=38, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 12
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=38
D-set A[p]=i, A[p]=0 where p=38 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 39
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,39)
w[p, sum, diffsum] is not true w[39,0,0]
i=A[p-1], p=39, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 11
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=39
D-set A[p]=i, A[p]=0 where p=39 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 40
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,40)
w[p, sum, diffsum] is not true w[40,0,0]
i=A[p-1], p=40, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 10
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=40
D-set A[p]=i, A[p]=0 where p=40 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 41
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,41)
w[p, sum, diffsum] is not true w[41,0,0]
i=A[p-1], p=41, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 9
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=41
D-set A[p]=i, A[p]=0 where p=41 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 42
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,42)
w[p, sum, diffsum] is not true w[42,0,0]
i=A[p-1], p=42, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 8
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=42
D-set A[p]=i, A[p]=0 where p=42 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 43
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,43)
w[p, sum, diffsum] is not true w[43,0,0]
i=A[p-1], p=43, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 7
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=43
D-set A[p]=i, A[p]=0 where p=43 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 44
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,44)
w[p, sum, diffsum] is not true w[44,0,0]
i=A[p-1], p=44, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 6
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=44
D-set A[p]=i, A[p]=0 where p=44 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,45)
w[p, sum, diffsum] is not true w[45,0,0]
i=A[p-1], p=45, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 5
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=45
D-set A[p]=i, A[p]=0 where p=45 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,46)
w[p, sum, diffsum] is not true w[46,0,0]
i=A[p-1], p=46, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 4
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=46
D-set A[p]=i, A[p]=0 where p=46 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,47)
w[p, sum, diffsum] is not true w[47,0,0]
i=A[p-1], p=47, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 3
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=47
D-set A[p]=i, A[p]=0 where p=47 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,48)
w[p, sum, diffsum] is not true w[48,0,0]
i=A[p-1], p=48, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 2
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=48
D-set A[p]=i, A[p]=0 where p=48 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,49)
w[p, sum, diffsum] is not true w[49,0,0]
i=A[p-1], p=49, i=0;
For loop (A - E): for(; i<=s;i++) i=0 s=20
n-p=? 1
iterate on i =0
A: review sum, diffsum 0 0
B: newSum, newDiffSum 0 0
C: i, n, p i=0 n=50 p=49
D-set A[p]=i, A[p]=0 where p=49 and i=0
D-Normal: loop start to end: From 0 to 20 current i = 0 and arguments:0 0 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
F: recursive call construct - arguments: (A,0,0,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 1 49
C: i, n, p i=1 n=50 p=49
D-set A[p]=i, A[p]=1 where p=49 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 49 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1]
F: recursive call construct - arguments: (A,1,49,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =2
A: review sum, diffsum 0 0
B: newSum, newDiffSum 2 98
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 0 to 20 current i = 2 and arguments:2 98 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2]
F: recursive call construct - arguments: (A,2,98,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 0 0
B: newSum, newDiffSum 3 147
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 0 to 20 current i = 3 and arguments:3 147 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3]
F: recursive call construct - arguments: (A,3,147,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 0 0
B: newSum, newDiffSum 4 196
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 0 to 20 current i = 4 and arguments:4 196 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4]
F: recursive call construct - arguments: (A,4,196,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 0 0
B: newSum, newDiffSum 5 245
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 0 to 20 current i = 5 and arguments:5 245 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5]
F: recursive call construct - arguments: (A,5,245,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 0 0
B: newSum, newDiffSum 6 294
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 0 to 20 current i = 6 and arguments:6 294 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6]
F: recursive call construct - arguments: (A,6,294,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 0 0
B: newSum, newDiffSum 7 343
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 0 to 20 current i = 7 and arguments:7 343 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7]
F: recursive call construct - arguments: (A,7,343,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 0 0
B: newSum, newDiffSum 8 392
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 0 to 20 current i = 8 and arguments:8 392 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8]
F: recursive call construct - arguments: (A,8,392,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 0 0
B: newSum, newDiffSum 9 441
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 0 to 20 current i = 9 and arguments:9 441 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9]
F: recursive call construct - arguments: (A,9,441,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 0 0
B: newSum, newDiffSum 10 490
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 0 to 20 current i = 10 and arguments:10 490 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10]
F: recursive call construct - arguments: (A,10,490,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 0 0
B: newSum, newDiffSum 11 539
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 0 to 20 current i = 11 and arguments:11 539 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11]
F: recursive call construct - arguments: (A,11,539,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 0 0
B: newSum, newDiffSum 12 588
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 0 to 20 current i = 12 and arguments:12 588 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12]
F: recursive call construct - arguments: (A,12,588,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 0 0
B: newSum, newDiffSum 13 637
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 0 to 20 current i = 13 and arguments:13 637 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13]
F: recursive call construct - arguments: (A,13,637,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 0 0
B: newSum, newDiffSum 14 686
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 0 to 20 current i = 14 and arguments:14 686 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14]
F: recursive call construct - arguments: (A,14,686,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 0 0
B: newSum, newDiffSum 15 735
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 0 to 20 current i = 15 and arguments:15 735 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15]
F: recursive call construct - arguments: (A,15,735,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 0 0
B: newSum, newDiffSum 16 784
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 0 to 20 current i = 16 and arguments:16 784 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]
F: recursive call construct - arguments: (A,16,784,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 0 0
B: newSum, newDiffSum 17 833
C: i, n, p i=17 n=50 p=49
D-set A[p]=i, A[p]=17 where p=49 and i=17
D-Normal: loop start to end: From 0 to 20 current i = 17 and arguments:17 833 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17]
F: recursive call construct - arguments: (A,17,833,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =18
A: review sum, diffsum 0 0
B: newSum, newDiffSum 18 882
C: i, n, p i=18 n=50 p=49
D-set A[p]=i, A[p]=18 where p=49 and i=18
D-Normal: loop start to end: From 0 to 20 current i = 18 and arguments:18 882 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18]
F: recursive call construct - arguments: (A,18,882,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =19
A: review sum, diffsum 0 0
B: newSum, newDiffSum 19 931
C: i, n, p i=19 n=50 p=49
D-set A[p]=i, A[p]=19 where p=49 and i=19
D-Normal: loop start to end: From 0 to 20 current i = 19 and arguments:19 931 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19]
F: recursive call construct - arguments: (A,19,931,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =20
A: review sum, diffsum 0 0
B: newSum, newDiffSum 20 980
C: i, n, p i=20 n=50 p=49
D-set A[p]=i, A[p]=20 where p=49 and i=20
D-Normal: loop start to end: From 0 to 20 current i = 20 and arguments:20 980 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20]
F: recursive call construct - arguments: (A,20,980,50)
p==n return 0 whereas p=50 n=50
n-p=? 2
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 2 96
C: i, n, p i=1 n=50 p=48
D-set A[p]=i, A[p]=1 where p=48 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 48 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20]
F: recursive call construct - arguments: (A,1,48,49)
w[p, sum, diffsum] is not true w[49,1,48]
i=A[p-1], p=49, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 1
iterate on i =1
A: review sum, diffsum 1 48
B: newSum, newDiffSum 2 96
C: i, n, p i=1 n=50 p=49
D-set A[p]=i, A[p]=1 where p=49 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:2 96 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1]
F: recursive call construct - arguments: (A,2,96,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =2
A: review sum, diffsum 1 48
B: newSum, newDiffSum 3 145
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:3 145 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2]
F: recursive call construct - arguments: (A,3,145,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 1 48
B: newSum, newDiffSum 4 194
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:4 194 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3]
F: recursive call construct - arguments: (A,4,194,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 1 48
B: newSum, newDiffSum 5 243
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:5 243 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4]
F: recursive call construct - arguments: (A,5,243,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 1 48
B: newSum, newDiffSum 6 292
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:6 292 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5]
F: recursive call construct - arguments: (A,6,292,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 1 48
B: newSum, newDiffSum 7 341
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:7 341 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6]
F: recursive call construct - arguments: (A,7,341,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 1 48
B: newSum, newDiffSum 8 390
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:8 390 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7]
F: recursive call construct - arguments: (A,8,390,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 1 48
B: newSum, newDiffSum 9 439
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:9 439 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8]
F: recursive call construct - arguments: (A,9,439,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 1 48
B: newSum, newDiffSum 10 488
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:10 488 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,9]
F: recursive call construct - arguments: (A,10,488,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 1 48
B: newSum, newDiffSum 11 537
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 1 to 20 current i = 10 and arguments:11 537 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,10]
F: recursive call construct - arguments: (A,11,537,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 1 48
B: newSum, newDiffSum 12 586
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 1 to 20 current i = 11 and arguments:12 586 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,11]
F: recursive call construct - arguments: (A,12,586,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 1 48
B: newSum, newDiffSum 13 635
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 1 to 20 current i = 12 and arguments:13 635 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12]
F: recursive call construct - arguments: (A,13,635,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 1 48
B: newSum, newDiffSum 14 684
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 1 to 20 current i = 13 and arguments:14 684 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,13]
F: recursive call construct - arguments: (A,14,684,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 1 48
B: newSum, newDiffSum 15 733
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 1 to 20 current i = 14 and arguments:15 733 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,14]
F: recursive call construct - arguments: (A,15,733,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 1 48
B: newSum, newDiffSum 16 782
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 1 to 20 current i = 15 and arguments:16 782 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,15]
F: recursive call construct - arguments: (A,16,782,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 1 48
B: newSum, newDiffSum 17 831
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 1 to 20 current i = 16 and arguments:17 831 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16]
F: recursive call construct - arguments: (A,17,831,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 1 48
B: newSum, newDiffSum 18 880
C: i, n, p i=17 n=50 p=49
D-set A[p]=i, A[p]=17 where p=49 and i=17
D-Normal: loop start to end: From 1 to 20 current i = 17 and arguments:18 880 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,17]
F: recursive call construct - arguments: (A,18,880,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =18
A: review sum, diffsum 1 48
B: newSum, newDiffSum 19 929
C: i, n, p i=18 n=50 p=49
D-set A[p]=i, A[p]=18 where p=49 and i=18
D-Normal: loop start to end: From 1 to 20 current i = 18 and arguments:19 929 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,18]
F: recursive call construct - arguments: (A,19,929,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =19
A: review sum, diffsum 1 48
B: newSum, newDiffSum 20 978
C: i, n, p i=19 n=50 p=49
D-set A[p]=i, A[p]=19 where p=49 and i=19
D-Normal: loop start to end: From 1 to 20 current i = 19 and arguments:20 978 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,19]
F: recursive call construct - arguments: (A,20,978,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =20
A: review sum, diffsum 1 48
B: newSum, newDiffSum 21 1027
C: i, n, p i=20 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1027 exit for loop.
return 0
n-p=? 2
iterate on i =2
A: review sum, diffsum 0 0
B: newSum, newDiffSum 4 192
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 0 to 20 current i = 2 and arguments:2 96 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,19]
F: recursive call construct - arguments: (A,2,96,49)
w[p, sum, diffsum] is not true w[49,2,96]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 2 96
B: newSum, newDiffSum 4 192
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:4 192 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2]
F: recursive call construct - arguments: (A,4,192,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 2 96
B: newSum, newDiffSum 5 241
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:5 241 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3]
F: recursive call construct - arguments: (A,5,241,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 2 96
B: newSum, newDiffSum 6 290
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:6 290 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4]
F: recursive call construct - arguments: (A,6,290,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 2 96
B: newSum, newDiffSum 7 339
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:7 339 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5]
F: recursive call construct - arguments: (A,7,339,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 2 96
B: newSum, newDiffSum 8 388
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:8 388 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6]
F: recursive call construct - arguments: (A,8,388,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 2 96
B: newSum, newDiffSum 9 437
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:9 437 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7]
F: recursive call construct - arguments: (A,9,437,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 2 96
B: newSum, newDiffSum 10 486
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:10 486 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,8]
F: recursive call construct - arguments: (A,10,486,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 2 96
B: newSum, newDiffSum 11 535
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:11 535 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9]
F: recursive call construct - arguments: (A,11,535,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 2 96
B: newSum, newDiffSum 12 584
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:12 584 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,10]
F: recursive call construct - arguments: (A,12,584,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 2 96
B: newSum, newDiffSum 13 633
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:13 633 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,11]
F: recursive call construct - arguments: (A,13,633,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 2 96
B: newSum, newDiffSum 14 682
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:14 682 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,12]
F: recursive call construct - arguments: (A,14,682,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 2 96
B: newSum, newDiffSum 15 731
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:15 731 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,13]
F: recursive call construct - arguments: (A,15,731,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 2 96
B: newSum, newDiffSum 16 780
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:16 780 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,14]
F: recursive call construct - arguments: (A,16,780,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 2 96
B: newSum, newDiffSum 17 829
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 2 to 20 current i = 15 and arguments:17 829 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,15]
F: recursive call construct - arguments: (A,17,829,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 2 96
B: newSum, newDiffSum 18 878
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 2 to 20 current i = 16 and arguments:18 878 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16]
F: recursive call construct - arguments: (A,18,878,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 2 96
B: newSum, newDiffSum 19 927
C: i, n, p i=17 n=50 p=49
D-set A[p]=i, A[p]=17 where p=49 and i=17
D-Normal: loop start to end: From 2 to 20 current i = 17 and arguments:19 927 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,17]
F: recursive call construct - arguments: (A,19,927,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =18
A: review sum, diffsum 2 96
B: newSum, newDiffSum 20 976
C: i, n, p i=18 n=50 p=49
D-set A[p]=i, A[p]=18 where p=49 and i=18
D-Normal: loop start to end: From 2 to 20 current i = 18 and arguments:20 976 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,18]
F: recursive call construct - arguments: (A,20,976,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =19
A: review sum, diffsum 2 96
B: newSum, newDiffSum 21 1025
C: i, n, p i=19 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1025 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 0 0
B: newSum, newDiffSum 6 288
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 0 to 20 current i = 3 and arguments:3 144 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,18]
F: recursive call construct - arguments: (A,3,144,49)
w[p, sum, diffsum] is not true w[49,3,144]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 3 144
B: newSum, newDiffSum 6 288
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:6 288 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3]
F: recursive call construct - arguments: (A,6,288,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 3 144
B: newSum, newDiffSum 7 337
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:7 337 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4]
F: recursive call construct - arguments: (A,7,337,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 3 144
B: newSum, newDiffSum 8 386
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:8 386 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5]
F: recursive call construct - arguments: (A,8,386,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 3 144
B: newSum, newDiffSum 9 435
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:9 435 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6]
F: recursive call construct - arguments: (A,9,435,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 3 144
B: newSum, newDiffSum 10 484
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:10 484 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7]
F: recursive call construct - arguments: (A,10,484,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 3 144
B: newSum, newDiffSum 11 533
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:11 533 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,8]
F: recursive call construct - arguments: (A,11,533,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 3 144
B: newSum, newDiffSum 12 582
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:12 582 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,9]
F: recursive call construct - arguments: (A,12,582,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 3 144
B: newSum, newDiffSum 13 631
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:13 631 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,10]
F: recursive call construct - arguments: (A,13,631,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 3 144
B: newSum, newDiffSum 14 680
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:14 680 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,11]
F: recursive call construct - arguments: (A,14,680,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 3 144
B: newSum, newDiffSum 15 729
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:15 729 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,12]
F: recursive call construct - arguments: (A,15,729,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 3 144
B: newSum, newDiffSum 16 778
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:16 778 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,13]
F: recursive call construct - arguments: (A,16,778,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 3 144
B: newSum, newDiffSum 17 827
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 3 to 20 current i = 14 and arguments:17 827 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,14]
F: recursive call construct - arguments: (A,17,827,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 3 144
B: newSum, newDiffSum 18 876
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 3 to 20 current i = 15 and arguments:18 876 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,15]
F: recursive call construct - arguments: (A,18,876,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 3 144
B: newSum, newDiffSum 19 925
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 3 to 20 current i = 16 and arguments:19 925 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,16]
F: recursive call construct - arguments: (A,19,925,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 3 144
B: newSum, newDiffSum 20 974
C: i, n, p i=17 n=50 p=49
D-set A[p]=i, A[p]=17 where p=49 and i=17
D-Normal: loop start to end: From 3 to 20 current i = 17 and arguments:20 974 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,17]
F: recursive call construct - arguments: (A,20,974,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =18
A: review sum, diffsum 3 144
B: newSum, newDiffSum 21 1023
C: i, n, p i=18 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1023 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 0 0
B: newSum, newDiffSum 8 384
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 0 to 20 current i = 4 and arguments:4 192 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,17]
F: recursive call construct - arguments: (A,4,192,49)
w[p, sum, diffsum] is not true w[49,4,192]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 4 192
B: newSum, newDiffSum 8 384
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:8 384 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4]
F: recursive call construct - arguments: (A,8,384,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 4 192
B: newSum, newDiffSum 9 433
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:9 433 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5]
F: recursive call construct - arguments: (A,9,433,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 4 192
B: newSum, newDiffSum 10 482
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:10 482 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,6]
F: recursive call construct - arguments: (A,10,482,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 4 192
B: newSum, newDiffSum 11 531
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:11 531 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,7]
F: recursive call construct - arguments: (A,11,531,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 4 192
B: newSum, newDiffSum 12 580
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:12 580 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8]
F: recursive call construct - arguments: (A,12,580,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 4 192
B: newSum, newDiffSum 13 629
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:13 629 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,9]
F: recursive call construct - arguments: (A,13,629,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 4 192
B: newSum, newDiffSum 14 678
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:14 678 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,10]
F: recursive call construct - arguments: (A,14,678,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 4 192
B: newSum, newDiffSum 15 727
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:15 727 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,11]
F: recursive call construct - arguments: (A,15,727,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 4 192
B: newSum, newDiffSum 16 776
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:16 776 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,12]
F: recursive call construct - arguments: (A,16,776,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 4 192
B: newSum, newDiffSum 17 825
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 4 to 20 current i = 13 and arguments:17 825 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,13]
F: recursive call construct - arguments: (A,17,825,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 4 192
B: newSum, newDiffSum 18 874
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 4 to 20 current i = 14 and arguments:18 874 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,14]
F: recursive call construct - arguments: (A,18,874,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 4 192
B: newSum, newDiffSum 19 923
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 4 to 20 current i = 15 and arguments:19 923 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,15]
F: recursive call construct - arguments: (A,19,923,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 4 192
B: newSum, newDiffSum 20 972
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 4 to 20 current i = 16 and arguments:20 972 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,16]
F: recursive call construct - arguments: (A,20,972,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 4 192
B: newSum, newDiffSum 21 1021
C: i, n, p i=17 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1021 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 0 0
B: newSum, newDiffSum 10 480
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 0 to 20 current i = 5 and arguments:5 240 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,16]
F: recursive call construct - arguments: (A,5,240,49)
w[p, sum, diffsum] is not true w[49,5,240]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 5 240
B: newSum, newDiffSum 10 480
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:10 480 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5]
F: recursive call construct - arguments: (A,10,480,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 5 240
B: newSum, newDiffSum 11 529
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:11 529 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6]
F: recursive call construct - arguments: (A,11,529,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 5 240
B: newSum, newDiffSum 12 578
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:12 578 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,7]
F: recursive call construct - arguments: (A,12,578,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 5 240
B: newSum, newDiffSum 13 627
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:13 627 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,8]
F: recursive call construct - arguments: (A,13,627,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 5 240
B: newSum, newDiffSum 14 676
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:14 676 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,9]
F: recursive call construct - arguments: (A,14,676,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 5 240
B: newSum, newDiffSum 15 725
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:15 725 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,10]
F: recursive call construct - arguments: (A,15,725,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 5 240
B: newSum, newDiffSum 16 774
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 5 to 20 current i = 11 and arguments:16 774 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,11]
F: recursive call construct - arguments: (A,16,774,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 5 240
B: newSum, newDiffSum 17 823
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 5 to 20 current i = 12 and arguments:17 823 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,12]
F: recursive call construct - arguments: (A,17,823,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 5 240
B: newSum, newDiffSum 18 872
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 5 to 20 current i = 13 and arguments:18 872 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,13]
F: recursive call construct - arguments: (A,18,872,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 5 240
B: newSum, newDiffSum 19 921
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 5 to 20 current i = 14 and arguments:19 921 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,14]
F: recursive call construct - arguments: (A,19,921,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 5 240
B: newSum, newDiffSum 20 970
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 5 to 20 current i = 15 and arguments:20 970 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,15]
F: recursive call construct - arguments: (A,20,970,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 5 240
B: newSum, newDiffSum 21 1019
C: i, n, p i=16 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1019 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 0 0
B: newSum, newDiffSum 12 576
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 0 to 20 current i = 6 and arguments:6 288 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,15]
F: recursive call construct - arguments: (A,6,288,49)
w[p, sum, diffsum] is not true w[49,6,288]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 288
B: newSum, newDiffSum 12 576
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:12 576 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6]
F: recursive call construct - arguments: (A,12,576,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 288
B: newSum, newDiffSum 13 625
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:13 625 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7]
F: recursive call construct - arguments: (A,13,625,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 288
B: newSum, newDiffSum 14 674
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:14 674 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,8]
F: recursive call construct - arguments: (A,14,674,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 288
B: newSum, newDiffSum 15 723
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 6 to 20 current i = 9 and arguments:15 723 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,9]
F: recursive call construct - arguments: (A,15,723,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 288
B: newSum, newDiffSum 16 772
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 6 to 20 current i = 10 and arguments:16 772 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,10]
F: recursive call construct - arguments: (A,16,772,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 288
B: newSum, newDiffSum 17 821
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 6 to 20 current i = 11 and arguments:17 821 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,11]
F: recursive call construct - arguments: (A,17,821,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 288
B: newSum, newDiffSum 18 870
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 6 to 20 current i = 12 and arguments:18 870 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12]
F: recursive call construct - arguments: (A,18,870,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 288
B: newSum, newDiffSum 19 919
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 6 to 20 current i = 13 and arguments:19 919 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,13]
F: recursive call construct - arguments: (A,19,919,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 288
B: newSum, newDiffSum 20 968
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 6 to 20 current i = 14 and arguments:20 968 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,14]
F: recursive call construct - arguments: (A,20,968,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 288
B: newSum, newDiffSum 21 1017
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1017 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 0 0
B: newSum, newDiffSum 14 672
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 0 to 20 current i = 7 and arguments:7 336 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,14]
F: recursive call construct - arguments: (A,7,336,49)
w[p, sum, diffsum] is not true w[49,7,336]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 336
B: newSum, newDiffSum 14 672
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:14 672 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7]
F: recursive call construct - arguments: (A,14,672,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 336
B: newSum, newDiffSum 15 721
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 7 to 20 current i = 8 and arguments:15 721 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,8]
F: recursive call construct - arguments: (A,15,721,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 336
B: newSum, newDiffSum 16 770
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 7 to 20 current i = 9 and arguments:16 770 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,9]
F: recursive call construct - arguments: (A,16,770,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 336
B: newSum, newDiffSum 17 819
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 7 to 20 current i = 10 and arguments:17 819 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,10]
F: recursive call construct - arguments: (A,17,819,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 336
B: newSum, newDiffSum 18 868
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 7 to 20 current i = 11 and arguments:18 868 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,11]
F: recursive call construct - arguments: (A,18,868,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 336
B: newSum, newDiffSum 19 917
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 7 to 20 current i = 12 and arguments:19 917 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,12]
F: recursive call construct - arguments: (A,19,917,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 336
B: newSum, newDiffSum 20 966
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 7 to 20 current i = 13 and arguments:20 966 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,13]
F: recursive call construct - arguments: (A,20,966,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 336
B: newSum, newDiffSum 21 1015
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1015 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 0 0
B: newSum, newDiffSum 16 768
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 0 to 20 current i = 8 and arguments:8 384 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,13]
F: recursive call construct - arguments: (A,8,384,49)
w[p, sum, diffsum] is not true w[49,8,384]
i=A[p-1], p=49, i=8;
For loop (A - E): for(; i<=s;i++) i=8 s=20
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 384
B: newSum, newDiffSum 16 768
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 8 to 20 current i = 8 and arguments:16 768 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8]
F: recursive call construct - arguments: (A,16,768,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 384
B: newSum, newDiffSum 17 817
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 8 to 20 current i = 9 and arguments:17 817 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9]
F: recursive call construct - arguments: (A,17,817,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 384
B: newSum, newDiffSum 18 866
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 8 to 20 current i = 10 and arguments:18 866 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,10]
F: recursive call construct - arguments: (A,18,866,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 384
B: newSum, newDiffSum 19 915
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 8 to 20 current i = 11 and arguments:19 915 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,11]
F: recursive call construct - arguments: (A,19,915,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 384
B: newSum, newDiffSum 20 964
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 8 to 20 current i = 12 and arguments:20 964 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12]
F: recursive call construct - arguments: (A,20,964,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 384
B: newSum, newDiffSum 21 1013
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1013 exit for loop.
return 0
n-p=? 2
iterate on i =9
A: review sum, diffsum 0 0
B: newSum, newDiffSum 18 864
C: i, n, p i=9 n=50 p=48
D-set A[p]=i, A[p]=9 where p=48 and i=9
D-Normal: loop start to end: From 0 to 20 current i = 9 and arguments:9 432 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,12]
F: recursive call construct - arguments: (A,9,432,49)
w[p, sum, diffsum] is not true w[49,9,432]
i=A[p-1], p=49, i=9;
For loop (A - E): for(; i<=s;i++) i=9 s=20
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 432
B: newSum, newDiffSum 18 864
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 9 to 20 current i = 9 and arguments:18 864 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9]
F: recursive call construct - arguments: (A,18,864,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 432
B: newSum, newDiffSum 19 913
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 9 to 20 current i = 10 and arguments:19 913 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10]
F: recursive call construct - arguments: (A,19,913,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 432
B: newSum, newDiffSum 20 962
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 9 to 20 current i = 11 and arguments:20 962 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,11]
F: recursive call construct - arguments: (A,20,962,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 432
B: newSum, newDiffSum 21 1011
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1011 exit for loop.
return 0
n-p=? 2
iterate on i =10
A: review sum, diffsum 0 0
B: newSum, newDiffSum 20 960
C: i, n, p i=10 n=50 p=48
D-set A[p]=i, A[p]=10 where p=48 and i=10
D-Normal: loop start to end: From 0 to 20 current i = 10 and arguments:10 480 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,11]
F: recursive call construct - arguments: (A,10,480,49)
w[p, sum, diffsum] is not true w[49,10,480]
i=A[p-1], p=49, i=10;
For loop (A - E): for(; i<=s;i++) i=10 s=20
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 480
B: newSum, newDiffSum 20 960
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 10 to 20 current i = 10 and arguments:20 960 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10]
F: recursive call construct - arguments: (A,20,960,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 480
B: newSum, newDiffSum 21 1009
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1009 exit for loop.
return 0
n-p=? 2
iterate on i =11
A: review sum, diffsum 0 0
B: newSum, newDiffSum 22 1056
C: i, n, p i=11 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1056 exit for loop.
return 0
n-p=? 3
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 3 141
C: i, n, p i=1 n=50 p=47
D-set A[p]=i, A[p]=1 where p=47 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 47 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,10,10]
F: recursive call construct - arguments: (A,1,47,48)
w[p, sum, diffsum] is not true w[48,1,47]
i=A[p-1], p=48, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 2
iterate on i =1
A: review sum, diffsum 1 47
B: newSum, newDiffSum 3 141
C: i, n, p i=1 n=50 p=48
D-set A[p]=i, A[p]=1 where p=48 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:2 94 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,10]
F: recursive call construct - arguments: (A,2,94,49)
w[p, sum, diffsum] is not true w[49,2,94]
i=A[p-1], p=49, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 1
iterate on i =1
A: review sum, diffsum 2 94
B: newSum, newDiffSum 3 141
C: i, n, p i=1 n=50 p=49
D-set A[p]=i, A[p]=1 where p=49 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:3 141 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1]
F: recursive call construct - arguments: (A,3,141,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =2
A: review sum, diffsum 2 94
B: newSum, newDiffSum 4 190
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:4 190 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2]
F: recursive call construct - arguments: (A,4,190,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 2 94
B: newSum, newDiffSum 5 239
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:5 239 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3]
F: recursive call construct - arguments: (A,5,239,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 2 94
B: newSum, newDiffSum 6 288
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:6 288 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4]
F: recursive call construct - arguments: (A,6,288,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 2 94
B: newSum, newDiffSum 7 337
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:7 337 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,5]
F: recursive call construct - arguments: (A,7,337,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 2 94
B: newSum, newDiffSum 8 386
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:8 386 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,6]
F: recursive call construct - arguments: (A,8,386,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 2 94
B: newSum, newDiffSum 9 435
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:9 435 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,7]
F: recursive call construct - arguments: (A,9,435,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 2 94
B: newSum, newDiffSum 10 484
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:10 484 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,8]
F: recursive call construct - arguments: (A,10,484,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 2 94
B: newSum, newDiffSum 11 533
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:11 533 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9]
F: recursive call construct - arguments: (A,11,533,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 2 94
B: newSum, newDiffSum 12 582
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 1 to 20 current i = 10 and arguments:12 582 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,10]
F: recursive call construct - arguments: (A,12,582,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 2 94
B: newSum, newDiffSum 13 631
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 1 to 20 current i = 11 and arguments:13 631 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,11]
F: recursive call construct - arguments: (A,13,631,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 2 94
B: newSum, newDiffSum 14 680
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 1 to 20 current i = 12 and arguments:14 680 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,12]
F: recursive call construct - arguments: (A,14,680,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 2 94
B: newSum, newDiffSum 15 729
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 1 to 20 current i = 13 and arguments:15 729 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,13]
F: recursive call construct - arguments: (A,15,729,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 2 94
B: newSum, newDiffSum 16 778
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 1 to 20 current i = 14 and arguments:16 778 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,14]
F: recursive call construct - arguments: (A,16,778,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 2 94
B: newSum, newDiffSum 17 827
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 1 to 20 current i = 15 and arguments:17 827 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,15]
F: recursive call construct - arguments: (A,17,827,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 2 94
B: newSum, newDiffSum 18 876
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 1 to 20 current i = 16 and arguments:18 876 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,16]
F: recursive call construct - arguments: (A,18,876,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 2 94
B: newSum, newDiffSum 19 925
C: i, n, p i=17 n=50 p=49
D-set A[p]=i, A[p]=17 where p=49 and i=17
D-Normal: loop start to end: From 1 to 20 current i = 17 and arguments:19 925 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,17]
F: recursive call construct - arguments: (A,19,925,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =18
A: review sum, diffsum 2 94
B: newSum, newDiffSum 20 974
C: i, n, p i=18 n=50 p=49
D-set A[p]=i, A[p]=18 where p=49 and i=18
D-Normal: loop start to end: From 1 to 20 current i = 18 and arguments:20 974 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,18]
F: recursive call construct - arguments: (A,20,974,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =19
A: review sum, diffsum 2 94
B: newSum, newDiffSum 21 1023
C: i, n, p i=19 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1023 exit for loop.
return 0
n-p=? 2
iterate on i =2
A: review sum, diffsum 1 47
B: newSum, newDiffSum 5 237
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:3 142 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,18]
F: recursive call construct - arguments: (A,3,142,49)
w[p, sum, diffsum] is not true w[49,3,142]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 3 142
B: newSum, newDiffSum 5 237
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:5 237 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2]
F: recursive call construct - arguments: (A,5,237,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 3 142
B: newSum, newDiffSum 6 286
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:6 286 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3]
F: recursive call construct - arguments: (A,6,286,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 3 142
B: newSum, newDiffSum 7 335
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:7 335 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4]
F: recursive call construct - arguments: (A,7,335,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 3 142
B: newSum, newDiffSum 8 384
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:8 384 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,5]
F: recursive call construct - arguments: (A,8,384,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 3 142
B: newSum, newDiffSum 9 433
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:9 433 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,6]
F: recursive call construct - arguments: (A,9,433,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 3 142
B: newSum, newDiffSum 10 482
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:10 482 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,7]
F: recursive call construct - arguments: (A,10,482,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 3 142
B: newSum, newDiffSum 11 531
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:11 531 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,8]
F: recursive call construct - arguments: (A,11,531,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 3 142
B: newSum, newDiffSum 12 580
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:12 580 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,9]
F: recursive call construct - arguments: (A,12,580,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 3 142
B: newSum, newDiffSum 13 629
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:13 629 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,10]
F: recursive call construct - arguments: (A,13,629,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 3 142
B: newSum, newDiffSum 14 678
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:14 678 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,11]
F: recursive call construct - arguments: (A,14,678,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 3 142
B: newSum, newDiffSum 15 727
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:15 727 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,12]
F: recursive call construct - arguments: (A,15,727,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 3 142
B: newSum, newDiffSum 16 776
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:16 776 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,13]
F: recursive call construct - arguments: (A,16,776,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 3 142
B: newSum, newDiffSum 17 825
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:17 825 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,14]
F: recursive call construct - arguments: (A,17,825,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 3 142
B: newSum, newDiffSum 18 874
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 2 to 20 current i = 15 and arguments:18 874 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,15]
F: recursive call construct - arguments: (A,18,874,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 3 142
B: newSum, newDiffSum 19 923
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 2 to 20 current i = 16 and arguments:19 923 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,16]
F: recursive call construct - arguments: (A,19,923,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 3 142
B: newSum, newDiffSum 20 972
C: i, n, p i=17 n=50 p=49
D-set A[p]=i, A[p]=17 where p=49 and i=17
D-Normal: loop start to end: From 2 to 20 current i = 17 and arguments:20 972 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,17]
F: recursive call construct - arguments: (A,20,972,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =18
A: review sum, diffsum 3 142
B: newSum, newDiffSum 21 1021
C: i, n, p i=18 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1021 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 1 47
B: newSum, newDiffSum 7 333
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:4 190 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,17]
F: recursive call construct - arguments: (A,4,190,49)
w[p, sum, diffsum] is not true w[49,4,190]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 4 190
B: newSum, newDiffSum 7 333
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:7 333 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3]
F: recursive call construct - arguments: (A,7,333,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 4 190
B: newSum, newDiffSum 8 382
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:8 382 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4]
F: recursive call construct - arguments: (A,8,382,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 4 190
B: newSum, newDiffSum 9 431
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:9 431 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5]
F: recursive call construct - arguments: (A,9,431,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 4 190
B: newSum, newDiffSum 10 480
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:10 480 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,6]
F: recursive call construct - arguments: (A,10,480,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 4 190
B: newSum, newDiffSum 11 529
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:11 529 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,7]
F: recursive call construct - arguments: (A,11,529,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 4 190
B: newSum, newDiffSum 12 578
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:12 578 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,8]
F: recursive call construct - arguments: (A,12,578,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 4 190
B: newSum, newDiffSum 13 627
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:13 627 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,9]
F: recursive call construct - arguments: (A,13,627,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 4 190
B: newSum, newDiffSum 14 676
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:14 676 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,10]
F: recursive call construct - arguments: (A,14,676,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 4 190
B: newSum, newDiffSum 15 725
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:15 725 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,11]
F: recursive call construct - arguments: (A,15,725,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 4 190
B: newSum, newDiffSum 16 774
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:16 774 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,12]
F: recursive call construct - arguments: (A,16,774,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 4 190
B: newSum, newDiffSum 17 823
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:17 823 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,13]
F: recursive call construct - arguments: (A,17,823,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 4 190
B: newSum, newDiffSum 18 872
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 3 to 20 current i = 14 and arguments:18 872 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,14]
F: recursive call construct - arguments: (A,18,872,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 4 190
B: newSum, newDiffSum 19 921
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 3 to 20 current i = 15 and arguments:19 921 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,15]
F: recursive call construct - arguments: (A,19,921,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 4 190
B: newSum, newDiffSum 20 970
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 3 to 20 current i = 16 and arguments:20 970 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,16]
F: recursive call construct - arguments: (A,20,970,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 4 190
B: newSum, newDiffSum 21 1019
C: i, n, p i=17 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1019 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 1 47
B: newSum, newDiffSum 9 429
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:5 238 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,16]
F: recursive call construct - arguments: (A,5,238,49)
w[p, sum, diffsum] is not true w[49,5,238]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 5 238
B: newSum, newDiffSum 9 429
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:9 429 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4]
F: recursive call construct - arguments: (A,9,429,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 5 238
B: newSum, newDiffSum 10 478
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:10 478 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5]
F: recursive call construct - arguments: (A,10,478,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 5 238
B: newSum, newDiffSum 11 527
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:11 527 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,6]
F: recursive call construct - arguments: (A,11,527,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 5 238
B: newSum, newDiffSum 12 576
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:12 576 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,7]
F: recursive call construct - arguments: (A,12,576,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 5 238
B: newSum, newDiffSum 13 625
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:13 625 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,8]
F: recursive call construct - arguments: (A,13,625,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 5 238
B: newSum, newDiffSum 14 674
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:14 674 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,9]
F: recursive call construct - arguments: (A,14,674,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 5 238
B: newSum, newDiffSum 15 723
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:15 723 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,10]
F: recursive call construct - arguments: (A,15,723,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 5 238
B: newSum, newDiffSum 16 772
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:16 772 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,11]
F: recursive call construct - arguments: (A,16,772,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 5 238
B: newSum, newDiffSum 17 821
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:17 821 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,12]
F: recursive call construct - arguments: (A,17,821,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 5 238
B: newSum, newDiffSum 18 870
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 4 to 20 current i = 13 and arguments:18 870 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,13]
F: recursive call construct - arguments: (A,18,870,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 5 238
B: newSum, newDiffSum 19 919
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 4 to 20 current i = 14 and arguments:19 919 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,14]
F: recursive call construct - arguments: (A,19,919,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 5 238
B: newSum, newDiffSum 20 968
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 4 to 20 current i = 15 and arguments:20 968 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,15]
F: recursive call construct - arguments: (A,20,968,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 5 238
B: newSum, newDiffSum 21 1017
C: i, n, p i=16 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1017 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 1 47
B: newSum, newDiffSum 11 525
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:6 286 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,15]
F: recursive call construct - arguments: (A,6,286,49)
w[p, sum, diffsum] is not true w[49,6,286]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 286
B: newSum, newDiffSum 11 525
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:11 525 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5]
F: recursive call construct - arguments: (A,11,525,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 286
B: newSum, newDiffSum 12 574
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:12 574 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,6]
F: recursive call construct - arguments: (A,12,574,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 286
B: newSum, newDiffSum 13 623
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:13 623 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,7]
F: recursive call construct - arguments: (A,13,623,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 286
B: newSum, newDiffSum 14 672
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:14 672 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,8]
F: recursive call construct - arguments: (A,14,672,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 286
B: newSum, newDiffSum 15 721
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:15 721 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,9]
F: recursive call construct - arguments: (A,15,721,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 286
B: newSum, newDiffSum 16 770
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:16 770 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,10]
F: recursive call construct - arguments: (A,16,770,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 286
B: newSum, newDiffSum 17 819
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 5 to 20 current i = 11 and arguments:17 819 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,11]
F: recursive call construct - arguments: (A,17,819,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 286
B: newSum, newDiffSum 18 868
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 5 to 20 current i = 12 and arguments:18 868 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,12]
F: recursive call construct - arguments: (A,18,868,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 286
B: newSum, newDiffSum 19 917
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 5 to 20 current i = 13 and arguments:19 917 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,13]
F: recursive call construct - arguments: (A,19,917,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 286
B: newSum, newDiffSum 20 966
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 5 to 20 current i = 14 and arguments:20 966 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,14]
F: recursive call construct - arguments: (A,20,966,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 286
B: newSum, newDiffSum 21 1015
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1015 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 1 47
B: newSum, newDiffSum 13 621
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:7 334 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,14]
F: recursive call construct - arguments: (A,7,334,49)
w[p, sum, diffsum] is not true w[49,7,334]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 334
B: newSum, newDiffSum 13 621
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:13 621 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,6]
F: recursive call construct - arguments: (A,13,621,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 334
B: newSum, newDiffSum 14 670
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:14 670 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,7]
F: recursive call construct - arguments: (A,14,670,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 334
B: newSum, newDiffSum 15 719
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:15 719 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,8]
F: recursive call construct - arguments: (A,15,719,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 334
B: newSum, newDiffSum 16 768
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 6 to 20 current i = 9 and arguments:16 768 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,9]
F: recursive call construct - arguments: (A,16,768,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 334
B: newSum, newDiffSum 17 817
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 6 to 20 current i = 10 and arguments:17 817 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,10]
F: recursive call construct - arguments: (A,17,817,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 334
B: newSum, newDiffSum 18 866
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 6 to 20 current i = 11 and arguments:18 866 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,11]
F: recursive call construct - arguments: (A,18,866,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 334
B: newSum, newDiffSum 19 915
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 6 to 20 current i = 12 and arguments:19 915 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,12]
F: recursive call construct - arguments: (A,19,915,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 334
B: newSum, newDiffSum 20 964
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 6 to 20 current i = 13 and arguments:20 964 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,13]
F: recursive call construct - arguments: (A,20,964,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 334
B: newSum, newDiffSum 21 1013
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1013 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 1 47
B: newSum, newDiffSum 15 717
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:8 382 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,13]
F: recursive call construct - arguments: (A,8,382,49)
w[p, sum, diffsum] is not true w[49,8,382]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 382
B: newSum, newDiffSum 15 717
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:15 717 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,7]
F: recursive call construct - arguments: (A,15,717,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 382
B: newSum, newDiffSum 16 766
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 7 to 20 current i = 8 and arguments:16 766 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,8]
F: recursive call construct - arguments: (A,16,766,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 382
B: newSum, newDiffSum 17 815
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 7 to 20 current i = 9 and arguments:17 815 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,9]
F: recursive call construct - arguments: (A,17,815,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 382
B: newSum, newDiffSum 18 864
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 7 to 20 current i = 10 and arguments:18 864 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,10]
F: recursive call construct - arguments: (A,18,864,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 382
B: newSum, newDiffSum 19 913
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 7 to 20 current i = 11 and arguments:19 913 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,11]
F: recursive call construct - arguments: (A,19,913,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 382
B: newSum, newDiffSum 20 962
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 7 to 20 current i = 12 and arguments:20 962 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,7,12]
F: recursive call construct - arguments: (A,20,962,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 382
B: newSum, newDiffSum 21 1011
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1011 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 1 47
B: newSum, newDiffSum 17 813
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:9 430 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,12]
F: recursive call construct - arguments: (A,9,430,49)
w[p, sum, diffsum] is not true w[49,9,430]
i=A[p-1], p=49, i=8;
For loop (A - E): for(; i<=s;i++) i=8 s=20
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 430
B: newSum, newDiffSum 17 813
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 8 to 20 current i = 8 and arguments:17 813 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,8]
F: recursive call construct - arguments: (A,17,813,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 430
B: newSum, newDiffSum 18 862
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 8 to 20 current i = 9 and arguments:18 862 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,9]
F: recursive call construct - arguments: (A,18,862,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 430
B: newSum, newDiffSum 19 911
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 8 to 20 current i = 10 and arguments:19 911 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,10]
F: recursive call construct - arguments: (A,19,911,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 430
B: newSum, newDiffSum 20 960
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 8 to 20 current i = 11 and arguments:20 960 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,11]
F: recursive call construct - arguments: (A,20,960,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 430
B: newSum, newDiffSum 21 1009
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1009 exit for loop.
return 0
n-p=? 2
iterate on i =9
A: review sum, diffsum 1 47
B: newSum, newDiffSum 19 909
C: i, n, p i=9 n=50 p=48
D-set A[p]=i, A[p]=9 where p=48 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:10 478 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,9,11]
F: recursive call construct - arguments: (A,10,478,49)
w[p, sum, diffsum] is not true w[49,10,478]
i=A[p-1], p=49, i=9;
For loop (A - E): for(; i<=s;i++) i=9 s=20
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 478
B: newSum, newDiffSum 19 909
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 9 to 20 current i = 9 and arguments:19 909 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,9,9]
F: recursive call construct - arguments: (A,19,909,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 478
B: newSum, newDiffSum 20 958
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 9 to 20 current i = 10 and arguments:20 958 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,9,10]
F: recursive call construct - arguments: (A,20,958,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 478
B: newSum, newDiffSum 21 1007
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1007 exit for loop.
return 0
n-p=? 2
iterate on i =10
A: review sum, diffsum 1 47
B: newSum, newDiffSum 21 1005
C: i, n, p i=10 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 1005 exit for loop.
return 0
n-p=? 3
iterate on i =2
A: review sum, diffsum 0 0
B: newSum, newDiffSum 6 282
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 0 to 20 current i = 2 and arguments:2 94 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,10]
F: recursive call construct - arguments: (A,2,94,48)
w[p, sum, diffsum] is not true w[48,2,94]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 2 94
B: newSum, newDiffSum 6 282
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:4 188 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,10]
F: recursive call construct - arguments: (A,4,188,49)
w[p, sum, diffsum] is not true w[49,4,188]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 4 188
B: newSum, newDiffSum 6 282
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 282 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2]
F: recursive call construct - arguments: (A,6,282,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 4 188
B: newSum, newDiffSum 7 331
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 331 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3]
F: recursive call construct - arguments: (A,7,331,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 4 188
B: newSum, newDiffSum 8 380
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 380 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4]
F: recursive call construct - arguments: (A,8,380,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 4 188
B: newSum, newDiffSum 9 429
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:9 429 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,5]
F: recursive call construct - arguments: (A,9,429,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 4 188
B: newSum, newDiffSum 10 478
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:10 478 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,6]
F: recursive call construct - arguments: (A,10,478,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 4 188
B: newSum, newDiffSum 11 527
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:11 527 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,7]
F: recursive call construct - arguments: (A,11,527,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 4 188
B: newSum, newDiffSum 12 576
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:12 576 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,8]
F: recursive call construct - arguments: (A,12,576,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 4 188
B: newSum, newDiffSum 13 625
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:13 625 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,9]
F: recursive call construct - arguments: (A,13,625,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 4 188
B: newSum, newDiffSum 14 674
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:14 674 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,10]
F: recursive call construct - arguments: (A,14,674,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 4 188
B: newSum, newDiffSum 15 723
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:15 723 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,11]
F: recursive call construct - arguments: (A,15,723,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 4 188
B: newSum, newDiffSum 16 772
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:16 772 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,12]
F: recursive call construct - arguments: (A,16,772,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 4 188
B: newSum, newDiffSum 17 821
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:17 821 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,13]
F: recursive call construct - arguments: (A,17,821,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 4 188
B: newSum, newDiffSum 18 870
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:18 870 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,14]
F: recursive call construct - arguments: (A,18,870,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 4 188
B: newSum, newDiffSum 19 919
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 2 to 20 current i = 15 and arguments:19 919 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,15]
F: recursive call construct - arguments: (A,19,919,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 4 188
B: newSum, newDiffSum 20 968
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 2 to 20 current i = 16 and arguments:20 968 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,16]
F: recursive call construct - arguments: (A,20,968,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 4 188
B: newSum, newDiffSum 21 1017
C: i, n, p i=17 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1017 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 2 94
B: newSum, newDiffSum 8 378
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:5 236 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,16]
F: recursive call construct - arguments: (A,5,236,49)
w[p, sum, diffsum] is not true w[49,5,236]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 5 236
B: newSum, newDiffSum 8 378
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 378 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3]
F: recursive call construct - arguments: (A,8,378,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 5 236
B: newSum, newDiffSum 9 427
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:9 427 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4]
F: recursive call construct - arguments: (A,9,427,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 5 236
B: newSum, newDiffSum 10 476
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:10 476 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5]
F: recursive call construct - arguments: (A,10,476,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 5 236
B: newSum, newDiffSum 11 525
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:11 525 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,6]
F: recursive call construct - arguments: (A,11,525,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 5 236
B: newSum, newDiffSum 12 574
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:12 574 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]
F: recursive call construct - arguments: (A,12,574,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 5 236
B: newSum, newDiffSum 13 623
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:13 623 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,8]
F: recursive call construct - arguments: (A,13,623,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 5 236
B: newSum, newDiffSum 14 672
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:14 672 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,9]
F: recursive call construct - arguments: (A,14,672,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 5 236
B: newSum, newDiffSum 15 721
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:15 721 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,10]
F: recursive call construct - arguments: (A,15,721,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 5 236
B: newSum, newDiffSum 16 770
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:16 770 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,11]
F: recursive call construct - arguments: (A,16,770,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 5 236
B: newSum, newDiffSum 17 819
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:17 819 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,12]
F: recursive call construct - arguments: (A,17,819,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 5 236
B: newSum, newDiffSum 18 868
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:18 868 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,13]
F: recursive call construct - arguments: (A,18,868,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 5 236
B: newSum, newDiffSum 19 917
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 3 to 20 current i = 14 and arguments:19 917 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,14]
F: recursive call construct - arguments: (A,19,917,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 5 236
B: newSum, newDiffSum 20 966
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 3 to 20 current i = 15 and arguments:20 966 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,15]
F: recursive call construct - arguments: (A,20,966,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 5 236
B: newSum, newDiffSum 21 1015
C: i, n, p i=16 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1015 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 2 94
B: newSum, newDiffSum 10 474
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:6 284 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,15]
F: recursive call construct - arguments: (A,6,284,49)
w[p, sum, diffsum] is not true w[49,6,284]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 6 284
B: newSum, newDiffSum 10 474
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:10 474 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4]
F: recursive call construct - arguments: (A,10,474,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 284
B: newSum, newDiffSum 11 523
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:11 523 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5]
F: recursive call construct - arguments: (A,11,523,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 284
B: newSum, newDiffSum 12 572
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:12 572 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6]
F: recursive call construct - arguments: (A,12,572,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 284
B: newSum, newDiffSum 13 621
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:13 621 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,7]
F: recursive call construct - arguments: (A,13,621,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 284
B: newSum, newDiffSum 14 670
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:14 670 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,8]
F: recursive call construct - arguments: (A,14,670,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 284
B: newSum, newDiffSum 15 719
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:15 719 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,9]
F: recursive call construct - arguments: (A,15,719,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 284
B: newSum, newDiffSum 16 768
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:16 768 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,10]
F: recursive call construct - arguments: (A,16,768,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 284
B: newSum, newDiffSum 17 817
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:17 817 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,11]
F: recursive call construct - arguments: (A,17,817,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 284
B: newSum, newDiffSum 18 866
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:18 866 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,12]
F: recursive call construct - arguments: (A,18,866,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 284
B: newSum, newDiffSum 19 915
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 4 to 20 current i = 13 and arguments:19 915 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,13]
F: recursive call construct - arguments: (A,19,915,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 284
B: newSum, newDiffSum 20 964
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 4 to 20 current i = 14 and arguments:20 964 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,14]
F: recursive call construct - arguments: (A,20,964,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 284
B: newSum, newDiffSum 21 1013
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1013 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 2 94
B: newSum, newDiffSum 12 570
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:7 332 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,14]
F: recursive call construct - arguments: (A,7,332,49)
w[p, sum, diffsum] is not true w[49,7,332]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 332
B: newSum, newDiffSum 12 570
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:12 570 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,5]
F: recursive call construct - arguments: (A,12,570,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 332
B: newSum, newDiffSum 13 619
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:13 619 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,6]
F: recursive call construct - arguments: (A,13,619,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 332
B: newSum, newDiffSum 14 668
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:14 668 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,7]
F: recursive call construct - arguments: (A,14,668,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 332
B: newSum, newDiffSum 15 717
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:15 717 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,8]
F: recursive call construct - arguments: (A,15,717,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 332
B: newSum, newDiffSum 16 766
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:16 766 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,9]
F: recursive call construct - arguments: (A,16,766,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 332
B: newSum, newDiffSum 17 815
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:17 815 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,10]
F: recursive call construct - arguments: (A,17,815,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 332
B: newSum, newDiffSum 18 864
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 5 to 20 current i = 11 and arguments:18 864 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,11]
F: recursive call construct - arguments: (A,18,864,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 332
B: newSum, newDiffSum 19 913
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 5 to 20 current i = 12 and arguments:19 913 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,12]
F: recursive call construct - arguments: (A,19,913,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 332
B: newSum, newDiffSum 20 962
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 5 to 20 current i = 13 and arguments:20 962 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,13]
F: recursive call construct - arguments: (A,20,962,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 332
B: newSum, newDiffSum 21 1011
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1011 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 2 94
B: newSum, newDiffSum 14 666
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:8 380 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,13]
F: recursive call construct - arguments: (A,8,380,49)
w[p, sum, diffsum] is not true w[49,8,380]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 380
B: newSum, newDiffSum 14 666
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:14 666 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,6]
F: recursive call construct - arguments: (A,14,666,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 380
B: newSum, newDiffSum 15 715
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:15 715 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,7]
F: recursive call construct - arguments: (A,15,715,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 380
B: newSum, newDiffSum 16 764
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:16 764 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,8]
F: recursive call construct - arguments: (A,16,764,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 380
B: newSum, newDiffSum 17 813
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 6 to 20 current i = 9 and arguments:17 813 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,9]
F: recursive call construct - arguments: (A,17,813,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 380
B: newSum, newDiffSum 18 862
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 6 to 20 current i = 10 and arguments:18 862 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,10]
F: recursive call construct - arguments: (A,18,862,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 380
B: newSum, newDiffSum 19 911
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 6 to 20 current i = 11 and arguments:19 911 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,11]
F: recursive call construct - arguments: (A,19,911,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 380
B: newSum, newDiffSum 20 960
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 6 to 20 current i = 12 and arguments:20 960 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,12]
F: recursive call construct - arguments: (A,20,960,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 380
B: newSum, newDiffSum 21 1009
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1009 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 2 94
B: newSum, newDiffSum 16 762
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:9 428 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,12]
F: recursive call construct - arguments: (A,9,428,49)
w[p, sum, diffsum] is not true w[49,9,428]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 428
B: newSum, newDiffSum 16 762
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:16 762 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,7]
F: recursive call construct - arguments: (A,16,762,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 428
B: newSum, newDiffSum 17 811
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 7 to 20 current i = 8 and arguments:17 811 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,8]
F: recursive call construct - arguments: (A,17,811,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 428
B: newSum, newDiffSum 18 860
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 7 to 20 current i = 9 and arguments:18 860 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,9]
F: recursive call construct - arguments: (A,18,860,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 428
B: newSum, newDiffSum 19 909
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 7 to 20 current i = 10 and arguments:19 909 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,10]
F: recursive call construct - arguments: (A,19,909,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 428
B: newSum, newDiffSum 20 958
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 7 to 20 current i = 11 and arguments:20 958 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,11]
F: recursive call construct - arguments: (A,20,958,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 428
B: newSum, newDiffSum 21 1007
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1007 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 2 94
B: newSum, newDiffSum 18 858
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:10 476 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,8,11]
F: recursive call construct - arguments: (A,10,476,49)
w[p, sum, diffsum] is not true w[49,10,476]
i=A[p-1], p=49, i=8;
For loop (A - E): for(; i<=s;i++) i=8 s=20
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 476
B: newSum, newDiffSum 18 858
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 8 to 20 current i = 8 and arguments:18 858 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,8,8]
F: recursive call construct - arguments: (A,18,858,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 476
B: newSum, newDiffSum 19 907
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 8 to 20 current i = 9 and arguments:19 907 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,8,9]
F: recursive call construct - arguments: (A,19,907,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 476
B: newSum, newDiffSum 20 956
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 8 to 20 current i = 10 and arguments:20 956 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,8,10]
F: recursive call construct - arguments: (A,20,956,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 476
B: newSum, newDiffSum 21 1005
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1005 exit for loop.
return 0
n-p=? 2
iterate on i =9
A: review sum, diffsum 2 94
B: newSum, newDiffSum 20 954
C: i, n, p i=9 n=50 p=48
D-set A[p]=i, A[p]=9 where p=48 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:11 524 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,10]
F: recursive call construct - arguments: (A,11,524,49)
w[p, sum, diffsum] is not true w[49,11,524]
i=A[p-1], p=49, i=9;
For loop (A - E): for(; i<=s;i++) i=9 s=20
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 524
B: newSum, newDiffSum 20 954
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 9 to 20 current i = 9 and arguments:20 954 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,9]
F: recursive call construct - arguments: (A,20,954,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 524
B: newSum, newDiffSum 21 1003
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1003 exit for loop.
return 0
n-p=? 2
iterate on i =10
A: review sum, diffsum 2 94
B: newSum, newDiffSum 22 1050
C: i, n, p i=10 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1050 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 0 0
B: newSum, newDiffSum 9 423
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 0 to 20 current i = 3 and arguments:3 141 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,9,9]
F: recursive call construct - arguments: (A,3,141,48)
w[p, sum, diffsum] is not true w[48,3,141]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 3 141
B: newSum, newDiffSum 9 423
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:6 282 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,9]
F: recursive call construct - arguments: (A,6,282,49)
w[p, sum, diffsum] is not true w[49,6,282]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 6 282
B: newSum, newDiffSum 9 423
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 423 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3]
F: recursive call construct - arguments: (A,9,423,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 6 282
B: newSum, newDiffSum 10 472
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:10 472 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4]
F: recursive call construct - arguments: (A,10,472,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 282
B: newSum, newDiffSum 11 521
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:11 521 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5]
F: recursive call construct - arguments: (A,11,521,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 282
B: newSum, newDiffSum 12 570
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:12 570 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,6]
F: recursive call construct - arguments: (A,12,570,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 282
B: newSum, newDiffSum 13 619
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:13 619 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,7]
F: recursive call construct - arguments: (A,13,619,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 282
B: newSum, newDiffSum 14 668
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:14 668 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,8]
F: recursive call construct - arguments: (A,14,668,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 282
B: newSum, newDiffSum 15 717
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:15 717 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,9]
F: recursive call construct - arguments: (A,15,717,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 282
B: newSum, newDiffSum 16 766
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:16 766 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,10]
F: recursive call construct - arguments: (A,16,766,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 282
B: newSum, newDiffSum 17 815
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:17 815 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,11]
F: recursive call construct - arguments: (A,17,815,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 282
B: newSum, newDiffSum 18 864
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:18 864 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,12]
F: recursive call construct - arguments: (A,18,864,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 282
B: newSum, newDiffSum 19 913
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:19 913 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,13]
F: recursive call construct - arguments: (A,19,913,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 282
B: newSum, newDiffSum 20 962
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 3 to 20 current i = 14 and arguments:20 962 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,14]
F: recursive call construct - arguments: (A,20,962,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 282
B: newSum, newDiffSum 21 1011
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1011 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 3 141
B: newSum, newDiffSum 11 519
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:7 330 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,14]
F: recursive call construct - arguments: (A,7,330,49)
w[p, sum, diffsum] is not true w[49,7,330]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 330
B: newSum, newDiffSum 11 519
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:11 519 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4]
F: recursive call construct - arguments: (A,11,519,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 330
B: newSum, newDiffSum 12 568
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:12 568 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,5]
F: recursive call construct - arguments: (A,12,568,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 330
B: newSum, newDiffSum 13 617
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:13 617 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,6]
F: recursive call construct - arguments: (A,13,617,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 330
B: newSum, newDiffSum 14 666
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:14 666 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,7]
F: recursive call construct - arguments: (A,14,666,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 330
B: newSum, newDiffSum 15 715
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:15 715 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,8]
F: recursive call construct - arguments: (A,15,715,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 330
B: newSum, newDiffSum 16 764
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:16 764 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,9]
F: recursive call construct - arguments: (A,16,764,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 330
B: newSum, newDiffSum 17 813
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:17 813 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,10]
F: recursive call construct - arguments: (A,17,813,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 330
B: newSum, newDiffSum 18 862
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:18 862 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,11]
F: recursive call construct - arguments: (A,18,862,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 330
B: newSum, newDiffSum 19 911
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:19 911 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,12]
F: recursive call construct - arguments: (A,19,911,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 330
B: newSum, newDiffSum 20 960
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 4 to 20 current i = 13 and arguments:20 960 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,13]
F: recursive call construct - arguments: (A,20,960,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 330
B: newSum, newDiffSum 21 1009
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1009 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 3 141
B: newSum, newDiffSum 13 615
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:8 378 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,13]
F: recursive call construct - arguments: (A,8,378,49)
w[p, sum, diffsum] is not true w[49,8,378]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 378
B: newSum, newDiffSum 13 615
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:13 615 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,5]
F: recursive call construct - arguments: (A,13,615,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 378
B: newSum, newDiffSum 14 664
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:14 664 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,6]
F: recursive call construct - arguments: (A,14,664,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 378
B: newSum, newDiffSum 15 713
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:15 713 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,7]
F: recursive call construct - arguments: (A,15,713,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 378
B: newSum, newDiffSum 16 762
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:16 762 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,8]
F: recursive call construct - arguments: (A,16,762,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 378
B: newSum, newDiffSum 17 811
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:17 811 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,9]
F: recursive call construct - arguments: (A,17,811,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 378
B: newSum, newDiffSum 18 860
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:18 860 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,10]
F: recursive call construct - arguments: (A,18,860,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 378
B: newSum, newDiffSum 19 909
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 5 to 20 current i = 11 and arguments:19 909 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,11]
F: recursive call construct - arguments: (A,19,909,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 378
B: newSum, newDiffSum 20 958
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 5 to 20 current i = 12 and arguments:20 958 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,12]
F: recursive call construct - arguments: (A,20,958,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 378
B: newSum, newDiffSum 21 1007
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1007 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 3 141
B: newSum, newDiffSum 15 711
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:9 426 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,12]
F: recursive call construct - arguments: (A,9,426,49)
w[p, sum, diffsum] is not true w[49,9,426]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 426
B: newSum, newDiffSum 15 711
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:15 711 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,6]
F: recursive call construct - arguments: (A,15,711,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 426
B: newSum, newDiffSum 16 760
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:16 760 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,7]
F: recursive call construct - arguments: (A,16,760,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 426
B: newSum, newDiffSum 17 809
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:17 809 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,8]
F: recursive call construct - arguments: (A,17,809,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 426
B: newSum, newDiffSum 18 858
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 6 to 20 current i = 9 and arguments:18 858 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,9]
F: recursive call construct - arguments: (A,18,858,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 426
B: newSum, newDiffSum 19 907
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 6 to 20 current i = 10 and arguments:19 907 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,10]
F: recursive call construct - arguments: (A,19,907,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 426
B: newSum, newDiffSum 20 956
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 6 to 20 current i = 11 and arguments:20 956 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,11]
F: recursive call construct - arguments: (A,20,956,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 426
B: newSum, newDiffSum 21 1005
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1005 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 3 141
B: newSum, newDiffSum 17 807
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:10 474 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,11]
F: recursive call construct - arguments: (A,10,474,49)
w[p, sum, diffsum] is not true w[49,10,474]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 474
B: newSum, newDiffSum 17 807
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:17 807 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,7]
F: recursive call construct - arguments: (A,17,807,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 474
B: newSum, newDiffSum 18 856
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 7 to 20 current i = 8 and arguments:18 856 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,8]
F: recursive call construct - arguments: (A,18,856,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 474
B: newSum, newDiffSum 19 905
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 7 to 20 current i = 9 and arguments:19 905 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,9]
F: recursive call construct - arguments: (A,19,905,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 474
B: newSum, newDiffSum 20 954
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 7 to 20 current i = 10 and arguments:20 954 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,7,10]
F: recursive call construct - arguments: (A,20,954,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 474
B: newSum, newDiffSum 21 1003
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1003 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 3 141
B: newSum, newDiffSum 19 903
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:11 522 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,8,10]
F: recursive call construct - arguments: (A,11,522,49)
w[p, sum, diffsum] is not true w[49,11,522]
i=A[p-1], p=49, i=8;
For loop (A - E): for(; i<=s;i++) i=8 s=20
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 522
B: newSum, newDiffSum 19 903
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 8 to 20 current i = 8 and arguments:19 903 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,8,8]
F: recursive call construct - arguments: (A,19,903,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 522
B: newSum, newDiffSum 20 952
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 8 to 20 current i = 9 and arguments:20 952 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,8,9]
F: recursive call construct - arguments: (A,20,952,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 522
B: newSum, newDiffSum 21 1001
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1001 exit for loop.
return 0
n-p=? 2
iterate on i =9
A: review sum, diffsum 3 141
B: newSum, newDiffSum 21 999
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 999 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 0 0
B: newSum, newDiffSum 12 564
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 0 to 20 current i = 4 and arguments:4 188 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8,9]
F: recursive call construct - arguments: (A,4,188,48)
w[p, sum, diffsum] is not true w[48,4,188]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 4 188
B: newSum, newDiffSum 12 564
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:8 376 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,9]
F: recursive call construct - arguments: (A,8,376,49)
w[p, sum, diffsum] is not true w[49,8,376]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 376
B: newSum, newDiffSum 12 564
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 564 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4]
F: recursive call construct - arguments: (A,12,564,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 376
B: newSum, newDiffSum 13 613
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 613 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,5]
F: recursive call construct - arguments: (A,13,613,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 376
B: newSum, newDiffSum 14 662
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 662 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,6]
F: recursive call construct - arguments: (A,14,662,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 376
B: newSum, newDiffSum 15 711
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:15 711 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,7]
F: recursive call construct - arguments: (A,15,711,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 376
B: newSum, newDiffSum 16 760
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:16 760 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,8]
F: recursive call construct - arguments: (A,16,760,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 376
B: newSum, newDiffSum 17 809
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:17 809 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,9]
F: recursive call construct - arguments: (A,17,809,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 376
B: newSum, newDiffSum 18 858
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:18 858 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,10]
F: recursive call construct - arguments: (A,18,858,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 376
B: newSum, newDiffSum 19 907
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:19 907 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,11]
F: recursive call construct - arguments: (A,19,907,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 376
B: newSum, newDiffSum 20 956
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:20 956 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,12]
F: recursive call construct - arguments: (A,20,956,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 376
B: newSum, newDiffSum 21 1005
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1005 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 4 188
B: newSum, newDiffSum 14 660
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:9 424 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,12]
F: recursive call construct - arguments: (A,9,424,49)
w[p, sum, diffsum] is not true w[49,9,424]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 424
B: newSum, newDiffSum 14 660
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:14 660 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5]
F: recursive call construct - arguments: (A,14,660,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 424
B: newSum, newDiffSum 15 709
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:15 709 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,6]
F: recursive call construct - arguments: (A,15,709,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 424
B: newSum, newDiffSum 16 758
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:16 758 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,7]
F: recursive call construct - arguments: (A,16,758,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 424
B: newSum, newDiffSum 17 807
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:17 807 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,8]
F: recursive call construct - arguments: (A,17,807,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 424
B: newSum, newDiffSum 18 856
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:18 856 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,9]
F: recursive call construct - arguments: (A,18,856,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 424
B: newSum, newDiffSum 19 905
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:19 905 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,10]
F: recursive call construct - arguments: (A,19,905,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 424
B: newSum, newDiffSum 20 954
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 5 to 20 current i = 11 and arguments:20 954 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,11]
F: recursive call construct - arguments: (A,20,954,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 424
B: newSum, newDiffSum 21 1003
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1003 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 4 188
B: newSum, newDiffSum 16 756
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:10 472 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,6,11]
F: recursive call construct - arguments: (A,10,472,49)
w[p, sum, diffsum] is not true w[49,10,472]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 472
B: newSum, newDiffSum 16 756
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:16 756 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,6,6]
F: recursive call construct - arguments: (A,16,756,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 472
B: newSum, newDiffSum 17 805
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:17 805 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,6,7]
F: recursive call construct - arguments: (A,17,805,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 472
B: newSum, newDiffSum 18 854
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:18 854 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,6,8]
F: recursive call construct - arguments: (A,18,854,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 472
B: newSum, newDiffSum 19 903
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 6 to 20 current i = 9 and arguments:19 903 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,6,9]
F: recursive call construct - arguments: (A,19,903,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 472
B: newSum, newDiffSum 20 952
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 6 to 20 current i = 10 and arguments:20 952 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,6,10]
F: recursive call construct - arguments: (A,20,952,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 472
B: newSum, newDiffSum 21 1001
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1001 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 4 188
B: newSum, newDiffSum 18 852
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:11 520 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,7,10]
F: recursive call construct - arguments: (A,11,520,49)
w[p, sum, diffsum] is not true w[49,11,520]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 520
B: newSum, newDiffSum 18 852
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:18 852 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,7,7]
F: recursive call construct - arguments: (A,18,852,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 520
B: newSum, newDiffSum 19 901
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 7 to 20 current i = 8 and arguments:19 901 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,7,8]
F: recursive call construct - arguments: (A,19,901,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 520
B: newSum, newDiffSum 20 950
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 7 to 20 current i = 9 and arguments:20 950 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,7,9]
F: recursive call construct - arguments: (A,20,950,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 520
B: newSum, newDiffSum 21 999
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 999 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 4 188
B: newSum, newDiffSum 20 948
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:12 568 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8,9]
F: recursive call construct - arguments: (A,12,568,49)
w[p, sum, diffsum] is not true w[49,12,568]
i=A[p-1], p=49, i=8;
For loop (A - E): for(; i<=s;i++) i=8 s=20
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 568
B: newSum, newDiffSum 20 948
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 8 to 20 current i = 8 and arguments:20 948 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8,8]
F: recursive call construct - arguments: (A,20,948,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 568
B: newSum, newDiffSum 21 997
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 2
iterate on i =9
A: review sum, diffsum 4 188
B: newSum, newDiffSum 22 1044
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1044 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 0 0
B: newSum, newDiffSum 15 705
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 0 to 20 current i = 5 and arguments:5 235 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,8,8]
F: recursive call construct - arguments: (A,5,235,48)
w[p, sum, diffsum] is not true w[48,5,235]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 5 235
B: newSum, newDiffSum 15 705
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:10 470 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,8]
F: recursive call construct - arguments: (A,10,470,49)
w[p, sum, diffsum] is not true w[49,10,470]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 470
B: newSum, newDiffSum 15 705
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 705 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5]
F: recursive call construct - arguments: (A,15,705,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 470
B: newSum, newDiffSum 16 754
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:16 754 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,6]
F: recursive call construct - arguments: (A,16,754,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 470
B: newSum, newDiffSum 17 803
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:17 803 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,7]
F: recursive call construct - arguments: (A,17,803,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 470
B: newSum, newDiffSum 18 852
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:18 852 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,8]
F: recursive call construct - arguments: (A,18,852,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 470
B: newSum, newDiffSum 19 901
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:19 901 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,9]
F: recursive call construct - arguments: (A,19,901,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 470
B: newSum, newDiffSum 20 950
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:20 950 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,10]
F: recursive call construct - arguments: (A,20,950,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 470
B: newSum, newDiffSum 21 999
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 999 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 5 235
B: newSum, newDiffSum 17 801
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:11 518 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,10]
F: recursive call construct - arguments: (A,11,518,49)
w[p, sum, diffsum] is not true w[49,11,518]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 518
B: newSum, newDiffSum 17 801
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:17 801 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,6]
F: recursive call construct - arguments: (A,17,801,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 518
B: newSum, newDiffSum 18 850
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:18 850 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,7]
F: recursive call construct - arguments: (A,18,850,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 518
B: newSum, newDiffSum 19 899
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:19 899 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,8]
F: recursive call construct - arguments: (A,19,899,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 518
B: newSum, newDiffSum 20 948
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 6 to 20 current i = 9 and arguments:20 948 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,6,9]
F: recursive call construct - arguments: (A,20,948,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 518
B: newSum, newDiffSum 21 997
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 5 235
B: newSum, newDiffSum 19 897
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:12 566 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,7,9]
F: recursive call construct - arguments: (A,12,566,49)
w[p, sum, diffsum] is not true w[49,12,566]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 566
B: newSum, newDiffSum 19 897
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:19 897 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,7,7]
F: recursive call construct - arguments: (A,19,897,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 566
B: newSum, newDiffSum 20 946
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 7 to 20 current i = 8 and arguments:20 946 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,7,8]
F: recursive call construct - arguments: (A,20,946,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 566
B: newSum, newDiffSum 21 995
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 995 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 5 235
B: newSum, newDiffSum 21 993
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 0 0
B: newSum, newDiffSum 18 846
C: i, n, p i=6 n=50 p=47
D-set A[p]=i, A[p]=6 where p=47 and i=6
D-Normal: loop start to end: From 0 to 20 current i = 6 and arguments:6 282 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8]
F: recursive call construct - arguments: (A,6,282,48)
w[p, sum, diffsum] is not true w[48,6,282]
i=A[p-1], p=48, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 282
B: newSum, newDiffSum 18 846
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:12 564 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,8]
F: recursive call construct - arguments: (A,12,564,49)
w[p, sum, diffsum] is not true w[49,12,564]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 564
B: newSum, newDiffSum 18 846
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:18 846 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6]
F: recursive call construct - arguments: (A,18,846,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 564
B: newSum, newDiffSum 19 895
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:19 895 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,7]
F: recursive call construct - arguments: (A,19,895,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 564
B: newSum, newDiffSum 20 944
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:20 944 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,8]
F: recursive call construct - arguments: (A,20,944,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 564
B: newSum, newDiffSum 21 993
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 282
B: newSum, newDiffSum 20 942
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:13 612 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,8]
F: recursive call construct - arguments: (A,13,612,49)
w[p, sum, diffsum] is not true w[49,13,612]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 612
B: newSum, newDiffSum 20 942
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:20 942 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,7,7]
F: recursive call construct - arguments: (A,20,942,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 612
B: newSum, newDiffSum 21 991
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 991 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 282
B: newSum, newDiffSum 22 1038
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1038 exit for loop.
return 0
n-p=? 3
iterate on i =7
A: review sum, diffsum 0 0
B: newSum, newDiffSum 21 987
C: i, n, p i=7 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 4
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 4 184
C: i, n, p i=1 n=50 p=46
D-set A[p]=i, A[p]=1 where p=46 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 46 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,7,7]
F: recursive call construct - arguments: (A,1,46,47)
w[p, sum, diffsum] is not true w[47,1,46]
i=A[p-1], p=47, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 3
iterate on i =1
A: review sum, diffsum 1 46
B: newSum, newDiffSum 4 184
C: i, n, p i=1 n=50 p=47
D-set A[p]=i, A[p]=1 where p=47 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:2 92 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,7,7]
F: recursive call construct - arguments: (A,2,92,48)
w[p, sum, diffsum] is not true w[48,2,92]
i=A[p-1], p=48, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 2
iterate on i =1
A: review sum, diffsum 2 92
B: newSum, newDiffSum 4 184
C: i, n, p i=1 n=50 p=48
D-set A[p]=i, A[p]=1 where p=48 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:3 138 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,7]
F: recursive call construct - arguments: (A,3,138,49)
w[p, sum, diffsum] is not true w[49,3,138]
i=A[p-1], p=49, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 1
iterate on i =1
A: review sum, diffsum 3 138
B: newSum, newDiffSum 4 184
C: i, n, p i=1 n=50 p=49
D-set A[p]=i, A[p]=1 where p=49 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:4 184 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1]
F: recursive call construct - arguments: (A,4,184,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =2
A: review sum, diffsum 3 138
B: newSum, newDiffSum 5 233
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:5 233 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2]
F: recursive call construct - arguments: (A,5,233,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 3 138
B: newSum, newDiffSum 6 282
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:6 282 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3]
F: recursive call construct - arguments: (A,6,282,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 3 138
B: newSum, newDiffSum 7 331
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:7 331 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4]
F: recursive call construct - arguments: (A,7,331,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 3 138
B: newSum, newDiffSum 8 380
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:8 380 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,5]
F: recursive call construct - arguments: (A,8,380,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 3 138
B: newSum, newDiffSum 9 429
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:9 429 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,6]
F: recursive call construct - arguments: (A,9,429,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 3 138
B: newSum, newDiffSum 10 478
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:10 478 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,7]
F: recursive call construct - arguments: (A,10,478,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 3 138
B: newSum, newDiffSum 11 527
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:11 527 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,8]
F: recursive call construct - arguments: (A,11,527,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 3 138
B: newSum, newDiffSum 12 576
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:12 576 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,9]
F: recursive call construct - arguments: (A,12,576,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 3 138
B: newSum, newDiffSum 13 625
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 1 to 20 current i = 10 and arguments:13 625 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,10]
F: recursive call construct - arguments: (A,13,625,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 3 138
B: newSum, newDiffSum 14 674
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 1 to 20 current i = 11 and arguments:14 674 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,11]
F: recursive call construct - arguments: (A,14,674,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 3 138
B: newSum, newDiffSum 15 723
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 1 to 20 current i = 12 and arguments:15 723 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,12]
F: recursive call construct - arguments: (A,15,723,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 3 138
B: newSum, newDiffSum 16 772
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 1 to 20 current i = 13 and arguments:16 772 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,13]
F: recursive call construct - arguments: (A,16,772,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 3 138
B: newSum, newDiffSum 17 821
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 1 to 20 current i = 14 and arguments:17 821 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,14]
F: recursive call construct - arguments: (A,17,821,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 3 138
B: newSum, newDiffSum 18 870
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 1 to 20 current i = 15 and arguments:18 870 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,15]
F: recursive call construct - arguments: (A,18,870,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 3 138
B: newSum, newDiffSum 19 919
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 1 to 20 current i = 16 and arguments:19 919 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,16]
F: recursive call construct - arguments: (A,19,919,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 3 138
B: newSum, newDiffSum 20 968
C: i, n, p i=17 n=50 p=49
D-set A[p]=i, A[p]=17 where p=49 and i=17
D-Normal: loop start to end: From 1 to 20 current i = 17 and arguments:20 968 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,17]
F: recursive call construct - arguments: (A,20,968,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =18
A: review sum, diffsum 3 138
B: newSum, newDiffSum 21 1017
C: i, n, p i=18 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1017 exit for loop.
return 0
n-p=? 2
iterate on i =2
A: review sum, diffsum 2 92
B: newSum, newDiffSum 6 280
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:4 186 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,17]
F: recursive call construct - arguments: (A,4,186,49)
w[p, sum, diffsum] is not true w[49,4,186]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 4 186
B: newSum, newDiffSum 6 280
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 280 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2]
F: recursive call construct - arguments: (A,6,280,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 4 186
B: newSum, newDiffSum 7 329
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 329 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3]
F: recursive call construct - arguments: (A,7,329,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 4 186
B: newSum, newDiffSum 8 378
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 378 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,4]
F: recursive call construct - arguments: (A,8,378,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 4 186
B: newSum, newDiffSum 9 427
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:9 427 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,5]
F: recursive call construct - arguments: (A,9,427,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 4 186
B: newSum, newDiffSum 10 476
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:10 476 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,6]
F: recursive call construct - arguments: (A,10,476,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 4 186
B: newSum, newDiffSum 11 525
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:11 525 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,7]
F: recursive call construct - arguments: (A,11,525,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 4 186
B: newSum, newDiffSum 12 574
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:12 574 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,8]
F: recursive call construct - arguments: (A,12,574,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 4 186
B: newSum, newDiffSum 13 623
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:13 623 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,9]
F: recursive call construct - arguments: (A,13,623,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 4 186
B: newSum, newDiffSum 14 672
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:14 672 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,10]
F: recursive call construct - arguments: (A,14,672,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 4 186
B: newSum, newDiffSum 15 721
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:15 721 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,11]
F: recursive call construct - arguments: (A,15,721,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 4 186
B: newSum, newDiffSum 16 770
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:16 770 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,12]
F: recursive call construct - arguments: (A,16,770,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 4 186
B: newSum, newDiffSum 17 819
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:17 819 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,13]
F: recursive call construct - arguments: (A,17,819,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 4 186
B: newSum, newDiffSum 18 868
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:18 868 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,14]
F: recursive call construct - arguments: (A,18,868,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 4 186
B: newSum, newDiffSum 19 917
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 2 to 20 current i = 15 and arguments:19 917 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,15]
F: recursive call construct - arguments: (A,19,917,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 4 186
B: newSum, newDiffSum 20 966
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 2 to 20 current i = 16 and arguments:20 966 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,16]
F: recursive call construct - arguments: (A,20,966,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 4 186
B: newSum, newDiffSum 21 1015
C: i, n, p i=17 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1015 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 2 92
B: newSum, newDiffSum 8 376
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:5 234 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,16]
F: recursive call construct - arguments: (A,5,234,49)
w[p, sum, diffsum] is not true w[49,5,234]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 5 234
B: newSum, newDiffSum 8 376
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 376 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3]
F: recursive call construct - arguments: (A,8,376,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 5 234
B: newSum, newDiffSum 9 425
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:9 425 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4]
F: recursive call construct - arguments: (A,9,425,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 5 234
B: newSum, newDiffSum 10 474
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:10 474 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,5]
F: recursive call construct - arguments: (A,10,474,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 5 234
B: newSum, newDiffSum 11 523
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:11 523 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,6]
F: recursive call construct - arguments: (A,11,523,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 5 234
B: newSum, newDiffSum 12 572
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:12 572 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,7]
F: recursive call construct - arguments: (A,12,572,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 5 234
B: newSum, newDiffSum 13 621
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:13 621 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,8]
F: recursive call construct - arguments: (A,13,621,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 5 234
B: newSum, newDiffSum 14 670
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:14 670 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,9]
F: recursive call construct - arguments: (A,14,670,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 5 234
B: newSum, newDiffSum 15 719
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:15 719 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,10]
F: recursive call construct - arguments: (A,15,719,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 5 234
B: newSum, newDiffSum 16 768
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:16 768 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,11]
F: recursive call construct - arguments: (A,16,768,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 5 234
B: newSum, newDiffSum 17 817
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:17 817 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,12]
F: recursive call construct - arguments: (A,17,817,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 5 234
B: newSum, newDiffSum 18 866
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:18 866 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,13]
F: recursive call construct - arguments: (A,18,866,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 5 234
B: newSum, newDiffSum 19 915
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 3 to 20 current i = 14 and arguments:19 915 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,14]
F: recursive call construct - arguments: (A,19,915,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 5 234
B: newSum, newDiffSum 20 964
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 3 to 20 current i = 15 and arguments:20 964 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,15]
F: recursive call construct - arguments: (A,20,964,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 5 234
B: newSum, newDiffSum 21 1013
C: i, n, p i=16 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1013 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 2 92
B: newSum, newDiffSum 10 472
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:6 282 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,15]
F: recursive call construct - arguments: (A,6,282,49)
w[p, sum, diffsum] is true - w[49,6,282] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 2 92
B: newSum, newDiffSum 12 568
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:7 330 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,5,15]
F: recursive call construct - arguments: (A,7,330,49)
w[p, sum, diffsum] is true - w[49,7,330] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 2 92
B: newSum, newDiffSum 14 664
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:8 378 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,6,15]
F: recursive call construct - arguments: (A,8,378,49)
w[p, sum, diffsum] is true - w[49,8,378] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 2 92
B: newSum, newDiffSum 16 760
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:9 426 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,7,15]
F: recursive call construct - arguments: (A,9,426,49)
w[p, sum, diffsum] is true - w[49,9,426] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 2 92
B: newSum, newDiffSum 18 856
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:10 474 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,8,15]
F: recursive call construct - arguments: (A,10,474,49)
w[p, sum, diffsum] is true - w[49,10,474] - return -1
n-p=? 2
iterate on i =9
A: review sum, diffsum 2 92
B: newSum, newDiffSum 20 952
C: i, n, p i=9 n=50 p=48
D-set A[p]=i, A[p]=9 where p=48 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:11 522 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,15]
F: recursive call construct - arguments: (A,11,522,49)
w[p, sum, diffsum] is true - w[49,11,522] - return -1
n-p=? 2
iterate on i =10
A: review sum, diffsum 2 92
B: newSum, newDiffSum 22 1048
C: i, n, p i=10 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1048 exit for loop.
return 0
n-p=? 3
iterate on i =2
A: review sum, diffsum 1 46
B: newSum, newDiffSum 7 325
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:3 139 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,9,15]
F: recursive call construct - arguments: (A,3,139,48)
w[p, sum, diffsum] is not true w[48,3,139]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 3 139
B: newSum, newDiffSum 7 325
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:5 232 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,15]
F: recursive call construct - arguments: (A,5,232,49)
w[p, sum, diffsum] is not true w[49,5,232]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 5 232
B: newSum, newDiffSum 7 325
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:7 325 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2]
F: recursive call construct - arguments: (A,7,325,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 5 232
B: newSum, newDiffSum 8 374
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:8 374 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3]
F: recursive call construct - arguments: (A,8,374,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 5 232
B: newSum, newDiffSum 9 423
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:9 423 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,4]
F: recursive call construct - arguments: (A,9,423,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 5 232
B: newSum, newDiffSum 10 472
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:10 472 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,5]
F: recursive call construct - arguments: (A,10,472,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 5 232
B: newSum, newDiffSum 11 521
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:11 521 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,6]
F: recursive call construct - arguments: (A,11,521,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 5 232
B: newSum, newDiffSum 12 570
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:12 570 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,7]
F: recursive call construct - arguments: (A,12,570,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 5 232
B: newSum, newDiffSum 13 619
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:13 619 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,8]
F: recursive call construct - arguments: (A,13,619,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 5 232
B: newSum, newDiffSum 14 668
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:14 668 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,9]
F: recursive call construct - arguments: (A,14,668,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 5 232
B: newSum, newDiffSum 15 717
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:15 717 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,10]
F: recursive call construct - arguments: (A,15,717,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 5 232
B: newSum, newDiffSum 16 766
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:16 766 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,11]
F: recursive call construct - arguments: (A,16,766,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 5 232
B: newSum, newDiffSum 17 815
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:17 815 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,12]
F: recursive call construct - arguments: (A,17,815,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 5 232
B: newSum, newDiffSum 18 864
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:18 864 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,13]
F: recursive call construct - arguments: (A,18,864,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 5 232
B: newSum, newDiffSum 19 913
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:19 913 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,14]
F: recursive call construct - arguments: (A,19,913,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 5 232
B: newSum, newDiffSum 20 962
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 2 to 20 current i = 15 and arguments:20 962 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,15]
F: recursive call construct - arguments: (A,20,962,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 5 232
B: newSum, newDiffSum 21 1011
C: i, n, p i=16 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1011 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 3 139
B: newSum, newDiffSum 9 421
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:6 280 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,15]
F: recursive call construct - arguments: (A,6,280,49)
w[p, sum, diffsum] is not true w[49,6,280]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 6 280
B: newSum, newDiffSum 9 421
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 421 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3]
F: recursive call construct - arguments: (A,9,421,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 6 280
B: newSum, newDiffSum 10 470
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:10 470 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4]
F: recursive call construct - arguments: (A,10,470,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 280
B: newSum, newDiffSum 11 519
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:11 519 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,5]
F: recursive call construct - arguments: (A,11,519,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 280
B: newSum, newDiffSum 12 568
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:12 568 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,6]
F: recursive call construct - arguments: (A,12,568,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 280
B: newSum, newDiffSum 13 617
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:13 617 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,7]
F: recursive call construct - arguments: (A,13,617,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 280
B: newSum, newDiffSum 14 666
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:14 666 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,8]
F: recursive call construct - arguments: (A,14,666,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 280
B: newSum, newDiffSum 15 715
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:15 715 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,9]
F: recursive call construct - arguments: (A,15,715,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 280
B: newSum, newDiffSum 16 764
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:16 764 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,10]
F: recursive call construct - arguments: (A,16,764,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 280
B: newSum, newDiffSum 17 813
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:17 813 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,11]
F: recursive call construct - arguments: (A,17,813,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 280
B: newSum, newDiffSum 18 862
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:18 862 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,12]
F: recursive call construct - arguments: (A,18,862,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 280
B: newSum, newDiffSum 19 911
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:19 911 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,13]
F: recursive call construct - arguments: (A,19,911,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 280
B: newSum, newDiffSum 20 960
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 3 to 20 current i = 14 and arguments:20 960 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,14]
F: recursive call construct - arguments: (A,20,960,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 280
B: newSum, newDiffSum 21 1009
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1009 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 3 139
B: newSum, newDiffSum 11 517
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:7 328 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,14]
F: recursive call construct - arguments: (A,7,328,49)
w[p, sum, diffsum] is not true w[49,7,328]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 328
B: newSum, newDiffSum 11 517
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:11 517 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4]
F: recursive call construct - arguments: (A,11,517,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 328
B: newSum, newDiffSum 12 566
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:12 566 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5]
F: recursive call construct - arguments: (A,12,566,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 328
B: newSum, newDiffSum 13 615
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:13 615 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,6]
F: recursive call construct - arguments: (A,13,615,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 328
B: newSum, newDiffSum 14 664
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:14 664 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,7]
F: recursive call construct - arguments: (A,14,664,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 328
B: newSum, newDiffSum 15 713
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:15 713 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,8]
F: recursive call construct - arguments: (A,15,713,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 328
B: newSum, newDiffSum 16 762
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:16 762 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,9]
F: recursive call construct - arguments: (A,16,762,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 328
B: newSum, newDiffSum 17 811
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:17 811 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,10]
F: recursive call construct - arguments: (A,17,811,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 328
B: newSum, newDiffSum 18 860
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:18 860 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,11]
F: recursive call construct - arguments: (A,18,860,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 328
B: newSum, newDiffSum 19 909
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:19 909 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,12]
F: recursive call construct - arguments: (A,19,909,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 328
B: newSum, newDiffSum 20 958
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 4 to 20 current i = 13 and arguments:20 958 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,13]
F: recursive call construct - arguments: (A,20,958,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 328
B: newSum, newDiffSum 21 1007
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1007 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 3 139
B: newSum, newDiffSum 13 613
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:8 376 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,5,13]
F: recursive call construct - arguments: (A,8,376,49)
w[p, sum, diffsum] is true - w[49,8,376] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 3 139
B: newSum, newDiffSum 15 709
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:9 424 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,6,13]
F: recursive call construct - arguments: (A,9,424,49)
w[p, sum, diffsum] is true - w[49,9,424] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 3 139
B: newSum, newDiffSum 17 805
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:10 472 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,7,13]
F: recursive call construct - arguments: (A,10,472,49)
w[p, sum, diffsum] is true - w[49,10,472] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 3 139
B: newSum, newDiffSum 19 901
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:11 520 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,8,13]
F: recursive call construct - arguments: (A,11,520,49)
w[p, sum, diffsum] is true - w[49,11,520] - return -1
n-p=? 2
iterate on i =9
A: review sum, diffsum 3 139
B: newSum, newDiffSum 21 997
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 1 46
B: newSum, newDiffSum 10 466
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:4 186 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,8,13]
F: recursive call construct - arguments: (A,4,186,48)
w[p, sum, diffsum] is not true w[48,4,186]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 4 186
B: newSum, newDiffSum 10 466
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:7 326 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,13]
F: recursive call construct - arguments: (A,7,326,49)
w[p, sum, diffsum] is not true w[49,7,326]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 7 326
B: newSum, newDiffSum 10 466
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 466 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3]
F: recursive call construct - arguments: (A,10,466,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 326
B: newSum, newDiffSum 11 515
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 515 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4]
F: recursive call construct - arguments: (A,11,515,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 326
B: newSum, newDiffSum 12 564
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 564 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,5]
F: recursive call construct - arguments: (A,12,564,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 326
B: newSum, newDiffSum 13 613
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 613 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,6]
F: recursive call construct - arguments: (A,13,613,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 326
B: newSum, newDiffSum 14 662
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:14 662 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,7]
F: recursive call construct - arguments: (A,14,662,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 326
B: newSum, newDiffSum 15 711
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:15 711 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,8]
F: recursive call construct - arguments: (A,15,711,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 326
B: newSum, newDiffSum 16 760
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:16 760 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,9]
F: recursive call construct - arguments: (A,16,760,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 326
B: newSum, newDiffSum 17 809
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:17 809 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,10]
F: recursive call construct - arguments: (A,17,809,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 326
B: newSum, newDiffSum 18 858
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:18 858 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,11]
F: recursive call construct - arguments: (A,18,858,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 326
B: newSum, newDiffSum 19 907
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:19 907 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,12]
F: recursive call construct - arguments: (A,19,907,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 326
B: newSum, newDiffSum 20 956
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:20 956 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,13]
F: recursive call construct - arguments: (A,20,956,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 326
B: newSum, newDiffSum 21 1005
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1005 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 4 186
B: newSum, newDiffSum 12 562
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:8 374 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,13]
F: recursive call construct - arguments: (A,8,374,49)
w[p, sum, diffsum] is not true w[49,8,374]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 374
B: newSum, newDiffSum 12 562
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 562 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4]
F: recursive call construct - arguments: (A,12,562,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 374
B: newSum, newDiffSum 13 611
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 611 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5]
F: recursive call construct - arguments: (A,13,611,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 374
B: newSum, newDiffSum 14 660
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 660 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,6]
F: recursive call construct - arguments: (A,14,660,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 374
B: newSum, newDiffSum 15 709
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:15 709 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,7]
F: recursive call construct - arguments: (A,15,709,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 374
B: newSum, newDiffSum 16 758
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:16 758 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,8]
F: recursive call construct - arguments: (A,16,758,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 374
B: newSum, newDiffSum 17 807
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:17 807 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,9]
F: recursive call construct - arguments: (A,17,807,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 374
B: newSum, newDiffSum 18 856
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:18 856 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,10]
F: recursive call construct - arguments: (A,18,856,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 374
B: newSum, newDiffSum 19 905
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:19 905 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,11]
F: recursive call construct - arguments: (A,19,905,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 374
B: newSum, newDiffSum 20 954
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:20 954 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,12]
F: recursive call construct - arguments: (A,20,954,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 374
B: newSum, newDiffSum 21 1003
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1003 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 4 186
B: newSum, newDiffSum 14 658
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:9 422 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,12]
F: recursive call construct - arguments: (A,9,422,49)
w[p, sum, diffsum] is not true w[49,9,422]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 422
B: newSum, newDiffSum 14 658
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:14 658 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,5]
F: recursive call construct - arguments: (A,14,658,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 422
B: newSum, newDiffSum 15 707
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:15 707 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,6]
F: recursive call construct - arguments: (A,15,707,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 422
B: newSum, newDiffSum 16 756
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:16 756 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,7]
F: recursive call construct - arguments: (A,16,756,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 422
B: newSum, newDiffSum 17 805
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:17 805 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,8]
F: recursive call construct - arguments: (A,17,805,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 422
B: newSum, newDiffSum 18 854
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:18 854 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,9]
F: recursive call construct - arguments: (A,18,854,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 422
B: newSum, newDiffSum 19 903
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:19 903 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,10]
F: recursive call construct - arguments: (A,19,903,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 422
B: newSum, newDiffSum 20 952
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 5 to 20 current i = 11 and arguments:20 952 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,11]
F: recursive call construct - arguments: (A,20,952,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 422
B: newSum, newDiffSum 21 1001
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1001 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 4 186
B: newSum, newDiffSum 16 754
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:10 470 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,6,11]
F: recursive call construct - arguments: (A,10,470,49)
w[p, sum, diffsum] is true - w[49,10,470] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 4 186
B: newSum, newDiffSum 18 850
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:11 518 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,7,11]
F: recursive call construct - arguments: (A,11,518,49)
w[p, sum, diffsum] is true - w[49,11,518] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 4 186
B: newSum, newDiffSum 20 946
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:12 566 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,8,11]
F: recursive call construct - arguments: (A,12,566,49)
w[p, sum, diffsum] is true - w[49,12,566] - return -1
n-p=? 2
iterate on i =9
A: review sum, diffsum 4 186
B: newSum, newDiffSum 22 1042
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1042 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 1 46
B: newSum, newDiffSum 13 607
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:5 233 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,8,11]
F: recursive call construct - arguments: (A,5,233,48)
w[p, sum, diffsum] is not true w[48,5,233]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 5 233
B: newSum, newDiffSum 13 607
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:9 420 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,11]
F: recursive call construct - arguments: (A,9,420,49)
w[p, sum, diffsum] is not true w[49,9,420]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 420
B: newSum, newDiffSum 13 607
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 607 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4]
F: recursive call construct - arguments: (A,13,607,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 420
B: newSum, newDiffSum 14 656
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 656 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,5]
F: recursive call construct - arguments: (A,14,656,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 420
B: newSum, newDiffSum 15 705
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:15 705 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,6]
F: recursive call construct - arguments: (A,15,705,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 420
B: newSum, newDiffSum 16 754
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:16 754 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,7]
F: recursive call construct - arguments: (A,16,754,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 420
B: newSum, newDiffSum 17 803
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:17 803 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,8]
F: recursive call construct - arguments: (A,17,803,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 420
B: newSum, newDiffSum 18 852
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:18 852 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,9]
F: recursive call construct - arguments: (A,18,852,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 420
B: newSum, newDiffSum 19 901
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:19 901 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,10]
F: recursive call construct - arguments: (A,19,901,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 420
B: newSum, newDiffSum 20 950
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:20 950 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,11]
F: recursive call construct - arguments: (A,20,950,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 420
B: newSum, newDiffSum 21 999
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 999 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 5 233
B: newSum, newDiffSum 15 703
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:10 468 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,11]
F: recursive call construct - arguments: (A,10,468,49)
w[p, sum, diffsum] is not true w[49,10,468]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 468
B: newSum, newDiffSum 15 703
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 703 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,5]
F: recursive call construct - arguments: (A,15,703,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 468
B: newSum, newDiffSum 16 752
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:16 752 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,6]
F: recursive call construct - arguments: (A,16,752,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 468
B: newSum, newDiffSum 17 801
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:17 801 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,7]
F: recursive call construct - arguments: (A,17,801,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 468
B: newSum, newDiffSum 18 850
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:18 850 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,8]
F: recursive call construct - arguments: (A,18,850,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 468
B: newSum, newDiffSum 19 899
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:19 899 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,9]
F: recursive call construct - arguments: (A,19,899,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 468
B: newSum, newDiffSum 20 948
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:20 948 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,10]
F: recursive call construct - arguments: (A,20,948,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 468
B: newSum, newDiffSum 21 997
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 5 233
B: newSum, newDiffSum 17 799
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:11 516 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,6,10]
F: recursive call construct - arguments: (A,11,516,49)
w[p, sum, diffsum] is not true w[49,11,516]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 516
B: newSum, newDiffSum 17 799
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:17 799 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,6,6]
F: recursive call construct - arguments: (A,17,799,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 516
B: newSum, newDiffSum 18 848
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:18 848 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,6,7]
F: recursive call construct - arguments: (A,18,848,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 516
B: newSum, newDiffSum 19 897
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:19 897 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,6,8]
F: recursive call construct - arguments: (A,19,897,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 516
B: newSum, newDiffSum 20 946
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 6 to 20 current i = 9 and arguments:20 946 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,6,9]
F: recursive call construct - arguments: (A,20,946,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 516
B: newSum, newDiffSum 21 995
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 995 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 5 233
B: newSum, newDiffSum 19 895
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:12 564 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,7,9]
F: recursive call construct - arguments: (A,12,564,49)
w[p, sum, diffsum] is true - w[49,12,564] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 5 233
B: newSum, newDiffSum 21 991
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 991 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 1 46
B: newSum, newDiffSum 16 748
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:6 280 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,7,9]
F: recursive call construct - arguments: (A,6,280,48)
w[p, sum, diffsum] is not true w[48,6,280]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 6 280
B: newSum, newDiffSum 16 748
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:11 514 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5,9]
F: recursive call construct - arguments: (A,11,514,49)
w[p, sum, diffsum] is not true w[49,11,514]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 514
B: newSum, newDiffSum 16 748
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:16 748 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5,5]
F: recursive call construct - arguments: (A,16,748,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 514
B: newSum, newDiffSum 17 797
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:17 797 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5,6]
F: recursive call construct - arguments: (A,17,797,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 514
B: newSum, newDiffSum 18 846
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:18 846 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5,7]
F: recursive call construct - arguments: (A,18,846,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 514
B: newSum, newDiffSum 19 895
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:19 895 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5,8]
F: recursive call construct - arguments: (A,19,895,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 514
B: newSum, newDiffSum 20 944
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:20 944 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5,9]
F: recursive call construct - arguments: (A,20,944,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 514
B: newSum, newDiffSum 21 993
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 280
B: newSum, newDiffSum 18 844
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:12 562 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,6,9]
F: recursive call construct - arguments: (A,12,562,49)
w[p, sum, diffsum] is not true w[49,12,562]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 562
B: newSum, newDiffSum 18 844
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:18 844 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,6,6]
F: recursive call construct - arguments: (A,18,844,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 562
B: newSum, newDiffSum 19 893
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:19 893 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,6,7]
F: recursive call construct - arguments: (A,19,893,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 562
B: newSum, newDiffSum 20 942
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:20 942 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,6,8]
F: recursive call construct - arguments: (A,20,942,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 562
B: newSum, newDiffSum 21 991
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 991 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 280
B: newSum, newDiffSum 20 940
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:13 610 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,7,8]
F: recursive call construct - arguments: (A,13,610,49)
w[p, sum, diffsum] is not true w[49,13,610]
i=A[p-1], p=49, i=7;
For loop (A - E): for(; i<=s;i++) i=7 s=20
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 610
B: newSum, newDiffSum 20 940
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 7 to 20 current i = 7 and arguments:20 940 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,7,7]
F: recursive call construct - arguments: (A,20,940,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 610
B: newSum, newDiffSum 21 989
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 989 exit for loop.
return 0
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 280
B: newSum, newDiffSum 22 1036
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1036 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 1 46
B: newSum, newDiffSum 19 889
C: i, n, p i=6 n=50 p=47
D-set A[p]=i, A[p]=6 where p=47 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:7 327 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,7,7]
F: recursive call construct - arguments: (A,7,327,48)
w[p, sum, diffsum] is not true w[48,7,327]
i=A[p-1], p=48, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 327
B: newSum, newDiffSum 19 889
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:13 608 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,6,7]
F: recursive call construct - arguments: (A,13,608,49)
w[p, sum, diffsum] is not true w[49,13,608]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 608
B: newSum, newDiffSum 19 889
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:19 889 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,6,6]
F: recursive call construct - arguments: (A,19,889,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 608
B: newSum, newDiffSum 20 938
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:20 938 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,6,7]
F: recursive call construct - arguments: (A,20,938,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 608
B: newSum, newDiffSum 21 987
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 327
B: newSum, newDiffSum 21 985
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 3
iterate on i =7
A: review sum, diffsum 1 46
B: newSum, newDiffSum 22 1030
C: i, n, p i=7 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 1030 exit for loop.
return 0
n-p=? 4
iterate on i =2
A: review sum, diffsum 0 0
B: newSum, newDiffSum 8 368
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 0 to 20 current i = 2 and arguments:2 92 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,6,7]
F: recursive call construct - arguments: (A,2,92,47)
w[p, sum, diffsum] is not true w[47,2,92]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 2 92
B: newSum, newDiffSum 8 368
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:4 184 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,6,7]
F: recursive call construct - arguments: (A,4,184,48)
w[p, sum, diffsum] is not true w[48,4,184]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 4 184
B: newSum, newDiffSum 8 368
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 276 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,7]
F: recursive call construct - arguments: (A,6,276,49)
w[p, sum, diffsum] is not true w[49,6,276]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 6 276
B: newSum, newDiffSum 8 368
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 368 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2]
F: recursive call construct - arguments: (A,8,368,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 6 276
B: newSum, newDiffSum 9 417
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 417 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3]
F: recursive call construct - arguments: (A,9,417,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 6 276
B: newSum, newDiffSum 10 466
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 466 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,4]
F: recursive call construct - arguments: (A,10,466,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 276
B: newSum, newDiffSum 11 515
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:11 515 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,5]
F: recursive call construct - arguments: (A,11,515,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 276
B: newSum, newDiffSum 12 564
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:12 564 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,6]
F: recursive call construct - arguments: (A,12,564,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 276
B: newSum, newDiffSum 13 613
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:13 613 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,7]
F: recursive call construct - arguments: (A,13,613,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 276
B: newSum, newDiffSum 14 662
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:14 662 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,8]
F: recursive call construct - arguments: (A,14,662,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 276
B: newSum, newDiffSum 15 711
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:15 711 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,9]
F: recursive call construct - arguments: (A,15,711,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 276
B: newSum, newDiffSum 16 760
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:16 760 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,10]
F: recursive call construct - arguments: (A,16,760,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 276
B: newSum, newDiffSum 17 809
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:17 809 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,11]
F: recursive call construct - arguments: (A,17,809,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 276
B: newSum, newDiffSum 18 858
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:18 858 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,12]
F: recursive call construct - arguments: (A,18,858,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 276
B: newSum, newDiffSum 19 907
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:19 907 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,13]
F: recursive call construct - arguments: (A,19,907,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 276
B: newSum, newDiffSum 20 956
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:20 956 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,14]
F: recursive call construct - arguments: (A,20,956,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 276
B: newSum, newDiffSum 21 1005
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1005 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 4 184
B: newSum, newDiffSum 10 464
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 324 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,14]
F: recursive call construct - arguments: (A,7,324,49)
w[p, sum, diffsum] is not true w[49,7,324]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 7 324
B: newSum, newDiffSum 10 464
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 464 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3]
F: recursive call construct - arguments: (A,10,464,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 324
B: newSum, newDiffSum 11 513
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 513 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4]
F: recursive call construct - arguments: (A,11,513,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 324
B: newSum, newDiffSum 12 562
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 562 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,5]
F: recursive call construct - arguments: (A,12,562,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 324
B: newSum, newDiffSum 13 611
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 611 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,6]
F: recursive call construct - arguments: (A,13,611,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 324
B: newSum, newDiffSum 14 660
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:14 660 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,7]
F: recursive call construct - arguments: (A,14,660,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 324
B: newSum, newDiffSum 15 709
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:15 709 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,8]
F: recursive call construct - arguments: (A,15,709,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 324
B: newSum, newDiffSum 16 758
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:16 758 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,9]
F: recursive call construct - arguments: (A,16,758,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 324
B: newSum, newDiffSum 17 807
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:17 807 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,10]
F: recursive call construct - arguments: (A,17,807,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 324
B: newSum, newDiffSum 18 856
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:18 856 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,11]
F: recursive call construct - arguments: (A,18,856,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 324
B: newSum, newDiffSum 19 905
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:19 905 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,12]
F: recursive call construct - arguments: (A,19,905,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 324
B: newSum, newDiffSum 20 954
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:20 954 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,13]
F: recursive call construct - arguments: (A,20,954,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 324
B: newSum, newDiffSum 21 1003
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1003 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 4 184
B: newSum, newDiffSum 12 560
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 372 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,13]
F: recursive call construct - arguments: (A,8,372,49)
w[p, sum, diffsum] is not true w[49,8,372]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 372
B: newSum, newDiffSum 12 560
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 560 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4]
F: recursive call construct - arguments: (A,12,560,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 372
B: newSum, newDiffSum 13 609
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 609 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,5]
F: recursive call construct - arguments: (A,13,609,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 372
B: newSum, newDiffSum 14 658
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 658 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,6]
F: recursive call construct - arguments: (A,14,658,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 372
B: newSum, newDiffSum 15 707
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:15 707 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,7]
F: recursive call construct - arguments: (A,15,707,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 372
B: newSum, newDiffSum 16 756
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:16 756 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,8]
F: recursive call construct - arguments: (A,16,756,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 372
B: newSum, newDiffSum 17 805
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:17 805 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,9]
F: recursive call construct - arguments: (A,17,805,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 372
B: newSum, newDiffSum 18 854
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:18 854 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,10]
F: recursive call construct - arguments: (A,18,854,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 372
B: newSum, newDiffSum 19 903
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:19 903 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,11]
F: recursive call construct - arguments: (A,19,903,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 372
B: newSum, newDiffSum 20 952
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:20 952 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,12]
F: recursive call construct - arguments: (A,20,952,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 372
B: newSum, newDiffSum 21 1001
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1001 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 4 184
B: newSum, newDiffSum 14 656
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:9 420 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,5,12]
F: recursive call construct - arguments: (A,9,420,49)
w[p, sum, diffsum] is true - w[49,9,420] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 4 184
B: newSum, newDiffSum 16 752
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:10 468 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,6,12]
F: recursive call construct - arguments: (A,10,468,49)
w[p, sum, diffsum] is true - w[49,10,468] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 4 184
B: newSum, newDiffSum 18 848
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:11 516 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,7,12]
F: recursive call construct - arguments: (A,11,516,49)
w[p, sum, diffsum] is true - w[49,11,516] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 4 184
B: newSum, newDiffSum 20 944
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:12 564 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,8,12]
F: recursive call construct - arguments: (A,12,564,49)
w[p, sum, diffsum] is true - w[49,12,564] - return -1
n-p=? 2
iterate on i =9
A: review sum, diffsum 4 184
B: newSum, newDiffSum 22 1040
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1040 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 2 92
B: newSum, newDiffSum 11 509
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:5 231 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,8,12]
F: recursive call construct - arguments: (A,5,231,48)
w[p, sum, diffsum] is not true w[48,5,231]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 5 231
B: newSum, newDiffSum 11 509
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 370 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,12]
F: recursive call construct - arguments: (A,8,370,49)
w[p, sum, diffsum] is not true w[49,8,370]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 370
B: newSum, newDiffSum 11 509
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 509 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3]
F: recursive call construct - arguments: (A,11,509,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 370
B: newSum, newDiffSum 12 558
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 558 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4]
F: recursive call construct - arguments: (A,12,558,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 370
B: newSum, newDiffSum 13 607
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 607 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,5]
F: recursive call construct - arguments: (A,13,607,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 370
B: newSum, newDiffSum 14 656
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 656 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,6]
F: recursive call construct - arguments: (A,14,656,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 370
B: newSum, newDiffSum 15 705
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:15 705 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,7]
F: recursive call construct - arguments: (A,15,705,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 370
B: newSum, newDiffSum 16 754
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:16 754 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,8]
F: recursive call construct - arguments: (A,16,754,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 370
B: newSum, newDiffSum 17 803
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:17 803 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,9]
F: recursive call construct - arguments: (A,17,803,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 370
B: newSum, newDiffSum 18 852
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:18 852 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,10]
F: recursive call construct - arguments: (A,18,852,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 370
B: newSum, newDiffSum 19 901
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:19 901 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,11]
F: recursive call construct - arguments: (A,19,901,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 370
B: newSum, newDiffSum 20 950
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:20 950 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,12]
F: recursive call construct - arguments: (A,20,950,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 370
B: newSum, newDiffSum 21 999
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 999 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 5 231
B: newSum, newDiffSum 13 605
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:9 418 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,12]
F: recursive call construct - arguments: (A,9,418,49)
w[p, sum, diffsum] is not true w[49,9,418]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 418
B: newSum, newDiffSum 13 605
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 605 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4]
F: recursive call construct - arguments: (A,13,605,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 418
B: newSum, newDiffSum 14 654
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 654 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5]
F: recursive call construct - arguments: (A,14,654,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 418
B: newSum, newDiffSum 15 703
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:15 703 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,6]
F: recursive call construct - arguments: (A,15,703,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 418
B: newSum, newDiffSum 16 752
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:16 752 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,7]
F: recursive call construct - arguments: (A,16,752,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 418
B: newSum, newDiffSum 17 801
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:17 801 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,8]
F: recursive call construct - arguments: (A,17,801,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 418
B: newSum, newDiffSum 18 850
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:18 850 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,9]
F: recursive call construct - arguments: (A,18,850,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 418
B: newSum, newDiffSum 19 899
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:19 899 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,10]
F: recursive call construct - arguments: (A,19,899,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 418
B: newSum, newDiffSum 20 948
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:20 948 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,11]
F: recursive call construct - arguments: (A,20,948,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 418
B: newSum, newDiffSum 21 997
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 5 231
B: newSum, newDiffSum 15 701
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:10 466 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,11]
F: recursive call construct - arguments: (A,10,466,49)
w[p, sum, diffsum] is not true w[49,10,466]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 466
B: newSum, newDiffSum 15 701
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 701 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,5]
F: recursive call construct - arguments: (A,15,701,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 466
B: newSum, newDiffSum 16 750
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:16 750 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,6]
F: recursive call construct - arguments: (A,16,750,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 466
B: newSum, newDiffSum 17 799
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:17 799 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,7]
F: recursive call construct - arguments: (A,17,799,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 466
B: newSum, newDiffSum 18 848
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:18 848 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,8]
F: recursive call construct - arguments: (A,18,848,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 466
B: newSum, newDiffSum 19 897
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:19 897 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,9]
F: recursive call construct - arguments: (A,19,897,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 466
B: newSum, newDiffSum 20 946
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:20 946 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,10]
F: recursive call construct - arguments: (A,20,946,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 466
B: newSum, newDiffSum 21 995
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 995 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 5 231
B: newSum, newDiffSum 17 797
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:11 514 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,6,10]
F: recursive call construct - arguments: (A,11,514,49)
w[p, sum, diffsum] is true - w[49,11,514] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 5 231
B: newSum, newDiffSum 19 893
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:12 562 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7,10]
F: recursive call construct - arguments: (A,12,562,49)
w[p, sum, diffsum] is true - w[49,12,562] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 5 231
B: newSum, newDiffSum 21 989
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 989 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 2 92
B: newSum, newDiffSum 14 650
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:6 278 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,7,10]
F: recursive call construct - arguments: (A,6,278,48)
w[p, sum, diffsum] is not true w[48,6,278]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 6 278
B: newSum, newDiffSum 14 650
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:10 464 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,10]
F: recursive call construct - arguments: (A,10,464,49)
w[p, sum, diffsum] is not true w[49,10,464]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 464
B: newSum, newDiffSum 14 650
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:14 650 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,4]
F: recursive call construct - arguments: (A,14,650,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 464
B: newSum, newDiffSum 15 699
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:15 699 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,5]
F: recursive call construct - arguments: (A,15,699,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 464
B: newSum, newDiffSum 16 748
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:16 748 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,6]
F: recursive call construct - arguments: (A,16,748,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 464
B: newSum, newDiffSum 17 797
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:17 797 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,7]
F: recursive call construct - arguments: (A,17,797,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 464
B: newSum, newDiffSum 18 846
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:18 846 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,8]
F: recursive call construct - arguments: (A,18,846,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 464
B: newSum, newDiffSum 19 895
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:19 895 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,9]
F: recursive call construct - arguments: (A,19,895,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 464
B: newSum, newDiffSum 20 944
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:20 944 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,10]
F: recursive call construct - arguments: (A,20,944,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 464
B: newSum, newDiffSum 21 993
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 6 278
B: newSum, newDiffSum 16 746
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:11 512 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,10]
F: recursive call construct - arguments: (A,11,512,49)
w[p, sum, diffsum] is not true w[49,11,512]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 512
B: newSum, newDiffSum 16 746
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:16 746 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,5]
F: recursive call construct - arguments: (A,16,746,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 512
B: newSum, newDiffSum 17 795
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:17 795 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,6]
F: recursive call construct - arguments: (A,17,795,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 512
B: newSum, newDiffSum 18 844
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:18 844 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,7]
F: recursive call construct - arguments: (A,18,844,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 512
B: newSum, newDiffSum 19 893
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:19 893 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,8]
F: recursive call construct - arguments: (A,19,893,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 512
B: newSum, newDiffSum 20 942
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:20 942 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,9]
F: recursive call construct - arguments: (A,20,942,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 512
B: newSum, newDiffSum 21 991
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 991 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 278
B: newSum, newDiffSum 18 842
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:12 560 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6,9]
F: recursive call construct - arguments: (A,12,560,49)
w[p, sum, diffsum] is not true w[49,12,560]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 560
B: newSum, newDiffSum 18 842
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:18 842 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6,6]
F: recursive call construct - arguments: (A,18,842,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 560
B: newSum, newDiffSum 19 891
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:19 891 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6,7]
F: recursive call construct - arguments: (A,19,891,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 560
B: newSum, newDiffSum 20 940
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 6 to 20 current i = 8 and arguments:20 940 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,6,8]
F: recursive call construct - arguments: (A,20,940,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 560
B: newSum, newDiffSum 21 989
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 989 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 278
B: newSum, newDiffSum 20 938
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:13 608 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,7,8]
F: recursive call construct - arguments: (A,13,608,49)
w[p, sum, diffsum] is true - w[49,13,608] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 278
B: newSum, newDiffSum 22 1034
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1034 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 2 92
B: newSum, newDiffSum 17 791
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:7 325 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,7,8]
F: recursive call construct - arguments: (A,7,325,48)
w[p, sum, diffsum] is not true w[48,7,325]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 325
B: newSum, newDiffSum 17 791
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:12 558 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,5,8]
F: recursive call construct - arguments: (A,12,558,49)
w[p, sum, diffsum] is not true w[49,12,558]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 558
B: newSum, newDiffSum 17 791
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:17 791 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,5,5]
F: recursive call construct - arguments: (A,17,791,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 558
B: newSum, newDiffSum 18 840
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:18 840 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,5,6]
F: recursive call construct - arguments: (A,18,840,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 558
B: newSum, newDiffSum 19 889
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:19 889 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,5,7]
F: recursive call construct - arguments: (A,19,889,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 558
B: newSum, newDiffSum 20 938
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:20 938 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,5,8]
F: recursive call construct - arguments: (A,20,938,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 558
B: newSum, newDiffSum 21 987
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 325
B: newSum, newDiffSum 19 887
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:13 606 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,6,8]
F: recursive call construct - arguments: (A,13,606,49)
w[p, sum, diffsum] is not true w[49,13,606]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 606
B: newSum, newDiffSum 19 887
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:19 887 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,6,6]
F: recursive call construct - arguments: (A,19,887,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 606
B: newSum, newDiffSum 20 936
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:20 936 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,6,7]
F: recursive call construct - arguments: (A,20,936,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 606
B: newSum, newDiffSum 21 985
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 325
B: newSum, newDiffSum 21 983
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 983 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 2 92
B: newSum, newDiffSum 20 932
C: i, n, p i=6 n=50 p=47
D-set A[p]=i, A[p]=6 where p=47 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:8 372 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,6,7]
F: recursive call construct - arguments: (A,8,372,48)
w[p, sum, diffsum] is not true w[48,8,372]
i=A[p-1], p=48, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 372
B: newSum, newDiffSum 20 932
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:14 652 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,6,7]
F: recursive call construct - arguments: (A,14,652,49)
w[p, sum, diffsum] is not true w[49,14,652]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 652
B: newSum, newDiffSum 20 932
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:20 932 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,6,6,6]
F: recursive call construct - arguments: (A,20,932,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 652
B: newSum, newDiffSum 21 981
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 372
B: newSum, newDiffSum 22 1028
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1028 exit for loop.
return 0
n-p=? 3
iterate on i =7
A: review sum, diffsum 2 92
B: newSum, newDiffSum 23 1073
C: i, n, p i=7 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1073 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 0 0
B: newSum, newDiffSum 12 552
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 0 to 20 current i = 3 and arguments:3 138 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,6,6,6]
F: recursive call construct - arguments: (A,3,138,47)
w[p, sum, diffsum] is not true w[47,3,138]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 3 138
B: newSum, newDiffSum 12 552
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:6 276 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,6,6]
F: recursive call construct - arguments: (A,6,276,48)
w[p, sum, diffsum] is not true w[48,6,276]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 6 276
B: newSum, newDiffSum 12 552
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 414 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,6]
F: recursive call construct - arguments: (A,9,414,49)
w[p, sum, diffsum] is not true w[49,9,414]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 9 414
B: newSum, newDiffSum 12 552
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 552 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3]
F: recursive call construct - arguments: (A,12,552,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 414
B: newSum, newDiffSum 13 601
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 601 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4]
F: recursive call construct - arguments: (A,13,601,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 414
B: newSum, newDiffSum 14 650
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 650 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,5]
F: recursive call construct - arguments: (A,14,650,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 414
B: newSum, newDiffSum 15 699
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:15 699 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,6]
F: recursive call construct - arguments: (A,15,699,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 414
B: newSum, newDiffSum 16 748
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:16 748 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,7]
F: recursive call construct - arguments: (A,16,748,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 414
B: newSum, newDiffSum 17 797
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:17 797 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,8]
F: recursive call construct - arguments: (A,17,797,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 414
B: newSum, newDiffSum 18 846
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:18 846 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,9]
F: recursive call construct - arguments: (A,18,846,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 414
B: newSum, newDiffSum 19 895
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:19 895 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,10]
F: recursive call construct - arguments: (A,19,895,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 414
B: newSum, newDiffSum 20 944
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:20 944 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,11]
F: recursive call construct - arguments: (A,20,944,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 414
B: newSum, newDiffSum 21 993
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 6 276
B: newSum, newDiffSum 14 648
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:10 462 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,11]
F: recursive call construct - arguments: (A,10,462,49)
w[p, sum, diffsum] is not true w[49,10,462]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 462
B: newSum, newDiffSum 14 648
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:14 648 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,4]
F: recursive call construct - arguments: (A,14,648,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 462
B: newSum, newDiffSum 15 697
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:15 697 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,5]
F: recursive call construct - arguments: (A,15,697,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 462
B: newSum, newDiffSum 16 746
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:16 746 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,6]
F: recursive call construct - arguments: (A,16,746,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 462
B: newSum, newDiffSum 17 795
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:17 795 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,7]
F: recursive call construct - arguments: (A,17,795,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 462
B: newSum, newDiffSum 18 844
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:18 844 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,8]
F: recursive call construct - arguments: (A,18,844,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 462
B: newSum, newDiffSum 19 893
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:19 893 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,9]
F: recursive call construct - arguments: (A,19,893,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 462
B: newSum, newDiffSum 20 942
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:20 942 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,10]
F: recursive call construct - arguments: (A,20,942,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 462
B: newSum, newDiffSum 21 991
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 991 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 6 276
B: newSum, newDiffSum 16 744
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:11 510 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,10]
F: recursive call construct - arguments: (A,11,510,49)
w[p, sum, diffsum] is not true w[49,11,510]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 510
B: newSum, newDiffSum 16 744
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:16 744 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,5]
F: recursive call construct - arguments: (A,16,744,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 510
B: newSum, newDiffSum 17 793
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:17 793 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,6]
F: recursive call construct - arguments: (A,17,793,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 510
B: newSum, newDiffSum 18 842
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:18 842 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,7]
F: recursive call construct - arguments: (A,18,842,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 510
B: newSum, newDiffSum 19 891
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:19 891 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,8]
F: recursive call construct - arguments: (A,19,891,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 510
B: newSum, newDiffSum 20 940
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:20 940 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,9]
F: recursive call construct - arguments: (A,20,940,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 510
B: newSum, newDiffSum 21 989
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 989 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 276
B: newSum, newDiffSum 18 840
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:12 558 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,6,9]
F: recursive call construct - arguments: (A,12,558,49)
w[p, sum, diffsum] is true - w[49,12,558] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 276
B: newSum, newDiffSum 20 936
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:13 606 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,7,9]
F: recursive call construct - arguments: (A,13,606,49)
w[p, sum, diffsum] is true - w[49,13,606] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 276
B: newSum, newDiffSum 22 1032
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1032 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 3 138
B: newSum, newDiffSum 15 693
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:7 323 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,7,9]
F: recursive call construct - arguments: (A,7,323,48)
w[p, sum, diffsum] is not true w[48,7,323]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 323
B: newSum, newDiffSum 15 693
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:11 508 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,9]
F: recursive call construct - arguments: (A,11,508,49)
w[p, sum, diffsum] is not true w[49,11,508]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 508
B: newSum, newDiffSum 15 693
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 693 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4]
F: recursive call construct - arguments: (A,15,693,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 508
B: newSum, newDiffSum 16 742
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:16 742 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,5]
F: recursive call construct - arguments: (A,16,742,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 508
B: newSum, newDiffSum 17 791
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:17 791 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,6]
F: recursive call construct - arguments: (A,17,791,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 508
B: newSum, newDiffSum 18 840
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:18 840 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,7]
F: recursive call construct - arguments: (A,18,840,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 508
B: newSum, newDiffSum 19 889
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:19 889 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,8]
F: recursive call construct - arguments: (A,19,889,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 508
B: newSum, newDiffSum 20 938
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:20 938 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,9]
F: recursive call construct - arguments: (A,20,938,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 508
B: newSum, newDiffSum 21 987
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 323
B: newSum, newDiffSum 17 789
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:12 556 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,5,9]
F: recursive call construct - arguments: (A,12,556,49)
w[p, sum, diffsum] is not true w[49,12,556]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 556
B: newSum, newDiffSum 17 789
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:17 789 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,5,5]
F: recursive call construct - arguments: (A,17,789,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 556
B: newSum, newDiffSum 18 838
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:18 838 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,5,6]
F: recursive call construct - arguments: (A,18,838,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 556
B: newSum, newDiffSum 19 887
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:19 887 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,5,7]
F: recursive call construct - arguments: (A,19,887,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 556
B: newSum, newDiffSum 20 936
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:20 936 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,5,8]
F: recursive call construct - arguments: (A,20,936,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 556
B: newSum, newDiffSum 21 985
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 323
B: newSum, newDiffSum 19 885
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:13 604 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,6,8]
F: recursive call construct - arguments: (A,13,604,49)
w[p, sum, diffsum] is not true w[49,13,604]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 604
B: newSum, newDiffSum 19 885
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:19 885 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,6,6]
F: recursive call construct - arguments: (A,19,885,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 604
B: newSum, newDiffSum 20 934
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 6 to 20 current i = 7 and arguments:20 934 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,6,7]
F: recursive call construct - arguments: (A,20,934,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 604
B: newSum, newDiffSum 21 983
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 983 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 323
B: newSum, newDiffSum 21 981
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 3 138
B: newSum, newDiffSum 18 834
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:8 370 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,6,7]
F: recursive call construct - arguments: (A,8,370,48)
w[p, sum, diffsum] is not true w[48,8,370]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 370
B: newSum, newDiffSum 18 834
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:13 602 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,5,7]
F: recursive call construct - arguments: (A,13,602,49)
w[p, sum, diffsum] is not true w[49,13,602]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 602
B: newSum, newDiffSum 18 834
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:18 834 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,5,5]
F: recursive call construct - arguments: (A,18,834,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 602
B: newSum, newDiffSum 19 883
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:19 883 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,5,6]
F: recursive call construct - arguments: (A,19,883,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 602
B: newSum, newDiffSum 20 932
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:20 932 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,5,7]
F: recursive call construct - arguments: (A,20,932,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 602
B: newSum, newDiffSum 21 981
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 370
B: newSum, newDiffSum 20 930
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:14 650 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,6,7]
F: recursive call construct - arguments: (A,14,650,49)
w[p, sum, diffsum] is not true w[49,14,650]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 650
B: newSum, newDiffSum 20 930
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:20 930 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,5,6,6]
F: recursive call construct - arguments: (A,20,930,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 650
B: newSum, newDiffSum 21 979
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 979 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 370
B: newSum, newDiffSum 22 1026
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1026 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 3 138
B: newSum, newDiffSum 21 975
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 0 0
B: newSum, newDiffSum 16 736
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 0 to 20 current i = 4 and arguments:4 184 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,6,6]
F: recursive call construct - arguments: (A,4,184,47)
w[p, sum, diffsum] is not true w[47,4,184]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 4 184
B: newSum, newDiffSum 16 736
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:8 368 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,6,6]
F: recursive call construct - arguments: (A,8,368,48)
w[p, sum, diffsum] is not true w[48,8,368]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 368
B: newSum, newDiffSum 16 736
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 552 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,6]
F: recursive call construct - arguments: (A,12,552,49)
w[p, sum, diffsum] is not true w[49,12,552]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 552
B: newSum, newDiffSum 16 736
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 736 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4]
F: recursive call construct - arguments: (A,16,736,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 552
B: newSum, newDiffSum 17 785
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:17 785 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,5]
F: recursive call construct - arguments: (A,17,785,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 552
B: newSum, newDiffSum 18 834
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:18 834 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,6]
F: recursive call construct - arguments: (A,18,834,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 552
B: newSum, newDiffSum 19 883
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:19 883 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,7]
F: recursive call construct - arguments: (A,19,883,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 552
B: newSum, newDiffSum 20 932
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:20 932 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,8]
F: recursive call construct - arguments: (A,20,932,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 552
B: newSum, newDiffSum 21 981
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 368
B: newSum, newDiffSum 18 832
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 600 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,5,8]
F: recursive call construct - arguments: (A,13,600,49)
w[p, sum, diffsum] is not true w[49,13,600]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 600
B: newSum, newDiffSum 18 832
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:18 832 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,5,5]
F: recursive call construct - arguments: (A,18,832,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 600
B: newSum, newDiffSum 19 881
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:19 881 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,5,6]
F: recursive call construct - arguments: (A,19,881,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 600
B: newSum, newDiffSum 20 930
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:20 930 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,5,7]
F: recursive call construct - arguments: (A,20,930,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 600
B: newSum, newDiffSum 21 979
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 979 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 368
B: newSum, newDiffSum 20 928
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 648 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,6,7]
F: recursive call construct - arguments: (A,14,648,49)
w[p, sum, diffsum] is not true w[49,14,648]
i=A[p-1], p=49, i=6;
For loop (A - E): for(; i<=s;i++) i=6 s=20
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 648
B: newSum, newDiffSum 20 928
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 6 to 20 current i = 6 and arguments:20 928 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,6,6]
F: recursive call construct - arguments: (A,20,928,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 648
B: newSum, newDiffSum 21 977
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 977 exit for loop.
return 0
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 368
B: newSum, newDiffSum 22 1024
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1024 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 4 184
B: newSum, newDiffSum 19 877
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:9 415 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,6,6]
F: recursive call construct - arguments: (A,9,415,48)
w[p, sum, diffsum] is not true w[48,9,415]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 415
B: newSum, newDiffSum 19 877
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:14 646 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5,6]
F: recursive call construct - arguments: (A,14,646,49)
w[p, sum, diffsum] is not true w[49,14,646]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 646
B: newSum, newDiffSum 19 877
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:19 877 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5,5]
F: recursive call construct - arguments: (A,19,877,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 646
B: newSum, newDiffSum 20 926
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:20 926 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,5,5,6]
F: recursive call construct - arguments: (A,20,926,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 646
B: newSum, newDiffSum 21 975
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 415
B: newSum, newDiffSum 21 973
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 4 184
B: newSum, newDiffSum 22 1018
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 1018 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 0 0
B: newSum, newDiffSum 20 920
C: i, n, p i=5 n=50 p=46
D-set A[p]=i, A[p]=5 where p=46 and i=5
D-Normal: loop start to end: From 0 to 20 current i = 5 and arguments:5 230 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,6]
F: recursive call construct - arguments: (A,5,230,47)
w[p, sum, diffsum] is not true w[47,5,230]
i=A[p-1], p=47, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 3
iterate on i =5
A: review sum, diffsum 5 230
B: newSum, newDiffSum 20 920
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:10 460 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,6]
F: recursive call construct - arguments: (A,10,460,48)
w[p, sum, diffsum] is not true w[48,10,460]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 460
B: newSum, newDiffSum 20 920
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 690 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,6]
F: recursive call construct - arguments: (A,15,690,49)
w[p, sum, diffsum] is not true w[49,15,690]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 690
B: newSum, newDiffSum 20 920
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:20 920 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5]
F: recursive call construct - arguments: (A,20,920,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 690
B: newSum, newDiffSum 21 969
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 460
B: newSum, newDiffSum 22 1016
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1016 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 5 230
B: newSum, newDiffSum 23 1061
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1061 exit for loop.
return 0
n-p=? 4
iterate on i =6
A: review sum, diffsum 0 0
B: newSum, newDiffSum 24 1104
C: i, n, p i=6 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 24 1104 exit for loop.
return 0
n-p=? 5
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 5 225
C: i, n, p i=1 n=50 p=45
D-set A[p]=i, A[p]=1 where p=45 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 45 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,5,5,5]
F: recursive call construct - arguments: (A,1,45,46)
w[p, sum, diffsum] is not true w[46,1,45]
i=A[p-1], p=46, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 4
iterate on i =1
A: review sum, diffsum 1 45
B: newSum, newDiffSum 5 225
C: i, n, p i=1 n=50 p=46
D-set A[p]=i, A[p]=1 where p=46 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:2 90 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,5,5,5]
F: recursive call construct - arguments: (A,2,90,47)
w[p, sum, diffsum] is not true w[47,2,90]
i=A[p-1], p=47, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 3
iterate on i =1
A: review sum, diffsum 2 90
B: newSum, newDiffSum 5 225
C: i, n, p i=1 n=50 p=47
D-set A[p]=i, A[p]=1 where p=47 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:3 135 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,5,5]
F: recursive call construct - arguments: (A,3,135,48)
w[p, sum, diffsum] is not true w[48,3,135]
i=A[p-1], p=48, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 2
iterate on i =1
A: review sum, diffsum 3 135
B: newSum, newDiffSum 5 225
C: i, n, p i=1 n=50 p=48
D-set A[p]=i, A[p]=1 where p=48 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:4 180 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,5]
F: recursive call construct - arguments: (A,4,180,49)
w[p, sum, diffsum] is not true w[49,4,180]
i=A[p-1], p=49, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 1
iterate on i =1
A: review sum, diffsum 4 180
B: newSum, newDiffSum 5 225
C: i, n, p i=1 n=50 p=49
D-set A[p]=i, A[p]=1 where p=49 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:5 225 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1]
F: recursive call construct - arguments: (A,5,225,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =2
A: review sum, diffsum 4 180
B: newSum, newDiffSum 6 274
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:6 274 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2]
F: recursive call construct - arguments: (A,6,274,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 4 180
B: newSum, newDiffSum 7 323
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:7 323 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3]
F: recursive call construct - arguments: (A,7,323,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 4 180
B: newSum, newDiffSum 8 372
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:8 372 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4]
F: recursive call construct - arguments: (A,8,372,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 4 180
B: newSum, newDiffSum 9 421
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:9 421 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,5]
F: recursive call construct - arguments: (A,9,421,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 4 180
B: newSum, newDiffSum 10 470
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:10 470 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,6]
F: recursive call construct - arguments: (A,10,470,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 4 180
B: newSum, newDiffSum 11 519
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:11 519 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,7]
F: recursive call construct - arguments: (A,11,519,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 4 180
B: newSum, newDiffSum 12 568
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:12 568 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,8]
F: recursive call construct - arguments: (A,12,568,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 4 180
B: newSum, newDiffSum 13 617
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:13 617 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,9]
F: recursive call construct - arguments: (A,13,617,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 4 180
B: newSum, newDiffSum 14 666
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 1 to 20 current i = 10 and arguments:14 666 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,10]
F: recursive call construct - arguments: (A,14,666,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 4 180
B: newSum, newDiffSum 15 715
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 1 to 20 current i = 11 and arguments:15 715 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,11]
F: recursive call construct - arguments: (A,15,715,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 4 180
B: newSum, newDiffSum 16 764
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 1 to 20 current i = 12 and arguments:16 764 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,12]
F: recursive call construct - arguments: (A,16,764,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 4 180
B: newSum, newDiffSum 17 813
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 1 to 20 current i = 13 and arguments:17 813 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,13]
F: recursive call construct - arguments: (A,17,813,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 4 180
B: newSum, newDiffSum 18 862
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 1 to 20 current i = 14 and arguments:18 862 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,14]
F: recursive call construct - arguments: (A,18,862,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 4 180
B: newSum, newDiffSum 19 911
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 1 to 20 current i = 15 and arguments:19 911 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,15]
F: recursive call construct - arguments: (A,19,911,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 4 180
B: newSum, newDiffSum 20 960
C: i, n, p i=16 n=50 p=49
D-set A[p]=i, A[p]=16 where p=49 and i=16
D-Normal: loop start to end: From 1 to 20 current i = 16 and arguments:20 960 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,16]
F: recursive call construct - arguments: (A,20,960,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =17
A: review sum, diffsum 4 180
B: newSum, newDiffSum 21 1009
C: i, n, p i=17 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1009 exit for loop.
return 0
n-p=? 2
iterate on i =2
A: review sum, diffsum 3 135
B: newSum, newDiffSum 7 321
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:5 228 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,16]
F: recursive call construct - arguments: (A,5,228,49)
w[p, sum, diffsum] is not true w[49,5,228]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 5 228
B: newSum, newDiffSum 7 321
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:7 321 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2]
F: recursive call construct - arguments: (A,7,321,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 5 228
B: newSum, newDiffSum 8 370
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:8 370 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3]
F: recursive call construct - arguments: (A,8,370,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 5 228
B: newSum, newDiffSum 9 419
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:9 419 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4]
F: recursive call construct - arguments: (A,9,419,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 5 228
B: newSum, newDiffSum 10 468
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:10 468 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5]
F: recursive call construct - arguments: (A,10,468,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 5 228
B: newSum, newDiffSum 11 517
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:11 517 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,6]
F: recursive call construct - arguments: (A,11,517,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 5 228
B: newSum, newDiffSum 12 566
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:12 566 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,7]
F: recursive call construct - arguments: (A,12,566,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 5 228
B: newSum, newDiffSum 13 615
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:13 615 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,8]
F: recursive call construct - arguments: (A,13,615,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 5 228
B: newSum, newDiffSum 14 664
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:14 664 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,9]
F: recursive call construct - arguments: (A,14,664,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 5 228
B: newSum, newDiffSum 15 713
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:15 713 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,10]
F: recursive call construct - arguments: (A,15,713,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 5 228
B: newSum, newDiffSum 16 762
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:16 762 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,11]
F: recursive call construct - arguments: (A,16,762,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 5 228
B: newSum, newDiffSum 17 811
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:17 811 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,12]
F: recursive call construct - arguments: (A,17,811,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 5 228
B: newSum, newDiffSum 18 860
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:18 860 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,13]
F: recursive call construct - arguments: (A,18,860,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 5 228
B: newSum, newDiffSum 19 909
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:19 909 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,14]
F: recursive call construct - arguments: (A,19,909,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 5 228
B: newSum, newDiffSum 20 958
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 2 to 20 current i = 15 and arguments:20 958 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,15]
F: recursive call construct - arguments: (A,20,958,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 5 228
B: newSum, newDiffSum 21 1007
C: i, n, p i=16 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1007 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 3 135
B: newSum, newDiffSum 9 417
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:6 276 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,15]
F: recursive call construct - arguments: (A,6,276,49)
w[p, sum, diffsum] is true - w[49,6,276] - return -1
n-p=? 2
iterate on i =4
A: review sum, diffsum 3 135
B: newSum, newDiffSum 11 513
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:7 324 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4,15]
F: recursive call construct - arguments: (A,7,324,49)
w[p, sum, diffsum] is true - w[49,7,324] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 3 135
B: newSum, newDiffSum 13 609
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:8 372 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,5,15]
F: recursive call construct - arguments: (A,8,372,49)
w[p, sum, diffsum] is true - w[49,8,372] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 3 135
B: newSum, newDiffSum 15 705
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:9 420 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,6,15]
F: recursive call construct - arguments: (A,9,420,49)
w[p, sum, diffsum] is true - w[49,9,420] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 3 135
B: newSum, newDiffSum 17 801
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:10 468 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,7,15]
F: recursive call construct - arguments: (A,10,468,49)
w[p, sum, diffsum] is true - w[49,10,468] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 3 135
B: newSum, newDiffSum 19 897
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:11 516 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,8,15]
F: recursive call construct - arguments: (A,11,516,49)
w[p, sum, diffsum] is true - w[49,11,516] - return -1
n-p=? 2
iterate on i =9
A: review sum, diffsum 3 135
B: newSum, newDiffSum 21 993
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 3
iterate on i =2
A: review sum, diffsum 2 90
B: newSum, newDiffSum 8 366
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:4 182 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,8,15]
F: recursive call construct - arguments: (A,4,182,48)
w[p, sum, diffsum] is not true w[48,4,182]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 4 182
B: newSum, newDiffSum 8 366
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 274 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,15]
F: recursive call construct - arguments: (A,6,274,49)
w[p, sum, diffsum] is not true w[49,6,274]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 6 274
B: newSum, newDiffSum 8 366
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 366 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2]
F: recursive call construct - arguments: (A,8,366,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 6 274
B: newSum, newDiffSum 9 415
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 415 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3]
F: recursive call construct - arguments: (A,9,415,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 6 274
B: newSum, newDiffSum 10 464
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 464 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,4]
F: recursive call construct - arguments: (A,10,464,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 274
B: newSum, newDiffSum 11 513
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:11 513 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,5]
F: recursive call construct - arguments: (A,11,513,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 274
B: newSum, newDiffSum 12 562
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:12 562 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,6]
F: recursive call construct - arguments: (A,12,562,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 274
B: newSum, newDiffSum 13 611
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:13 611 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,7]
F: recursive call construct - arguments: (A,13,611,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 274
B: newSum, newDiffSum 14 660
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:14 660 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,8]
F: recursive call construct - arguments: (A,14,660,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 274
B: newSum, newDiffSum 15 709
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:15 709 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,9]
F: recursive call construct - arguments: (A,15,709,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 274
B: newSum, newDiffSum 16 758
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:16 758 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,10]
F: recursive call construct - arguments: (A,16,758,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 274
B: newSum, newDiffSum 17 807
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:17 807 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,11]
F: recursive call construct - arguments: (A,17,807,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 274
B: newSum, newDiffSum 18 856
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:18 856 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,12]
F: recursive call construct - arguments: (A,18,856,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 274
B: newSum, newDiffSum 19 905
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:19 905 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,13]
F: recursive call construct - arguments: (A,19,905,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 274
B: newSum, newDiffSum 20 954
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:20 954 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,14]
F: recursive call construct - arguments: (A,20,954,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 274
B: newSum, newDiffSum 21 1003
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1003 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 4 182
B: newSum, newDiffSum 10 462
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 322 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,14]
F: recursive call construct - arguments: (A,7,322,49)
w[p, sum, diffsum] is not true w[49,7,322]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 7 322
B: newSum, newDiffSum 10 462
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 462 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3]
F: recursive call construct - arguments: (A,10,462,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 322
B: newSum, newDiffSum 11 511
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 511 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4]
F: recursive call construct - arguments: (A,11,511,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 322
B: newSum, newDiffSum 12 560
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 560 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,5]
F: recursive call construct - arguments: (A,12,560,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 322
B: newSum, newDiffSum 13 609
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 609 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,6]
F: recursive call construct - arguments: (A,13,609,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 322
B: newSum, newDiffSum 14 658
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:14 658 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,7]
F: recursive call construct - arguments: (A,14,658,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 322
B: newSum, newDiffSum 15 707
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:15 707 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,8]
F: recursive call construct - arguments: (A,15,707,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 322
B: newSum, newDiffSum 16 756
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:16 756 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,9]
F: recursive call construct - arguments: (A,16,756,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 322
B: newSum, newDiffSum 17 805
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:17 805 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,10]
F: recursive call construct - arguments: (A,17,805,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 322
B: newSum, newDiffSum 18 854
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:18 854 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,11]
F: recursive call construct - arguments: (A,18,854,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 322
B: newSum, newDiffSum 19 903
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:19 903 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,12]
F: recursive call construct - arguments: (A,19,903,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 322
B: newSum, newDiffSum 20 952
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:20 952 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,13]
F: recursive call construct - arguments: (A,20,952,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 322
B: newSum, newDiffSum 21 1001
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 1001 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 4 182
B: newSum, newDiffSum 12 558
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 370 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,4,13]
F: recursive call construct - arguments: (A,8,370,49)
w[p, sum, diffsum] is true - w[49,8,370] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 4 182
B: newSum, newDiffSum 14 654
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:9 418 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,5,13]
F: recursive call construct - arguments: (A,9,418,49)
w[p, sum, diffsum] is true - w[49,9,418] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 4 182
B: newSum, newDiffSum 16 750
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:10 466 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,6,13]
F: recursive call construct - arguments: (A,10,466,49)
w[p, sum, diffsum] is true - w[49,10,466] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 4 182
B: newSum, newDiffSum 18 846
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:11 514 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,7,13]
F: recursive call construct - arguments: (A,11,514,49)
w[p, sum, diffsum] is true - w[49,11,514] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 4 182
B: newSum, newDiffSum 20 942
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:12 562 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,8,13]
F: recursive call construct - arguments: (A,12,562,49)
w[p, sum, diffsum] is true - w[49,12,562] - return -1
n-p=? 2
iterate on i =9
A: review sum, diffsum 4 182
B: newSum, newDiffSum 22 1038
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1038 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 2 90
B: newSum, newDiffSum 11 507
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:5 229 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,8,13]
F: recursive call construct - arguments: (A,5,229,48)
w[p, sum, diffsum] is not true w[48,5,229]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 5 229
B: newSum, newDiffSum 11 507
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 368 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,13]
F: recursive call construct - arguments: (A,8,368,49)
w[p, sum, diffsum] is not true w[49,8,368]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 368
B: newSum, newDiffSum 11 507
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 507 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3]
F: recursive call construct - arguments: (A,11,507,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 368
B: newSum, newDiffSum 12 556
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 556 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4]
F: recursive call construct - arguments: (A,12,556,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 368
B: newSum, newDiffSum 13 605
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 605 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,5]
F: recursive call construct - arguments: (A,13,605,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 368
B: newSum, newDiffSum 14 654
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 654 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,6]
F: recursive call construct - arguments: (A,14,654,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 368
B: newSum, newDiffSum 15 703
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:15 703 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,7]
F: recursive call construct - arguments: (A,15,703,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 368
B: newSum, newDiffSum 16 752
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:16 752 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,8]
F: recursive call construct - arguments: (A,16,752,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 368
B: newSum, newDiffSum 17 801
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:17 801 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,9]
F: recursive call construct - arguments: (A,17,801,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 368
B: newSum, newDiffSum 18 850
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:18 850 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,10]
F: recursive call construct - arguments: (A,18,850,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 368
B: newSum, newDiffSum 19 899
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:19 899 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,11]
F: recursive call construct - arguments: (A,19,899,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 368
B: newSum, newDiffSum 20 948
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:20 948 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,12]
F: recursive call construct - arguments: (A,20,948,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 368
B: newSum, newDiffSum 21 997
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 5 229
B: newSum, newDiffSum 13 603
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:9 416 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,12]
F: recursive call construct - arguments: (A,9,416,49)
w[p, sum, diffsum] is not true w[49,9,416]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 416
B: newSum, newDiffSum 13 603
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 603 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,4]
F: recursive call construct - arguments: (A,13,603,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 416
B: newSum, newDiffSum 14 652
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 652 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,5]
F: recursive call construct - arguments: (A,14,652,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 416
B: newSum, newDiffSum 15 701
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:15 701 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,6]
F: recursive call construct - arguments: (A,15,701,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 416
B: newSum, newDiffSum 16 750
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:16 750 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,7]
F: recursive call construct - arguments: (A,16,750,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 416
B: newSum, newDiffSum 17 799
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:17 799 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,8]
F: recursive call construct - arguments: (A,17,799,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 416
B: newSum, newDiffSum 18 848
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:18 848 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,9]
F: recursive call construct - arguments: (A,18,848,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 416
B: newSum, newDiffSum 19 897
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:19 897 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,10]
F: recursive call construct - arguments: (A,19,897,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 416
B: newSum, newDiffSum 20 946
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:20 946 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,11]
F: recursive call construct - arguments: (A,20,946,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 416
B: newSum, newDiffSum 21 995
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 995 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 5 229
B: newSum, newDiffSum 15 699
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:10 464 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,5,11]
F: recursive call construct - arguments: (A,10,464,49)
w[p, sum, diffsum] is true - w[49,10,464] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 5 229
B: newSum, newDiffSum 17 795
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:11 512 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,6,11]
F: recursive call construct - arguments: (A,11,512,49)
w[p, sum, diffsum] is true - w[49,11,512] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 5 229
B: newSum, newDiffSum 19 891
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:12 560 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,7,11]
F: recursive call construct - arguments: (A,12,560,49)
w[p, sum, diffsum] is true - w[49,12,560] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 5 229
B: newSum, newDiffSum 21 987
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 2 90
B: newSum, newDiffSum 14 648
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:6 276 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,7,11]
F: recursive call construct - arguments: (A,6,276,48)
w[p, sum, diffsum] is true - w[48,6,276] - return -1
n-p=? 3
iterate on i =5
A: review sum, diffsum 2 90
B: newSum, newDiffSum 17 789
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:7 323 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,5,7,11]
F: recursive call construct - arguments: (A,7,323,48)
w[p, sum, diffsum] is true - w[48,7,323] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 2 90
B: newSum, newDiffSum 20 930
C: i, n, p i=6 n=50 p=47
D-set A[p]=i, A[p]=6 where p=47 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:8 370 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,6,7,11]
F: recursive call construct - arguments: (A,8,370,48)
w[p, sum, diffsum] is true - w[48,8,370] - return -1
n-p=? 3
iterate on i =7
A: review sum, diffsum 2 90
B: newSum, newDiffSum 23 1071
C: i, n, p i=7 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1071 exit for loop.
return 0
n-p=? 4
iterate on i =2
A: review sum, diffsum 1 45
B: newSum, newDiffSum 9 409
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:3 136 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,6,7,11]
F: recursive call construct - arguments: (A,3,136,47)
w[p, sum, diffsum] is not true w[47,3,136]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 3 136
B: newSum, newDiffSum 9 409
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:5 227 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,7,11]
F: recursive call construct - arguments: (A,5,227,48)
w[p, sum, diffsum] is not true w[48,5,227]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 5 227
B: newSum, newDiffSum 9 409
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:7 318 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,11]
F: recursive call construct - arguments: (A,7,318,49)
w[p, sum, diffsum] is not true w[49,7,318]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 7 318
B: newSum, newDiffSum 9 409
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:9 409 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2]
F: recursive call construct - arguments: (A,9,409,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 7 318
B: newSum, newDiffSum 10 458
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:10 458 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3]
F: recursive call construct - arguments: (A,10,458,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 318
B: newSum, newDiffSum 11 507
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:11 507 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,4]
F: recursive call construct - arguments: (A,11,507,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 318
B: newSum, newDiffSum 12 556
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:12 556 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,5]
F: recursive call construct - arguments: (A,12,556,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 318
B: newSum, newDiffSum 13 605
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:13 605 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,6]
F: recursive call construct - arguments: (A,13,605,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 318
B: newSum, newDiffSum 14 654
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:14 654 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,7]
F: recursive call construct - arguments: (A,14,654,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 318
B: newSum, newDiffSum 15 703
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:15 703 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,8]
F: recursive call construct - arguments: (A,15,703,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 318
B: newSum, newDiffSum 16 752
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:16 752 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,9]
F: recursive call construct - arguments: (A,16,752,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 318
B: newSum, newDiffSum 17 801
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:17 801 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,10]
F: recursive call construct - arguments: (A,17,801,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 318
B: newSum, newDiffSum 18 850
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:18 850 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,11]
F: recursive call construct - arguments: (A,18,850,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 318
B: newSum, newDiffSum 19 899
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:19 899 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,12]
F: recursive call construct - arguments: (A,19,899,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 318
B: newSum, newDiffSum 20 948
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:20 948 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,13]
F: recursive call construct - arguments: (A,20,948,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 318
B: newSum, newDiffSum 21 997
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 5 227
B: newSum, newDiffSum 11 505
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:8 366 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,13]
F: recursive call construct - arguments: (A,8,366,49)
w[p, sum, diffsum] is not true w[49,8,366]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 366
B: newSum, newDiffSum 11 505
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 505 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3]
F: recursive call construct - arguments: (A,11,505,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 366
B: newSum, newDiffSum 12 554
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 554 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4]
F: recursive call construct - arguments: (A,12,554,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 366
B: newSum, newDiffSum 13 603
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 603 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,5]
F: recursive call construct - arguments: (A,13,603,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 366
B: newSum, newDiffSum 14 652
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 652 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,6]
F: recursive call construct - arguments: (A,14,652,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 366
B: newSum, newDiffSum 15 701
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:15 701 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,7]
F: recursive call construct - arguments: (A,15,701,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 366
B: newSum, newDiffSum 16 750
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:16 750 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,8]
F: recursive call construct - arguments: (A,16,750,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 366
B: newSum, newDiffSum 17 799
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:17 799 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,9]
F: recursive call construct - arguments: (A,17,799,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 366
B: newSum, newDiffSum 18 848
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:18 848 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,10]
F: recursive call construct - arguments: (A,18,848,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 366
B: newSum, newDiffSum 19 897
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:19 897 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,11]
F: recursive call construct - arguments: (A,19,897,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 366
B: newSum, newDiffSum 20 946
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:20 946 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,12]
F: recursive call construct - arguments: (A,20,946,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 366
B: newSum, newDiffSum 21 995
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 995 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 5 227
B: newSum, newDiffSum 13 601
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:9 414 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,4,12]
F: recursive call construct - arguments: (A,9,414,49)
w[p, sum, diffsum] is true - w[49,9,414] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 5 227
B: newSum, newDiffSum 15 697
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:10 462 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,5,12]
F: recursive call construct - arguments: (A,10,462,49)
w[p, sum, diffsum] is true - w[49,10,462] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 5 227
B: newSum, newDiffSum 17 793
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:11 510 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,6,12]
F: recursive call construct - arguments: (A,11,510,49)
w[p, sum, diffsum] is true - w[49,11,510] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 5 227
B: newSum, newDiffSum 19 889
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:12 558 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,7,12]
F: recursive call construct - arguments: (A,12,558,49)
w[p, sum, diffsum] is true - w[49,12,558] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 5 227
B: newSum, newDiffSum 21 985
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 3 136
B: newSum, newDiffSum 12 550
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:6 274 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,7,12]
F: recursive call construct - arguments: (A,6,274,48)
w[p, sum, diffsum] is not true w[48,6,274]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 6 274
B: newSum, newDiffSum 12 550
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 412 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,12]
F: recursive call construct - arguments: (A,9,412,49)
w[p, sum, diffsum] is not true w[49,9,412]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 9 412
B: newSum, newDiffSum 12 550
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 550 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3]
F: recursive call construct - arguments: (A,12,550,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 412
B: newSum, newDiffSum 13 599
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 599 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4]
F: recursive call construct - arguments: (A,13,599,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 412
B: newSum, newDiffSum 14 648
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 648 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,5]
F: recursive call construct - arguments: (A,14,648,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 412
B: newSum, newDiffSum 15 697
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:15 697 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,6]
F: recursive call construct - arguments: (A,15,697,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 412
B: newSum, newDiffSum 16 746
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:16 746 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,7]
F: recursive call construct - arguments: (A,16,746,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 412
B: newSum, newDiffSum 17 795
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:17 795 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,8]
F: recursive call construct - arguments: (A,17,795,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 412
B: newSum, newDiffSum 18 844
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:18 844 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,9]
F: recursive call construct - arguments: (A,18,844,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 412
B: newSum, newDiffSum 19 893
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:19 893 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,10]
F: recursive call construct - arguments: (A,19,893,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 412
B: newSum, newDiffSum 20 942
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:20 942 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,11]
F: recursive call construct - arguments: (A,20,942,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 412
B: newSum, newDiffSum 21 991
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 991 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 6 274
B: newSum, newDiffSum 14 646
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:10 460 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,11]
F: recursive call construct - arguments: (A,10,460,49)
w[p, sum, diffsum] is not true w[49,10,460]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 460
B: newSum, newDiffSum 14 646
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:14 646 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4]
F: recursive call construct - arguments: (A,14,646,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 460
B: newSum, newDiffSum 15 695
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:15 695 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5]
F: recursive call construct - arguments: (A,15,695,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 460
B: newSum, newDiffSum 16 744
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:16 744 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,6]
F: recursive call construct - arguments: (A,16,744,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 460
B: newSum, newDiffSum 17 793
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:17 793 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,7]
F: recursive call construct - arguments: (A,17,793,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 460
B: newSum, newDiffSum 18 842
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:18 842 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,8]
F: recursive call construct - arguments: (A,18,842,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 460
B: newSum, newDiffSum 19 891
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:19 891 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,9]
F: recursive call construct - arguments: (A,19,891,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 460
B: newSum, newDiffSum 20 940
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:20 940 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,10]
F: recursive call construct - arguments: (A,20,940,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 460
B: newSum, newDiffSum 21 989
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 989 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 6 274
B: newSum, newDiffSum 16 742
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:11 508 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,5,10]
F: recursive call construct - arguments: (A,11,508,49)
w[p, sum, diffsum] is true - w[49,11,508] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 274
B: newSum, newDiffSum 18 838
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:12 556 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,6,10]
F: recursive call construct - arguments: (A,12,556,49)
w[p, sum, diffsum] is true - w[49,12,556] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 274
B: newSum, newDiffSum 20 934
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:13 604 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,7,10]
F: recursive call construct - arguments: (A,13,604,49)
w[p, sum, diffsum] is true - w[49,13,604] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 274
B: newSum, newDiffSum 22 1030
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1030 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 3 136
B: newSum, newDiffSum 15 691
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:7 321 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,7,10]
F: recursive call construct - arguments: (A,7,321,48)
w[p, sum, diffsum] is not true w[48,7,321]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 321
B: newSum, newDiffSum 15 691
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:11 506 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,10]
F: recursive call construct - arguments: (A,11,506,49)
w[p, sum, diffsum] is not true w[49,11,506]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 506
B: newSum, newDiffSum 15 691
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 691 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,4]
F: recursive call construct - arguments: (A,15,691,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 506
B: newSum, newDiffSum 16 740
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:16 740 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,5]
F: recursive call construct - arguments: (A,16,740,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 506
B: newSum, newDiffSum 17 789
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:17 789 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,6]
F: recursive call construct - arguments: (A,17,789,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 506
B: newSum, newDiffSum 18 838
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:18 838 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,7]
F: recursive call construct - arguments: (A,18,838,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 506
B: newSum, newDiffSum 19 887
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:19 887 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,8]
F: recursive call construct - arguments: (A,19,887,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 506
B: newSum, newDiffSum 20 936
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:20 936 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,9]
F: recursive call construct - arguments: (A,20,936,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 506
B: newSum, newDiffSum 21 985
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 321
B: newSum, newDiffSum 17 787
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:12 554 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5,9]
F: recursive call construct - arguments: (A,12,554,49)
w[p, sum, diffsum] is not true w[49,12,554]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 554
B: newSum, newDiffSum 17 787
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:17 787 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5,5]
F: recursive call construct - arguments: (A,17,787,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 554
B: newSum, newDiffSum 18 836
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:18 836 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5,6]
F: recursive call construct - arguments: (A,18,836,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 554
B: newSum, newDiffSum 19 885
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:19 885 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5,7]
F: recursive call construct - arguments: (A,19,885,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 554
B: newSum, newDiffSum 20 934
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:20 934 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5,8]
F: recursive call construct - arguments: (A,20,934,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 554
B: newSum, newDiffSum 21 983
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 983 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 321
B: newSum, newDiffSum 19 883
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:13 602 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,6,8]
F: recursive call construct - arguments: (A,13,602,49)
w[p, sum, diffsum] is true - w[49,13,602] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 321
B: newSum, newDiffSum 21 979
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 979 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 3 136
B: newSum, newDiffSum 18 832
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:8 368 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,5,6,8]
F: recursive call construct - arguments: (A,8,368,48)
w[p, sum, diffsum] is true - w[48,8,368] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 3 136
B: newSum, newDiffSum 21 973
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 1 45
B: newSum, newDiffSum 13 593
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:4 182 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,6,8]
F: recursive call construct - arguments: (A,4,182,47)
w[p, sum, diffsum] is not true w[47,4,182]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 4 182
B: newSum, newDiffSum 13 593
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:7 319 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,6,8]
F: recursive call construct - arguments: (A,7,319,48)
w[p, sum, diffsum] is not true w[48,7,319]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 7 319
B: newSum, newDiffSum 13 593
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 456 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,8]
F: recursive call construct - arguments: (A,10,456,49)
w[p, sum, diffsum] is not true w[49,10,456]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 456
B: newSum, newDiffSum 13 593
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 593 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3]
F: recursive call construct - arguments: (A,13,593,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 456
B: newSum, newDiffSum 14 642
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 642 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,4]
F: recursive call construct - arguments: (A,14,642,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 456
B: newSum, newDiffSum 15 691
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 691 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,5]
F: recursive call construct - arguments: (A,15,691,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 456
B: newSum, newDiffSum 16 740
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:16 740 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,6]
F: recursive call construct - arguments: (A,16,740,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 456
B: newSum, newDiffSum 17 789
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:17 789 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,7]
F: recursive call construct - arguments: (A,17,789,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 456
B: newSum, newDiffSum 18 838
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:18 838 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,8]
F: recursive call construct - arguments: (A,18,838,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 456
B: newSum, newDiffSum 19 887
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:19 887 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,9]
F: recursive call construct - arguments: (A,19,887,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 456
B: newSum, newDiffSum 20 936
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:20 936 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,10]
F: recursive call construct - arguments: (A,20,936,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 456
B: newSum, newDiffSum 21 985
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 319
B: newSum, newDiffSum 15 689
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 504 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,10]
F: recursive call construct - arguments: (A,11,504,49)
w[p, sum, diffsum] is not true w[49,11,504]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 504
B: newSum, newDiffSum 15 689
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 689 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,4]
F: recursive call construct - arguments: (A,15,689,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 504
B: newSum, newDiffSum 16 738
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:16 738 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,5]
F: recursive call construct - arguments: (A,16,738,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 504
B: newSum, newDiffSum 17 787
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:17 787 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,6]
F: recursive call construct - arguments: (A,17,787,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 504
B: newSum, newDiffSum 18 836
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:18 836 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,7]
F: recursive call construct - arguments: (A,18,836,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 504
B: newSum, newDiffSum 19 885
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:19 885 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,8]
F: recursive call construct - arguments: (A,19,885,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 504
B: newSum, newDiffSum 20 934
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:20 934 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,9]
F: recursive call construct - arguments: (A,20,934,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 504
B: newSum, newDiffSum 21 983
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 983 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 319
B: newSum, newDiffSum 17 785
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 552 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,5,9]
F: recursive call construct - arguments: (A,12,552,49)
w[p, sum, diffsum] is true - w[49,12,552] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 319
B: newSum, newDiffSum 19 881
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 600 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,6,9]
F: recursive call construct - arguments: (A,13,600,49)
w[p, sum, diffsum] is true - w[49,13,600] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 319
B: newSum, newDiffSum 21 977
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 977 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 4 182
B: newSum, newDiffSum 16 734
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:8 366 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,6,9]
F: recursive call construct - arguments: (A,8,366,48)
w[p, sum, diffsum] is not true w[48,8,366]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 366
B: newSum, newDiffSum 16 734
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 550 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,9]
F: recursive call construct - arguments: (A,12,550,49)
w[p, sum, diffsum] is not true w[49,12,550]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 550
B: newSum, newDiffSum 16 734
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 734 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,4]
F: recursive call construct - arguments: (A,16,734,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 550
B: newSum, newDiffSum 17 783
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:17 783 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,5]
F: recursive call construct - arguments: (A,17,783,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 550
B: newSum, newDiffSum 18 832
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:18 832 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,6]
F: recursive call construct - arguments: (A,18,832,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 550
B: newSum, newDiffSum 19 881
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:19 881 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,7]
F: recursive call construct - arguments: (A,19,881,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 550
B: newSum, newDiffSum 20 930
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:20 930 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,8]
F: recursive call construct - arguments: (A,20,930,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 550
B: newSum, newDiffSum 21 979
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 979 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 366
B: newSum, newDiffSum 18 830
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 598 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,8]
F: recursive call construct - arguments: (A,13,598,49)
w[p, sum, diffsum] is not true w[49,13,598]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 598
B: newSum, newDiffSum 18 830
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:18 830 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,5]
F: recursive call construct - arguments: (A,18,830,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 598
B: newSum, newDiffSum 19 879
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:19 879 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,6]
F: recursive call construct - arguments: (A,19,879,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 598
B: newSum, newDiffSum 20 928
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:20 928 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,7]
F: recursive call construct - arguments: (A,20,928,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 598
B: newSum, newDiffSum 21 977
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 977 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 366
B: newSum, newDiffSum 20 926
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 646 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,6,7]
F: recursive call construct - arguments: (A,14,646,49)
w[p, sum, diffsum] is true - w[49,14,646] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 366
B: newSum, newDiffSum 22 1022
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1022 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 4 182
B: newSum, newDiffSum 19 875
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:9 413 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,6,7]
F: recursive call construct - arguments: (A,9,413,48)
w[p, sum, diffsum] is not true w[48,9,413]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 413
B: newSum, newDiffSum 19 875
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:14 644 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,5,7]
F: recursive call construct - arguments: (A,14,644,49)
w[p, sum, diffsum] is not true w[49,14,644]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 644
B: newSum, newDiffSum 19 875
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:19 875 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,5,5]
F: recursive call construct - arguments: (A,19,875,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 644
B: newSum, newDiffSum 20 924
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:20 924 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,5,5,6]
F: recursive call construct - arguments: (A,20,924,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 644
B: newSum, newDiffSum 21 973
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 413
B: newSum, newDiffSum 21 971
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 971 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 4 182
B: newSum, newDiffSum 22 1016
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 1016 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 1 45
B: newSum, newDiffSum 17 777
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:5 228 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,5,6]
F: recursive call construct - arguments: (A,5,228,47)
w[p, sum, diffsum] is not true w[47,5,228]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 5 228
B: newSum, newDiffSum 17 777
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:9 411 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,5,6]
F: recursive call construct - arguments: (A,9,411,48)
w[p, sum, diffsum] is not true w[48,9,411]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 411
B: newSum, newDiffSum 17 777
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 594 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,6]
F: recursive call construct - arguments: (A,13,594,49)
w[p, sum, diffsum] is not true w[49,13,594]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 594
B: newSum, newDiffSum 17 777
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:17 777 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,4]
F: recursive call construct - arguments: (A,17,777,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 594
B: newSum, newDiffSum 18 826
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:18 826 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,5]
F: recursive call construct - arguments: (A,18,826,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 594
B: newSum, newDiffSum 19 875
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:19 875 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,6]
F: recursive call construct - arguments: (A,19,875,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 594
B: newSum, newDiffSum 20 924
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:20 924 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,7]
F: recursive call construct - arguments: (A,20,924,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 594
B: newSum, newDiffSum 21 973
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 411
B: newSum, newDiffSum 19 873
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 642 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,5,7]
F: recursive call construct - arguments: (A,14,642,49)
w[p, sum, diffsum] is not true w[49,14,642]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 642
B: newSum, newDiffSum 19 873
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:19 873 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,5,5]
F: recursive call construct - arguments: (A,19,873,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 642
B: newSum, newDiffSum 20 922
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:20 922 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,5,6]
F: recursive call construct - arguments: (A,20,922,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 642
B: newSum, newDiffSum 21 971
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 971 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 411
B: newSum, newDiffSum 21 969
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 5 228
B: newSum, newDiffSum 20 918
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:10 458 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,5,6]
F: recursive call construct - arguments: (A,10,458,48)
w[p, sum, diffsum] is not true w[48,10,458]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 458
B: newSum, newDiffSum 20 918
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 688 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,5,6]
F: recursive call construct - arguments: (A,15,688,49)
w[p, sum, diffsum] is not true w[49,15,688]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 688
B: newSum, newDiffSum 20 918
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:20 918 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,5,5,5]
F: recursive call construct - arguments: (A,20,918,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 688
B: newSum, newDiffSum 21 967
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 458
B: newSum, newDiffSum 22 1014
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1014 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 5 228
B: newSum, newDiffSum 23 1059
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1059 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 1 45
B: newSum, newDiffSum 21 961
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 21 961 exit for loop.
return 0
n-p=? 5
iterate on i =2
A: review sum, diffsum 0 0
B: newSum, newDiffSum 10 450
C: i, n, p i=2 n=50 p=45
D-set A[p]=i, A[p]=2 where p=45 and i=2
D-Normal: loop start to end: From 0 to 20 current i = 2 and arguments:2 90 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,5,5]
F: recursive call construct - arguments: (A,2,90,46)
w[p, sum, diffsum] is not true w[46,2,90]
i=A[p-1], p=46, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 4
iterate on i =2
A: review sum, diffsum 2 90
B: newSum, newDiffSum 10 450
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:4 180 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,5,5,5]
F: recursive call construct - arguments: (A,4,180,47)
w[p, sum, diffsum] is not true w[47,4,180]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 4 180
B: newSum, newDiffSum 10 450
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 270 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,5,5]
F: recursive call construct - arguments: (A,6,270,48)
w[p, sum, diffsum] is not true w[48,6,270]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 6 270
B: newSum, newDiffSum 10 450
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 360 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,5]
F: recursive call construct - arguments: (A,8,360,49)
w[p, sum, diffsum] is not true w[49,8,360]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 8 360
B: newSum, newDiffSum 10 450
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:10 450 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2]
F: recursive call construct - arguments: (A,10,450,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 360
B: newSum, newDiffSum 11 499
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:11 499 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3]
F: recursive call construct - arguments: (A,11,499,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 360
B: newSum, newDiffSum 12 548
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:12 548 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4]
F: recursive call construct - arguments: (A,12,548,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 360
B: newSum, newDiffSum 13 597
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:13 597 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,5]
F: recursive call construct - arguments: (A,13,597,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 360
B: newSum, newDiffSum 14 646
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:14 646 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,6]
F: recursive call construct - arguments: (A,14,646,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 360
B: newSum, newDiffSum 15 695
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:15 695 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,7]
F: recursive call construct - arguments: (A,15,695,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 360
B: newSum, newDiffSum 16 744
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:16 744 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,8]
F: recursive call construct - arguments: (A,16,744,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 360
B: newSum, newDiffSum 17 793
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:17 793 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,9]
F: recursive call construct - arguments: (A,17,793,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 360
B: newSum, newDiffSum 18 842
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:18 842 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,10]
F: recursive call construct - arguments: (A,18,842,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 360
B: newSum, newDiffSum 19 891
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:19 891 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,11]
F: recursive call construct - arguments: (A,19,891,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 360
B: newSum, newDiffSum 20 940
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:20 940 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,12]
F: recursive call construct - arguments: (A,20,940,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 360
B: newSum, newDiffSum 21 989
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 989 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 6 270
B: newSum, newDiffSum 12 546
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 408 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,12]
F: recursive call construct - arguments: (A,9,408,49)
w[p, sum, diffsum] is not true w[49,9,408]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 9 408
B: newSum, newDiffSum 12 546
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 546 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3]
F: recursive call construct - arguments: (A,12,546,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 408
B: newSum, newDiffSum 13 595
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 595 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,4]
F: recursive call construct - arguments: (A,13,595,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 408
B: newSum, newDiffSum 14 644
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 644 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,5]
F: recursive call construct - arguments: (A,14,644,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 408
B: newSum, newDiffSum 15 693
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:15 693 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,6]
F: recursive call construct - arguments: (A,15,693,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 408
B: newSum, newDiffSum 16 742
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:16 742 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,7]
F: recursive call construct - arguments: (A,16,742,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 408
B: newSum, newDiffSum 17 791
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:17 791 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,8]
F: recursive call construct - arguments: (A,17,791,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 408
B: newSum, newDiffSum 18 840
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:18 840 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,9]
F: recursive call construct - arguments: (A,18,840,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 408
B: newSum, newDiffSum 19 889
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:19 889 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,10]
F: recursive call construct - arguments: (A,19,889,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 408
B: newSum, newDiffSum 20 938
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:20 938 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,11]
F: recursive call construct - arguments: (A,20,938,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 408
B: newSum, newDiffSum 21 987
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 6 270
B: newSum, newDiffSum 14 642
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 456 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,4,11]
F: recursive call construct - arguments: (A,10,456,49)
w[p, sum, diffsum] is true - w[49,10,456] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 6 270
B: newSum, newDiffSum 16 738
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:11 504 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,5,11]
F: recursive call construct - arguments: (A,11,504,49)
w[p, sum, diffsum] is true - w[49,11,504] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 270
B: newSum, newDiffSum 18 834
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:12 552 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,6,11]
F: recursive call construct - arguments: (A,12,552,49)
w[p, sum, diffsum] is true - w[49,12,552] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 270
B: newSum, newDiffSum 20 930
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:13 600 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,7,11]
F: recursive call construct - arguments: (A,13,600,49)
w[p, sum, diffsum] is true - w[49,13,600] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 270
B: newSum, newDiffSum 22 1026
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1026 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 4 180
B: newSum, newDiffSum 13 591
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 317 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,7,11]
F: recursive call construct - arguments: (A,7,317,48)
w[p, sum, diffsum] is not true w[48,7,317]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 7 317
B: newSum, newDiffSum 13 591
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 454 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,11]
F: recursive call construct - arguments: (A,10,454,49)
w[p, sum, diffsum] is not true w[49,10,454]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 454
B: newSum, newDiffSum 13 591
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 591 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3]
F: recursive call construct - arguments: (A,13,591,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 454
B: newSum, newDiffSum 14 640
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 640 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,4]
F: recursive call construct - arguments: (A,14,640,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 454
B: newSum, newDiffSum 15 689
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 689 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,5]
F: recursive call construct - arguments: (A,15,689,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 454
B: newSum, newDiffSum 16 738
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:16 738 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,6]
F: recursive call construct - arguments: (A,16,738,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 454
B: newSum, newDiffSum 17 787
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:17 787 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,7]
F: recursive call construct - arguments: (A,17,787,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 454
B: newSum, newDiffSum 18 836
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:18 836 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,8]
F: recursive call construct - arguments: (A,18,836,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 454
B: newSum, newDiffSum 19 885
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:19 885 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,9]
F: recursive call construct - arguments: (A,19,885,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 454
B: newSum, newDiffSum 20 934
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:20 934 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,10]
F: recursive call construct - arguments: (A,20,934,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 454
B: newSum, newDiffSum 21 983
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 983 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 317
B: newSum, newDiffSum 15 687
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 502 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,10]
F: recursive call construct - arguments: (A,11,502,49)
w[p, sum, diffsum] is not true w[49,11,502]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 502
B: newSum, newDiffSum 15 687
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 687 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,4]
F: recursive call construct - arguments: (A,15,687,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 502
B: newSum, newDiffSum 16 736
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:16 736 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,5]
F: recursive call construct - arguments: (A,16,736,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 502
B: newSum, newDiffSum 17 785
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:17 785 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,6]
F: recursive call construct - arguments: (A,17,785,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 502
B: newSum, newDiffSum 18 834
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:18 834 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,7]
F: recursive call construct - arguments: (A,18,834,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 502
B: newSum, newDiffSum 19 883
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:19 883 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,8]
F: recursive call construct - arguments: (A,19,883,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 502
B: newSum, newDiffSum 20 932
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:20 932 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,9]
F: recursive call construct - arguments: (A,20,932,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 502
B: newSum, newDiffSum 21 981
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 317
B: newSum, newDiffSum 17 783
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 550 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,5,9]
F: recursive call construct - arguments: (A,12,550,49)
w[p, sum, diffsum] is true - w[49,12,550] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 317
B: newSum, newDiffSum 19 879
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 598 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,6,9]
F: recursive call construct - arguments: (A,13,598,49)
w[p, sum, diffsum] is true - w[49,13,598] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 317
B: newSum, newDiffSum 21 975
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 4 180
B: newSum, newDiffSum 16 732
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 364 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,6,9]
F: recursive call construct - arguments: (A,8,364,48)
w[p, sum, diffsum] is not true w[48,8,364]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 364
B: newSum, newDiffSum 16 732
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 548 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,9]
F: recursive call construct - arguments: (A,12,548,49)
w[p, sum, diffsum] is not true w[49,12,548]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 548
B: newSum, newDiffSum 16 732
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 732 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,4]
F: recursive call construct - arguments: (A,16,732,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 548
B: newSum, newDiffSum 17 781
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:17 781 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,5]
F: recursive call construct - arguments: (A,17,781,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 548
B: newSum, newDiffSum 18 830
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:18 830 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,6]
F: recursive call construct - arguments: (A,18,830,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 548
B: newSum, newDiffSum 19 879
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:19 879 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,7]
F: recursive call construct - arguments: (A,19,879,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 548
B: newSum, newDiffSum 20 928
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:20 928 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,8]
F: recursive call construct - arguments: (A,20,928,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 548
B: newSum, newDiffSum 21 977
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 977 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 364
B: newSum, newDiffSum 18 828
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 596 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,5,8]
F: recursive call construct - arguments: (A,13,596,49)
w[p, sum, diffsum] is not true w[49,13,596]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 596
B: newSum, newDiffSum 18 828
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:18 828 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,5,5]
F: recursive call construct - arguments: (A,18,828,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 596
B: newSum, newDiffSum 19 877
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:19 877 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,5,6]
F: recursive call construct - arguments: (A,19,877,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 596
B: newSum, newDiffSum 20 926
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:20 926 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,5,7]
F: recursive call construct - arguments: (A,20,926,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 596
B: newSum, newDiffSum 21 975
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 364
B: newSum, newDiffSum 20 924
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 644 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,6,7]
F: recursive call construct - arguments: (A,14,644,49)
w[p, sum, diffsum] is true - w[49,14,644] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 364
B: newSum, newDiffSum 22 1020
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1020 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 4 180
B: newSum, newDiffSum 19 873
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:9 411 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,5,6,7]
F: recursive call construct - arguments: (A,9,411,48)
w[p, sum, diffsum] is true - w[48,9,411] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 4 180
B: newSum, newDiffSum 22 1014
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 1014 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 2 90
B: newSum, newDiffSum 14 634
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:5 226 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,6,7]
F: recursive call construct - arguments: (A,5,226,47)
w[p, sum, diffsum] is not true w[47,5,226]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 5 226
B: newSum, newDiffSum 14 634
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 362 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,6,7]
F: recursive call construct - arguments: (A,8,362,48)
w[p, sum, diffsum] is not true w[48,8,362]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 8 362
B: newSum, newDiffSum 14 634
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 498 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,7]
F: recursive call construct - arguments: (A,11,498,49)
w[p, sum, diffsum] is not true w[49,11,498]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 11 498
B: newSum, newDiffSum 14 634
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 634 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3]
F: recursive call construct - arguments: (A,14,634,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 498
B: newSum, newDiffSum 15 683
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 683 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,4]
F: recursive call construct - arguments: (A,15,683,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 498
B: newSum, newDiffSum 16 732
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:16 732 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,5]
F: recursive call construct - arguments: (A,16,732,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 498
B: newSum, newDiffSum 17 781
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:17 781 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,6]
F: recursive call construct - arguments: (A,17,781,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 498
B: newSum, newDiffSum 18 830
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:18 830 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,7]
F: recursive call construct - arguments: (A,18,830,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 498
B: newSum, newDiffSum 19 879
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:19 879 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,8]
F: recursive call construct - arguments: (A,19,879,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 498
B: newSum, newDiffSum 20 928
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:20 928 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,9]
F: recursive call construct - arguments: (A,20,928,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 498
B: newSum, newDiffSum 21 977
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 977 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 362
B: newSum, newDiffSum 16 730
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 546 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,9]
F: recursive call construct - arguments: (A,12,546,49)
w[p, sum, diffsum] is not true w[49,12,546]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 546
B: newSum, newDiffSum 16 730
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 730 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,4]
F: recursive call construct - arguments: (A,16,730,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 546
B: newSum, newDiffSum 17 779
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:17 779 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,5]
F: recursive call construct - arguments: (A,17,779,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 546
B: newSum, newDiffSum 18 828
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:18 828 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,6]
F: recursive call construct - arguments: (A,18,828,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 546
B: newSum, newDiffSum 19 877
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:19 877 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,7]
F: recursive call construct - arguments: (A,19,877,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 546
B: newSum, newDiffSum 20 926
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:20 926 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,8]
F: recursive call construct - arguments: (A,20,926,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 546
B: newSum, newDiffSum 21 975
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 362
B: newSum, newDiffSum 18 826
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 594 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,5,8]
F: recursive call construct - arguments: (A,13,594,49)
w[p, sum, diffsum] is true - w[49,13,594] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 362
B: newSum, newDiffSum 20 922
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 642 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,6,8]
F: recursive call construct - arguments: (A,14,642,49)
w[p, sum, diffsum] is true - w[49,14,642] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 362
B: newSum, newDiffSum 22 1018
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1018 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 5 226
B: newSum, newDiffSum 17 775
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:9 409 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,6,8]
F: recursive call construct - arguments: (A,9,409,48)
w[p, sum, diffsum] is not true w[48,9,409]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 409
B: newSum, newDiffSum 17 775
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 592 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4,8]
F: recursive call construct - arguments: (A,13,592,49)
w[p, sum, diffsum] is not true w[49,13,592]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 592
B: newSum, newDiffSum 17 775
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:17 775 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4,4]
F: recursive call construct - arguments: (A,17,775,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 592
B: newSum, newDiffSum 18 824
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:18 824 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4,5]
F: recursive call construct - arguments: (A,18,824,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 592
B: newSum, newDiffSum 19 873
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:19 873 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4,6]
F: recursive call construct - arguments: (A,19,873,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 592
B: newSum, newDiffSum 20 922
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:20 922 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4,7]
F: recursive call construct - arguments: (A,20,922,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 592
B: newSum, newDiffSum 21 971
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 971 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 409
B: newSum, newDiffSum 19 871
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 640 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,7]
F: recursive call construct - arguments: (A,14,640,49)
w[p, sum, diffsum] is not true w[49,14,640]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 640
B: newSum, newDiffSum 19 871
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:19 871 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,5]
F: recursive call construct - arguments: (A,19,871,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 640
B: newSum, newDiffSum 20 920
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:20 920 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5,6]
F: recursive call construct - arguments: (A,20,920,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 640
B: newSum, newDiffSum 21 969
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 409
B: newSum, newDiffSum 21 967
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 5 226
B: newSum, newDiffSum 20 916
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:10 456 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,5,6]
F: recursive call construct - arguments: (A,10,456,48)
w[p, sum, diffsum] is not true w[48,10,456]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 456
B: newSum, newDiffSum 20 916
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 686 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,5,6]
F: recursive call construct - arguments: (A,15,686,49)
w[p, sum, diffsum] is not true w[49,15,686]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 686
B: newSum, newDiffSum 20 916
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:20 916 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,5,5,5]
F: recursive call construct - arguments: (A,20,916,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 686
B: newSum, newDiffSum 21 965
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 965 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 456
B: newSum, newDiffSum 22 1012
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1012 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 5 226
B: newSum, newDiffSum 23 1057
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1057 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 2 90
B: newSum, newDiffSum 18 818
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:6 272 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,5,5,5]
F: recursive call construct - arguments: (A,6,272,47)
w[p, sum, diffsum] is not true w[47,6,272]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 6 272
B: newSum, newDiffSum 18 818
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:10 454 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,5,5]
F: recursive call construct - arguments: (A,10,454,48)
w[p, sum, diffsum] is not true w[48,10,454]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 454
B: newSum, newDiffSum 18 818
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:14 636 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,4,5]
F: recursive call construct - arguments: (A,14,636,49)
w[p, sum, diffsum] is not true w[49,14,636]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 636
B: newSum, newDiffSum 18 818
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:18 818 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,4,4]
F: recursive call construct - arguments: (A,18,818,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 636
B: newSum, newDiffSum 19 867
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:19 867 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,4,5]
F: recursive call construct - arguments: (A,19,867,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 636
B: newSum, newDiffSum 20 916
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:20 916 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,4,6]
F: recursive call construct - arguments: (A,20,916,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 636
B: newSum, newDiffSum 21 965
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 965 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 454
B: newSum, newDiffSum 20 914
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:15 684 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,5,6]
F: recursive call construct - arguments: (A,15,684,49)
w[p, sum, diffsum] is not true w[49,15,684]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 684
B: newSum, newDiffSum 20 914
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:20 914 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,4,5,5]
F: recursive call construct - arguments: (A,20,914,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 684
B: newSum, newDiffSum 21 963
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 963 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 454
B: newSum, newDiffSum 22 1010
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1010 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 6 272
B: newSum, newDiffSum 21 959
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 959 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 2 90
B: newSum, newDiffSum 22 1002
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 22 1002 exit for loop.
return 0
n-p=? 5
iterate on i =3
A: review sum, diffsum 0 0
B: newSum, newDiffSum 15 675
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 0 to 20 current i = 3 and arguments:3 135 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,5,5]
F: recursive call construct - arguments: (A,3,135,46)
w[p, sum, diffsum] is not true w[46,3,135]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 3 135
B: newSum, newDiffSum 15 675
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:6 270 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,5,5]
F: recursive call construct - arguments: (A,6,270,47)
w[p, sum, diffsum] is not true w[47,6,270]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 6 270
B: newSum, newDiffSum 15 675
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 405 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,5,5]
F: recursive call construct - arguments: (A,9,405,48)
w[p, sum, diffsum] is not true w[48,9,405]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 9 405
B: newSum, newDiffSum 15 675
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 540 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,5]
F: recursive call construct - arguments: (A,12,540,49)
w[p, sum, diffsum] is not true w[49,12,540]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 12 540
B: newSum, newDiffSum 15 675
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 675 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3]
F: recursive call construct - arguments: (A,15,675,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 540
B: newSum, newDiffSum 16 724
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 724 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,4]
F: recursive call construct - arguments: (A,16,724,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 540
B: newSum, newDiffSum 17 773
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:17 773 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,5]
F: recursive call construct - arguments: (A,17,773,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 540
B: newSum, newDiffSum 18 822
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:18 822 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,6]
F: recursive call construct - arguments: (A,18,822,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 540
B: newSum, newDiffSum 19 871
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:19 871 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,7]
F: recursive call construct - arguments: (A,19,871,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 540
B: newSum, newDiffSum 20 920
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:20 920 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,8]
F: recursive call construct - arguments: (A,20,920,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 540
B: newSum, newDiffSum 21 969
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 405
B: newSum, newDiffSum 17 771
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 588 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,8]
F: recursive call construct - arguments: (A,13,588,49)
w[p, sum, diffsum] is not true w[49,13,588]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 588
B: newSum, newDiffSum 17 771
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:17 771 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,4]
F: recursive call construct - arguments: (A,17,771,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 588
B: newSum, newDiffSum 18 820
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:18 820 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,5]
F: recursive call construct - arguments: (A,18,820,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 588
B: newSum, newDiffSum 19 869
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:19 869 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,6]
F: recursive call construct - arguments: (A,19,869,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 588
B: newSum, newDiffSum 20 918
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:20 918 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,7]
F: recursive call construct - arguments: (A,20,918,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 588
B: newSum, newDiffSum 21 967
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 405
B: newSum, newDiffSum 19 867
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 636 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,5,7]
F: recursive call construct - arguments: (A,14,636,49)
w[p, sum, diffsum] is true - w[49,14,636] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 405
B: newSum, newDiffSum 21 963
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 963 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 6 270
B: newSum, newDiffSum 18 816
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:10 452 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,5,7]
F: recursive call construct - arguments: (A,10,452,48)
w[p, sum, diffsum] is not true w[48,10,452]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 452
B: newSum, newDiffSum 18 816
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:14 634 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,4,7]
F: recursive call construct - arguments: (A,14,634,49)
w[p, sum, diffsum] is not true w[49,14,634]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 634
B: newSum, newDiffSum 18 816
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:18 816 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,4,4]
F: recursive call construct - arguments: (A,18,816,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 634
B: newSum, newDiffSum 19 865
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:19 865 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,4,5]
F: recursive call construct - arguments: (A,19,865,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 634
B: newSum, newDiffSum 20 914
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:20 914 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,4,6]
F: recursive call construct - arguments: (A,20,914,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 634
B: newSum, newDiffSum 21 963
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 963 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 452
B: newSum, newDiffSum 20 912
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:15 682 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,5,6]
F: recursive call construct - arguments: (A,15,682,49)
w[p, sum, diffsum] is not true w[49,15,682]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 682
B: newSum, newDiffSum 20 912
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:20 912 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,4,5,5]
F: recursive call construct - arguments: (A,20,912,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 682
B: newSum, newDiffSum 21 961
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 961 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 452
B: newSum, newDiffSum 22 1008
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1008 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 6 270
B: newSum, newDiffSum 21 957
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 957 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 3 135
B: newSum, newDiffSum 19 859
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:7 316 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,5,5]
F: recursive call construct - arguments: (A,7,316,47)
w[p, sum, diffsum] is not true w[47,7,316]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 7 316
B: newSum, newDiffSum 19 859
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:11 497 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,5,5]
F: recursive call construct - arguments: (A,11,497,48)
w[p, sum, diffsum] is not true w[48,11,497]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 497
B: newSum, newDiffSum 19 859
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 678 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,5]
F: recursive call construct - arguments: (A,15,678,49)
w[p, sum, diffsum] is not true w[49,15,678]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 678
B: newSum, newDiffSum 19 859
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 859 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,4]
F: recursive call construct - arguments: (A,19,859,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 678
B: newSum, newDiffSum 20 908
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 908 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,4,4,4,5]
F: recursive call construct - arguments: (A,20,908,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 678
B: newSum, newDiffSum 21 957
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 957 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 497
B: newSum, newDiffSum 21 955
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 955 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 7 316
B: newSum, newDiffSum 22 1000
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 1000 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 3 135
B: newSum, newDiffSum 23 1043
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 23 1043 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 0 0
B: newSum, newDiffSum 20 900
C: i, n, p i=4 n=50 p=45
D-set A[p]=i, A[p]=4 where p=45 and i=4
D-Normal: loop start to end: From 0 to 20 current i = 4 and arguments:4 180 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,5]
F: recursive call construct - arguments: (A,4,180,46)
w[p, sum, diffsum] is not true w[46,4,180]
i=A[p-1], p=46, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 4
iterate on i =4
A: review sum, diffsum 4 180
B: newSum, newDiffSum 20 900
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:8 360 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,5]
F: recursive call construct - arguments: (A,8,360,47)
w[p, sum, diffsum] is not true w[47,8,360]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 8 360
B: newSum, newDiffSum 20 900
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 540 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,5]
F: recursive call construct - arguments: (A,12,540,48)
w[p, sum, diffsum] is not true w[48,12,540]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 540
B: newSum, newDiffSum 20 900
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 720 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,5]
F: recursive call construct - arguments: (A,16,720,49)
w[p, sum, diffsum] is not true w[49,16,720]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 720
B: newSum, newDiffSum 20 900
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 900 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4]
F: recursive call construct - arguments: (A,20,900,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 720
B: newSum, newDiffSum 21 949
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 949 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 540
B: newSum, newDiffSum 22 996
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 996 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 8 360
B: newSum, newDiffSum 23 1041
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1041 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 4 180
B: newSum, newDiffSum 24 1084
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 24 1084 exit for loop.
return 0
n-p=? 5
iterate on i =5
A: review sum, diffsum 0 0
B: newSum, newDiffSum 25 1125
C: i, n, p i=5 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 25 1125 exit for loop.
return 0
n-p=? 6
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 6 264
C: i, n, p i=1 n=50 p=44
D-set A[p]=i, A[p]=1 where p=44 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 44 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,4,4,4,4]
F: recursive call construct - arguments: (A,1,44,45)
w[p, sum, diffsum] is not true w[45,1,44]
i=A[p-1], p=45, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 5
iterate on i =1
A: review sum, diffsum 1 44
B: newSum, newDiffSum 6 264
C: i, n, p i=1 n=50 p=45
D-set A[p]=i, A[p]=1 where p=45 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:2 88 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,4,4,4]
F: recursive call construct - arguments: (A,2,88,46)
w[p, sum, diffsum] is not true w[46,2,88]
i=A[p-1], p=46, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 4
iterate on i =1
A: review sum, diffsum 2 88
B: newSum, newDiffSum 6 264
C: i, n, p i=1 n=50 p=46
D-set A[p]=i, A[p]=1 where p=46 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:3 132 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4,4,4]
F: recursive call construct - arguments: (A,3,132,47)
w[p, sum, diffsum] is not true w[47,3,132]
i=A[p-1], p=47, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 3
iterate on i =1
A: review sum, diffsum 3 132
B: newSum, newDiffSum 6 264
C: i, n, p i=1 n=50 p=47
D-set A[p]=i, A[p]=1 where p=47 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:4 176 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,4]
F: recursive call construct - arguments: (A,4,176,48)
w[p, sum, diffsum] is not true w[48,4,176]
i=A[p-1], p=48, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 2
iterate on i =1
A: review sum, diffsum 4 176
B: newSum, newDiffSum 6 264
C: i, n, p i=1 n=50 p=48
D-set A[p]=i, A[p]=1 where p=48 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:5 220 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4]
F: recursive call construct - arguments: (A,5,220,49)
w[p, sum, diffsum] is not true w[49,5,220]
i=A[p-1], p=49, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 1
iterate on i =1
A: review sum, diffsum 5 220
B: newSum, newDiffSum 6 264
C: i, n, p i=1 n=50 p=49
D-set A[p]=i, A[p]=1 where p=49 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:6 264 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]
F: recursive call construct - arguments: (A,6,264,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =2
A: review sum, diffsum 5 220
B: newSum, newDiffSum 7 313
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:7 313 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2]
F: recursive call construct - arguments: (A,7,313,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 5 220
B: newSum, newDiffSum 8 362
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:8 362 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3]
F: recursive call construct - arguments: (A,8,362,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 5 220
B: newSum, newDiffSum 9 411
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:9 411 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4]
F: recursive call construct - arguments: (A,9,411,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 5 220
B: newSum, newDiffSum 10 460
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:10 460 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5]
F: recursive call construct - arguments: (A,10,460,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 5 220
B: newSum, newDiffSum 11 509
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:11 509 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,6]
F: recursive call construct - arguments: (A,11,509,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 5 220
B: newSum, newDiffSum 12 558
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:12 558 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,7]
F: recursive call construct - arguments: (A,12,558,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 5 220
B: newSum, newDiffSum 13 607
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:13 607 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,8]
F: recursive call construct - arguments: (A,13,607,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 5 220
B: newSum, newDiffSum 14 656
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:14 656 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,9]
F: recursive call construct - arguments: (A,14,656,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 5 220
B: newSum, newDiffSum 15 705
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 1 to 20 current i = 10 and arguments:15 705 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,10]
F: recursive call construct - arguments: (A,15,705,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 5 220
B: newSum, newDiffSum 16 754
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 1 to 20 current i = 11 and arguments:16 754 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,11]
F: recursive call construct - arguments: (A,16,754,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 5 220
B: newSum, newDiffSum 17 803
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 1 to 20 current i = 12 and arguments:17 803 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,12]
F: recursive call construct - arguments: (A,17,803,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 5 220
B: newSum, newDiffSum 18 852
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 1 to 20 current i = 13 and arguments:18 852 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,13]
F: recursive call construct - arguments: (A,18,852,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 5 220
B: newSum, newDiffSum 19 901
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 1 to 20 current i = 14 and arguments:19 901 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,14]
F: recursive call construct - arguments: (A,19,901,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 5 220
B: newSum, newDiffSum 20 950
C: i, n, p i=15 n=50 p=49
D-set A[p]=i, A[p]=15 where p=49 and i=15
D-Normal: loop start to end: From 1 to 20 current i = 15 and arguments:20 950 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,15]
F: recursive call construct - arguments: (A,20,950,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =16
A: review sum, diffsum 5 220
B: newSum, newDiffSum 21 999
C: i, n, p i=16 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 999 exit for loop.
return 0
n-p=? 2
iterate on i =2
A: review sum, diffsum 4 176
B: newSum, newDiffSum 8 360
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:6 268 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,15]
F: recursive call construct - arguments: (A,6,268,49)
w[p, sum, diffsum] is not true w[49,6,268]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 6 268
B: newSum, newDiffSum 8 360
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 360 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2]
F: recursive call construct - arguments: (A,8,360,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 6 268
B: newSum, newDiffSum 9 409
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 409 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3]
F: recursive call construct - arguments: (A,9,409,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 6 268
B: newSum, newDiffSum 10 458
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 458 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,4]
F: recursive call construct - arguments: (A,10,458,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 268
B: newSum, newDiffSum 11 507
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:11 507 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,5]
F: recursive call construct - arguments: (A,11,507,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 268
B: newSum, newDiffSum 12 556
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:12 556 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,6]
F: recursive call construct - arguments: (A,12,556,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 268
B: newSum, newDiffSum 13 605
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:13 605 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,7]
F: recursive call construct - arguments: (A,13,605,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 268
B: newSum, newDiffSum 14 654
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:14 654 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,8]
F: recursive call construct - arguments: (A,14,654,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 268
B: newSum, newDiffSum 15 703
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:15 703 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,9]
F: recursive call construct - arguments: (A,15,703,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 268
B: newSum, newDiffSum 16 752
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:16 752 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,10]
F: recursive call construct - arguments: (A,16,752,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 268
B: newSum, newDiffSum 17 801
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:17 801 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,11]
F: recursive call construct - arguments: (A,17,801,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 268
B: newSum, newDiffSum 18 850
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:18 850 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,12]
F: recursive call construct - arguments: (A,18,850,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 268
B: newSum, newDiffSum 19 899
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:19 899 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,13]
F: recursive call construct - arguments: (A,19,899,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 268
B: newSum, newDiffSum 20 948
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 2 to 20 current i = 14 and arguments:20 948 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,14]
F: recursive call construct - arguments: (A,20,948,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 268
B: newSum, newDiffSum 21 997
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 997 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 4 176
B: newSum, newDiffSum 10 456
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:7 316 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,14]
F: recursive call construct - arguments: (A,7,316,49)
w[p, sum, diffsum] is not true w[49,7,316]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 7 316
B: newSum, newDiffSum 10 456
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 456 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3]
F: recursive call construct - arguments: (A,10,456,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 316
B: newSum, newDiffSum 11 505
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 505 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,4]
F: recursive call construct - arguments: (A,11,505,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 316
B: newSum, newDiffSum 12 554
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 554 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,5]
F: recursive call construct - arguments: (A,12,554,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 316
B: newSum, newDiffSum 13 603
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 603 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,6]
F: recursive call construct - arguments: (A,13,603,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 316
B: newSum, newDiffSum 14 652
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:14 652 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,7]
F: recursive call construct - arguments: (A,14,652,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 316
B: newSum, newDiffSum 15 701
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:15 701 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,8]
F: recursive call construct - arguments: (A,15,701,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 316
B: newSum, newDiffSum 16 750
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:16 750 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,9]
F: recursive call construct - arguments: (A,16,750,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 316
B: newSum, newDiffSum 17 799
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:17 799 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,10]
F: recursive call construct - arguments: (A,17,799,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 316
B: newSum, newDiffSum 18 848
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:18 848 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,11]
F: recursive call construct - arguments: (A,18,848,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 316
B: newSum, newDiffSum 19 897
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:19 897 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,12]
F: recursive call construct - arguments: (A,19,897,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 316
B: newSum, newDiffSum 20 946
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 3 to 20 current i = 13 and arguments:20 946 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,13]
F: recursive call construct - arguments: (A,20,946,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 316
B: newSum, newDiffSum 21 995
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 995 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 4 176
B: newSum, newDiffSum 12 552
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:8 364 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,13]
F: recursive call construct - arguments: (A,8,364,49)
w[p, sum, diffsum] is not true w[49,8,364]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 364
B: newSum, newDiffSum 12 552
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 552 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,4]
F: recursive call construct - arguments: (A,12,552,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 364
B: newSum, newDiffSum 13 601
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 601 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,5]
F: recursive call construct - arguments: (A,13,601,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 364
B: newSum, newDiffSum 14 650
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 650 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,6]
F: recursive call construct - arguments: (A,14,650,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 364
B: newSum, newDiffSum 15 699
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:15 699 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,7]
F: recursive call construct - arguments: (A,15,699,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 364
B: newSum, newDiffSum 16 748
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:16 748 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,8]
F: recursive call construct - arguments: (A,16,748,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 364
B: newSum, newDiffSum 17 797
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:17 797 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,9]
F: recursive call construct - arguments: (A,17,797,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 364
B: newSum, newDiffSum 18 846
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:18 846 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,10]
F: recursive call construct - arguments: (A,18,846,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 364
B: newSum, newDiffSum 19 895
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:19 895 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,11]
F: recursive call construct - arguments: (A,19,895,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 364
B: newSum, newDiffSum 20 944
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 4 to 20 current i = 12 and arguments:20 944 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,12]
F: recursive call construct - arguments: (A,20,944,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 364
B: newSum, newDiffSum 21 993
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 4 176
B: newSum, newDiffSum 14 648
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:9 412 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,5,12]
F: recursive call construct - arguments: (A,9,412,49)
w[p, sum, diffsum] is true - w[49,9,412] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 4 176
B: newSum, newDiffSum 16 744
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:10 460 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,6,12]
F: recursive call construct - arguments: (A,10,460,49)
w[p, sum, diffsum] is true - w[49,10,460] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 4 176
B: newSum, newDiffSum 18 840
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:11 508 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,7,12]
F: recursive call construct - arguments: (A,11,508,49)
w[p, sum, diffsum] is true - w[49,11,508] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 4 176
B: newSum, newDiffSum 20 936
C: i, n, p i=8 n=50 p=48
D-set A[p]=i, A[p]=8 where p=48 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:12 556 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,8,12]
F: recursive call construct - arguments: (A,12,556,49)
w[p, sum, diffsum] is true - w[49,12,556] - return -1
n-p=? 2
iterate on i =9
A: review sum, diffsum 4 176
B: newSum, newDiffSum 22 1032
C: i, n, p i=9 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1032 exit for loop.
return 0
n-p=? 3
iterate on i =2
A: review sum, diffsum 3 132
B: newSum, newDiffSum 9 405
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:5 223 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,8,12]
F: recursive call construct - arguments: (A,5,223,48)
w[p, sum, diffsum] is not true w[48,5,223]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 5 223
B: newSum, newDiffSum 9 405
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:7 314 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,12]
F: recursive call construct - arguments: (A,7,314,49)
w[p, sum, diffsum] is not true w[49,7,314]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 7 314
B: newSum, newDiffSum 9 405
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:9 405 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2]
F: recursive call construct - arguments: (A,9,405,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 7 314
B: newSum, newDiffSum 10 454
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:10 454 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3]
F: recursive call construct - arguments: (A,10,454,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 314
B: newSum, newDiffSum 11 503
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:11 503 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4]
F: recursive call construct - arguments: (A,11,503,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 314
B: newSum, newDiffSum 12 552
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:12 552 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,5]
F: recursive call construct - arguments: (A,12,552,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 314
B: newSum, newDiffSum 13 601
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:13 601 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,6]
F: recursive call construct - arguments: (A,13,601,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 314
B: newSum, newDiffSum 14 650
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:14 650 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,7]
F: recursive call construct - arguments: (A,14,650,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 314
B: newSum, newDiffSum 15 699
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:15 699 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,8]
F: recursive call construct - arguments: (A,15,699,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 314
B: newSum, newDiffSum 16 748
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:16 748 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,9]
F: recursive call construct - arguments: (A,16,748,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 314
B: newSum, newDiffSum 17 797
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:17 797 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,10]
F: recursive call construct - arguments: (A,17,797,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 314
B: newSum, newDiffSum 18 846
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:18 846 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,11]
F: recursive call construct - arguments: (A,18,846,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 314
B: newSum, newDiffSum 19 895
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:19 895 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,12]
F: recursive call construct - arguments: (A,19,895,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 314
B: newSum, newDiffSum 20 944
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:20 944 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,13]
F: recursive call construct - arguments: (A,20,944,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 314
B: newSum, newDiffSum 21 993
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 993 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 5 223
B: newSum, newDiffSum 11 501
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:8 362 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,13]
F: recursive call construct - arguments: (A,8,362,49)
w[p, sum, diffsum] is not true w[49,8,362]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 362
B: newSum, newDiffSum 11 501
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 501 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3]
F: recursive call construct - arguments: (A,11,501,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 362
B: newSum, newDiffSum 12 550
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 550 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,4]
F: recursive call construct - arguments: (A,12,550,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 362
B: newSum, newDiffSum 13 599
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 599 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,5]
F: recursive call construct - arguments: (A,13,599,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 362
B: newSum, newDiffSum 14 648
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 648 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,6]
F: recursive call construct - arguments: (A,14,648,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 362
B: newSum, newDiffSum 15 697
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:15 697 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,7]
F: recursive call construct - arguments: (A,15,697,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 362
B: newSum, newDiffSum 16 746
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:16 746 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,8]
F: recursive call construct - arguments: (A,16,746,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 362
B: newSum, newDiffSum 17 795
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:17 795 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,9]
F: recursive call construct - arguments: (A,17,795,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 362
B: newSum, newDiffSum 18 844
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:18 844 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,10]
F: recursive call construct - arguments: (A,18,844,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 362
B: newSum, newDiffSum 19 893
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:19 893 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,11]
F: recursive call construct - arguments: (A,19,893,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 362
B: newSum, newDiffSum 20 942
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:20 942 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,12]
F: recursive call construct - arguments: (A,20,942,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 362
B: newSum, newDiffSum 21 991
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 991 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 5 223
B: newSum, newDiffSum 13 597
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:9 410 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,12]
F: recursive call construct - arguments: (A,9,410,49)
w[p, sum, diffsum] is not true w[49,9,410]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 410
B: newSum, newDiffSum 13 597
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 597 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,4]
F: recursive call construct - arguments: (A,13,597,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 410
B: newSum, newDiffSum 14 646
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 646 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,5]
F: recursive call construct - arguments: (A,14,646,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 410
B: newSum, newDiffSum 15 695
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:15 695 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,6]
F: recursive call construct - arguments: (A,15,695,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 410
B: newSum, newDiffSum 16 744
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:16 744 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,7]
F: recursive call construct - arguments: (A,16,744,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 410
B: newSum, newDiffSum 17 793
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:17 793 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,8]
F: recursive call construct - arguments: (A,17,793,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 410
B: newSum, newDiffSum 18 842
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:18 842 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,9]
F: recursive call construct - arguments: (A,18,842,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 410
B: newSum, newDiffSum 19 891
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:19 891 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,10]
F: recursive call construct - arguments: (A,19,891,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 410
B: newSum, newDiffSum 20 940
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:20 940 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,11]
F: recursive call construct - arguments: (A,20,940,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 410
B: newSum, newDiffSum 21 989
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 989 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 5 223
B: newSum, newDiffSum 15 693
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:10 458 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,11]
F: recursive call construct - arguments: (A,10,458,49)
w[p, sum, diffsum] is not true w[49,10,458]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 458
B: newSum, newDiffSum 15 693
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 693 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,5]
F: recursive call construct - arguments: (A,15,693,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 458
B: newSum, newDiffSum 16 742
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:16 742 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,6]
F: recursive call construct - arguments: (A,16,742,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 458
B: newSum, newDiffSum 17 791
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:17 791 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,7]
F: recursive call construct - arguments: (A,17,791,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 458
B: newSum, newDiffSum 18 840
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:18 840 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,8]
F: recursive call construct - arguments: (A,18,840,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 458
B: newSum, newDiffSum 19 889
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:19 889 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,9]
F: recursive call construct - arguments: (A,19,889,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 458
B: newSum, newDiffSum 20 938
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:20 938 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,10]
F: recursive call construct - arguments: (A,20,938,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 458
B: newSum, newDiffSum 21 987
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 5 223
B: newSum, newDiffSum 17 789
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:11 506 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,6,10]
F: recursive call construct - arguments: (A,11,506,49)
w[p, sum, diffsum] is true - w[49,11,506] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 5 223
B: newSum, newDiffSum 19 885
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:12 554 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,7,10]
F: recursive call construct - arguments: (A,12,554,49)
w[p, sum, diffsum] is true - w[49,12,554] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 5 223
B: newSum, newDiffSum 21 981
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 3 132
B: newSum, newDiffSum 12 546
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:6 270 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,7,10]
F: recursive call construct - arguments: (A,6,270,48)
w[p, sum, diffsum] is true - w[48,6,270] - return -1
n-p=? 3
iterate on i =4
A: review sum, diffsum 3 132
B: newSum, newDiffSum 15 687
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:7 317 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4,7,10]
F: recursive call construct - arguments: (A,7,317,48)
w[p, sum, diffsum] is true - w[48,7,317] - return -1
n-p=? 3
iterate on i =5
A: review sum, diffsum 3 132
B: newSum, newDiffSum 18 828
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:8 364 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,5,7,10]
F: recursive call construct - arguments: (A,8,364,48)
w[p, sum, diffsum] is true - w[48,8,364] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 3 132
B: newSum, newDiffSum 21 969
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 4
iterate on i =2
A: review sum, diffsum 2 88
B: newSum, newDiffSum 10 448
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:4 178 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,5,7,10]
F: recursive call construct - arguments: (A,4,178,47)
w[p, sum, diffsum] is not true w[47,4,178]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 4 178
B: newSum, newDiffSum 10 448
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 268 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,7,10]
F: recursive call construct - arguments: (A,6,268,48)
w[p, sum, diffsum] is not true w[48,6,268]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 6 268
B: newSum, newDiffSum 10 448
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 358 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,10]
F: recursive call construct - arguments: (A,8,358,49)
w[p, sum, diffsum] is not true w[49,8,358]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 8 358
B: newSum, newDiffSum 10 448
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:10 448 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2]
F: recursive call construct - arguments: (A,10,448,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 358
B: newSum, newDiffSum 11 497
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:11 497 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3]
F: recursive call construct - arguments: (A,11,497,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 358
B: newSum, newDiffSum 12 546
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:12 546 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,4]
F: recursive call construct - arguments: (A,12,546,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 358
B: newSum, newDiffSum 13 595
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:13 595 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,5]
F: recursive call construct - arguments: (A,13,595,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 358
B: newSum, newDiffSum 14 644
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:14 644 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,6]
F: recursive call construct - arguments: (A,14,644,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 358
B: newSum, newDiffSum 15 693
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:15 693 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,7]
F: recursive call construct - arguments: (A,15,693,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 358
B: newSum, newDiffSum 16 742
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:16 742 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,8]
F: recursive call construct - arguments: (A,16,742,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 358
B: newSum, newDiffSum 17 791
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:17 791 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,9]
F: recursive call construct - arguments: (A,17,791,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 358
B: newSum, newDiffSum 18 840
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:18 840 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,10]
F: recursive call construct - arguments: (A,18,840,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 358
B: newSum, newDiffSum 19 889
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:19 889 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,11]
F: recursive call construct - arguments: (A,19,889,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 358
B: newSum, newDiffSum 20 938
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:20 938 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,12]
F: recursive call construct - arguments: (A,20,938,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 358
B: newSum, newDiffSum 21 987
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 6 268
B: newSum, newDiffSum 12 544
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 406 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,12]
F: recursive call construct - arguments: (A,9,406,49)
w[p, sum, diffsum] is not true w[49,9,406]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 9 406
B: newSum, newDiffSum 12 544
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 544 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3]
F: recursive call construct - arguments: (A,12,544,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 406
B: newSum, newDiffSum 13 593
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 593 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4]
F: recursive call construct - arguments: (A,13,593,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 406
B: newSum, newDiffSum 14 642
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 642 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,5]
F: recursive call construct - arguments: (A,14,642,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 406
B: newSum, newDiffSum 15 691
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:15 691 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,6]
F: recursive call construct - arguments: (A,15,691,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 406
B: newSum, newDiffSum 16 740
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:16 740 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,7]
F: recursive call construct - arguments: (A,16,740,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 406
B: newSum, newDiffSum 17 789
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:17 789 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,8]
F: recursive call construct - arguments: (A,17,789,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 406
B: newSum, newDiffSum 18 838
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:18 838 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,9]
F: recursive call construct - arguments: (A,18,838,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 406
B: newSum, newDiffSum 19 887
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:19 887 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,10]
F: recursive call construct - arguments: (A,19,887,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 406
B: newSum, newDiffSum 20 936
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:20 936 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,11]
F: recursive call construct - arguments: (A,20,936,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 406
B: newSum, newDiffSum 21 985
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 6 268
B: newSum, newDiffSum 14 640
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 454 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,4,11]
F: recursive call construct - arguments: (A,10,454,49)
w[p, sum, diffsum] is true - w[49,10,454] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 6 268
B: newSum, newDiffSum 16 736
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:11 502 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,5,11]
F: recursive call construct - arguments: (A,11,502,49)
w[p, sum, diffsum] is true - w[49,11,502] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 268
B: newSum, newDiffSum 18 832
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:12 550 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,6,11]
F: recursive call construct - arguments: (A,12,550,49)
w[p, sum, diffsum] is true - w[49,12,550] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 268
B: newSum, newDiffSum 20 928
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:13 598 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,7,11]
F: recursive call construct - arguments: (A,13,598,49)
w[p, sum, diffsum] is true - w[49,13,598] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 268
B: newSum, newDiffSum 22 1024
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1024 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 4 178
B: newSum, newDiffSum 13 589
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 315 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,7,11]
F: recursive call construct - arguments: (A,7,315,48)
w[p, sum, diffsum] is not true w[48,7,315]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 7 315
B: newSum, newDiffSum 13 589
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 452 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,11]
F: recursive call construct - arguments: (A,10,452,49)
w[p, sum, diffsum] is not true w[49,10,452]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 452
B: newSum, newDiffSum 13 589
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 589 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,3]
F: recursive call construct - arguments: (A,13,589,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 452
B: newSum, newDiffSum 14 638
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 638 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,4]
F: recursive call construct - arguments: (A,14,638,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 452
B: newSum, newDiffSum 15 687
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 687 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,5]
F: recursive call construct - arguments: (A,15,687,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 452
B: newSum, newDiffSum 16 736
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:16 736 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,6]
F: recursive call construct - arguments: (A,16,736,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 452
B: newSum, newDiffSum 17 785
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:17 785 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,7]
F: recursive call construct - arguments: (A,17,785,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 452
B: newSum, newDiffSum 18 834
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:18 834 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,8]
F: recursive call construct - arguments: (A,18,834,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 452
B: newSum, newDiffSum 19 883
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:19 883 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,9]
F: recursive call construct - arguments: (A,19,883,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 452
B: newSum, newDiffSum 20 932
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:20 932 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,10]
F: recursive call construct - arguments: (A,20,932,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 452
B: newSum, newDiffSum 21 981
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 315
B: newSum, newDiffSum 15 685
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 500 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,10]
F: recursive call construct - arguments: (A,11,500,49)
w[p, sum, diffsum] is not true w[49,11,500]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 500
B: newSum, newDiffSum 15 685
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 685 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,4]
F: recursive call construct - arguments: (A,15,685,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 500
B: newSum, newDiffSum 16 734
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:16 734 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,5]
F: recursive call construct - arguments: (A,16,734,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 500
B: newSum, newDiffSum 17 783
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:17 783 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,6]
F: recursive call construct - arguments: (A,17,783,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 500
B: newSum, newDiffSum 18 832
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:18 832 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,7]
F: recursive call construct - arguments: (A,18,832,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 500
B: newSum, newDiffSum 19 881
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:19 881 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,8]
F: recursive call construct - arguments: (A,19,881,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 500
B: newSum, newDiffSum 20 930
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:20 930 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,9]
F: recursive call construct - arguments: (A,20,930,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 500
B: newSum, newDiffSum 21 979
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 979 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 315
B: newSum, newDiffSum 17 781
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 548 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,5,9]
F: recursive call construct - arguments: (A,12,548,49)
w[p, sum, diffsum] is true - w[49,12,548] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 315
B: newSum, newDiffSum 19 877
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 596 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,6,9]
F: recursive call construct - arguments: (A,13,596,49)
w[p, sum, diffsum] is true - w[49,13,596] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 315
B: newSum, newDiffSum 21 973
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 4 178
B: newSum, newDiffSum 16 730
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 362 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,4,6,9]
F: recursive call construct - arguments: (A,8,362,48)
w[p, sum, diffsum] is true - w[48,8,362] - return -1
n-p=? 3
iterate on i =5
A: review sum, diffsum 4 178
B: newSum, newDiffSum 19 871
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:9 409 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,5,6,9]
F: recursive call construct - arguments: (A,9,409,48)
w[p, sum, diffsum] is true - w[48,9,409] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 4 178
B: newSum, newDiffSum 22 1012
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 1012 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 2 88
B: newSum, newDiffSum 14 632
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:5 224 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,5,6,9]
F: recursive call construct - arguments: (A,5,224,47)
w[p, sum, diffsum] is not true w[47,5,224]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 5 224
B: newSum, newDiffSum 14 632
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 360 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,6,9]
F: recursive call construct - arguments: (A,8,360,48)
w[p, sum, diffsum] is not true w[48,8,360]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 8 360
B: newSum, newDiffSum 14 632
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 496 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,9]
F: recursive call construct - arguments: (A,11,496,49)
w[p, sum, diffsum] is not true w[49,11,496]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 11 496
B: newSum, newDiffSum 14 632
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 632 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,3]
F: recursive call construct - arguments: (A,14,632,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 496
B: newSum, newDiffSum 15 681
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 681 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,4]
F: recursive call construct - arguments: (A,15,681,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 496
B: newSum, newDiffSum 16 730
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:16 730 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,5]
F: recursive call construct - arguments: (A,16,730,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 496
B: newSum, newDiffSum 17 779
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:17 779 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,6]
F: recursive call construct - arguments: (A,17,779,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 496
B: newSum, newDiffSum 18 828
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:18 828 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,7]
F: recursive call construct - arguments: (A,18,828,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 496
B: newSum, newDiffSum 19 877
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:19 877 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,8]
F: recursive call construct - arguments: (A,19,877,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 496
B: newSum, newDiffSum 20 926
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:20 926 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,9]
F: recursive call construct - arguments: (A,20,926,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 496
B: newSum, newDiffSum 21 975
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 360
B: newSum, newDiffSum 16 728
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 544 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,9]
F: recursive call construct - arguments: (A,12,544,49)
w[p, sum, diffsum] is not true w[49,12,544]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 544
B: newSum, newDiffSum 16 728
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 728 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,4]
F: recursive call construct - arguments: (A,16,728,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 544
B: newSum, newDiffSum 17 777
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:17 777 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,5]
F: recursive call construct - arguments: (A,17,777,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 544
B: newSum, newDiffSum 18 826
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:18 826 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,6]
F: recursive call construct - arguments: (A,18,826,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 544
B: newSum, newDiffSum 19 875
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:19 875 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,7]
F: recursive call construct - arguments: (A,19,875,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 544
B: newSum, newDiffSum 20 924
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:20 924 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,8]
F: recursive call construct - arguments: (A,20,924,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 544
B: newSum, newDiffSum 21 973
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 360
B: newSum, newDiffSum 18 824
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 592 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,5,8]
F: recursive call construct - arguments: (A,13,592,49)
w[p, sum, diffsum] is true - w[49,13,592] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 360
B: newSum, newDiffSum 20 920
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 640 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,6,8]
F: recursive call construct - arguments: (A,14,640,49)
w[p, sum, diffsum] is true - w[49,14,640] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 360
B: newSum, newDiffSum 22 1016
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1016 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 5 224
B: newSum, newDiffSum 17 773
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:9 407 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,6,8]
F: recursive call construct - arguments: (A,9,407,48)
w[p, sum, diffsum] is not true w[48,9,407]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 407
B: newSum, newDiffSum 17 773
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 590 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,4,8]
F: recursive call construct - arguments: (A,13,590,49)
w[p, sum, diffsum] is not true w[49,13,590]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 590
B: newSum, newDiffSum 17 773
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:17 773 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,4,4]
F: recursive call construct - arguments: (A,17,773,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 590
B: newSum, newDiffSum 18 822
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:18 822 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,4,5]
F: recursive call construct - arguments: (A,18,822,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 590
B: newSum, newDiffSum 19 871
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:19 871 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,4,6]
F: recursive call construct - arguments: (A,19,871,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 590
B: newSum, newDiffSum 20 920
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:20 920 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,4,7]
F: recursive call construct - arguments: (A,20,920,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 590
B: newSum, newDiffSum 21 969
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 407
B: newSum, newDiffSum 19 869
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 638 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,5,7]
F: recursive call construct - arguments: (A,14,638,49)
w[p, sum, diffsum] is not true w[49,14,638]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 638
B: newSum, newDiffSum 19 869
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:19 869 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,5,5]
F: recursive call construct - arguments: (A,19,869,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 638
B: newSum, newDiffSum 20 918
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:20 918 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,5,6]
F: recursive call construct - arguments: (A,20,918,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 638
B: newSum, newDiffSum 21 967
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 407
B: newSum, newDiffSum 21 965
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 965 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 5 224
B: newSum, newDiffSum 20 914
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:10 454 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,5,5,6]
F: recursive call construct - arguments: (A,10,454,48)
w[p, sum, diffsum] is true - w[48,10,454] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 5 224
B: newSum, newDiffSum 23 1055
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1055 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 2 88
B: newSum, newDiffSum 18 816
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:6 270 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,4,5,5,6]
F: recursive call construct - arguments: (A,6,270,47)
w[p, sum, diffsum] is true - w[47,6,270] - return -1
n-p=? 4
iterate on i =5
A: review sum, diffsum 2 88
B: newSum, newDiffSum 22 1000
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 22 1000 exit for loop.
return 0
n-p=? 5
iterate on i =2
A: review sum, diffsum 1 44
B: newSum, newDiffSum 11 489
C: i, n, p i=2 n=50 p=45
D-set A[p]=i, A[p]=2 where p=45 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:3 133 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,5,5,6]
F: recursive call construct - arguments: (A,3,133,46)
w[p, sum, diffsum] is not true w[46,3,133]
i=A[p-1], p=46, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 4
iterate on i =2
A: review sum, diffsum 3 133
B: newSum, newDiffSum 11 489
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:5 222 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,5,5,6]
F: recursive call construct - arguments: (A,5,222,47)
w[p, sum, diffsum] is not true w[47,5,222]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 5 222
B: newSum, newDiffSum 11 489
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:7 311 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,5,6]
F: recursive call construct - arguments: (A,7,311,48)
w[p, sum, diffsum] is not true w[48,7,311]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 7 311
B: newSum, newDiffSum 11 489
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:9 400 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,6]
F: recursive call construct - arguments: (A,9,400,49)
w[p, sum, diffsum] is not true w[49,9,400]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 9 400
B: newSum, newDiffSum 11 489
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:11 489 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2]
F: recursive call construct - arguments: (A,11,489,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 9 400
B: newSum, newDiffSum 12 538
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:12 538 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3]
F: recursive call construct - arguments: (A,12,538,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 400
B: newSum, newDiffSum 13 587
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:13 587 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,4]
F: recursive call construct - arguments: (A,13,587,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 400
B: newSum, newDiffSum 14 636
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:14 636 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,5]
F: recursive call construct - arguments: (A,14,636,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 400
B: newSum, newDiffSum 15 685
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:15 685 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,6]
F: recursive call construct - arguments: (A,15,685,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 400
B: newSum, newDiffSum 16 734
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:16 734 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,7]
F: recursive call construct - arguments: (A,16,734,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 400
B: newSum, newDiffSum 17 783
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:17 783 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,8]
F: recursive call construct - arguments: (A,17,783,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 400
B: newSum, newDiffSum 18 832
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:18 832 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,9]
F: recursive call construct - arguments: (A,18,832,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 400
B: newSum, newDiffSum 19 881
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:19 881 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,10]
F: recursive call construct - arguments: (A,19,881,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 400
B: newSum, newDiffSum 20 930
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:20 930 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,11]
F: recursive call construct - arguments: (A,20,930,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 400
B: newSum, newDiffSum 21 979
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 979 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 7 311
B: newSum, newDiffSum 13 585
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:10 448 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,11]
F: recursive call construct - arguments: (A,10,448,49)
w[p, sum, diffsum] is not true w[49,10,448]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 448
B: newSum, newDiffSum 13 585
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 585 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,3]
F: recursive call construct - arguments: (A,13,585,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 448
B: newSum, newDiffSum 14 634
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 634 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,4]
F: recursive call construct - arguments: (A,14,634,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 448
B: newSum, newDiffSum 15 683
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 683 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,5]
F: recursive call construct - arguments: (A,15,683,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 448
B: newSum, newDiffSum 16 732
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:16 732 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,6]
F: recursive call construct - arguments: (A,16,732,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 448
B: newSum, newDiffSum 17 781
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:17 781 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,7]
F: recursive call construct - arguments: (A,17,781,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 448
B: newSum, newDiffSum 18 830
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:18 830 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,8]
F: recursive call construct - arguments: (A,18,830,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 448
B: newSum, newDiffSum 19 879
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:19 879 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,9]
F: recursive call construct - arguments: (A,19,879,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 448
B: newSum, newDiffSum 20 928
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:20 928 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,10]
F: recursive call construct - arguments: (A,20,928,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 448
B: newSum, newDiffSum 21 977
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 977 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 311
B: newSum, newDiffSum 15 681
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:11 496 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,4,10]
F: recursive call construct - arguments: (A,11,496,49)
w[p, sum, diffsum] is true - w[49,11,496] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 311
B: newSum, newDiffSum 17 777
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:12 544 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,5,10]
F: recursive call construct - arguments: (A,12,544,49)
w[p, sum, diffsum] is true - w[49,12,544] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 311
B: newSum, newDiffSum 19 873
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:13 592 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,6,10]
F: recursive call construct - arguments: (A,13,592,49)
w[p, sum, diffsum] is true - w[49,13,592] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 311
B: newSum, newDiffSum 21 969
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 5 222
B: newSum, newDiffSum 14 630
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:8 358 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,6,10]
F: recursive call construct - arguments: (A,8,358,48)
w[p, sum, diffsum] is not true w[48,8,358]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 8 358
B: newSum, newDiffSum 14 630
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 494 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,10]
F: recursive call construct - arguments: (A,11,494,49)
w[p, sum, diffsum] is not true w[49,11,494]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 11 494
B: newSum, newDiffSum 14 630
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 630 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3]
F: recursive call construct - arguments: (A,14,630,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 494
B: newSum, newDiffSum 15 679
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 679 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,4]
F: recursive call construct - arguments: (A,15,679,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 494
B: newSum, newDiffSum 16 728
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:16 728 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,5]
F: recursive call construct - arguments: (A,16,728,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 494
B: newSum, newDiffSum 17 777
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:17 777 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,6]
F: recursive call construct - arguments: (A,17,777,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 494
B: newSum, newDiffSum 18 826
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:18 826 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,7]
F: recursive call construct - arguments: (A,18,826,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 494
B: newSum, newDiffSum 19 875
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:19 875 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,8]
F: recursive call construct - arguments: (A,19,875,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 494
B: newSum, newDiffSum 20 924
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:20 924 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,9]
F: recursive call construct - arguments: (A,20,924,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 494
B: newSum, newDiffSum 21 973
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 358
B: newSum, newDiffSum 16 726
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 542 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,9]
F: recursive call construct - arguments: (A,12,542,49)
w[p, sum, diffsum] is not true w[49,12,542]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 542
B: newSum, newDiffSum 16 726
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 726 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,4]
F: recursive call construct - arguments: (A,16,726,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 542
B: newSum, newDiffSum 17 775
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:17 775 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,5]
F: recursive call construct - arguments: (A,17,775,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 542
B: newSum, newDiffSum 18 824
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:18 824 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,6]
F: recursive call construct - arguments: (A,18,824,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 542
B: newSum, newDiffSum 19 873
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:19 873 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,7]
F: recursive call construct - arguments: (A,19,873,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 542
B: newSum, newDiffSum 20 922
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:20 922 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,8]
F: recursive call construct - arguments: (A,20,922,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 542
B: newSum, newDiffSum 21 971
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 971 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 358
B: newSum, newDiffSum 18 822
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 590 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,5,8]
F: recursive call construct - arguments: (A,13,590,49)
w[p, sum, diffsum] is true - w[49,13,590] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 358
B: newSum, newDiffSum 20 918
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 638 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,6,8]
F: recursive call construct - arguments: (A,14,638,49)
w[p, sum, diffsum] is true - w[49,14,638] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 358
B: newSum, newDiffSum 22 1014
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1014 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 5 222
B: newSum, newDiffSum 17 771
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:9 405 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,4,6,8]
F: recursive call construct - arguments: (A,9,405,48)
w[p, sum, diffsum] is true - w[48,9,405] - return -1
n-p=? 3
iterate on i =5
A: review sum, diffsum 5 222
B: newSum, newDiffSum 20 912
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:10 452 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,5,6,8]
F: recursive call construct - arguments: (A,10,452,48)
w[p, sum, diffsum] is true - w[48,10,452] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 5 222
B: newSum, newDiffSum 23 1053
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1053 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 3 133
B: newSum, newDiffSum 15 673
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:6 268 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,5,6,8]
F: recursive call construct - arguments: (A,6,268,47)
w[p, sum, diffsum] is not true w[47,6,268]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 6 268
B: newSum, newDiffSum 15 673
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 403 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,6,8]
F: recursive call construct - arguments: (A,9,403,48)
w[p, sum, diffsum] is not true w[48,9,403]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 9 403
B: newSum, newDiffSum 15 673
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 538 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,8]
F: recursive call construct - arguments: (A,12,538,49)
w[p, sum, diffsum] is not true w[49,12,538]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 12 538
B: newSum, newDiffSum 15 673
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 673 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,3]
F: recursive call construct - arguments: (A,15,673,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 538
B: newSum, newDiffSum 16 722
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 722 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,4]
F: recursive call construct - arguments: (A,16,722,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 538
B: newSum, newDiffSum 17 771
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:17 771 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,5]
F: recursive call construct - arguments: (A,17,771,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 538
B: newSum, newDiffSum 18 820
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:18 820 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,6]
F: recursive call construct - arguments: (A,18,820,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 538
B: newSum, newDiffSum 19 869
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:19 869 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,7]
F: recursive call construct - arguments: (A,19,869,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 538
B: newSum, newDiffSum 20 918
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:20 918 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,8]
F: recursive call construct - arguments: (A,20,918,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 538
B: newSum, newDiffSum 21 967
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 403
B: newSum, newDiffSum 17 769
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 586 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,8]
F: recursive call construct - arguments: (A,13,586,49)
w[p, sum, diffsum] is not true w[49,13,586]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 586
B: newSum, newDiffSum 17 769
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:17 769 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,4]
F: recursive call construct - arguments: (A,17,769,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 586
B: newSum, newDiffSum 18 818
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:18 818 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,5]
F: recursive call construct - arguments: (A,18,818,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 586
B: newSum, newDiffSum 19 867
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:19 867 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,6]
F: recursive call construct - arguments: (A,19,867,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 586
B: newSum, newDiffSum 20 916
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:20 916 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,7]
F: recursive call construct - arguments: (A,20,916,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 586
B: newSum, newDiffSum 21 965
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 965 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 403
B: newSum, newDiffSum 19 865
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 634 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,5,7]
F: recursive call construct - arguments: (A,14,634,49)
w[p, sum, diffsum] is true - w[49,14,634] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 403
B: newSum, newDiffSum 21 961
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 961 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 6 268
B: newSum, newDiffSum 18 814
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:10 450 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,7]
F: recursive call construct - arguments: (A,10,450,48)
w[p, sum, diffsum] is not true w[48,10,450]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 450
B: newSum, newDiffSum 18 814
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:14 632 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,7]
F: recursive call construct - arguments: (A,14,632,49)
w[p, sum, diffsum] is not true w[49,14,632]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 632
B: newSum, newDiffSum 18 814
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:18 814 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,4]
F: recursive call construct - arguments: (A,18,814,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 632
B: newSum, newDiffSum 19 863
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:19 863 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,5]
F: recursive call construct - arguments: (A,19,863,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 632
B: newSum, newDiffSum 20 912
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:20 912 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,4,6]
F: recursive call construct - arguments: (A,20,912,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 632
B: newSum, newDiffSum 21 961
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 961 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 450
B: newSum, newDiffSum 20 910
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:15 680 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,6]
F: recursive call construct - arguments: (A,15,680,49)
w[p, sum, diffsum] is not true w[49,15,680]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 680
B: newSum, newDiffSum 20 910
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:20 910 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4,5,5]
F: recursive call construct - arguments: (A,20,910,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 680
B: newSum, newDiffSum 21 959
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 959 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 450
B: newSum, newDiffSum 22 1006
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1006 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 6 268
B: newSum, newDiffSum 21 955
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 955 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 3 133
B: newSum, newDiffSum 19 857
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:7 314 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,5,5]
F: recursive call construct - arguments: (A,7,314,47)
w[p, sum, diffsum] is not true w[47,7,314]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 7 314
B: newSum, newDiffSum 19 857
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:11 495 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,5,5]
F: recursive call construct - arguments: (A,11,495,48)
w[p, sum, diffsum] is not true w[48,11,495]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 495
B: newSum, newDiffSum 19 857
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 676 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,4,5]
F: recursive call construct - arguments: (A,15,676,49)
w[p, sum, diffsum] is not true w[49,15,676]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 676
B: newSum, newDiffSum 19 857
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 857 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,4,4]
F: recursive call construct - arguments: (A,19,857,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 676
B: newSum, newDiffSum 20 906
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 906 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,4,4,4,5]
F: recursive call construct - arguments: (A,20,906,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 676
B: newSum, newDiffSum 21 955
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 955 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 495
B: newSum, newDiffSum 21 953
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 953 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 7 314
B: newSum, newDiffSum 22 998
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 998 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 3 133
B: newSum, newDiffSum 23 1041
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 23 1041 exit for loop.
return 0
n-p=? 5
iterate on i =3
A: review sum, diffsum 1 44
B: newSum, newDiffSum 16 714
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:4 178 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,4,5]
F: recursive call construct - arguments: (A,4,178,46)
w[p, sum, diffsum] is not true w[46,4,178]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 4 178
B: newSum, newDiffSum 16 714
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:7 312 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,4,5]
F: recursive call construct - arguments: (A,7,312,47)
w[p, sum, diffsum] is not true w[47,7,312]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 7 312
B: newSum, newDiffSum 16 714
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 446 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,4,5]
F: recursive call construct - arguments: (A,10,446,48)
w[p, sum, diffsum] is not true w[48,10,446]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 10 446
B: newSum, newDiffSum 16 714
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 580 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,5]
F: recursive call construct - arguments: (A,13,580,49)
w[p, sum, diffsum] is not true w[49,13,580]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 13 580
B: newSum, newDiffSum 16 714
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:16 714 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,3]
F: recursive call construct - arguments: (A,16,714,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 580
B: newSum, newDiffSum 17 763
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:17 763 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,4]
F: recursive call construct - arguments: (A,17,763,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 580
B: newSum, newDiffSum 18 812
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:18 812 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,5]
F: recursive call construct - arguments: (A,18,812,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 580
B: newSum, newDiffSum 19 861
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:19 861 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,6]
F: recursive call construct - arguments: (A,19,861,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 580
B: newSum, newDiffSum 20 910
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:20 910 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,7]
F: recursive call construct - arguments: (A,20,910,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 580
B: newSum, newDiffSum 21 959
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 959 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 446
B: newSum, newDiffSum 18 810
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 628 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,4,7]
F: recursive call construct - arguments: (A,14,628,49)
w[p, sum, diffsum] is not true w[49,14,628]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 628
B: newSum, newDiffSum 18 810
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:18 810 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,4,4]
F: recursive call construct - arguments: (A,18,810,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 628
B: newSum, newDiffSum 19 859
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:19 859 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,4,5]
F: recursive call construct - arguments: (A,19,859,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 628
B: newSum, newDiffSum 20 908
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:20 908 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,4,6]
F: recursive call construct - arguments: (A,20,908,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 628
B: newSum, newDiffSum 21 957
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 957 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 446
B: newSum, newDiffSum 20 906
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 676 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,5,6]
F: recursive call construct - arguments: (A,15,676,49)
w[p, sum, diffsum] is true - w[49,15,676] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 446
B: newSum, newDiffSum 22 1002
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1002 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 7 312
B: newSum, newDiffSum 19 855
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 493 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,5,6]
F: recursive call construct - arguments: (A,11,493,48)
w[p, sum, diffsum] is not true w[48,11,493]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 493
B: newSum, newDiffSum 19 855
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 674 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,4,6]
F: recursive call construct - arguments: (A,15,674,49)
w[p, sum, diffsum] is not true w[49,15,674]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 674
B: newSum, newDiffSum 19 855
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 855 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,4,4]
F: recursive call construct - arguments: (A,19,855,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 674
B: newSum, newDiffSum 20 904
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 904 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,4,4,5]
F: recursive call construct - arguments: (A,20,904,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 674
B: newSum, newDiffSum 21 953
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 953 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 493
B: newSum, newDiffSum 21 951
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 951 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 7 312
B: newSum, newDiffSum 22 996
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 996 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 4 178
B: newSum, newDiffSum 20 898
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:8 358 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,4,5]
F: recursive call construct - arguments: (A,8,358,47)
w[p, sum, diffsum] is not true w[47,8,358]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 8 358
B: newSum, newDiffSum 20 898
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 538 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,4,5]
F: recursive call construct - arguments: (A,12,538,48)
w[p, sum, diffsum] is not true w[48,12,538]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 538
B: newSum, newDiffSum 20 898
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 718 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,4,5]
F: recursive call construct - arguments: (A,16,718,49)
w[p, sum, diffsum] is not true w[49,16,718]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 718
B: newSum, newDiffSum 20 898
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 898 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,4,4,4]
F: recursive call construct - arguments: (A,20,898,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 718
B: newSum, newDiffSum 21 947
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 947 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 538
B: newSum, newDiffSum 22 994
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 994 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 8 358
B: newSum, newDiffSum 23 1039
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1039 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 4 178
B: newSum, newDiffSum 24 1082
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 24 1082 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 1 44
B: newSum, newDiffSum 21 939
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 21 939 exit for loop.
return 0
n-p=? 6
iterate on i =2
A: review sum, diffsum 0 0
B: newSum, newDiffSum 12 528
C: i, n, p i=2 n=50 p=44
D-set A[p]=i, A[p]=2 where p=44 and i=2
D-Normal: loop start to end: From 0 to 20 current i = 2 and arguments:2 88 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4,4,4]
F: recursive call construct - arguments: (A,2,88,45)
w[p, sum, diffsum] is not true w[45,2,88]
i=A[p-1], p=45, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 5
iterate on i =2
A: review sum, diffsum 2 88
B: newSum, newDiffSum 12 528
C: i, n, p i=2 n=50 p=45
D-set A[p]=i, A[p]=2 where p=45 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:4 176 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,4,4]
F: recursive call construct - arguments: (A,4,176,46)
w[p, sum, diffsum] is not true w[46,4,176]
i=A[p-1], p=46, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 4
iterate on i =2
A: review sum, diffsum 4 176
B: newSum, newDiffSum 12 528
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 264 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,4,4,4]
F: recursive call construct - arguments: (A,6,264,47)
w[p, sum, diffsum] is not true w[47,6,264]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 6 264
B: newSum, newDiffSum 12 528
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 352 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,4]
F: recursive call construct - arguments: (A,8,352,48)
w[p, sum, diffsum] is not true w[48,8,352]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 8 352
B: newSum, newDiffSum 12 528
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:10 440 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,4]
F: recursive call construct - arguments: (A,10,440,49)
w[p, sum, diffsum] is not true w[49,10,440]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 10 440
B: newSum, newDiffSum 12 528
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:12 528 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2]
F: recursive call construct - arguments: (A,12,528,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 440
B: newSum, newDiffSum 13 577
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:13 577 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3]
F: recursive call construct - arguments: (A,13,577,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 440
B: newSum, newDiffSum 14 626
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:14 626 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,4]
F: recursive call construct - arguments: (A,14,626,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 440
B: newSum, newDiffSum 15 675
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:15 675 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,5]
F: recursive call construct - arguments: (A,15,675,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 440
B: newSum, newDiffSum 16 724
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:16 724 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,6]
F: recursive call construct - arguments: (A,16,724,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 440
B: newSum, newDiffSum 17 773
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:17 773 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,7]
F: recursive call construct - arguments: (A,17,773,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 440
B: newSum, newDiffSum 18 822
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:18 822 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,8]
F: recursive call construct - arguments: (A,18,822,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 440
B: newSum, newDiffSum 19 871
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:19 871 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,9]
F: recursive call construct - arguments: (A,19,871,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 440
B: newSum, newDiffSum 20 920
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:20 920 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,10]
F: recursive call construct - arguments: (A,20,920,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 440
B: newSum, newDiffSum 21 969
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 8 352
B: newSum, newDiffSum 14 624
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:11 488 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,10]
F: recursive call construct - arguments: (A,11,488,49)
w[p, sum, diffsum] is not true w[49,11,488]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 11 488
B: newSum, newDiffSum 14 624
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 624 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,3]
F: recursive call construct - arguments: (A,14,624,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 488
B: newSum, newDiffSum 15 673
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 673 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,4]
F: recursive call construct - arguments: (A,15,673,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 488
B: newSum, newDiffSum 16 722
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:16 722 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,5]
F: recursive call construct - arguments: (A,16,722,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 488
B: newSum, newDiffSum 17 771
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:17 771 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,6]
F: recursive call construct - arguments: (A,17,771,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 488
B: newSum, newDiffSum 18 820
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:18 820 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,7]
F: recursive call construct - arguments: (A,18,820,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 488
B: newSum, newDiffSum 19 869
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:19 869 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,8]
F: recursive call construct - arguments: (A,19,869,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 488
B: newSum, newDiffSum 20 918
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:20 918 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,9]
F: recursive call construct - arguments: (A,20,918,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 488
B: newSum, newDiffSum 21 967
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 352
B: newSum, newDiffSum 16 720
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:12 536 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,9]
F: recursive call construct - arguments: (A,12,536,49)
w[p, sum, diffsum] is not true w[49,12,536]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 536
B: newSum, newDiffSum 16 720
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 720 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,4]
F: recursive call construct - arguments: (A,16,720,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 536
B: newSum, newDiffSum 17 769
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:17 769 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,5]
F: recursive call construct - arguments: (A,17,769,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 536
B: newSum, newDiffSum 18 818
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:18 818 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,6]
F: recursive call construct - arguments: (A,18,818,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 536
B: newSum, newDiffSum 19 867
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:19 867 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,7]
F: recursive call construct - arguments: (A,19,867,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 536
B: newSum, newDiffSum 20 916
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:20 916 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,8]
F: recursive call construct - arguments: (A,20,916,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 536
B: newSum, newDiffSum 21 965
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 965 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 352
B: newSum, newDiffSum 18 816
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:13 584 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,5,8]
F: recursive call construct - arguments: (A,13,584,49)
w[p, sum, diffsum] is not true w[49,13,584]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 584
B: newSum, newDiffSum 18 816
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:18 816 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,5,5]
F: recursive call construct - arguments: (A,18,816,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 584
B: newSum, newDiffSum 19 865
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:19 865 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,5,6]
F: recursive call construct - arguments: (A,19,865,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 584
B: newSum, newDiffSum 20 914
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:20 914 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,5,7]
F: recursive call construct - arguments: (A,20,914,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 584
B: newSum, newDiffSum 21 963
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 963 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 352
B: newSum, newDiffSum 20 912
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:14 632 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,6,7]
F: recursive call construct - arguments: (A,14,632,49)
w[p, sum, diffsum] is true - w[49,14,632] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 352
B: newSum, newDiffSum 22 1008
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1008 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 6 264
B: newSum, newDiffSum 15 669
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 399 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,6,7]
F: recursive call construct - arguments: (A,9,399,48)
w[p, sum, diffsum] is not true w[48,9,399]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 9 399
B: newSum, newDiffSum 15 669
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 534 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,7]
F: recursive call construct - arguments: (A,12,534,49)
w[p, sum, diffsum] is not true w[49,12,534]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 12 534
B: newSum, newDiffSum 15 669
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 669 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,3]
F: recursive call construct - arguments: (A,15,669,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 534
B: newSum, newDiffSum 16 718
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 718 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,4]
F: recursive call construct - arguments: (A,16,718,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 534
B: newSum, newDiffSum 17 767
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:17 767 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,5]
F: recursive call construct - arguments: (A,17,767,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 534
B: newSum, newDiffSum 18 816
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:18 816 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,6]
F: recursive call construct - arguments: (A,18,816,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 534
B: newSum, newDiffSum 19 865
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:19 865 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,7]
F: recursive call construct - arguments: (A,19,865,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 534
B: newSum, newDiffSum 20 914
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:20 914 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,8]
F: recursive call construct - arguments: (A,20,914,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 534
B: newSum, newDiffSum 21 963
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 963 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 399
B: newSum, newDiffSum 17 765
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 582 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,4,8]
F: recursive call construct - arguments: (A,13,582,49)
w[p, sum, diffsum] is not true w[49,13,582]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 582
B: newSum, newDiffSum 17 765
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:17 765 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,4,4]
F: recursive call construct - arguments: (A,17,765,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 582
B: newSum, newDiffSum 18 814
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:18 814 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,4,5]
F: recursive call construct - arguments: (A,18,814,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 582
B: newSum, newDiffSum 19 863
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:19 863 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,4,6]
F: recursive call construct - arguments: (A,19,863,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 582
B: newSum, newDiffSum 20 912
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:20 912 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,4,7]
F: recursive call construct - arguments: (A,20,912,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 582
B: newSum, newDiffSum 21 961
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 961 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 399
B: newSum, newDiffSum 19 861
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 630 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,5,7]
F: recursive call construct - arguments: (A,14,630,49)
w[p, sum, diffsum] is not true w[49,14,630]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 630
B: newSum, newDiffSum 19 861
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:19 861 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,5,5]
F: recursive call construct - arguments: (A,19,861,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 630
B: newSum, newDiffSum 20 910
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:20 910 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,5,6]
F: recursive call construct - arguments: (A,20,910,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 630
B: newSum, newDiffSum 21 959
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 959 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 399
B: newSum, newDiffSum 21 957
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 957 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 6 264
B: newSum, newDiffSum 18 810
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 446 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,4,5,6]
F: recursive call construct - arguments: (A,10,446,48)
w[p, sum, diffsum] is true - w[48,10,446] - return -1
n-p=? 3
iterate on i =5
A: review sum, diffsum 6 264
B: newSum, newDiffSum 21 951
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 951 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 4 176
B: newSum, newDiffSum 16 712
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 310 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,5,6]
F: recursive call construct - arguments: (A,7,310,47)
w[p, sum, diffsum] is not true w[47,7,310]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 7 310
B: newSum, newDiffSum 16 712
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 444 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,5,6]
F: recursive call construct - arguments: (A,10,444,48)
w[p, sum, diffsum] is not true w[48,10,444]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 10 444
B: newSum, newDiffSum 16 712
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 578 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,6]
F: recursive call construct - arguments: (A,13,578,49)
w[p, sum, diffsum] is not true w[49,13,578]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 13 578
B: newSum, newDiffSum 16 712
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:16 712 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,3]
F: recursive call construct - arguments: (A,16,712,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 578
B: newSum, newDiffSum 17 761
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:17 761 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,4]
F: recursive call construct - arguments: (A,17,761,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 578
B: newSum, newDiffSum 18 810
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:18 810 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,5]
F: recursive call construct - arguments: (A,18,810,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 578
B: newSum, newDiffSum 19 859
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:19 859 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,6]
F: recursive call construct - arguments: (A,19,859,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 578
B: newSum, newDiffSum 20 908
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:20 908 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,7]
F: recursive call construct - arguments: (A,20,908,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 578
B: newSum, newDiffSum 21 957
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 957 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 444
B: newSum, newDiffSum 18 808
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 626 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,4,7]
F: recursive call construct - arguments: (A,14,626,49)
w[p, sum, diffsum] is not true w[49,14,626]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 626
B: newSum, newDiffSum 18 808
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:18 808 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,4,4]
F: recursive call construct - arguments: (A,18,808,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 626
B: newSum, newDiffSum 19 857
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:19 857 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,4,5]
F: recursive call construct - arguments: (A,19,857,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 626
B: newSum, newDiffSum 20 906
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:20 906 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,4,6]
F: recursive call construct - arguments: (A,20,906,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 626
B: newSum, newDiffSum 21 955
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 955 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 444
B: newSum, newDiffSum 20 904
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 674 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,5,6]
F: recursive call construct - arguments: (A,15,674,49)
w[p, sum, diffsum] is true - w[49,15,674] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 444
B: newSum, newDiffSum 22 1000
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1000 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 7 310
B: newSum, newDiffSum 19 853
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 491 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,5,6]
F: recursive call construct - arguments: (A,11,491,48)
w[p, sum, diffsum] is not true w[48,11,491]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 491
B: newSum, newDiffSum 19 853
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 672 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,4,6]
F: recursive call construct - arguments: (A,15,672,49)
w[p, sum, diffsum] is not true w[49,15,672]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 672
B: newSum, newDiffSum 19 853
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 853 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,4,4]
F: recursive call construct - arguments: (A,19,853,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 672
B: newSum, newDiffSum 20 902
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 902 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,4,4,5]
F: recursive call construct - arguments: (A,20,902,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 672
B: newSum, newDiffSum 21 951
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 951 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 491
B: newSum, newDiffSum 21 949
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 949 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 7 310
B: newSum, newDiffSum 22 994
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 994 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 4 176
B: newSum, newDiffSum 20 896
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 356 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,4,5]
F: recursive call construct - arguments: (A,8,356,47)
w[p, sum, diffsum] is not true w[47,8,356]
i=A[p-1], p=47, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 3
iterate on i =4
A: review sum, diffsum 8 356
B: newSum, newDiffSum 20 896
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 536 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,4,5]
F: recursive call construct - arguments: (A,12,536,48)
w[p, sum, diffsum] is not true w[48,12,536]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 536
B: newSum, newDiffSum 20 896
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 716 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,4,5]
F: recursive call construct - arguments: (A,16,716,49)
w[p, sum, diffsum] is not true w[49,16,716]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 716
B: newSum, newDiffSum 20 896
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 896 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,4,4,4,4]
F: recursive call construct - arguments: (A,20,896,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 716
B: newSum, newDiffSum 21 945
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 945 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 536
B: newSum, newDiffSum 22 992
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 992 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 8 356
B: newSum, newDiffSum 23 1037
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1037 exit for loop.
return 0
n-p=? 4
iterate on i =5
A: review sum, diffsum 4 176
B: newSum, newDiffSum 24 1080
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 24 1080 exit for loop.
return 0
n-p=? 5
iterate on i =3
A: review sum, diffsum 2 88
B: newSum, newDiffSum 17 753
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:5 221 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,4,4,4]
F: recursive call construct - arguments: (A,5,221,46)
w[p, sum, diffsum] is not true w[46,5,221]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 5 221
B: newSum, newDiffSum 17 753
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 354 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,4,4]
F: recursive call construct - arguments: (A,8,354,47)
w[p, sum, diffsum] is not true w[47,8,354]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 8 354
B: newSum, newDiffSum 17 753
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 487 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,4,4]
F: recursive call construct - arguments: (A,11,487,48)
w[p, sum, diffsum] is not true w[48,11,487]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 11 487
B: newSum, newDiffSum 17 753
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 620 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,4]
F: recursive call construct - arguments: (A,14,620,49)
w[p, sum, diffsum] is not true w[49,14,620]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 14 620
B: newSum, newDiffSum 17 753
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:17 753 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3]
F: recursive call construct - arguments: (A,17,753,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 620
B: newSum, newDiffSum 18 802
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:18 802 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,4]
F: recursive call construct - arguments: (A,18,802,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 620
B: newSum, newDiffSum 19 851
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:19 851 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,5]
F: recursive call construct - arguments: (A,19,851,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 620
B: newSum, newDiffSum 20 900
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:20 900 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,6]
F: recursive call construct - arguments: (A,20,900,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 620
B: newSum, newDiffSum 21 949
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 949 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 487
B: newSum, newDiffSum 19 849
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 668 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,4,6]
F: recursive call construct - arguments: (A,15,668,49)
w[p, sum, diffsum] is not true w[49,15,668]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 668
B: newSum, newDiffSum 19 849
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 849 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,4,4]
F: recursive call construct - arguments: (A,19,849,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 668
B: newSum, newDiffSum 20 898
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 898 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,4,5]
F: recursive call construct - arguments: (A,20,898,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 668
B: newSum, newDiffSum 21 947
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 947 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 487
B: newSum, newDiffSum 21 945
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 945 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 8 354
B: newSum, newDiffSum 20 894
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 534 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,4,5]
F: recursive call construct - arguments: (A,12,534,48)
w[p, sum, diffsum] is not true w[48,12,534]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 534
B: newSum, newDiffSum 20 894
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 714 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,4,5]
F: recursive call construct - arguments: (A,16,714,49)
w[p, sum, diffsum] is not true w[49,16,714]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 714
B: newSum, newDiffSum 20 894
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 894 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,4,4,4]
F: recursive call construct - arguments: (A,20,894,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 714
B: newSum, newDiffSum 21 943
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 943 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 534
B: newSum, newDiffSum 22 990
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 990 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 8 354
B: newSum, newDiffSum 23 1035
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1035 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 5 221
B: newSum, newDiffSum 21 937
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 21 937 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 2 88
B: newSum, newDiffSum 22 978
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 22 978 exit for loop.
return 0
n-p=? 6
iterate on i =3
A: review sum, diffsum 0 0
B: newSum, newDiffSum 18 792
C: i, n, p i=3 n=50 p=44
D-set A[p]=i, A[p]=3 where p=44 and i=3
D-Normal: loop start to end: From 0 to 20 current i = 3 and arguments:3 132 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,4,4]
F: recursive call construct - arguments: (A,3,132,45)
w[p, sum, diffsum] is not true w[45,3,132]
i=A[p-1], p=45, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 5
iterate on i =3
A: review sum, diffsum 3 132
B: newSum, newDiffSum 18 792
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:6 264 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,4,4]
F: recursive call construct - arguments: (A,6,264,46)
w[p, sum, diffsum] is not true w[46,6,264]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 6 264
B: newSum, newDiffSum 18 792
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 396 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,4,4,4]
F: recursive call construct - arguments: (A,9,396,47)
w[p, sum, diffsum] is not true w[47,9,396]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 9 396
B: newSum, newDiffSum 18 792
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 528 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,4,4]
F: recursive call construct - arguments: (A,12,528,48)
w[p, sum, diffsum] is not true w[48,12,528]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 12 528
B: newSum, newDiffSum 18 792
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 660 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,15,660,49)
w[p, sum, diffsum] is not true w[49,15,660]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 15 660
B: newSum, newDiffSum 18 792
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:18 792 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3]
F: recursive call construct - arguments: (A,18,792,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 660
B: newSum, newDiffSum 19 841
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:19 841 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,19,841,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 660
B: newSum, newDiffSum 20 890
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:20 890 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,5]
F: recursive call construct - arguments: (A,20,890,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 660
B: newSum, newDiffSum 21 939
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 939 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 528
B: newSum, newDiffSum 20 888
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 708 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,4,5]
F: recursive call construct - arguments: (A,16,708,49)
w[p, sum, diffsum] is not true w[49,16,708]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 708
B: newSum, newDiffSum 20 888
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 888 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,4,4]
F: recursive call construct - arguments: (A,20,888,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 708
B: newSum, newDiffSum 21 937
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 937 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 528
B: newSum, newDiffSum 22 984
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 984 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 9 396
B: newSum, newDiffSum 21 933
C: i, n, p i=4 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 933 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 6 264
B: newSum, newDiffSum 22 976
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 22 976 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 3 132
B: newSum, newDiffSum 23 1017
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 23 1017 exit for loop.
return 0
n-p=? 6
iterate on i =4
A: review sum, diffsum 0 0
B: newSum, newDiffSum 24 1056
C: i, n, p i=4 n=50 p=44
D-Exception: newSum, newDiffSum are bigger than s, k 24 1056 exit for loop.
return 0
n-p=? 7
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 7 301
C: i, n, p i=1 n=50 p=43
D-set A[p]=i, A[p]=1 where p=43 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 43 44
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,4,4]
F: recursive call construct - arguments: (A,1,43,44)
w[p, sum, diffsum] is not true w[44,1,43]
i=A[p-1], p=44, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 6
iterate on i =1
A: review sum, diffsum 1 43
B: newSum, newDiffSum 7 301
C: i, n, p i=1 n=50 p=44
D-set A[p]=i, A[p]=1 where p=44 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:2 86 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,4,4]
F: recursive call construct - arguments: (A,2,86,45)
w[p, sum, diffsum] is not true w[45,2,86]
i=A[p-1], p=45, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 5
iterate on i =1
A: review sum, diffsum 2 86
B: newSum, newDiffSum 7 301
C: i, n, p i=1 n=50 p=45
D-set A[p]=i, A[p]=1 where p=45 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:3 129 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,3,4,4]
F: recursive call construct - arguments: (A,3,129,46)
w[p, sum, diffsum] is not true w[46,3,129]
i=A[p-1], p=46, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 4
iterate on i =1
A: review sum, diffsum 3 129
B: newSum, newDiffSum 7 301
C: i, n, p i=1 n=50 p=46
D-set A[p]=i, A[p]=1 where p=46 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:4 172 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,4,4]
F: recursive call construct - arguments: (A,4,172,47)
w[p, sum, diffsum] is not true w[47,4,172]
i=A[p-1], p=47, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 3
iterate on i =1
A: review sum, diffsum 4 172
B: newSum, newDiffSum 7 301
C: i, n, p i=1 n=50 p=47
D-set A[p]=i, A[p]=1 where p=47 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:5 215 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,4]
F: recursive call construct - arguments: (A,5,215,48)
w[p, sum, diffsum] is not true w[48,5,215]
i=A[p-1], p=48, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 2
iterate on i =1
A: review sum, diffsum 5 215
B: newSum, newDiffSum 7 301
C: i, n, p i=1 n=50 p=48
D-set A[p]=i, A[p]=1 where p=48 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:6 258 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,4]
F: recursive call construct - arguments: (A,6,258,49)
w[p, sum, diffsum] is not true w[49,6,258]
i=A[p-1], p=49, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 1
iterate on i =1
A: review sum, diffsum 6 258
B: newSum, newDiffSum 7 301
C: i, n, p i=1 n=50 p=49
D-set A[p]=i, A[p]=1 where p=49 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:7 301 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1]
F: recursive call construct - arguments: (A,7,301,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =2
A: review sum, diffsum 6 258
B: newSum, newDiffSum 8 350
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:8 350 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,2]
F: recursive call construct - arguments: (A,8,350,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 6 258
B: newSum, newDiffSum 9 399
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:9 399 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,3]
F: recursive call construct - arguments: (A,9,399,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 6 258
B: newSum, newDiffSum 10 448
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:10 448 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,4]
F: recursive call construct - arguments: (A,10,448,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 6 258
B: newSum, newDiffSum 11 497
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:11 497 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,5]
F: recursive call construct - arguments: (A,11,497,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 6 258
B: newSum, newDiffSum 12 546
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:12 546 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,6]
F: recursive call construct - arguments: (A,12,546,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 6 258
B: newSum, newDiffSum 13 595
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:13 595 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,7]
F: recursive call construct - arguments: (A,13,595,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 6 258
B: newSum, newDiffSum 14 644
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 1 to 20 current i = 8 and arguments:14 644 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,8]
F: recursive call construct - arguments: (A,14,644,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 6 258
B: newSum, newDiffSum 15 693
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 1 to 20 current i = 9 and arguments:15 693 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,9]
F: recursive call construct - arguments: (A,15,693,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 6 258
B: newSum, newDiffSum 16 742
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 1 to 20 current i = 10 and arguments:16 742 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,10]
F: recursive call construct - arguments: (A,16,742,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 6 258
B: newSum, newDiffSum 17 791
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 1 to 20 current i = 11 and arguments:17 791 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,11]
F: recursive call construct - arguments: (A,17,791,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 6 258
B: newSum, newDiffSum 18 840
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 1 to 20 current i = 12 and arguments:18 840 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,12]
F: recursive call construct - arguments: (A,18,840,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 6 258
B: newSum, newDiffSum 19 889
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 1 to 20 current i = 13 and arguments:19 889 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,13]
F: recursive call construct - arguments: (A,19,889,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 6 258
B: newSum, newDiffSum 20 938
C: i, n, p i=14 n=50 p=49
D-set A[p]=i, A[p]=14 where p=49 and i=14
D-Normal: loop start to end: From 1 to 20 current i = 14 and arguments:20 938 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,14]
F: recursive call construct - arguments: (A,20,938,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =15
A: review sum, diffsum 6 258
B: newSum, newDiffSum 21 987
C: i, n, p i=15 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 987 exit for loop.
return 0
n-p=? 2
iterate on i =2
A: review sum, diffsum 5 215
B: newSum, newDiffSum 9 397
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:7 306 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,14]
F: recursive call construct - arguments: (A,7,306,49)
w[p, sum, diffsum] is not true w[49,7,306]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 7 306
B: newSum, newDiffSum 9 397
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:9 397 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,2]
F: recursive call construct - arguments: (A,9,397,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 7 306
B: newSum, newDiffSum 10 446
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:10 446 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,3]
F: recursive call construct - arguments: (A,10,446,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 7 306
B: newSum, newDiffSum 11 495
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:11 495 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,4]
F: recursive call construct - arguments: (A,11,495,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 7 306
B: newSum, newDiffSum 12 544
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:12 544 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,5]
F: recursive call construct - arguments: (A,12,544,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 7 306
B: newSum, newDiffSum 13 593
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:13 593 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,6]
F: recursive call construct - arguments: (A,13,593,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 7 306
B: newSum, newDiffSum 14 642
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:14 642 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,7]
F: recursive call construct - arguments: (A,14,642,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 7 306
B: newSum, newDiffSum 15 691
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:15 691 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,8]
F: recursive call construct - arguments: (A,15,691,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 7 306
B: newSum, newDiffSum 16 740
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:16 740 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,9]
F: recursive call construct - arguments: (A,16,740,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 7 306
B: newSum, newDiffSum 17 789
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:17 789 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,10]
F: recursive call construct - arguments: (A,17,789,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 7 306
B: newSum, newDiffSum 18 838
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:18 838 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,11]
F: recursive call construct - arguments: (A,18,838,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 7 306
B: newSum, newDiffSum 19 887
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:19 887 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,12]
F: recursive call construct - arguments: (A,19,887,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 7 306
B: newSum, newDiffSum 20 936
C: i, n, p i=13 n=50 p=49
D-set A[p]=i, A[p]=13 where p=49 and i=13
D-Normal: loop start to end: From 2 to 20 current i = 13 and arguments:20 936 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,2,13]
F: recursive call construct - arguments: (A,20,936,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =14
A: review sum, diffsum 7 306
B: newSum, newDiffSum 21 985
C: i, n, p i=14 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 985 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 5 215
B: newSum, newDiffSum 11 493
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:8 354 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,13]
F: recursive call construct - arguments: (A,8,354,49)
w[p, sum, diffsum] is not true w[49,8,354]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 354
B: newSum, newDiffSum 11 493
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 493 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,3]
F: recursive call construct - arguments: (A,11,493,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 354
B: newSum, newDiffSum 12 542
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 542 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,4]
F: recursive call construct - arguments: (A,12,542,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 354
B: newSum, newDiffSum 13 591
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 591 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,5]
F: recursive call construct - arguments: (A,13,591,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 354
B: newSum, newDiffSum 14 640
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 640 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,6]
F: recursive call construct - arguments: (A,14,640,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 354
B: newSum, newDiffSum 15 689
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:15 689 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,7]
F: recursive call construct - arguments: (A,15,689,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 354
B: newSum, newDiffSum 16 738
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:16 738 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,8]
F: recursive call construct - arguments: (A,16,738,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 354
B: newSum, newDiffSum 17 787
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:17 787 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,9]
F: recursive call construct - arguments: (A,17,787,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 354
B: newSum, newDiffSum 18 836
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:18 836 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,10]
F: recursive call construct - arguments: (A,18,836,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 354
B: newSum, newDiffSum 19 885
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 3 to 20 current i = 11 and arguments:19 885 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,11]
F: recursive call construct - arguments: (A,19,885,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 354
B: newSum, newDiffSum 20 934
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 3 to 20 current i = 12 and arguments:20 934 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,12]
F: recursive call construct - arguments: (A,20,934,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 354
B: newSum, newDiffSum 21 983
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 983 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 5 215
B: newSum, newDiffSum 13 589
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:9 402 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,12]
F: recursive call construct - arguments: (A,9,402,49)
w[p, sum, diffsum] is not true w[49,9,402]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 402
B: newSum, newDiffSum 13 589
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 589 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,4]
F: recursive call construct - arguments: (A,13,589,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 402
B: newSum, newDiffSum 14 638
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 638 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,5]
F: recursive call construct - arguments: (A,14,638,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 402
B: newSum, newDiffSum 15 687
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:15 687 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,6]
F: recursive call construct - arguments: (A,15,687,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 402
B: newSum, newDiffSum 16 736
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:16 736 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,7]
F: recursive call construct - arguments: (A,16,736,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 402
B: newSum, newDiffSum 17 785
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:17 785 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,8]
F: recursive call construct - arguments: (A,17,785,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 402
B: newSum, newDiffSum 18 834
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:18 834 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,9]
F: recursive call construct - arguments: (A,18,834,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 402
B: newSum, newDiffSum 19 883
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 4 to 20 current i = 10 and arguments:19 883 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,10]
F: recursive call construct - arguments: (A,19,883,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 402
B: newSum, newDiffSum 20 932
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 4 to 20 current i = 11 and arguments:20 932 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,4,11]
F: recursive call construct - arguments: (A,20,932,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 402
B: newSum, newDiffSum 21 981
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 5 215
B: newSum, newDiffSum 15 685
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:10 450 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5,11]
F: recursive call construct - arguments: (A,10,450,49)
w[p, sum, diffsum] is not true w[49,10,450]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 450
B: newSum, newDiffSum 15 685
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 685 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5,5]
F: recursive call construct - arguments: (A,15,685,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 450
B: newSum, newDiffSum 16 734
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:16 734 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5,6]
F: recursive call construct - arguments: (A,16,734,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 450
B: newSum, newDiffSum 17 783
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 5 to 20 current i = 7 and arguments:17 783 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5,7]
F: recursive call construct - arguments: (A,17,783,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 450
B: newSum, newDiffSum 18 832
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 5 to 20 current i = 8 and arguments:18 832 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5,8]
F: recursive call construct - arguments: (A,18,832,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 450
B: newSum, newDiffSum 19 881
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 5 to 20 current i = 9 and arguments:19 881 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5,9]
F: recursive call construct - arguments: (A,19,881,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 450
B: newSum, newDiffSum 20 930
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 5 to 20 current i = 10 and arguments:20 930 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,5,10]
F: recursive call construct - arguments: (A,20,930,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 450
B: newSum, newDiffSum 21 979
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 979 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 5 215
B: newSum, newDiffSum 17 781
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 1 to 20 current i = 6 and arguments:11 498 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,6,10]
F: recursive call construct - arguments: (A,11,498,49)
w[p, sum, diffsum] is true - w[49,11,498] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 5 215
B: newSum, newDiffSum 19 877
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 1 to 20 current i = 7 and arguments:12 546 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,7,10]
F: recursive call construct - arguments: (A,12,546,49)
w[p, sum, diffsum] is true - w[49,12,546] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 5 215
B: newSum, newDiffSum 21 973
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 3
iterate on i =2
A: review sum, diffsum 4 172
B: newSum, newDiffSum 10 442
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:6 262 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,7,10]
F: recursive call construct - arguments: (A,6,262,48)
w[p, sum, diffsum] is not true w[48,6,262]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 6 262
B: newSum, newDiffSum 10 442
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 352 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,10]
F: recursive call construct - arguments: (A,8,352,49)
w[p, sum, diffsum] is not true w[49,8,352]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 8 352
B: newSum, newDiffSum 10 442
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:10 442 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,2]
F: recursive call construct - arguments: (A,10,442,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 8 352
B: newSum, newDiffSum 11 491
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:11 491 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,3]
F: recursive call construct - arguments: (A,11,491,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 8 352
B: newSum, newDiffSum 12 540
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:12 540 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,4]
F: recursive call construct - arguments: (A,12,540,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 8 352
B: newSum, newDiffSum 13 589
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:13 589 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,5]
F: recursive call construct - arguments: (A,13,589,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 8 352
B: newSum, newDiffSum 14 638
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:14 638 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,6]
F: recursive call construct - arguments: (A,14,638,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 8 352
B: newSum, newDiffSum 15 687
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:15 687 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,7]
F: recursive call construct - arguments: (A,15,687,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 8 352
B: newSum, newDiffSum 16 736
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:16 736 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,8]
F: recursive call construct - arguments: (A,16,736,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 8 352
B: newSum, newDiffSum 17 785
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:17 785 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,9]
F: recursive call construct - arguments: (A,17,785,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 8 352
B: newSum, newDiffSum 18 834
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:18 834 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,10]
F: recursive call construct - arguments: (A,18,834,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 8 352
B: newSum, newDiffSum 19 883
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:19 883 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,11]
F: recursive call construct - arguments: (A,19,883,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 8 352
B: newSum, newDiffSum 20 932
C: i, n, p i=12 n=50 p=49
D-set A[p]=i, A[p]=12 where p=49 and i=12
D-Normal: loop start to end: From 2 to 20 current i = 12 and arguments:20 932 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,2,12]
F: recursive call construct - arguments: (A,20,932,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =13
A: review sum, diffsum 8 352
B: newSum, newDiffSum 21 981
C: i, n, p i=13 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 981 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 6 262
B: newSum, newDiffSum 12 538
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 400 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,3,12]
F: recursive call construct - arguments: (A,9,400,49)
w[p, sum, diffsum] is true - w[49,9,400] - return -1
n-p=? 2
iterate on i =4
A: review sum, diffsum 6 262
B: newSum, newDiffSum 14 634
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 448 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,4,12]
F: recursive call construct - arguments: (A,10,448,49)
w[p, sum, diffsum] is true - w[49,10,448] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 6 262
B: newSum, newDiffSum 16 730
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:11 496 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,5,12]
F: recursive call construct - arguments: (A,11,496,49)
w[p, sum, diffsum] is true - w[49,11,496] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 6 262
B: newSum, newDiffSum 18 826
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:12 544 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,6,12]
F: recursive call construct - arguments: (A,12,544,49)
w[p, sum, diffsum] is true - w[49,12,544] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 6 262
B: newSum, newDiffSum 20 922
C: i, n, p i=7 n=50 p=48
D-set A[p]=i, A[p]=7 where p=48 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:13 592 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,2,7,12]
F: recursive call construct - arguments: (A,13,592,49)
w[p, sum, diffsum] is true - w[49,13,592] - return -1
n-p=? 2
iterate on i =8
A: review sum, diffsum 6 262
B: newSum, newDiffSum 22 1018
C: i, n, p i=8 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1018 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 4 172
B: newSum, newDiffSum 13 583
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:7 309 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,7,12]
F: recursive call construct - arguments: (A,7,309,48)
w[p, sum, diffsum] is not true w[48,7,309]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 7 309
B: newSum, newDiffSum 13 583
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 446 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,12]
F: recursive call construct - arguments: (A,10,446,49)
w[p, sum, diffsum] is not true w[49,10,446]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 446
B: newSum, newDiffSum 13 583
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 583 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,3]
F: recursive call construct - arguments: (A,13,583,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 446
B: newSum, newDiffSum 14 632
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 632 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,4]
F: recursive call construct - arguments: (A,14,632,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 446
B: newSum, newDiffSum 15 681
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 681 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,5]
F: recursive call construct - arguments: (A,15,681,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 446
B: newSum, newDiffSum 16 730
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:16 730 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,6]
F: recursive call construct - arguments: (A,16,730,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 446
B: newSum, newDiffSum 17 779
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:17 779 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,7]
F: recursive call construct - arguments: (A,17,779,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 446
B: newSum, newDiffSum 18 828
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:18 828 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,8]
F: recursive call construct - arguments: (A,18,828,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 446
B: newSum, newDiffSum 19 877
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:19 877 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,9]
F: recursive call construct - arguments: (A,19,877,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 446
B: newSum, newDiffSum 20 926
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:20 926 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,10]
F: recursive call construct - arguments: (A,20,926,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 446
B: newSum, newDiffSum 21 975
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 309
B: newSum, newDiffSum 15 679
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 494 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,4,10]
F: recursive call construct - arguments: (A,11,494,49)
w[p, sum, diffsum] is true - w[49,11,494] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 309
B: newSum, newDiffSum 17 775
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:12 542 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,5,10]
F: recursive call construct - arguments: (A,12,542,49)
w[p, sum, diffsum] is true - w[49,12,542] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 309
B: newSum, newDiffSum 19 871
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:13 590 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,6,10]
F: recursive call construct - arguments: (A,13,590,49)
w[p, sum, diffsum] is true - w[49,13,590] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 309
B: newSum, newDiffSum 21 967
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 4 172
B: newSum, newDiffSum 16 724
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:8 356 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,6,10]
F: recursive call construct - arguments: (A,8,356,48)
w[p, sum, diffsum] is not true w[48,8,356]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 356
B: newSum, newDiffSum 16 724
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:12 540 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,4,10]
F: recursive call construct - arguments: (A,12,540,49)
w[p, sum, diffsum] is true - w[49,12,540] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 356
B: newSum, newDiffSum 18 820
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:13 588 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,5,10]
F: recursive call construct - arguments: (A,13,588,49)
w[p, sum, diffsum] is true - w[49,13,588] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 356
B: newSum, newDiffSum 20 916
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:14 636 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,4,6,10]
F: recursive call construct - arguments: (A,14,636,49)
w[p, sum, diffsum] is true - w[49,14,636] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 356
B: newSum, newDiffSum 22 1012
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1012 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 4 172
B: newSum, newDiffSum 19 865
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 1 to 20 current i = 5 and arguments:9 403 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,5,6,10]
F: recursive call construct - arguments: (A,9,403,48)
w[p, sum, diffsum] is true - w[48,9,403] - return -1
n-p=? 3
iterate on i =6
A: review sum, diffsum 4 172
B: newSum, newDiffSum 22 1006
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 1006 exit for loop.
return 0
n-p=? 4
iterate on i =2
A: review sum, diffsum 3 129
B: newSum, newDiffSum 11 485
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:5 218 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,6,10]
F: recursive call construct - arguments: (A,5,218,47)
w[p, sum, diffsum] is not true w[47,5,218]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 5 218
B: newSum, newDiffSum 11 485
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:7 307 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,6,10]
F: recursive call construct - arguments: (A,7,307,48)
w[p, sum, diffsum] is not true w[48,7,307]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 7 307
B: newSum, newDiffSum 11 485
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:9 396 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,10]
F: recursive call construct - arguments: (A,9,396,49)
w[p, sum, diffsum] is not true w[49,9,396]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 9 396
B: newSum, newDiffSum 11 485
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:11 485 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2]
F: recursive call construct - arguments: (A,11,485,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 9 396
B: newSum, newDiffSum 12 534
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:12 534 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,3]
F: recursive call construct - arguments: (A,12,534,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 9 396
B: newSum, newDiffSum 13 583
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:13 583 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,4]
F: recursive call construct - arguments: (A,13,583,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 9 396
B: newSum, newDiffSum 14 632
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:14 632 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,5]
F: recursive call construct - arguments: (A,14,632,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 9 396
B: newSum, newDiffSum 15 681
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:15 681 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,6]
F: recursive call construct - arguments: (A,15,681,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 9 396
B: newSum, newDiffSum 16 730
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:16 730 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,7]
F: recursive call construct - arguments: (A,16,730,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 9 396
B: newSum, newDiffSum 17 779
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:17 779 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,8]
F: recursive call construct - arguments: (A,17,779,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 9 396
B: newSum, newDiffSum 18 828
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:18 828 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,9]
F: recursive call construct - arguments: (A,18,828,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 9 396
B: newSum, newDiffSum 19 877
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:19 877 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,10]
F: recursive call construct - arguments: (A,19,877,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 9 396
B: newSum, newDiffSum 20 926
C: i, n, p i=11 n=50 p=49
D-set A[p]=i, A[p]=11 where p=49 and i=11
D-Normal: loop start to end: From 2 to 20 current i = 11 and arguments:20 926 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,11]
F: recursive call construct - arguments: (A,20,926,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =12
A: review sum, diffsum 9 396
B: newSum, newDiffSum 21 975
C: i, n, p i=12 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 975 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 7 307
B: newSum, newDiffSum 13 581
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:10 444 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,11]
F: recursive call construct - arguments: (A,10,444,49)
w[p, sum, diffsum] is not true w[49,10,444]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 444
B: newSum, newDiffSum 13 581
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 581 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,3]
F: recursive call construct - arguments: (A,13,581,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 444
B: newSum, newDiffSum 14 630
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 630 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,4]
F: recursive call construct - arguments: (A,14,630,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 444
B: newSum, newDiffSum 15 679
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 679 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,5]
F: recursive call construct - arguments: (A,15,679,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 444
B: newSum, newDiffSum 16 728
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:16 728 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,6]
F: recursive call construct - arguments: (A,16,728,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 444
B: newSum, newDiffSum 17 777
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:17 777 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,7]
F: recursive call construct - arguments: (A,17,777,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 444
B: newSum, newDiffSum 18 826
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:18 826 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,8]
F: recursive call construct - arguments: (A,18,826,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 444
B: newSum, newDiffSum 19 875
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:19 875 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,9]
F: recursive call construct - arguments: (A,19,875,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 444
B: newSum, newDiffSum 20 924
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 3 to 20 current i = 10 and arguments:20 924 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,3,10]
F: recursive call construct - arguments: (A,20,924,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 444
B: newSum, newDiffSum 21 973
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 973 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 7 307
B: newSum, newDiffSum 15 677
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:11 492 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4,10]
F: recursive call construct - arguments: (A,11,492,49)
w[p, sum, diffsum] is not true w[49,11,492]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 492
B: newSum, newDiffSum 15 677
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 677 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4,4]
F: recursive call construct - arguments: (A,15,677,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 492
B: newSum, newDiffSum 16 726
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:16 726 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4,5]
F: recursive call construct - arguments: (A,16,726,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 492
B: newSum, newDiffSum 17 775
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:17 775 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4,6]
F: recursive call construct - arguments: (A,17,775,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 492
B: newSum, newDiffSum 18 824
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:18 824 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4,7]
F: recursive call construct - arguments: (A,18,824,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 492
B: newSum, newDiffSum 19 873
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 4 to 20 current i = 8 and arguments:19 873 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4,8]
F: recursive call construct - arguments: (A,19,873,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 492
B: newSum, newDiffSum 20 922
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 4 to 20 current i = 9 and arguments:20 922 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,4,9]
F: recursive call construct - arguments: (A,20,922,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 492
B: newSum, newDiffSum 21 971
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 971 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 7 307
B: newSum, newDiffSum 17 773
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:12 540 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,5,9]
F: recursive call construct - arguments: (A,12,540,49)
w[p, sum, diffsum] is true - w[49,12,540] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 7 307
B: newSum, newDiffSum 19 869
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:13 588 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,6,9]
F: recursive call construct - arguments: (A,13,588,49)
w[p, sum, diffsum] is true - w[49,13,588] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 7 307
B: newSum, newDiffSum 21 965
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 965 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 5 218
B: newSum, newDiffSum 14 626
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:8 354 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,6,9]
F: recursive call construct - arguments: (A,8,354,48)
w[p, sum, diffsum] is not true w[48,8,354]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 8 354
B: newSum, newDiffSum 14 626
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 490 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,9]
F: recursive call construct - arguments: (A,11,490,49)
w[p, sum, diffsum] is not true w[49,11,490]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 11 490
B: newSum, newDiffSum 14 626
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 626 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,3]
F: recursive call construct - arguments: (A,14,626,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 490
B: newSum, newDiffSum 15 675
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 675 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,4]
F: recursive call construct - arguments: (A,15,675,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 490
B: newSum, newDiffSum 16 724
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:16 724 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,5]
F: recursive call construct - arguments: (A,16,724,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 490
B: newSum, newDiffSum 17 773
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:17 773 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,6]
F: recursive call construct - arguments: (A,17,773,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 490
B: newSum, newDiffSum 18 822
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:18 822 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,7]
F: recursive call construct - arguments: (A,18,822,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 490
B: newSum, newDiffSum 19 871
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:19 871 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,8]
F: recursive call construct - arguments: (A,19,871,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 490
B: newSum, newDiffSum 20 920
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:20 920 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,3,9]
F: recursive call construct - arguments: (A,20,920,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 490
B: newSum, newDiffSum 21 969
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 969 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 354
B: newSum, newDiffSum 16 722
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 538 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,4,9]
F: recursive call construct - arguments: (A,12,538,49)
w[p, sum, diffsum] is true - w[49,12,538] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 354
B: newSum, newDiffSum 18 818
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:13 586 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,5,9]
F: recursive call construct - arguments: (A,13,586,49)
w[p, sum, diffsum] is true - w[49,13,586] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 354
B: newSum, newDiffSum 20 914
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:14 634 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,3,6,9]
F: recursive call construct - arguments: (A,14,634,49)
w[p, sum, diffsum] is true - w[49,14,634] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 354
B: newSum, newDiffSum 22 1010
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1010 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 5 218
B: newSum, newDiffSum 17 767
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:9 401 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,6,9]
F: recursive call construct - arguments: (A,9,401,48)
w[p, sum, diffsum] is not true w[48,9,401]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 401
B: newSum, newDiffSum 17 767
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:13 584 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,4,9]
F: recursive call construct - arguments: (A,13,584,49)
w[p, sum, diffsum] is true - w[49,13,584] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 401
B: newSum, newDiffSum 19 863
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:14 632 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,4,5,9]
F: recursive call construct - arguments: (A,14,632,49)
w[p, sum, diffsum] is true - w[49,14,632] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 401
B: newSum, newDiffSum 21 959
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 959 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 5 218
B: newSum, newDiffSum 20 908
C: i, n, p i=5 n=50 p=47
D-set A[p]=i, A[p]=5 where p=47 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:10 448 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,5,9]
F: recursive call construct - arguments: (A,10,448,48)
w[p, sum, diffsum] is not true w[48,10,448]
i=A[p-1], p=48, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 448
B: newSum, newDiffSum 20 908
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:15 678 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,2,5,5,9]
F: recursive call construct - arguments: (A,15,678,49)
w[p, sum, diffsum] is true - w[49,15,678] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 448
B: newSum, newDiffSum 22 1004
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1004 exit for loop.
return 0
n-p=? 3
iterate on i =6
A: review sum, diffsum 5 218
B: newSum, newDiffSum 23 1049
C: i, n, p i=6 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1049 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 3 129
B: newSum, newDiffSum 15 669
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:6 264 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,5,5,9]
F: recursive call construct - arguments: (A,6,264,47)
w[p, sum, diffsum] is true - w[47,6,264] - return -1
n-p=? 4
iterate on i =4
A: review sum, diffsum 3 129
B: newSum, newDiffSum 19 853
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 1 to 20 current i = 4 and arguments:7 310 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4,5,5,9]
F: recursive call construct - arguments: (A,7,310,47)
w[p, sum, diffsum] is true - w[47,7,310] - return -1
n-p=? 4
iterate on i =5
A: review sum, diffsum 3 129
B: newSum, newDiffSum 23 1037
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 23 1037 exit for loop.
return 0
n-p=? 5
iterate on i =2
A: review sum, diffsum 2 86
B: newSum, newDiffSum 12 526
C: i, n, p i=2 n=50 p=45
D-set A[p]=i, A[p]=2 where p=45 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:4 174 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,4,5,5,9]
F: recursive call construct - arguments: (A,4,174,46)
w[p, sum, diffsum] is not true w[46,4,174]
i=A[p-1], p=46, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 4
iterate on i =2
A: review sum, diffsum 4 174
B: newSum, newDiffSum 12 526
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 262 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,5,5,9]
F: recursive call construct - arguments: (A,6,262,47)
w[p, sum, diffsum] is not true w[47,6,262]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 6 262
B: newSum, newDiffSum 12 526
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 350 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,5,9]
F: recursive call construct - arguments: (A,8,350,48)
w[p, sum, diffsum] is not true w[48,8,350]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 8 350
B: newSum, newDiffSum 12 526
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:10 438 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,9]
F: recursive call construct - arguments: (A,10,438,49)
w[p, sum, diffsum] is not true w[49,10,438]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 10 438
B: newSum, newDiffSum 12 526
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:12 526 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,2]
F: recursive call construct - arguments: (A,12,526,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 10 438
B: newSum, newDiffSum 13 575
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:13 575 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,3]
F: recursive call construct - arguments: (A,13,575,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 10 438
B: newSum, newDiffSum 14 624
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:14 624 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,4]
F: recursive call construct - arguments: (A,14,624,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 10 438
B: newSum, newDiffSum 15 673
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:15 673 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,5]
F: recursive call construct - arguments: (A,15,673,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 10 438
B: newSum, newDiffSum 16 722
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:16 722 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,6]
F: recursive call construct - arguments: (A,16,722,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 10 438
B: newSum, newDiffSum 17 771
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:17 771 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,7]
F: recursive call construct - arguments: (A,17,771,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 10 438
B: newSum, newDiffSum 18 820
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:18 820 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,8]
F: recursive call construct - arguments: (A,18,820,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 10 438
B: newSum, newDiffSum 19 869
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:19 869 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,9]
F: recursive call construct - arguments: (A,19,869,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 10 438
B: newSum, newDiffSum 20 918
C: i, n, p i=10 n=50 p=49
D-set A[p]=i, A[p]=10 where p=49 and i=10
D-Normal: loop start to end: From 2 to 20 current i = 10 and arguments:20 918 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,10]
F: recursive call construct - arguments: (A,20,918,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =11
A: review sum, diffsum 10 438
B: newSum, newDiffSum 21 967
C: i, n, p i=11 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 967 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 8 350
B: newSum, newDiffSum 14 622
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:11 486 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,10]
F: recursive call construct - arguments: (A,11,486,49)
w[p, sum, diffsum] is not true w[49,11,486]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 11 486
B: newSum, newDiffSum 14 622
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 622 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,3]
F: recursive call construct - arguments: (A,14,622,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 486
B: newSum, newDiffSum 15 671
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 671 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,4]
F: recursive call construct - arguments: (A,15,671,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 486
B: newSum, newDiffSum 16 720
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:16 720 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,5]
F: recursive call construct - arguments: (A,16,720,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 486
B: newSum, newDiffSum 17 769
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:17 769 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,6]
F: recursive call construct - arguments: (A,17,769,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 486
B: newSum, newDiffSum 18 818
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:18 818 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,7]
F: recursive call construct - arguments: (A,18,818,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 486
B: newSum, newDiffSum 19 867
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:19 867 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,8]
F: recursive call construct - arguments: (A,19,867,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 486
B: newSum, newDiffSum 20 916
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 3 to 20 current i = 9 and arguments:20 916 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,3,9]
F: recursive call construct - arguments: (A,20,916,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 486
B: newSum, newDiffSum 21 965
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 965 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 8 350
B: newSum, newDiffSum 16 718
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:12 534 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,4,9]
F: recursive call construct - arguments: (A,12,534,49)
w[p, sum, diffsum] is true - w[49,12,534] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 8 350
B: newSum, newDiffSum 18 814
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:13 582 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,5,9]
F: recursive call construct - arguments: (A,13,582,49)
w[p, sum, diffsum] is true - w[49,13,582] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 8 350
B: newSum, newDiffSum 20 910
C: i, n, p i=6 n=50 p=48
D-set A[p]=i, A[p]=6 where p=48 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:14 630 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,6,9]
F: recursive call construct - arguments: (A,14,630,49)
w[p, sum, diffsum] is true - w[49,14,630] - return -1
n-p=? 2
iterate on i =7
A: review sum, diffsum 8 350
B: newSum, newDiffSum 22 1006
C: i, n, p i=7 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 1006 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 6 262
B: newSum, newDiffSum 15 667
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 397 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,6,9]
F: recursive call construct - arguments: (A,9,397,48)
w[p, sum, diffsum] is not true w[48,9,397]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 9 397
B: newSum, newDiffSum 15 667
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 532 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,9]
F: recursive call construct - arguments: (A,12,532,49)
w[p, sum, diffsum] is not true w[49,12,532]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 12 532
B: newSum, newDiffSum 15 667
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 667 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,3]
F: recursive call construct - arguments: (A,15,667,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 532
B: newSum, newDiffSum 16 716
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 716 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,4]
F: recursive call construct - arguments: (A,16,716,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 532
B: newSum, newDiffSum 17 765
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:17 765 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,5]
F: recursive call construct - arguments: (A,17,765,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 532
B: newSum, newDiffSum 18 814
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:18 814 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,6]
F: recursive call construct - arguments: (A,18,814,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 532
B: newSum, newDiffSum 19 863
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:19 863 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,7]
F: recursive call construct - arguments: (A,19,863,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 532
B: newSum, newDiffSum 20 912
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:20 912 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,3,8]
F: recursive call construct - arguments: (A,20,912,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 532
B: newSum, newDiffSum 21 961
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 961 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 397
B: newSum, newDiffSum 17 763
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:13 580 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4,8]
F: recursive call construct - arguments: (A,13,580,49)
w[p, sum, diffsum] is true - w[49,13,580] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 397
B: newSum, newDiffSum 19 859
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:14 628 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,5,8]
F: recursive call construct - arguments: (A,14,628,49)
w[p, sum, diffsum] is true - w[49,14,628] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 397
B: newSum, newDiffSum 21 955
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 955 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 6 262
B: newSum, newDiffSum 18 808
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:10 444 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,4,5,8]
F: recursive call construct - arguments: (A,10,444,48)
w[p, sum, diffsum] is true - w[48,10,444] - return -1
n-p=? 3
iterate on i =5
A: review sum, diffsum 6 262
B: newSum, newDiffSum 21 949
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 949 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 4 174
B: newSum, newDiffSum 16 710
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 308 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,5,8]
F: recursive call construct - arguments: (A,7,308,47)
w[p, sum, diffsum] is not true w[47,7,308]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 7 308
B: newSum, newDiffSum 16 710
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 442 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,5,8]
F: recursive call construct - arguments: (A,10,442,48)
w[p, sum, diffsum] is not true w[48,10,442]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 10 442
B: newSum, newDiffSum 16 710
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 576 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,3,8]
F: recursive call construct - arguments: (A,13,576,49)
w[p, sum, diffsum] is not true w[49,13,576]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 13 576
B: newSum, newDiffSum 16 710
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:16 710 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,3,3]
F: recursive call construct - arguments: (A,16,710,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 576
B: newSum, newDiffSum 17 759
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:17 759 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,3,4]
F: recursive call construct - arguments: (A,17,759,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 576
B: newSum, newDiffSum 18 808
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:18 808 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,3,5]
F: recursive call construct - arguments: (A,18,808,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 576
B: newSum, newDiffSum 19 857
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:19 857 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,3,6]
F: recursive call construct - arguments: (A,19,857,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 576
B: newSum, newDiffSum 20 906
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:20 906 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,3,7]
F: recursive call construct - arguments: (A,20,906,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 576
B: newSum, newDiffSum 21 955
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 955 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 442
B: newSum, newDiffSum 18 806
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 624 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,4,7]
F: recursive call construct - arguments: (A,14,624,49)
w[p, sum, diffsum] is not true w[49,14,624]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 624
B: newSum, newDiffSum 18 806
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:18 806 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,4,4]
F: recursive call construct - arguments: (A,18,806,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 624
B: newSum, newDiffSum 19 855
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:19 855 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,4,5]
F: recursive call construct - arguments: (A,19,855,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 624
B: newSum, newDiffSum 20 904
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:20 904 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,4,6]
F: recursive call construct - arguments: (A,20,904,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 624
B: newSum, newDiffSum 21 953
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 953 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 442
B: newSum, newDiffSum 20 902
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 672 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,3,5,6]
F: recursive call construct - arguments: (A,15,672,49)
w[p, sum, diffsum] is true - w[49,15,672] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 442
B: newSum, newDiffSum 22 998
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 998 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 7 308
B: newSum, newDiffSum 19 851
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:11 489 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,5,6]
F: recursive call construct - arguments: (A,11,489,48)
w[p, sum, diffsum] is not true w[48,11,489]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 489
B: newSum, newDiffSum 19 851
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:15 670 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,4,6]
F: recursive call construct - arguments: (A,15,670,49)
w[p, sum, diffsum] is not true w[49,15,670]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 670
B: newSum, newDiffSum 19 851
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 851 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,4,4]
F: recursive call construct - arguments: (A,19,851,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 670
B: newSum, newDiffSum 20 900
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 900 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,4,4,5]
F: recursive call construct - arguments: (A,20,900,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 670
B: newSum, newDiffSum 21 949
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 949 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 489
B: newSum, newDiffSum 21 947
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 947 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 7 308
B: newSum, newDiffSum 22 992
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 992 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 4 174
B: newSum, newDiffSum 20 894
C: i, n, p i=4 n=50 p=46
D-set A[p]=i, A[p]=4 where p=46 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:8 354 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,4,4,4,5]
F: recursive call construct - arguments: (A,8,354,47)
w[p, sum, diffsum] is true - w[47,8,354] - return -1
n-p=? 4
iterate on i =5
A: review sum, diffsum 4 174
B: newSum, newDiffSum 24 1078
C: i, n, p i=5 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 24 1078 exit for loop.
return 0
n-p=? 5
iterate on i =3
A: review sum, diffsum 2 86
B: newSum, newDiffSum 17 751
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:5 219 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,4,4,4,5]
F: recursive call construct - arguments: (A,5,219,46)
w[p, sum, diffsum] is not true w[46,5,219]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 5 219
B: newSum, newDiffSum 17 751
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 352 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,4,5]
F: recursive call construct - arguments: (A,8,352,47)
w[p, sum, diffsum] is not true w[47,8,352]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 8 352
B: newSum, newDiffSum 17 751
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 485 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,4,5]
F: recursive call construct - arguments: (A,11,485,48)
w[p, sum, diffsum] is not true w[48,11,485]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 11 485
B: newSum, newDiffSum 17 751
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 618 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,3,5]
F: recursive call construct - arguments: (A,14,618,49)
w[p, sum, diffsum] is not true w[49,14,618]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 14 618
B: newSum, newDiffSum 17 751
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:17 751 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,3,3]
F: recursive call construct - arguments: (A,17,751,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 618
B: newSum, newDiffSum 18 800
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:18 800 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,3,4]
F: recursive call construct - arguments: (A,18,800,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 618
B: newSum, newDiffSum 19 849
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:19 849 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,3,5]
F: recursive call construct - arguments: (A,19,849,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 618
B: newSum, newDiffSum 20 898
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:20 898 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,3,6]
F: recursive call construct - arguments: (A,20,898,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 618
B: newSum, newDiffSum 21 947
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 947 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 485
B: newSum, newDiffSum 19 847
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 666 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,4,6]
F: recursive call construct - arguments: (A,15,666,49)
w[p, sum, diffsum] is not true w[49,15,666]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 666
B: newSum, newDiffSum 19 847
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 847 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,4,4]
F: recursive call construct - arguments: (A,19,847,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 666
B: newSum, newDiffSum 20 896
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 896 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,4,5]
F: recursive call construct - arguments: (A,20,896,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 666
B: newSum, newDiffSum 21 945
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 945 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 485
B: newSum, newDiffSum 21 943
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 943 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 8 352
B: newSum, newDiffSum 20 892
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 532 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,4,5]
F: recursive call construct - arguments: (A,12,532,48)
w[p, sum, diffsum] is not true w[48,12,532]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 532
B: newSum, newDiffSum 20 892
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 712 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,4,5]
F: recursive call construct - arguments: (A,16,712,49)
w[p, sum, diffsum] is not true w[49,16,712]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 712
B: newSum, newDiffSum 20 892
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 892 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,4,4,4]
F: recursive call construct - arguments: (A,20,892,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 712
B: newSum, newDiffSum 21 941
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 941 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 532
B: newSum, newDiffSum 22 988
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 988 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 8 352
B: newSum, newDiffSum 23 1033
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1033 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 5 219
B: newSum, newDiffSum 21 935
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 21 935 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 2 86
B: newSum, newDiffSum 22 976
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 22 976 exit for loop.
return 0
n-p=? 6
iterate on i =2
A: review sum, diffsum 1 43
B: newSum, newDiffSum 13 565
C: i, n, p i=2 n=50 p=44
D-set A[p]=i, A[p]=2 where p=44 and i=2
D-Normal: loop start to end: From 1 to 20 current i = 2 and arguments:3 130 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,4,4]
F: recursive call construct - arguments: (A,3,130,45)
w[p, sum, diffsum] is not true w[45,3,130]
i=A[p-1], p=45, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 5
iterate on i =2
A: review sum, diffsum 3 130
B: newSum, newDiffSum 13 565
C: i, n, p i=2 n=50 p=45
D-set A[p]=i, A[p]=2 where p=45 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:5 217 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,4,4]
F: recursive call construct - arguments: (A,5,217,46)
w[p, sum, diffsum] is not true w[46,5,217]
i=A[p-1], p=46, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 4
iterate on i =2
A: review sum, diffsum 5 217
B: newSum, newDiffSum 13 565
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:7 304 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,4,4,4]
F: recursive call construct - arguments: (A,7,304,47)
w[p, sum, diffsum] is not true w[47,7,304]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 7 304
B: newSum, newDiffSum 13 565
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:9 391 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,4,4]
F: recursive call construct - arguments: (A,9,391,48)
w[p, sum, diffsum] is not true w[48,9,391]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 9 391
B: newSum, newDiffSum 13 565
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:11 478 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,4]
F: recursive call construct - arguments: (A,11,478,49)
w[p, sum, diffsum] is not true w[49,11,478]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 11 478
B: newSum, newDiffSum 13 565
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:13 565 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,2]
F: recursive call construct - arguments: (A,13,565,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 11 478
B: newSum, newDiffSum 14 614
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:14 614 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,3]
F: recursive call construct - arguments: (A,14,614,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 11 478
B: newSum, newDiffSum 15 663
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:15 663 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,4]
F: recursive call construct - arguments: (A,15,663,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 11 478
B: newSum, newDiffSum 16 712
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:16 712 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,5]
F: recursive call construct - arguments: (A,16,712,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 11 478
B: newSum, newDiffSum 17 761
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:17 761 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,6]
F: recursive call construct - arguments: (A,17,761,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 11 478
B: newSum, newDiffSum 18 810
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:18 810 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,7]
F: recursive call construct - arguments: (A,18,810,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 11 478
B: newSum, newDiffSum 19 859
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:19 859 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,8]
F: recursive call construct - arguments: (A,19,859,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 11 478
B: newSum, newDiffSum 20 908
C: i, n, p i=9 n=50 p=49
D-set A[p]=i, A[p]=9 where p=49 and i=9
D-Normal: loop start to end: From 2 to 20 current i = 9 and arguments:20 908 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,2,9]
F: recursive call construct - arguments: (A,20,908,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =10
A: review sum, diffsum 11 478
B: newSum, newDiffSum 21 957
C: i, n, p i=10 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 957 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 9 391
B: newSum, newDiffSum 15 661
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:12 526 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,9]
F: recursive call construct - arguments: (A,12,526,49)
w[p, sum, diffsum] is not true w[49,12,526]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 12 526
B: newSum, newDiffSum 15 661
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 661 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,3]
F: recursive call construct - arguments: (A,15,661,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 526
B: newSum, newDiffSum 16 710
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 710 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,4]
F: recursive call construct - arguments: (A,16,710,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 526
B: newSum, newDiffSum 17 759
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:17 759 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,5]
F: recursive call construct - arguments: (A,17,759,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 526
B: newSum, newDiffSum 18 808
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:18 808 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,6]
F: recursive call construct - arguments: (A,18,808,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 526
B: newSum, newDiffSum 19 857
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:19 857 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,7]
F: recursive call construct - arguments: (A,19,857,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 526
B: newSum, newDiffSum 20 906
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 3 to 20 current i = 8 and arguments:20 906 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,3,8]
F: recursive call construct - arguments: (A,20,906,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 526
B: newSum, newDiffSum 21 955
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 955 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 9 391
B: newSum, newDiffSum 17 757
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:13 574 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,4,8]
F: recursive call construct - arguments: (A,13,574,49)
w[p, sum, diffsum] is not true w[49,13,574]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 574
B: newSum, newDiffSum 17 757
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:17 757 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,4,4]
F: recursive call construct - arguments: (A,17,757,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 574
B: newSum, newDiffSum 18 806
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:18 806 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,4,5]
F: recursive call construct - arguments: (A,18,806,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 574
B: newSum, newDiffSum 19 855
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:19 855 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,4,6]
F: recursive call construct - arguments: (A,19,855,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 574
B: newSum, newDiffSum 20 904
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 4 to 20 current i = 7 and arguments:20 904 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,4,7]
F: recursive call construct - arguments: (A,20,904,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 574
B: newSum, newDiffSum 21 953
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 953 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 9 391
B: newSum, newDiffSum 19 853
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:14 622 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,5,7]
F: recursive call construct - arguments: (A,14,622,49)
w[p, sum, diffsum] is not true w[49,14,622]
i=A[p-1], p=49, i=5;
For loop (A - E): for(; i<=s;i++) i=5 s=20
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 622
B: newSum, newDiffSum 19 853
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 5 to 20 current i = 5 and arguments:19 853 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,5,5]
F: recursive call construct - arguments: (A,19,853,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 622
B: newSum, newDiffSum 20 902
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 5 to 20 current i = 6 and arguments:20 902 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,2,5,6]
F: recursive call construct - arguments: (A,20,902,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 622
B: newSum, newDiffSum 21 951
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 951 exit for loop.
return 0
n-p=? 2
iterate on i =6
A: review sum, diffsum 9 391
B: newSum, newDiffSum 21 949
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 949 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 7 304
B: newSum, newDiffSum 16 706
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:10 438 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,5,6]
F: recursive call construct - arguments: (A,10,438,48)
w[p, sum, diffsum] is not true w[48,10,438]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 10 438
B: newSum, newDiffSum 16 706
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 572 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,3,6]
F: recursive call construct - arguments: (A,13,572,49)
w[p, sum, diffsum] is not true w[49,13,572]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 13 572
B: newSum, newDiffSum 16 706
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:16 706 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,3,3]
F: recursive call construct - arguments: (A,16,706,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 572
B: newSum, newDiffSum 17 755
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:17 755 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,3,4]
F: recursive call construct - arguments: (A,17,755,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 572
B: newSum, newDiffSum 18 804
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:18 804 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,3,5]
F: recursive call construct - arguments: (A,18,804,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 572
B: newSum, newDiffSum 19 853
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:19 853 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,3,6]
F: recursive call construct - arguments: (A,19,853,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 572
B: newSum, newDiffSum 20 902
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:20 902 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,3,7]
F: recursive call construct - arguments: (A,20,902,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 572
B: newSum, newDiffSum 21 951
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 951 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 438
B: newSum, newDiffSum 18 802
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:14 620 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,4,7]
F: recursive call construct - arguments: (A,14,620,49)
w[p, sum, diffsum] is true - w[49,14,620] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 438
B: newSum, newDiffSum 20 898
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:15 668 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,3,5,7]
F: recursive call construct - arguments: (A,15,668,49)
w[p, sum, diffsum] is true - w[49,15,668] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 438
B: newSum, newDiffSum 22 994
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 994 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 7 304
B: newSum, newDiffSum 19 847
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:11 485 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,2,4,5,7]
F: recursive call construct - arguments: (A,11,485,48)
w[p, sum, diffsum] is true - w[48,11,485] - return -1
n-p=? 3
iterate on i =5
A: review sum, diffsum 7 304
B: newSum, newDiffSum 22 988
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 988 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 5 217
B: newSum, newDiffSum 17 749
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:8 350 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,5,7]
F: recursive call construct - arguments: (A,8,350,47)
w[p, sum, diffsum] is not true w[47,8,350]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 8 350
B: newSum, newDiffSum 17 749
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 483 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,5,7]
F: recursive call construct - arguments: (A,11,483,48)
w[p, sum, diffsum] is not true w[48,11,483]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 11 483
B: newSum, newDiffSum 17 749
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 616 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3,7]
F: recursive call construct - arguments: (A,14,616,49)
w[p, sum, diffsum] is not true w[49,14,616]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 14 616
B: newSum, newDiffSum 17 749
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:17 749 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3,3]
F: recursive call construct - arguments: (A,17,749,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 616
B: newSum, newDiffSum 18 798
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:18 798 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3,4]
F: recursive call construct - arguments: (A,18,798,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 616
B: newSum, newDiffSum 19 847
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:19 847 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3,5]
F: recursive call construct - arguments: (A,19,847,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 616
B: newSum, newDiffSum 20 896
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:20 896 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,3,6]
F: recursive call construct - arguments: (A,20,896,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 616
B: newSum, newDiffSum 21 945
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 945 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 483
B: newSum, newDiffSum 19 845
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 664 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,4,6]
F: recursive call construct - arguments: (A,15,664,49)
w[p, sum, diffsum] is not true w[49,15,664]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 664
B: newSum, newDiffSum 19 845
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:19 845 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,4,4]
F: recursive call construct - arguments: (A,19,845,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 664
B: newSum, newDiffSum 20 894
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:20 894 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,3,4,5]
F: recursive call construct - arguments: (A,20,894,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 664
B: newSum, newDiffSum 21 943
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 943 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 483
B: newSum, newDiffSum 21 941
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 941 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 8 350
B: newSum, newDiffSum 20 890
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:12 530 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,4,5]
F: recursive call construct - arguments: (A,12,530,48)
w[p, sum, diffsum] is not true w[48,12,530]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 530
B: newSum, newDiffSum 20 890
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 710 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,4,5]
F: recursive call construct - arguments: (A,16,710,49)
w[p, sum, diffsum] is not true w[49,16,710]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 710
B: newSum, newDiffSum 20 890
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 890 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,2,3,4,4,4]
F: recursive call construct - arguments: (A,20,890,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 710
B: newSum, newDiffSum 21 939
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 939 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 530
B: newSum, newDiffSum 22 986
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 986 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 8 350
B: newSum, newDiffSum 23 1031
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1031 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 5 217
B: newSum, newDiffSum 21 933
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 21 933 exit for loop.
return 0
n-p=? 5
iterate on i =3
A: review sum, diffsum 3 130
B: newSum, newDiffSum 18 790
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:6 262 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,4,4]
F: recursive call construct - arguments: (A,6,262,46)
w[p, sum, diffsum] is not true w[46,6,262]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 6 262
B: newSum, newDiffSum 18 790
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:9 394 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,4,4,4]
F: recursive call construct - arguments: (A,9,394,47)
w[p, sum, diffsum] is not true w[47,9,394]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 9 394
B: newSum, newDiffSum 18 790
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 526 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,4,4]
F: recursive call construct - arguments: (A,12,526,48)
w[p, sum, diffsum] is not true w[48,12,526]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 12 526
B: newSum, newDiffSum 18 790
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 658 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,3,4]
F: recursive call construct - arguments: (A,15,658,49)
w[p, sum, diffsum] is not true w[49,15,658]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 15 658
B: newSum, newDiffSum 18 790
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:18 790 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,3,3]
F: recursive call construct - arguments: (A,18,790,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 658
B: newSum, newDiffSum 19 839
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:19 839 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,3,4]
F: recursive call construct - arguments: (A,19,839,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 658
B: newSum, newDiffSum 20 888
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:20 888 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,3,5]
F: recursive call construct - arguments: (A,20,888,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 658
B: newSum, newDiffSum 21 937
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 937 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 526
B: newSum, newDiffSum 20 886
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 706 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,4,5]
F: recursive call construct - arguments: (A,16,706,49)
w[p, sum, diffsum] is not true w[49,16,706]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 706
B: newSum, newDiffSum 20 886
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 886 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,4,4]
F: recursive call construct - arguments: (A,20,886,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 706
B: newSum, newDiffSum 21 935
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 935 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 526
B: newSum, newDiffSum 22 982
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 982 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 9 394
B: newSum, newDiffSum 21 931
C: i, n, p i=4 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 931 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 6 262
B: newSum, newDiffSum 22 974
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 22 974 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 3 130
B: newSum, newDiffSum 23 1015
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 23 1015 exit for loop.
return 0
n-p=? 6
iterate on i =3
A: review sum, diffsum 1 43
B: newSum, newDiffSum 19 829
C: i, n, p i=3 n=50 p=44
D-set A[p]=i, A[p]=3 where p=44 and i=3
D-Normal: loop start to end: From 1 to 20 current i = 3 and arguments:4 174 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,4,4]
F: recursive call construct - arguments: (A,4,174,45)
w[p, sum, diffsum] is not true w[45,4,174]
i=A[p-1], p=45, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 5
iterate on i =3
A: review sum, diffsum 4 174
B: newSum, newDiffSum 19 829
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:7 305 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,4,4]
F: recursive call construct - arguments: (A,7,305,46)
w[p, sum, diffsum] is not true w[46,7,305]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 7 305
B: newSum, newDiffSum 19 829
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 436 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,4,4]
F: recursive call construct - arguments: (A,10,436,47)
w[p, sum, diffsum] is not true w[47,10,436]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 10 436
B: newSum, newDiffSum 19 829
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 567 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,4,4]
F: recursive call construct - arguments: (A,13,567,48)
w[p, sum, diffsum] is not true w[48,13,567]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 13 567
B: newSum, newDiffSum 19 829
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:16 698 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,16,698,49)
w[p, sum, diffsum] is not true w[49,16,698]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 16 698
B: newSum, newDiffSum 19 829
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:19 829 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,3,3]
F: recursive call construct - arguments: (A,19,829,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 698
B: newSum, newDiffSum 20 878
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:20 878 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,20,878,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 698
B: newSum, newDiffSum 21 927
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 927 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 13 567
B: newSum, newDiffSum 21 925
C: i, n, p i=4 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 925 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 10 436
B: newSum, newDiffSum 22 970
C: i, n, p i=4 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 970 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 7 305
B: newSum, newDiffSum 23 1013
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 23 1013 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 4 174
B: newSum, newDiffSum 24 1054
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 24 1054 exit for loop.
return 0
n-p=? 6
iterate on i =4
A: review sum, diffsum 1 43
B: newSum, newDiffSum 25 1093
C: i, n, p i=4 n=50 p=44
D-Exception: newSum, newDiffSum are bigger than s, k 25 1093 exit for loop.
return 0
n-p=? 7
iterate on i =2
A: review sum, diffsum 0 0
B: newSum, newDiffSum 14 602
C: i, n, p i=2 n=50 p=43
D-set A[p]=i, A[p]=2 where p=43 and i=2
D-Normal: loop start to end: From 0 to 20 current i = 2 and arguments:2 86 44
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,2,86,44)
w[p, sum, diffsum] is not true w[44,2,86]
i=A[p-1], p=44, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 6
iterate on i =2
A: review sum, diffsum 2 86
B: newSum, newDiffSum 14 602
C: i, n, p i=2 n=50 p=44
D-set A[p]=i, A[p]=2 where p=44 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:4 172 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,3,4]
F: recursive call construct - arguments: (A,4,172,45)
w[p, sum, diffsum] is not true w[45,4,172]
i=A[p-1], p=45, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 5
iterate on i =2
A: review sum, diffsum 4 172
B: newSum, newDiffSum 14 602
C: i, n, p i=2 n=50 p=45
D-set A[p]=i, A[p]=2 where p=45 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:6 258 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,3,4]
F: recursive call construct - arguments: (A,6,258,46)
w[p, sum, diffsum] is not true w[46,6,258]
i=A[p-1], p=46, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 4
iterate on i =2
A: review sum, diffsum 6 258
B: newSum, newDiffSum 14 602
C: i, n, p i=2 n=50 p=46
D-set A[p]=i, A[p]=2 where p=46 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:8 344 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,3,4]
F: recursive call construct - arguments: (A,8,344,47)
w[p, sum, diffsum] is not true w[47,8,344]
i=A[p-1], p=47, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 3
iterate on i =2
A: review sum, diffsum 8 344
B: newSum, newDiffSum 14 602
C: i, n, p i=2 n=50 p=47
D-set A[p]=i, A[p]=2 where p=47 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:10 430 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,4]
F: recursive call construct - arguments: (A,10,430,48)
w[p, sum, diffsum] is not true w[48,10,430]
i=A[p-1], p=48, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 2
iterate on i =2
A: review sum, diffsum 10 430
B: newSum, newDiffSum 14 602
C: i, n, p i=2 n=50 p=48
D-set A[p]=i, A[p]=2 where p=48 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:12 516 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,4]
F: recursive call construct - arguments: (A,12,516,49)
w[p, sum, diffsum] is not true w[49,12,516]
i=A[p-1], p=49, i=2;
For loop (A - E): for(; i<=s;i++) i=2 s=20
n-p=? 1
iterate on i =2
A: review sum, diffsum 12 516
B: newSum, newDiffSum 14 602
C: i, n, p i=2 n=50 p=49
D-set A[p]=i, A[p]=2 where p=49 and i=2
D-Normal: loop start to end: From 2 to 20 current i = 2 and arguments:14 602 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2]
F: recursive call construct - arguments: (A,14,602,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =3
A: review sum, diffsum 12 516
B: newSum, newDiffSum 15 651
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:15 651 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,3]
F: recursive call construct - arguments: (A,15,651,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 12 516
B: newSum, newDiffSum 16 700
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:16 700 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,4]
F: recursive call construct - arguments: (A,16,700,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 12 516
B: newSum, newDiffSum 17 749
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:17 749 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,5]
F: recursive call construct - arguments: (A,17,749,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 12 516
B: newSum, newDiffSum 18 798
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 2 to 20 current i = 6 and arguments:18 798 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,6]
F: recursive call construct - arguments: (A,18,798,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 12 516
B: newSum, newDiffSum 19 847
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 2 to 20 current i = 7 and arguments:19 847 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,7]
F: recursive call construct - arguments: (A,19,847,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 12 516
B: newSum, newDiffSum 20 896
C: i, n, p i=8 n=50 p=49
D-set A[p]=i, A[p]=8 where p=49 and i=8
D-Normal: loop start to end: From 2 to 20 current i = 8 and arguments:20 896 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,8]
F: recursive call construct - arguments: (A,20,896,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =9
A: review sum, diffsum 12 516
B: newSum, newDiffSum 21 945
C: i, n, p i=9 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 945 exit for loop.
return 0
n-p=? 2
iterate on i =3
A: review sum, diffsum 10 430
B: newSum, newDiffSum 16 698
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:13 564 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,8]
F: recursive call construct - arguments: (A,13,564,49)
w[p, sum, diffsum] is not true w[49,13,564]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 13 564
B: newSum, newDiffSum 16 698
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:16 698 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,3]
F: recursive call construct - arguments: (A,16,698,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 13 564
B: newSum, newDiffSum 17 747
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:17 747 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,4]
F: recursive call construct - arguments: (A,17,747,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 13 564
B: newSum, newDiffSum 18 796
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:18 796 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,5]
F: recursive call construct - arguments: (A,18,796,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 13 564
B: newSum, newDiffSum 19 845
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:19 845 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,6]
F: recursive call construct - arguments: (A,19,845,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 13 564
B: newSum, newDiffSum 20 894
C: i, n, p i=7 n=50 p=49
D-set A[p]=i, A[p]=7 where p=49 and i=7
D-Normal: loop start to end: From 3 to 20 current i = 7 and arguments:20 894 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,3,7]
F: recursive call construct - arguments: (A,20,894,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =8
A: review sum, diffsum 13 564
B: newSum, newDiffSum 21 943
C: i, n, p i=8 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 943 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 10 430
B: newSum, newDiffSum 18 794
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:14 612 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,4,7]
F: recursive call construct - arguments: (A,14,612,49)
w[p, sum, diffsum] is not true w[49,14,612]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 612
B: newSum, newDiffSum 18 794
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:18 794 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,4,4]
F: recursive call construct - arguments: (A,18,794,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 612
B: newSum, newDiffSum 19 843
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 4 to 20 current i = 5 and arguments:19 843 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,4,5]
F: recursive call construct - arguments: (A,19,843,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 612
B: newSum, newDiffSum 20 892
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 4 to 20 current i = 6 and arguments:20 892 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,4,6]
F: recursive call construct - arguments: (A,20,892,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 612
B: newSum, newDiffSum 21 941
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 941 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 10 430
B: newSum, newDiffSum 20 890
C: i, n, p i=5 n=50 p=48
D-set A[p]=i, A[p]=5 where p=48 and i=5
D-Normal: loop start to end: From 2 to 20 current i = 5 and arguments:15 660 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,5,6]
F: recursive call construct - arguments: (A,15,660,49)
w[p, sum, diffsum] is true - w[49,15,660] - return -1
n-p=? 2
iterate on i =6
A: review sum, diffsum 10 430
B: newSum, newDiffSum 22 986
C: i, n, p i=6 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 986 exit for loop.
return 0
n-p=? 3
iterate on i =3
A: review sum, diffsum 8 344
B: newSum, newDiffSum 17 743
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:11 477 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,5,6]
F: recursive call construct - arguments: (A,11,477,48)
w[p, sum, diffsum] is not true w[48,11,477]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 11 477
B: newSum, newDiffSum 17 743
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 610 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,3,6]
F: recursive call construct - arguments: (A,14,610,49)
w[p, sum, diffsum] is not true w[49,14,610]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 14 610
B: newSum, newDiffSum 17 743
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:17 743 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,3,3]
F: recursive call construct - arguments: (A,17,743,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 14 610
B: newSum, newDiffSum 18 792
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:18 792 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,3,4]
F: recursive call construct - arguments: (A,18,792,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 14 610
B: newSum, newDiffSum 19 841
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:19 841 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,3,5]
F: recursive call construct - arguments: (A,19,841,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 14 610
B: newSum, newDiffSum 20 890
C: i, n, p i=6 n=50 p=49
D-set A[p]=i, A[p]=6 where p=49 and i=6
D-Normal: loop start to end: From 3 to 20 current i = 6 and arguments:20 890 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,3,6]
F: recursive call construct - arguments: (A,20,890,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =7
A: review sum, diffsum 14 610
B: newSum, newDiffSum 21 939
C: i, n, p i=7 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 939 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 11 477
B: newSum, newDiffSum 19 839
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:15 658 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,3,4,6]
F: recursive call construct - arguments: (A,15,658,49)
w[p, sum, diffsum] is true - w[49,15,658] - return -1
n-p=? 2
iterate on i =5
A: review sum, diffsum 11 477
B: newSum, newDiffSum 21 935
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 935 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 8 344
B: newSum, newDiffSum 20 884
C: i, n, p i=4 n=50 p=47
D-set A[p]=i, A[p]=4 where p=47 and i=4
D-Normal: loop start to end: From 2 to 20 current i = 4 and arguments:12 524 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,4,6]
F: recursive call construct - arguments: (A,12,524,48)
w[p, sum, diffsum] is not true w[48,12,524]
i=A[p-1], p=48, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 524
B: newSum, newDiffSum 20 884
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:16 704 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,4,6]
F: recursive call construct - arguments: (A,16,704,49)
w[p, sum, diffsum] is not true w[49,16,704]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 704
B: newSum, newDiffSum 20 884
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 884 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,4,4,4]
F: recursive call construct - arguments: (A,20,884,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 704
B: newSum, newDiffSum 21 933
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 933 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 524
B: newSum, newDiffSum 22 980
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 980 exit for loop.
return 0
n-p=? 3
iterate on i =5
A: review sum, diffsum 8 344
B: newSum, newDiffSum 23 1025
C: i, n, p i=5 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1025 exit for loop.
return 0
n-p=? 4
iterate on i =3
A: review sum, diffsum 6 258
B: newSum, newDiffSum 18 786
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:9 390 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,4,4,4]
F: recursive call construct - arguments: (A,9,390,47)
w[p, sum, diffsum] is not true w[47,9,390]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 9 390
B: newSum, newDiffSum 18 786
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:12 522 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4]
F: recursive call construct - arguments: (A,12,522,48)
w[p, sum, diffsum] is not true w[48,12,522]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 12 522
B: newSum, newDiffSum 18 786
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:15 654 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,3,4]
F: recursive call construct - arguments: (A,15,654,49)
w[p, sum, diffsum] is not true w[49,15,654]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 15 654
B: newSum, newDiffSum 18 786
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:18 786 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,3,3]
F: recursive call construct - arguments: (A,18,786,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 15 654
B: newSum, newDiffSum 19 835
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:19 835 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,3,4]
F: recursive call construct - arguments: (A,19,835,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 15 654
B: newSum, newDiffSum 20 884
C: i, n, p i=5 n=50 p=49
D-set A[p]=i, A[p]=5 where p=49 and i=5
D-Normal: loop start to end: From 3 to 20 current i = 5 and arguments:20 884 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,3,5]
F: recursive call construct - arguments: (A,20,884,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =6
A: review sum, diffsum 15 654
B: newSum, newDiffSum 21 933
C: i, n, p i=6 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 933 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 12 522
B: newSum, newDiffSum 20 882
C: i, n, p i=4 n=50 p=48
D-set A[p]=i, A[p]=4 where p=48 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:16 702 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,5]
F: recursive call construct - arguments: (A,16,702,49)
w[p, sum, diffsum] is not true w[49,16,702]
i=A[p-1], p=49, i=4;
For loop (A - E): for(; i<=s;i++) i=4 s=20
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 702
B: newSum, newDiffSum 20 882
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 4 to 20 current i = 4 and arguments:20 882 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4]
F: recursive call construct - arguments: (A,20,882,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 702
B: newSum, newDiffSum 21 931
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 931 exit for loop.
return 0
n-p=? 2
iterate on i =5
A: review sum, diffsum 12 522
B: newSum, newDiffSum 22 978
C: i, n, p i=5 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 978 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 9 390
B: newSum, newDiffSum 21 927
C: i, n, p i=4 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 21 927 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 6 258
B: newSum, newDiffSum 22 970
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 22 970 exit for loop.
return 0
n-p=? 5
iterate on i =3
A: review sum, diffsum 4 172
B: newSum, newDiffSum 19 827
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:7 303 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,4,4]
F: recursive call construct - arguments: (A,7,303,46)
w[p, sum, diffsum] is not true w[46,7,303]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 7 303
B: newSum, newDiffSum 19 827
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:10 434 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,4,4]
F: recursive call construct - arguments: (A,10,434,47)
w[p, sum, diffsum] is not true w[47,10,434]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 10 434
B: newSum, newDiffSum 19 827
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:13 565 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,4,4]
F: recursive call construct - arguments: (A,13,565,48)
w[p, sum, diffsum] is not true w[48,13,565]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 13 565
B: newSum, newDiffSum 19 827
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:16 696 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,3,4]
F: recursive call construct - arguments: (A,16,696,49)
w[p, sum, diffsum] is not true w[49,16,696]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 16 696
B: newSum, newDiffSum 19 827
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:19 827 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,3,3]
F: recursive call construct - arguments: (A,19,827,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 16 696
B: newSum, newDiffSum 20 876
C: i, n, p i=4 n=50 p=49
D-set A[p]=i, A[p]=4 where p=49 and i=4
D-Normal: loop start to end: From 3 to 20 current i = 4 and arguments:20 876 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,3,3,3,3,4]
F: recursive call construct - arguments: (A,20,876,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =5
A: review sum, diffsum 16 696
B: newSum, newDiffSum 21 925
C: i, n, p i=5 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 925 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 13 565
B: newSum, newDiffSum 21 923
C: i, n, p i=4 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 21 923 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 10 434
B: newSum, newDiffSum 22 968
C: i, n, p i=4 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 22 968 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 7 303
B: newSum, newDiffSum 23 1011
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 23 1011 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 4 172
B: newSum, newDiffSum 24 1052
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 24 1052 exit for loop.
return 0
n-p=? 6
iterate on i =3
A: review sum, diffsum 2 86
B: newSum, newDiffSum 20 866
C: i, n, p i=3 n=50 p=44
D-set A[p]=i, A[p]=3 where p=44 and i=3
D-Normal: loop start to end: From 2 to 20 current i = 3 and arguments:5 216 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,5,216,45)
w[p, sum, diffsum] is not true w[45,5,216]
i=A[p-1], p=45, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 5
iterate on i =3
A: review sum, diffsum 5 216
B: newSum, newDiffSum 20 866
C: i, n, p i=3 n=50 p=45
D-set A[p]=i, A[p]=3 where p=45 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:8 346 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,8,346,46)
w[p, sum, diffsum] is not true w[46,8,346]
i=A[p-1], p=46, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 4
iterate on i =3
A: review sum, diffsum 8 346
B: newSum, newDiffSum 20 866
C: i, n, p i=3 n=50 p=46
D-set A[p]=i, A[p]=3 where p=46 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:11 476 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,11,476,47)
w[p, sum, diffsum] is not true w[47,11,476]
i=A[p-1], p=47, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 3
iterate on i =3
A: review sum, diffsum 11 476
B: newSum, newDiffSum 20 866
C: i, n, p i=3 n=50 p=47
D-set A[p]=i, A[p]=3 where p=47 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:14 606 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,14,606,48)
w[p, sum, diffsum] is not true w[48,14,606]
i=A[p-1], p=48, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 2
iterate on i =3
A: review sum, diffsum 14 606
B: newSum, newDiffSum 20 866
C: i, n, p i=3 n=50 p=48
D-set A[p]=i, A[p]=3 where p=48 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:17 736 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3,4]
F: recursive call construct - arguments: (A,17,736,49)
w[p, sum, diffsum] is not true w[49,17,736]
i=A[p-1], p=49, i=3;
For loop (A - E): for(; i<=s;i++) i=3 s=20
n-p=? 1
iterate on i =3
A: review sum, diffsum 17 736
B: newSum, newDiffSum 20 866
C: i, n, p i=3 n=50 p=49
D-set A[p]=i, A[p]=3 where p=49 and i=3
D-Normal: loop start to end: From 3 to 20 current i = 3 and arguments:20 866 50
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,3,3,3,3,3]
F: recursive call construct - arguments: (A,20,866,50)
p==n return 0 whereas p=50 n=50
n-p=? 1
iterate on i =4
A: review sum, diffsum 17 736
B: newSum, newDiffSum 21 915
C: i, n, p i=4 n=50 p=49
D-Exception: newSum, newDiffSum are bigger than s, k 21 915 exit for loop.
return 0
n-p=? 2
iterate on i =4
A: review sum, diffsum 14 606
B: newSum, newDiffSum 22 962
C: i, n, p i=4 n=50 p=48
D-Exception: newSum, newDiffSum are bigger than s, k 22 962 exit for loop.
return 0
n-p=? 3
iterate on i =4
A: review sum, diffsum 11 476
B: newSum, newDiffSum 23 1007
C: i, n, p i=4 n=50 p=47
D-Exception: newSum, newDiffSum are bigger than s, k 23 1007 exit for loop.
return 0
n-p=? 4
iterate on i =4
A: review sum, diffsum 8 346
B: newSum, newDiffSum 24 1050
C: i, n, p i=4 n=50 p=46
D-Exception: newSum, newDiffSum are bigger than s, k 24 1050 exit for loop.
return 0
n-p=? 5
iterate on i =4
A: review sum, diffsum 5 216
B: newSum, newDiffSum 25 1091
C: i, n, p i=4 n=50 p=45
D-Exception: newSum, newDiffSum are bigger than s, k 25 1091 exit for loop.
return 0
n-p=? 6
iterate on i =4
A: review sum, diffsum 2 86
B: newSum, newDiffSum 26 1130
C: i, n, p i=4 n=50 p=44
D-Exception: newSum, newDiffSum are bigger than s, k 26 1130 exit for loop.
return 0
n-p=? 7
iterate on i =3
A: review sum, diffsum 0 0
B: newSum, newDiffSum 21 903
C: i, n, p i=3 n=50 p=43
D-Exception: newSum, newDiffSum are bigger than s, k 21 903 exit for loop.
return 0
n-p=? 8
iterate on i =1
A: review sum, diffsum 0 0
B: newSum, newDiffSum 8 336
C: i, n, p i=1 n=50 p=42
D-set A[p]=i, A[p]=1 where p=42 and i=1
D-Normal: loop start to end: From 0 to 20 current i = 1 and arguments:1 42 43
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,3,3,3]
F: recursive call construct - arguments: (A,1,42,43)
w[p, sum, diffsum] is not true w[43,1,42]
i=A[p-1], p=43, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 7
iterate on i =1
A: review sum, diffsum 1 42
B: newSum, newDiffSum 8 336
C: i, n, p i=1 n=50 p=43
D-set A[p]=i, A[p]=1 where p=43 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:2 84 44
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,3,3,3,3,3]
F: recursive call construct - arguments: (A,2,84,44)
w[p, sum, diffsum] is not true w[44,2,84]
i=A[p-1], p=44, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 6
iterate on i =1
A: review sum, diffsum 2 84
B: newSum, newDiffSum 8 336
C: i, n, p i=1 n=50 p=44
D-set A[p]=i, A[p]=1 where p=44 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:3 126 45
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,3,3,3,3,3]
F: recursive call construct - arguments: (A,3,126,45)
w[p, sum, diffsum] is not true w[45,3,126]
i=A[p-1], p=45, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 5
iterate on i =1
A: review sum, diffsum 3 126
B: newSum, newDiffSum 8 336
C: i, n, p i=1 n=50 p=45
D-set A[p]=i, A[p]=1 where p=45 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:4 168 46
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,3,3,3,3]
F: recursive call construct - arguments: (A,4,168,46)
w[p, sum, diffsum] is not true w[46,4,168]
i=A[p-1], p=46, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 4
iterate on i =1
A: review sum, diffsum 4 168
B: newSum, newDiffSum 8 336
C: i, n, p i=1 n=50 p=46
D-set A[p]=i, A[p]=1 where p=46 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:5 210 47
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,3,3,3]
F: recursive call construct - arguments: (A,5,210,47)
w[p, sum, diffsum] is not true w[47,5,210]
i=A[p-1], p=47, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 3
iterate on i =1
A: review sum, diffsum 5 210
B: newSum, newDiffSum 8 336
C: i, n, p i=1 n=50 p=47
D-set A[p]=i, A[p]=1 where p=47 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:6 252 48
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,3,3]
F: recursive call construct - arguments: (A,6,252,48)
w[p, sum, diffsum] is not true w[48,6,252]
i=A[p-1], p=48, i=1;
For loop (A - E): for(; i<=s;i++) i=1 s=20
n-p=? 2
iterate on i =1
A: review sum, diffsum 6 252
B: newSum, newDiffSum 8 336
C: i, n, p i=1 n=50 p=48
D-set A[p]=i, A[p]=1 where p=48 and i=1
D-Normal: loop start to end: From 1 to 20 current i = 1 and arguments:7 294 49
E: Array A is [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment