본문 바로가기
반응형

동적계획법17

05.09. 카드 구매하기 [Dynamic Programming][백준 11052] https://www.acmicpc.net/problem/11052 11052번: 카드 구매하기 첫째 줄에 민규가 구매하려고 하는 카드의 개수 N이 주어진다. (1 ≤ N ≤ 1,000) 둘째 줄에는 Pi가 P1부터 PN까지 순서대로 주어진다. (1 ≤ Pi ≤ 10,000) www.acmicpc.net Algorithm classification : Dynamic Programming 05.09.1. Problem 요즘 민규네 동네에서는 스타트링크에서 만든 PS카드를 모으는 것이 유행이다. PS카드는 PS(Problem Solving)분야에서 유명한 사람들의 아이디와 얼굴이 적혀있는 카드이다. 각각의 카드에는 등급을 나타내는 색이 칠해져 있고, 다음과 같이 8가지가 있다. 전설카드 레드카드 오렌지카드 .. 2021. 12. 28.
05.08. 제곱수의 합 [Dynamic Programming][백준 1699] https://www.acmicpc.net/problem/1699 1699번: 제곱수의 합 어떤 자연수 N은 그보다 작거나 같은 제곱수들의 합으로 나타낼 수 있다. 예를 들어 11=32+12+12(3개 항)이다. 이런 표현방법은 여러 가지가 될 수 있는데, 11의 경우 11=22+22+12+12+12(5개 항)도 가능하다 www.acmicpc.net Algorithm classification : Dynamic Programming, Math 05.08.1. Problem Any natural number N can be expressed as the sum of squares less than or equal to it. For example, 11=3^2+1^2+1^2 (3 terms). This e.. 2021. 12. 28.
05.07. 동전 2 [Dynamic Programming][백준 2294] https://www.acmicpc.net/problem/2294 2294번: 동전 2 첫째 줄에 n, k가 주어진다. (1 ≤ n ≤ 100, 1 ≤ k ≤ 10,000) 다음 n개의 줄에는 각각의 동전의 가치가 주어진다. 동전의 가치는 100,000보다 작거나 같은 자연수이다. 가치가 같은 동전이 여러 번 주 www.acmicpc.net Algorithm classification : Dynamic Programming 05.07.1. Problem There are n types of coins. I would like to use these coins in moderation so that their value sums to k won. At the same time, we try to minim.. 2021. 12. 27.
05.06. 스티커 [Dynamic Programming][백준 9465] https://www.acmicpc.net/problem/9465 9465번: 스티커 첫째 줄에 테스트 케이스의 개수 T가 주어진다. 각 테스트 케이스의 첫째 줄에는 n (1 ≤ n ≤ 100,000)이 주어진다. 다음 두 줄에는 n개의 정수가 주어지며, 각 정수는 그 위치에 해당하는 스티커의 www.acmicpc.net Algorithm classification : Dynamic Programming 05.06.1. Problem Nancy, your little sister, has a sheet of 2n stickers of rectangular shape that are arranged in 2 rows and n columns. See Figure 1(a). Nancy wants to dec.. 2021. 12. 27.
05.05. 2×n 타일링 2 [Dynamic Programming][백준 11727] https://www.acmicpc.net/problem/11727 11727번: 2×n 타일링 2 2×n 직사각형을 1×2, 2×1과 2×2 타일로 채우는 방법의 수를 구하는 프로그램을 작성하시오. 아래 그림은 2×17 직사각형을 채운 한가지 예이다. www.acmicpc.net Algorithm classification : Dynamic Programming 05.05.1. Problem Write a program to count the number of ways to fill a 2×n rectangle with 1×2, 2×1, and 2×2 tiles. 05.05.2. Input limit In the first line n is given. (1 ≤ n ≤ 1,000) 05.05.3. Ou.. 2021. 12. 27.
05.04. 2×n 타일링 [Dynamic Programming][백준 11726] https://www.acmicpc.net/problem/11726 11726번: 2×n 타일링 2×n 크기의 직사각형을 1×2, 2×1 타일로 채우는 방법의 수를 구하는 프로그램을 작성하시오. 아래 그림은 2×5 크기의 직사각형을 채운 한 가지 방법의 예이다. www.acmicpc.net Algorithm classification : Dynamic Programming 05.04.1. Problem Write a program to find the number of ways to fill a 2×n rectangle with 1×2, 2×1 tiles. 05.04.2. Input limit In the first line n is given. (1 ≤ n ≤ 1,000) 05.04.3. Output .. 2021. 12. 27.
반응형