Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.058 s | 3 KBi |
#2 |
Correcto
|
0.018 s | 3 KBi |
#3 |
Correcto
|
0.03 s | 3 KBi |
#4 |
Correcto
|
0.022 s | 3 KBi |
#5 |
Correcto
|
0.027 s | 3 KBi |
#6 |
Correcto
|
0.018 s | 3 KBi |
#7 |
Correcto
|
0.023 s | 3 KBi |
#8 |
Correcto
|
0.023 s | 3 KBi |
#9 |
Correcto
|
0.027 s | 3 KBi |
#10 |
Correcto
|
0.03 s | 3 KBi |
#11 |
Correcto
|
0.027 s | 3 KBi |
#12 |
Correcto
|
0.042 s | 3 KBi |
#13 |
Correcto
|
0.552 s | 3 KBi |
#14 |
Correcto
|
0.252 s | 3 KBi |
#15 |
Correcto
|
0.487 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 = 0 for i in range(N): startEnd = toMinutesArray(input()) table[startEnd[0]] += 1 table[startEnd[1]] -= 1 for i in range(1, MAX_MINS): table[i] += table[i-1] res = max(res, table[i]) print(res)