Data hosted with ♥ by
Pastebin.com
-
Download Raw
-
See Original
int
invCnt
(
int
A
[
]
,
int
n
)
{
int
i
,
j
;
int
cnt
=
0
;
for
(
i
=
0
;
i
<
n
-
1
;
++
i
)
for
(
j
=
i
+
1
;
j
<
n
;
++
j
)
if
(
A
[
i
]
>
A
[
j
]
)
cnt
++;
return
cnt
;
}