coh
coh
profile
오철호
Written by coh
글시리즈소개
태그 목록
  • 전체보기(48)
  • python(34)
  • 백준(20)
  • BFS(8)
  • DFS(6)
  • stack(5)
  • html(5)
  • python문법(4)
  • git(3)
  • Backtracking(3)
  • 42Seoul(3)
  • Binary Search(2)
  • heap(1)
  • memoization(1)
  • recursion(1)
  • ft_printf(1)
  • html5(1)
  • file(1)
  • Algorithms(1)
  • GNL(1)
  • error(1)
  • Problem(1)
  • Depth_first_search(1)
  • pointer(1)
  • Libft(1)
  • C(1)
  • gitignore(1)
  • Breadth_first_search(1)
  • Circular_Linked_List(1)
  • struct(1)
  • linear search(1)
  • search(1)
  • queue(1)
  • priority queue(1)
전체보기 (48)python(34)백준(20)BFS(8)DFS(6)stack(5)html(5)python문법(4)git(3)Backtracking(3)42Seoul(3)Binary Search(2)heap(1)memoization(1)recursion(1)ft_printf(1)html5(1)file(1)Algorithms(1)GNL(1)error(1)Problem(1)Depth_first_search(1)pointer(1)Libft(1)C(1)gitignore(1)Breadth_first_search(1)Circular_Linked_List(1)struct(1)linear search(1)search(1)queue(1)priority queue(1)

bj 14235 크리스마스 선물

아.. 처음에 test case로 넣은 input값 수정 안해서 틀렸다가 두 번째에는 시간초과가 떴다. 왜 그러지 하고 살펴보니 굳이 sort를 할 필요 없는데 sort 후에 pop을 해서 시간복잡도가 최악의 경우에 n^3이었음 ㅋㅋ.. 그래서 code를 sort를 빼

heappriority queuepython백준
2022년 5월 28일
·
0개의 댓글
·
0