Skip to content

Latest commit

 

History

History
14 lines (12 loc) · 378 Bytes

230625_롤케이크 자르기.md

File metadata and controls

14 lines (12 loc) · 378 Bytes
# N의 최대는 1000... N^2여도 백만 가능

from collections import defaultdict

def solution(book_time):
    room_dict = defaultdict(int)
    for s,e in book_time:
        start = int(s[:2]) * 60 + int(s[3:])
        end = int(e[:2]) * 60 + int(e[3:]) + 10
        for time in range(start, end):
            room_dict[time] += 1
    return max(room_dict.values())