Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.037 s | 8 KBi |
#2 |
Correcto
|
0.029 s | 4 KBi |
#3 |
Correcto
|
0.024 s | 3 KBi |
#4 |
Correcto
|
0.029 s | 3 KBi |
#5 |
Correcto
|
0.025 s | 4 KBi |
#6 |
Correcto
|
0.016 s | 3 KBi |
#7 |
Correcto
|
0.027 s | 3 KBi |
#8 |
Correcto
|
0.031 s | 3 KBi |
#9 |
Correcto
|
0.029 s | 5 KBi |
#10 |
Incorrecto
|
0.017 s | 4 KBi |
#11 |
Correcto
|
0.026 s | 3 KBi |
#12 |
Incorrecto
|
0.022 s | 3 KBi |
#13 |
Incorrecto
|
0.026 s | 3 KBi |
#14 |
Correcto
|
0.025 s | 3 KBi |
#15 |
Correcto
|
0.033 s | 4 KBi |
#16 |
Incorrecto
|
0.037 s | 3 KBi |
#17 |
Incorrecto
|
0.035 s | 4 KBi |
#18 |
Correcto
|
0.041 s | 4 KBi |
#19 |
Correcto
|
0.033 s | 3 KBi |
#20 |
Incorrecto
|
0.021 s | 3 KBi |
def magic_square(square, n): for i in range(0, n): for j in range(0, n): if i == 0 and j == 0: continue if j == 0: square[i][j] += square[i - 1][n - 1] else: square[i][j] += square[i][j - 1] if square[n - 1][n - 1] // (n * n) > 0: print("Yes") else: print("No") n = int(input()) square = [[int(x) for x in input().split()] for _ in range(n)] magic_square(square, n)