Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.052 s | 3 KBi |
#2 |
Correcto
|
0.036 s | 3 KBi |
#3 |
Incorrecto
|
0.046 s | 3 KBi |
#4 |
Correcto
|
0.024 s | 3 KBi |
#5 |
Correcto
|
0.026 s | 3 KBi |
#6 |
Correcto
|
0.019 s | 3 KBi |
#7 |
Incorrecto
|
0.057 s | 3 KBi |
#8 |
Incorrecto
|
0.021 s | 3 KBi |
#9 |
Correcto
|
0.023 s | 3 KBi |
#10 |
Correcto
|
0.02 s | 3 KBi |
#11 |
Correcto
|
0.02 s | 3 KBi |
#12 |
Correcto
|
0.025 s | 3 KBi |
#13 |
Correcto
|
0.392 s | 3 KBi |
#14 |
Incorrecto
|
0.429 s | 3 KBi |
#15 |
Incorrecto
|
0.746 s | 3 KBi |
def toMinutesArray(times: str): res = [0, 0] startEnd = times.split() hourMin = startEnd[0].split(':') res[0] = int(hourMin[0]) * 60 + int(hourMin[1]) hourMin = startEnd[1].split(':') res[1] = int(hourMin[0]) * 60 + int(hourMin[1]) return res MAX_MINS = 1500 N = int(input()) table = [0] * MAX_MINS res = table[0] for i in range(N): startEnd = toMinutesArray(input()) table[startEnd[0]] += 1 table[startEnd[1] + 1] -= 1 sum = 0 res = 0 for i in range(1, MAX_MINS): table[i] += table[i-1] res = max(res, table[i]) print(res)