13300
-
[Python] BOJ 13300 : 방배정코딩테스트/백준 2024. 10. 11. 08:22
요구사항시간 제한 2초 N과 K가 각각 1000메모리 제한 512MB 조건에 맞게 모든 학생을 배정하기 위해 필요한 방의 최소 개수설계 1파이썬에서 제공하는 모듈을 불러와서 사용해야겠다.combination 으로 시작. 조합 중 같다면 count 구현 1from itertools import combinationsN, K = map(int, input().split())student_list = [tuple(map(int, input().split())) for _ in range(N)]combi_student_list = list(combinations(student_list, K))count = 0for combi in combi_student_list: if combi[0] == combi[1..