Created
November 23, 2016 20:27
-
-
Save crised/ac56b3ff18032f2a78919d5d4dbd2d6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAX_INT = 2 ** 31 - 1 | |
ans = 0 | |
def merge(a, p, q, r): | |
left = list(a[p:q]) | |
right = list(a[q:r]) | |
for i in xrange(len(left)): | |
for j in xrange(len(right)): | |
if left[i] > right[j]: | |
ans = ans + 1 | |
print ans |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment