east-wind 님의 블로그

  • 홈
  • 태그
  • 방명록

Algorithm_Java/Dynamic Programming 1

백준 1106 : 호텔

처음에 dp를 생각했는데 생각하기 좀 복잡해서 priority queue로 풀었다. 근데 dp가 정석 풀이였다. dp풀이도 첨부하겠다.1. pq 풀이import java.io.*;import java.util.*;public class Main { static class comp implements Comparator{ @Override public int compare(City a, City b){ return a.cost - b.cost; } } static class City{ int cost; int customers; City(int cost, int customers){ ..

Algorithm_Java/Dynamic Programming 2025.03.28
이전
1
다음
더보기
프로필사진

east-wind 님의 블로그

east-wind 님의 블로그 입니다.

  • 분류 전체보기 (228)
    • Algorithm_SQL (11)
    • Algorithm_Java (19)
      • Graph Search (2)
      • Dynamic Programming (1)
      • Greedy Algorithm (2)
      • String (0)
      • Math (2)
      • Implementation (1)
      • Data structure (2)
      • Search (0)
      • Brute Force (3)
      • ETC (4)
    • Algorithm_C++ (152)
      • Graph Search (26)
      • Dynamic Programming (18)
      • Greedy Algorithm (11)
      • String (5)
      • Math (21)
      • Implementation (25)
      • Data Structure (6)
      • Search (9)
      • Brute Force (4)
      • ETC (27)
    • CS (21)
      • Network (3)
      • CloudComputing (0)
      • DB (3)
      • SoftwareEngineering (6)
      • Web (1)
      • OS (2)
      • Security (2)
      • ETC (4)
      • ComputerArchitecture (0)
    • ML (3)
    • Project (14)
      • Spring (13)
      • FastAPI (1)
    • Diary (0)
      • 2024 (0)
      • 2025 (0)
    • 빅분기 (3)
    • 면접 (0)

Tag

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   2025/12   »
일 월 화 수 목 금 토
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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바