SampleSolutionsCentral Europe Regional Contest 2007.ppt

SampleSolutionsCentral Europe Regional Contest 2007.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
SampleSolutionsCentral Europe Regional Contest 2007.ppt

Sample Solutions Central Europe Regional Contest 2007 B: Billboard Billboard – Problem Billboard – Main Idea Billboard – Main Idea Billboard – Main Idea Billboard – Main Idea Billboard – Solution C: Phone Cell Cell – Problem Cell – Simple Solution Cell –Solution Cell –Solution H: Hexagon Hexagon – Idea Hexagon – Solution Hexagon –Solution II K: Keys Keys – Idea Keys – Idea L: Logic Logic – Problem Logic – Potential Pitfalls Logic – Potential Pitfalls N: Numbers Numbers – Solution Numbers – Solution P: Polygon Polygon – Problem Polygon – Idea Polygon – Idea Polygon – Idea Polygon – Solution Polygon – Solution R: Roshambo S: Robotic Sort Sort – Problem Sort – Another Approach Sort – Solution Sort – Solution II W: Water Water – Problem Water – Idea Water – Solution Water – Solution Water – Solution Water – Solution Statistics = Find their horizontal neighbor 1 3 2 4 5 6 7 8 Sort by Y = vertical neighbor 1 5 3 7 4 6 2 8 Now, each vertex knows its neighbors Start with the first, and walk around Count Left / Right turns Left Right ? = counter-clockwise R L L L L L R Naive approach – reverse in an array Little bit better: remember reversed Quadratic time ? 100 0002 ? 6 8 2 1 7 4 5 3 6 8 2 3 5 4 7 1 Double-linked list Problem finding the ?forward direction“ 5 4 7 1 2 8 3 5 4 7 1 2 8 3 Combined solution: use both Linked list + array of reversed The array time: O(rev_before) After SQRT(n) steps: reorder ? n.SQRT(n) time Other possibilities - ??? Heap Interval Trees … ? Find the Center of Mass Amount of water with the lowest center Split the glass into horizontal slices Volume of one slice: π.r2.d Center of Mass of the glass Weighted average of all slices Add the water “slowly” Center of water mass * * Test all existing subsets 2256 possibilities for the 16x16 board ? What if we somehow knew the tapped tiles in the first row? x x x We can try what happens with the row WOW! It is easy to find the second one! x x x We can try what happens with the row WOW! It is easy

文档评论(0)

zhaoxq + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档