Как заменить в данном случае циклы, чтобы не выскакивала ошибка runtime-error(RE) при тесте? 59/60 тестов норм, ошибка на последнем
import numpy as np
def rocauc(x3):
return [item
for sublist in x3
for item in sublist
]
N = int(input())
a = [[float(i) for i in input().split()] for _ in range(N)]
floating_a = rocauc(a)
x1 = np.array(floating_a[::2])
x2 = np.array(floating_a[1::2])
x11, x12 = np.meshgrid(x1, x1)
x21, x22 = np.meshgrid(x2, x2)
x_condition = (x11>x12)
final = ((np.sum(x_condition & (x21 > x22))+ np.sum(x_condition & (x21 == x22))*0.5) / np.sum(x_condition))
print("%.6f" % final)