摘要:
Sorting a Three-Valued SequenceIOI'96 - Day 2Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem in which the records to be sorted have at mostthreedifferent key values. This happens for instance when we sort medalists of a competition accord 阅读全文
posted @ 2012-08-27 20:31
mtry
阅读(347)
评论(0)
推荐(0)
摘要:
Ordered FractionsConsider the set of all reduced fractions between 0 and 1 inclusive with denominators less than or equal to N.Here is the set when N = 5:0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1Write a program that, given an integer N between 1 and 160 inclusive, prints the fractions in order of 阅读全文
posted @ 2012-08-27 18:55
mtry
阅读(232)
评论(0)
推荐(0)
摘要:
Packing RectanglesIOI 95The six basic layouts of four rectanglesFour rectangles are given. Find the smallest enclosing (new) rectangle into which these four may be fitted without overlapping. By smallest rectangle, we mean the one with the smallest area.All four rectangles should have their sides pa 阅读全文
posted @ 2012-08-27 18:46
mtry
阅读(599)
评论(0)
推荐(0)