Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- apitestcase
- Coroutine
- dry-yasg
- nestedfunction
- django
- aggregate
- Git
- Prefetch_related
- database
- EC2
- F객체
- Transaction
- to_attr
- CI
- Continuous Deployment
- CD
- DRF
- Continuous Delivery
- annotate
- Python
- 코루틴
- testcase
- DjangoCache
- docker
- DjangoRestFramework
- 백준
- QuerySet
- 도커
- racecondition
- aws
Archives
- Today
- Total
목록1931 (1)
BackEnd King KY

✔️문제 https://www.acmicpc.net/problem/1931 1931번: 회의실 배정 (1,4), (5,7), (8,11), (12,14) 를 이용할 수 있다. www.acmicpc.net ✔️풀이 n = int(input()) l = [] for i in range(n): l.append(list(map(int, input().split()))) l = sorted(l, key=lambda a:a[0]) l = sorted(l, key=lambda a:a[1]) cnt = 0 base = 0 for i,j in l: if i >= base: base = j cnt +=1 print(cnt) 정렬 방법에 대해 찾아봤는데 sorted에서 key=lamda a:a[0] 이렇게 하면 a[0] ..
Algorithms
2022. 3. 24. 23:15