image/svg+xml
1
1
2
3
3
4
1
1
5
5
2
3
1
4
0
1
2
3
4
5
6
7
8
9
10
11
12
13
0
1
2
3
4
5
6
7
8
9
10
11
12
13
s=argsort:
i=unargsort:
0
1
5
7
8
10
2
3
12
13
6
9
4
11
b=a[s]:
1
1
2
3
3
4
1
1
5
5
2
3
1
4
dfill(b):
1
1
1
1
5
7
10
12
0
...diff:
5,2,3,2,2
...repeat:
0,0,0,0,0,5,5,7,7,7,10,10,12,12
...where:
arange(n)-dfill(b):
0,1,2,3,4,0,1,0,1,2,0,1,0,1
(arange(n)-dfill(b))[i]:
0
1
0
0
1
0
2
3
0
1
1
2
4
1
1
1
2
3
3
4
1
1
5
5
2
3
1
4
in:
in: