Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))

li = list(itertools.permutations(P,N))
li.sort()

a = 0
b = 0

for i in range(math.factorial(N)):
    if li[i] == P:
        a = i
    elif li[i] == Q:
        b = i
    else:
        a = a
        b = b
        
print(abs(a-b))


Fixed submission:
import math
import itertools

N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))

li = list(itertools.permutations(P,N))
li.sort()

a = 0
b = 0

for i in range(math.factorial(N)):
    if li[i] == P:
        a = i
    else:
        a = a

for i in range(math.factorial(N)):
    if li[i] == Q:
        b = i
    else:
        b = b
        
print(abs(a-b))

Buggy python submission (verdict: Runtime Error):
N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))

li = list(itertools.permutations(P ,N))

a = 0
b = 0

for i in range(math.factorial(N)):
    if li[i] == P:
        a = i
    elif li[i] == Q:
        b = i
    else:
        a = a
        b = b
        
print(abs(a-b))

Fixed submission:
import math
import itertools

N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))

li = list(itertools.permutations(P,N))
li.sort()

a = 0
b = 0

for i in range(math.factorial(N)):
    if li[i] == P:
        a = i
    else:
        a = a

for i in range(math.factorial(N)):
    if li[i] == Q:
        b = i
    else:
        b = b
        
print(abs(a-b))

Buggy python submission (verdict: Runtime Error):
#C - Count Order
N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))

li = list(itertools.permutations(P ,N))

a = 0
b = 0

for i in range(math.factorial(3)):
    if li[i] == P:
        a = i
    elif li[i] == Q:
        b = i
    else:
        a = a
        b = b
        
print(abs(a-b))

Fixed submission:
import math
import itertools

N = int(input())
P = tuple(map(int,input().split()))
Q = tuple(map(int,input().split()))

li = list(itertools.permutations(P,N))
li.sort()

a = 0
b = 0

for i in range(math.factorial(N)):
    if li[i] == P:
        a = i
    else:
        a = a

for i in range(math.factorial(N)):
    if li[i] == Q:
        b = i
    else:
        b = b
        
print(abs(a-b))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
for i in range(N):
  ans += B[A[i]]
  if A[i]+1 == A[i+1]:
    ans += C[A[i]]

print(ans)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

ans = 0
for i in range(N):
  ans += B[A[i]-1]
  if i < N - 1 and A[i] == A[i+1]-1:
    ans += C[A[i]-1]

print(ans)
Buggy python submission (verdict: Runtime Error):
L, R = map(int, input().split())

print(min([i * j % 2019 for i in range(L, R) for j in range(i+1, R)]))


Fixed submission:
L, R = map(int, input().split())

if L == 0:
    print(0)
elif not L // 2019 == R // 2019:
    print(0)
else:
    L %= 2019
    R %= 2019
    ans = 2020
    for i in range(L, R):
        for j in range(i+1, R+1):
            tmp = (i * j) % 2019
            if tmp < ans:
                ans = tmp
    print(ans)
Buggy python submission (verdict: Runtime Error):
from functools import lru_cache


@lru_cache(maxsize=10000000)
def get_ways(n):
    if n == 1 or n == 2:
        return n
    elif n == 0:
        return 1
    elif n == -1:
        return 0
    else:
        return get_ways(n - 2) + get_ways(n - 1)


N, M = map(int, input().split())
ans = 1
tmp = 0
for i in range(M):
    a = int(input())
    ans *= get_ways(a - tmp - 1)
    tmp = a + 1
ans *= get_ways(N - tmp)
print(ans % 1000000007)


Fixed submission:
from functools import lru_cache
import sys
sys.setrecursionlimit(10**6)


@lru_cache(maxsize=1000000)
def get_ways(n):
    if n == 1 or n == 2:
        return n
    elif n == 0:
        return 1
    elif n == -1:
        return 0
    else:
        return get_ways(n - 2) + get_ways(n - 1)


N, M = map(int, input().split())
ans = 1
tmp = 0
for i in range(M):
    a = int(input())
    ans *= get_ways(a - tmp - 1)
    tmp = a + 1
ans *= get_ways(N - tmp)
print(ans % 1000000007)

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache


@lru_cache(maxsize=100000)
def get_ways(n):
    if n == 1 or n == 2:
        return n
    elif n == 0:
        return 1
    elif n == -1:
        return 0
    else:
        return get_ways(n - 2) + get_ways(n - 1)


N, M = map(int, input().split())
ans = 1
tmp = 0
for i in range(M):
    a = int(input())
    ans *= get_ways(a - tmp - 1)
    tmp = a + 1
ans *= get_ways(N - tmp)
print(ans % 1000000007)


Fixed submission:
from functools import lru_cache
import sys
sys.setrecursionlimit(10**6)


@lru_cache(maxsize=1000000)
def get_ways(n):
    if n == 1 or n == 2:
        return n
    elif n == 0:
        return 1
    elif n == -1:
        return 0
    else:
        return get_ways(n - 2) + get_ways(n - 1)


N, M = map(int, input().split())
ans = 1
tmp = 0
for i in range(M):
    a = int(input())
    ans *= get_ways(a - tmp - 1)
    tmp = a + 1
ans *= get_ways(N - tmp)
print(ans % 1000000007)
Buggy python submission (verdict: Runtime Error):
L = [int(input()) for i in range(len("abcde"))]
k = int(input())

for i in range(5):
  for j in range(i, 5):
    if abs(L[i] - L[i+j+1]) > k:
      print(":(")
      break
  else:
    continue
  break
else:
  print("Yay!")



Fixed submission:
L = [int(input()) for i in range(len("abcde"))]
k = int(input())

for i in range(4):
    for j in range(i+1, 5):
        if abs(L[i] - L[j]) > k:
            print(":(")
            break
    else:
        continue
    break
else:
    print("Yay!")
Buggy python submission (verdict: Runtime Error):
base = {'A':'A', 'C':'T', 'G':'C', 'T':'G'}

b = int(input())
print(base[b])


Fixed submission:
base = {'A':'T', 'C':'G', 'G':'C', 'T':'A'}
 
b = input()
print(base[b])
Buggy python submission (verdict: Runtime Error):
def f(n):
  if n % 2 == 0:
    return n//2
  else:
    return 3*n + 1


s = int(input())
a = [s]
i = 0
while True:
  s = f(a[i])
  if a in s:
    print(i)
    break
  else:
    a.append(s)
    i += 1


Fixed submission:
def f(n):
  if n % 2 == 0:
    return n//2
  else:
    return 3*n + 1


s = int(input())
a = [s]
i = 0
while True:
  s = f(a[i])
  if s in a:
    print(i+2)
    break
  else:
    a.append(s)
    i += 1

Buggy python submission (verdict: Runtime Error):
def f(n):
  if n % 2 == 0:
    return n//2
  else:
    return 3*n + 1


s = int(input())
a = [s]
i = 0
while True:
  s = f(a[i])
  if a in s:
    print(i)
    break
  else:
    a.ppend(s)
    i += 1

Fixed submission:
def f(n):
  if n % 2 == 0:
    return n//2
  else:
    return 3*n + 1


s = int(input())
a = [s]
i = 0
while True:
  s = f(a[i])
  if s in a:
    print(i+2)
    break
  else:
    a.append(s)
    i += 1
Buggy python submission (verdict: Time Limit Exceeded):
N, W = map(int, input().split())
w = [0 for _ in range(N)]
v = [0 for _ in range(N)]
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = [[0 for _ in range(W+1)] for _ in range(N+1)]

for i in range(N):
    for sum_w in range(1, W+1):
        if sum_w - w[i] >= 0:
            dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w - w[i]] + v[i])
        dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w])

print(dp[N][W])


Fixed submission:
N, W = map(int, input().split())
w = [0 for _ in range(N)]
v = [0 for _ in range(N)]
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = [[0 for _ in range(W+1)] for _ in range(N+1)]

for i in range(N):
    for sum_w in range(1, W+1):
        if sum_w - w[i] >= 0:
            dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w - w[i]] + v[i])
        dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w])

print(dp[N][W])
Buggy python submission (verdict: Time Limit Exceeded):
N, W = map(int, input().split())
w = [0 for _ in range(N)]
v = [0 for _ in range(N)]
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = [[0 for _ in range(W+1)] for _ in range(N+1)]

for i in range(N):
    for sum_w in range(1, W+1):
        if sum_w - w[i] >= 0:
            dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w - w[i]] + v[i])
        dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w])

print(dp[N][W])


Fixed submission:
MAX_V = 100100
MAX_N = 101
INF = pow(2, 70)

N, W = map(int, input().split())
w = [0 for _ in range(N)]
v = [0 for _ in range(N)]
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = [[INF for _ in range(MAX_V)] for _ in range(N + 1)]
dp[0][0] = 0
for i in range(N):
    for sum_v in range(MAX_V):
        # print(i, sum_v, sum_v - v[i] >= 0)
        if sum_v - v[i] >= 0:
            dp[i+1][sum_v] = min(dp[i+1][sum_v], dp[i][sum_v - v[i]] + w[i])
        dp[i+1][sum_v] = min(dp[i+1][sum_v], dp[i][sum_v])
        # print(dp[i + 1][sum_v])

ans = max([i for i in range(len(dp[N])) if dp[N][i] <= W])
# for l in dp:
#     print([n for n in l if not n == INF])

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
N = len(S)

W = [i for i, x in enumerate(S) if x == 'W']
B = [i for i, x in enumerate(S) if x == 'B']

print(sum([len([b for b in B if b < w]) for w in W]))


Fixed submission:
S = input()
N = len(S)

# W = [i for i, x in enumerate(S) if x == 'W']
# B = [i for i, x in enumerate(S) if x == 'B']
#
# print(sum([len([b for b in B if b < w]) for w in W]))

dp = [0] * (N + 1)
ans = 0
for i in range(1, N + 1):
    if S[i-1] == 'B':
        dp[i] = dp[i-1] + 1
    else:
        dp[i] = dp[i-1]
        ans += dp[i]

print(ans)
Buggy python submission (verdict: Runtime Error):
import math


# def burger_generator(n):
#     if n == 0:
#         return int("101", 2)
#     else:
#         lt = burger_generator(n-1)
#         x1 = 1 + (lt << 1)
#         length = int(math.log2(x1)) + 1
#         x1 = x1 + (lt << length + 1)
#         length = int(math.log2(x1)) + 1
#         return x1 + (1 << length)


def f(N, X):
    if X == 1:
        return 0
    if 1 < X <= 1 + size[N - 1]:
        return f(N - 1, X - 1)
    if X == 2 + size[N]:
        return patty[N - 1] + 1
    if 2 + size[N - 1] < X <= 2 + 2 * size[N - 1]:
        return patty[N - 1] + 1 + f(N - 1, X - 2 - size[N - 1])
    if X == 3 + 2 * size[N - 1]:
        return 2 * patty[N - 1] + 1


N, X = map(int, input().split())
print(N, X)
# burger = format(burger_generator(N), "b")
# print(burger[-K:].count("0"))
size, patty = [1], [1]
for i in range(N):
    size.append(size[i] * 2 + 3)
    patty.append(patty[i] * 2 + 1)

print(f(N, X))


Fixed submission:
import math


# def burger_generator(n):
#     if n == 0:
#         return int("101", 2)
#     else:
#         lt = burger_generator(n-1)
#         x1 = 1 + (lt << 1)
#         length = int(math.log2(x1)) + 1
#         x1 = x1 + (lt << length + 1)
#         length = int(math.log2(x1)) + 1
#         return x1 + (1 << length)


def f(N, X):
    if X == 1:
        # print(1)
        return 0 if not N == 0 else 1
    elif X <= 1 + size[N - 1]:
        # print(2)
        return f(N - 1, X - 1)
    elif X == 2 + size[N - 1]:
        # print(3)
        return patty[N - 1] + 1
    elif X <= 2 + 2 * size[N - 1]:
        # print(4)
        return patty[N - 1] + 1 + f(N - 1, X - 2 - size[N - 1])
    elif X == 3 + 2 * size[N - 1]:
        # print(5)
        return 2 * patty[N - 1] + 1


N, X = map(int, input().split())
# burger = format(burger_generator(N), "b")
# print(burger[-K:].count("0"))
size, patty = [1], [1]
for i in range(N):
    size.append(size[i] * 2 + 3)
    patty.append(patty[i] * 2 + 1)
# for i in range(N):
#     print(size)
# for i in range(N):
#     print(patty)
print(f(N, X))
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
ans = 0
for x in range(K + 1):
    for y in range(K + 1):
        for z in range(K + 1):
            # print(x, y, z)
            if x + y + z == S:
                ans += 1
print(ans)


Fixed submission:
K, S = map(int, input().split())
ans = 0
for x in range(K + 1):
    for y in range(K + 1):
        ans += 1 if 0 <= S - x - y <= K else 0
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
ans = 0
for x in range(K + 1):
    for y in range(K + 1):
        for z in range(K + 1):
            # print(x, y, z)
            if x + y + z == S:
                ans += 1
print(ans)


Fixed submission:
K, S = map(int, input().split())
ans = 0
for x in range(K + 1):
    for y in range(K + 1):
        ans += 1 if 0 <= S - x - y <= K else 0
print(ans)
Buggy python submission (verdict: Runtime Error):
n, k = map(int,input().split())
d = list(map(str, input().split()))
while(n>0):
    S = str(n)
    t = 0
    for i in S:
        if i not in d:
            t += 1
    if t == len(S):
        print(int(S))
        break
    else:
        n += 1

Fixed submission:
x = list(map(int,input().split()))
n5=0
n7=0
for i in range(len(x)):
    if(x[i]==5):n5=n5+1
    if(x[i]==7):n7=n7+1
if(n5==2 and n7==1):print("YES")
else:print("NO")
Buggy python submission (verdict: Runtime Error):
n, k, q= map(int, input().split())
a = [int(input()) for i in range(q)]

b = [k - q] * n

for i in range(q):
    b[a[i - 1]] += 1

for i in range(n):
    if b[i] > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
n, k, q= map(int, input().split())
a = [int(input()) for i in range(q)]

b = [k - q] * n

for i in range(q):
    b[a[i] - 1] += 1

for j in range(n):
    if b[j] > 0:
        print('Yes')
    else:
        print('No')

Buggy python submission (verdict: Runtime Error):
n, k, q= map(int, input().split())
a = [int(input()) for i in range(q)]

b = [k - q] * n

for i in range(q):
    b[a[i - 1]] += 1

for i in range(n):
    if b[i] > 0:
        print('Yes')
    else:
        print('No')

Fixed submission:
n, k, q= map(int, input().split())
a = [int(input()) for i in range(q)]

b = [k - q] * n

for i in range(q):
    b[a[i] - 1] += 1

for j in range(n):
    if b[j] > 0:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
a = int(input())
s = str(input())

if a >= 3200:
    print(s)
else:
    print(red)

Fixed submission:
a = int(input())
s = str(input())

if a >= 3200:
    print(s)
else:
    print('red')
Buggy python submission (verdict: Time Limit Exceeded):
N = input()
N = int(N)

list_modified = []

for n in range(1, N + 1):
    s = input()
    list_s = sorted(s)
    new_s = ''.join(list_s)
    list_modified.append(new_s)
    
m = 0
    
for k in range(0, N):
    for l in range (k + 1, N):
        if list_modified[k] == list_modified[l]:
            m += 1
        else:
            continue

print(m)

Fixed submission:
N = int(input())
list_anagram = [''.join(sorted(str(input()))) for i in range(N)]
 
list_anagram.sort()
ans = 0
 
x = 1
 
for i in range(1, N):
    if i != N - 1 and list_anagram[i] == list_anagram[i - 1]:
        x += 1
    elif i != N - 1 and list_anagram[i] != list_anagram[i - 1]:
        ans = ans + x * (x - 1) // 2
        x = 1
    elif i == N - 1 and list_anagram[i] == list_anagram[i - 1]:
        x += 1
        ans = ans + x * (x - 1) //2
    else:
        ans = ans + x * (x - 1) // 2
 
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = input()
N = int(N)
list_anagram = []
list_modified = []
for n in range(1, N + 1):
    s = input()
    #list_anagram.append(s)
    list_s = []
    for i in range(0, 10):
        list_s.append(s[i])
    list_s.sort()
    s_modified = ''
    for i in range(0, 10):
        s_modified = s_modified + list_s[i]
    list_modified.append(s_modified)
    
m = 0
    
for k in range(0, N):
    for l in range (k + 1, N):
        if list_modified[k] == list_modified[l]:
            m += 1
        else:
            continue
print(m)

Fixed submission:
N = int(input())
list_anagram = [''.join(sorted(str(input()))) for i in range(N)]
 
list_anagram.sort()
ans = 0
 
x = 1
 
for i in range(1, N):
    if i != N - 1 and list_anagram[i] == list_anagram[i - 1]:
        x += 1
    elif i != N - 1 and list_anagram[i] != list_anagram[i - 1]:
        ans = ans + x * (x - 1) // 2
        x = 1
    elif i == N - 1 and list_anagram[i] == list_anagram[i - 1]:
        x += 1
        ans = ans + x * (x - 1) //2
    else:
        ans = ans + x * (x - 1) // 2
 
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = tuple(int(input()) for i in range(N))

B = list(A)

for j in range(N):
    B.pop(j)
    print(max(B))
    B = list(A)

Fixed submission:
N = int(input())
A = list(int(input()) for i in range(N))

max_value = max(A)
number = A.count(max_value)

if number > 1:
    for j in range(N):
        print(max_value)
else:
    position = A.index(max_value)
    A.remove(max_value)
    for j in range(N):
        if j == position:
            print(max(A))
        else:
            print(max_value)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = tuple(int(input()) for i in range(N)

B = list(A)

for j in range(N):
    B.pop(j)
    print(max(B))
    B = list(A)

Fixed submission:
N = int(input())
A = list(int(input()) for i in range(N))

max_value = max(A)
number = A.count(max_value)

if number > 1:
    for j in range(N):
        print(max_value)
else:
    position = A.index(max_value)
    A.remove(max_value)
    for j in range(N):
        if j == position:
            print(max(A))
        else:
            print(max_value)
Buggy python submission (verdict: Time Limit Exceeded):
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K, *P = map(int, read().split())

ans = 0
for i in range(N - K + 1):
    L = P[i:i + K]
    s = (sum(L) + K) / 2
    ans = max(s, ans)
print('{:.10f}'.format(ans))


Fixed submission:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

import itertools

# import math
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K, *P = map(int, read().split())
R = list(itertools.accumulate(P))
ans = 0
for i in range(K - 1, N):
    if i - K >= 0:
        s = ((R[i] - R[i - K]) + K) / 2
    else:
        s = (R[i] + K) / 2
    ans = max(s, ans)
print('{:.6f}'.format(ans))

Buggy python submission (verdict: Runtime Error):
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K, *P = map(int, read().split())

ans = 0
for i in range(N - K + 1):
    L = P[i:i + K]
    s = (sum(L) + K) / 2
    ans = max(s, ans)
print(f'{ans:.10f}')


Fixed submission:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

import itertools

# import math
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, K, *P = map(int, read().split())
R = list(itertools.accumulate(P))
ans = 0
for i in range(K - 1, N):
    if i - K >= 0:
        s = ((R[i] - R[i - K]) + K) / 2
    else:
        s = (R[i] + K) / 2
    ans = max(s, ans)
print('{:.6f}'.format(ans))
Buggy python submission (verdict: Time Limit Exceeded):
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
INF = 10 ** 9

N, *P = map(int, read().split())
ans = 0
for i in range(1, len(P)+1):
    if min(P[:i]) == P[:i][-1]:
        ans += 1
print(ans)


Fixed submission:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
INF = 10 ** 9

N = int(readline())

P = np.array(readline().split(), np.int32)
Q = np.minimum.accumulate(P)
ans = np.count_nonzero(P <= Q)
print(ans)
Buggy python submission (verdict: Runtime Error):
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H = readline().decode('utf8')
print(chr(ord(H) + 1))


Fixed submission:
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import itertools
# import math

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

H = readline().decode('utf8').strip()
print(chr(ord(H) + 1))
Buggy python submission (verdict: Runtime Error):
N=int(input())
S=input().split()
print(len(set(S))

Fixed submission:
"""
author : halo2halo
date : 19,Oct,2019
"""

import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
words = readline().rstrip()
preword = '1'
ans = 0
for word in words:
    if preword != word:
        ans += 1
        preword = word

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, *A = map(int, read().split())
B = sorted(A)
ans=[]
for i in B:
    ans.append(A.index(i)+1)
print(*ans, sep=' ')

Fixed submission:
"""
author : halo2halo
date : 18,Oct,2019
"""

import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)


N = int(readline())
A = [int(x) for x in readline().split()]
ans = [None]*N

for i, a in enumerate(A):
    ans[a-1] = i+1


print(*ans)
Buggy python submission (verdict: Runtime Error):
"""
author : halo2halo
date : 19,Oct,2019
"""

import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

A,B=map(int,readline())

print(max({A * B, A + B, A - B}))


Fixed submission:
"""
author : halo2halo
date : 19,Oct,2019
"""

import sys
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

A,B=map(int,readline().split())

print(max({A * B, A + B, A - B}))
Buggy python submission (verdict: Runtime Error):
"""
author : halo2halo
date : 10, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buf"""
author : halo2halo
date : 11, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, M = map(int, read().split())
S = N + M

print(S // 2 if S % 2 == 0 else 'IMPOSSIBLE')
fer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, M = map(int, read().split())
S = N + M

print(S // 2 if S % 2 == 0 else 'IMPOSSIBLE')


Fixed submission:
"""
author : halo2halo
date : 10, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, M = map(int, read().split())
S = N + M

print(S // 2 if S % 2 == 0 else 'IMPOSSIBLE')
Buggy python submission (verdict: Runtime Error):
"""
author : halo2halo
date : 13,Nov,2019
"""

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

print(3*int(read()**2))


Fixed submission:
"""
author : halo2halo
date : 13,Nov,2019
"""

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

print(3*int(read())**2)