본문 바로가기

공돌이 공룡의 서재

검색하기
공돌이 공룡의 서재
프로필사진 구름위의공룡

  • 분류 전체보기 (50)
    • 코딩 (21)
      • 자료구조 (3)
      • 프로그래머스 (10)
      • opencv (7)
    • 딥러닝 (27)
      • Vision (9)
      • NLP (3)
      • NeRF (0)
      • Tracking (3)
      • Model (3)
      • 3D (4)
      • GAN (1)
    • 컴퓨터비전 (2)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
일 월 화 수 목 금 토
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
  • 3D
  • NLP
  • Threshold
  • re-identification
  • transformer
  • deep learning
  • level2
  • Deeplearning
  • 스택
  • 파이썬
  • OpenCV
  • point cloud
  • 큐
  • numpy
  • center loss
  • Python
  • 자료구조
  • attention
  • 딥러닝
  • cv2
  • Knowledge Distillation
  • Object Detection
  • reconstruction
  • 임계처리
  • flame
  • 프로그래머스
  • 논문 구현
  • Object Tracking
  • 알고리즘
  • Computer Vision
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록Greedy (1)

공돌이 공룡의 서재

[프로그래머스 Level 1] 체육복 / 탐욕법 / 파이썬

def solution(n, lost, reserve): give = reserve.copy() for i in range(len(reserve)): if reserve[i] in lost: lost.remove(reserve[i]) give.remove(reserve[i]) check = lost.copy() reserve = give for i in range(len(reserve)): if reserve[i] - 1 in check: if len(check) != 0: check.remove(reserve[i]-1) elif reserve[i] + 1 in check: if len(check) != 0: check.remove(reserve[i]+1) else: pass return n - len(..

코딩/프로그래머스 2020. 7. 9. 01:33
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바