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 | 31 |
Tags
- Focal Loss
- ComputerVision
- pytorch
- BatchNormalization
- noiserobustness
- 우선순위큐
- labelsmoothing
- focalloss
- 밑바닥부터 시작하는 딥러닝
- 힙
- 중복순열
- layernormalization
- autograd
- 프로그래머스
- objectdetection
- Optimizer
- f1loss
- 네이버 ai 부스트캠프
- fasterRCNN
- ImageClassification
- cmp_to_key
- 네이버AI부스트캠프
- labelsmoothingloss
- 정렬
- l2penalty
- 자료구조끝판왕문제
- clibration
- mmdetectionv3
- DataAugmentation
- inference
Archives
- Today
- Total
목록정렬 (2)
HealthyAI

~ 개 이상 인 값들이 ~개 이상 있다. 라는 표현이 나온다면 정렬을 하고 인덱스 값을 붙이면서 풀 수 있을 것 같다. def solution(citations): stack = [] citations.sort(reverse = True) for i, c in enumerate(citations, start = 1): stack.append(min(i,c)) return max(stack)
Coding test/프로그래머스
2023. 1. 19. 15:47

처음에는 itertools의 permutations 함수를 사용해서 풀었는데 런타임 초과 문제로 다른 방법을 찾아야 했다. from itertools import permutations def solution(numbers): answer = '' stack = [] numbers = [str(i) for i in numbers] for p in permutations(numbers, len(numbers)): stack.append(int(''.join(p))) return str(max(stack)) 이 과정에서 functools 모듈의 cmp_to_key 함수를 알게 되었다. 두 문자의 결합을 비교하여 1,0 반환 시 위치를 그대로 하고 -1 반환 시 위치를 바꿔준다. from functools i..
Coding test/프로그래머스
2023. 1. 19. 15:45