본문 바로가기

Algospot10

GRID https://algospot.com/judge/problem/read/GRID 문제 We wish to tile a grid 4 units high and N units long with rectangles (dominoes) 2 units by one unit (in either orientation). For example, the figure shows the five different ways that a grid 4 units high and 2 units wide may be tiled. Write a program that takes as input the width, W, of the grid and outputs the number of different ways to tile a 4-.. 2017. 10. 17.
DICT https://algospot.com/judge/problem/read/DICT 문제 (주의: 이 문제는 TopCoder SRM428 Div2 Hard 의 번역 문제입니다.) a 와 b 로만 이루어진 단어들을 담고 있는 사전이 있다. 이 사전은 n 개의 a 와 m 개의 b 로 이루어진 단어들을 _전부_ 포함하는데, 예를 들어 n=2, m=2 인 경우, 사전에는 aabb, abba 등의 단어들이 포함된다. n 과 m 이 주어질 때, 이 사전의 k 번째 단어를 출력하는 프로그램을 작성하라. 단어들은 사전 순서대로 정렬되어 있다고 가정한다. 입력 입력의 첫 줄에는 테스트 케이스의 수 C ( m >> k; if (c[n + m][n] < k || (n == 0 && m == 0)) { cout 2017. 10. 14.
CHANGE https://algospot.com/judge/problem/read/CHANGE 문제 Sue is waiting in line at the grocery store. Being in a hurry, she wants to pay with exact change when she gets to the front of the line. However, she does not know how much her items are going to cost; instead, she only knows an upper bound C on their total cost. Given a list of the various coins Sue has in her pocket, your goal is to determine .. 2017. 8. 28.
CAKECUT https://algospot.com/judge/problem/read/BOOKTHIEF 문제 You are given a rectangular cake of integral dimensions w × h. Your goal is to divide this cake into m rectangular pieces of integral dimensions such that the area of the largest piece is minimal. Each cut must be a straight line parallel to one of the sides of the original cake and must divide a piece of cake into two new pieces of positive a.. 2017. 8. 22.