본문 바로가기

clohi 님의 블로그

검색하기
clohi 님의 블로그
프로필사진 clohi

  • 분류 전체보기 (30) N
    • Backend (1)
      • Spring (1)
    • Algorithm (21)
      • BOJ (21)
    • 구름톤 유니브 (1)
    • CS (7) N
      • 운영체제 (2)
      • 네트워크 (4)
      • 자료구조&알고리즘 (1) N
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   2026/06   »
일 월 화 수 목 금 토
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
Tags
  • 스택
  • 투 포인터
  • 3986
  • 구현
  • 완전 탐색
  • 24480
  • 그리디
  • 15900
  • 브루트포스
  • BOJ
  • 완전탐색
  • 16713
  • 11726
  • 17299
  • 백준
  • python
  • dfs
  • 10799
  • 14503
  • 10546
  • 8983
  • 이분탐색
  • dp
  • 누적합
  • 5972
  • 시뮬레이션
  • BFS
  • 알고리즘
  • 14248
  • 10431
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록1149 (1)

clohi 님의 블로그

[BOJ / Python] 1149 : RGB거리

https://www.acmicpc.net/problem/1149 문제 코드 import sysinput = sys.stdin.readlinen = int(input())rgb= []for _ in range(n): rgb.append(list(map(int, input().split())))dp = [[0] * 3 for _ in range(n)]dp[0] = rgb[0]for i in range(1, n): dp[i][0] = rgb[i][0] + min(dp[i-1][1], dp[i-1][2]) dp[i][1] = rgb[i][1] + min(dp[i-1][0], dp[i-1][2]) dp[i][2] = rgb[i][2] + min(dp[i-1][0], dp[i-1][1])pr..

Algorithm/BOJ 2025. 8. 24. 23:34
이전 Prev 1 Next 다음

Blog is powered by AXZ / Designed by Tistory

티스토리툴바