목록2025/05/18 (2)
넘치게 채우기
https://leetcode.com/problems/painting-a-grid-with-three-different-colors/description/?envType=daily-question&envId=2025-05-18Leetcode - Painting a Grid With Three Different Colors문제 유형: 타일링, 다이나믹 프로그래밍, dfs문제 난이도: Hard 문제You are given two integers m and n. Consider an m x n grid where each cell is initially white. You can paint each cell red, green, or blue. All cells must be painted.Return the..
https://www.acmicpc.net/problem/3066BOJ - 브리징 시그널문제 유형: 이진 탐색, LIS(Longest Increasing Subsequence)난이도: Gold II시간 제한: 1초메모리 제한: 128MB 문제ACM(Advanced Chip Manufacture)이라는 회사의 수석 칩(chip) 설계자인 한승이는 고민에 빠져있다. 경로 설계자들의 잘못으로 두 개의 블록의 포트를 연결하는 칩 위의 시그널들이 서로 교차하게 만들어졌다. 이 시점에서 경로 설계를 다시 하는 것은 비용이 너무 많이든다. 그 대신 엔지이너들은 교차하는 시그널들을 브리징 하기로 했다. 브리징은 시그널이 서로 교차하는 경우 하나의 시그널이 다른 시그널과 접촉하지 않도록 수직으로 띄우는 작업이다. 하지만..