The famous Glenbow Museum in Calgary is Western Canada’s largest
museum, with exhibits ranging from art to cultural history to
mineralogy. A brand new section is being planned, devoted to brilliant
computer programmers just like you. Unfortunately, due to lack of
space, the museum is going to have to build a brand new building and
relocate into it. The size and capacity of the new building differ
from those of the original building. But the oor plans of both
buildings are orthogonal polygons. An orthogonal polygon is a polygon
whose internal angles are either 90 or 270. If 90 angles are denoted
as R (Right) and 270 angles are denoted as O (Ob- tuse) then a string
containing only R and O can roughly describe an orthogonal polygon.
For example, a rectangle (Figure 1) is the simplest orthogonal polygon
and it can be described as RRRR (the angles are listed in
counter-clockwise order, starting from any corner). Similarly, a
cross-shaped orthogonal polygon (Figure 2) can be described by the
sequence RRORRORRORRO, RORRORRORROR, or ORRORRORRORR. These sequences
are called angle strings . Of course, an angle string does not
completely specify the shape of a polygon | it says
uva1073 Glenbow Museum【解法二】
最新推荐文章于 2019-04-15 12:57:58 发布
这篇博客讨论了卡尔加里著名的Glenbow博物馆新馆的规划,新馆将展示杰出的计算机程序员。由于空间限制,需要新建建筑并迁移。新旧建筑的平面图都是正交多边形。博客探讨了如何用角度字符串描述这些多边形,并定义了有效的正交多边形——即能由一名警卫守卫的多边形。作者提出了动态规划的解决方案来计算给定长度下有多少个接受的角字符串。
摘要由CSDN通过智能技术生成