본문 바로가기

레야몬

검색하기
레야몬
프로필사진 Leyamon

  • 분류 전체보기 (194)
    • 나의 생활 (15)
      • 일기 (9)
      • 운동 (3)
    • 알고리즘 (176)
      • 백준 (161)
      • Algorithmic Problem Solving.. (13)
    • 물리 (1)
      • 고급 물리학 (1)
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
  • 흰책
  • 분할 정복
  • 하얀책
  • 트리
  • C++
  • 종만북
  • BFS
  • 그래프 이론
  • C++언어
  • 정렬
  • 강한 연결 요소
  • 최대 유량
  • 최소 공통 조상
  • 수학
  • 위상 정렬
  • 자료 구조
  • 우선순위 큐
  • DFS
  • 문자열
  • 알고리즘
  • 세그먼트 트리
  • DP
  • 기하학
  • 백준
  • 자료구조
  • c언어
  • 이분 매칭
  • 그리디
  • 정수론
  • 책
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록힙 (1)

레야몬

[C언어] 1927번 최소힙 - 힙

#include #define SWAP(x, y) do{int tmp; tmp=x; x=y; y=tmp;}while(0) #define MAX_N 100000 typedef struct _heap { //힙 구조체 int arr[MAX_N]; int size; } heap; heap h; void insert(heap* hp, int data) //힙 넣기 { int here = ++hp->size; while((here!=1) && (dataarr[here/2])) { hp->arr[here] = hp->arr[here/2]; here/=2; } hp->arr[here] = data; } int deleteData(heap *hp) //힙 꺼내기 { if(!hp->size) return 0; int r..

알고리즘/백준 2022. 8. 24. 17:32
이전 Prev 1 Next 다음

Blog is powered by kakao / Designed by Tistory

티스토리툴바