- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
                        查看更多
                        
                    
                2004ACM杯比赛往年试题集锦
                    参赛资格与报名:
1、参赛者的范围包括:各高校在校本科生、硕士生、博士生,以及被北京大学预录取的应届高三保送生。其他人员如欲报名,请先询组委会。
2、竞赛以组队形式进行,每支队伍一名、两名或三名队员,设队长一名。
3、参赛队在截止时间前下载报名表并提交,组委会在收到报名后会给予回复。
4、外校参赛队如有需要,可向组委会申请提供邀请函。
5、本次竞赛不收取报名费。
 
竞赛流程与规则:?
1、参赛者应当在竞赛的前一天查看竞赛网站,或检查报名时所留的邮箱,以了解第二天竞赛细节方面可能的变动,并阅读最新通知。
2、参赛者须携带以下证件进入考场:
? * 校园卡或学生证(北京大学在校生)
? * 学生证,和有效身份证件(其它高校在校生)
? * 学生证、
???? CPU????? 3.0GHz(HT)
???? RAM????? 1GB
???? 硬盘???? 80GB
???? 显示器?? 17英寸
???? 键盘???? 国际标准键盘
???? 鼠标???? 光电鼠标
 软件平台:???? Windows 2000 Professional 或 Windows XP
???? Microsoft Visual C++ 6.0
???? Eclipse 3.2
???? Dev-C++ 4.9.9.2
?????? 
 
Area
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 6845
Accepted: 1856
Description
You are going to compute the area of a special kind of polygon. One vertex of the polygon is the origin of the orthogonal coordinate system. From this vertex, you may go step by step to the following vertexes of the polygon until back to the initial vertex. For each step you may go North, West, South or East with step length of 1 unit, or go Northwest, Northeast, Southwest or Southeast with step length of square root of 2. For example, this is a legal polygon to be computed and its area is 2.5: 
Input
The first line of input is an integer t (1 = t = 20), the number of the test polygons. Each of the following lines contains a string composed of digits 1-9 describing how the polygon is formed by walking from the origin. Here 8, 2, 6 and 4 represent North, South, East and West, while 9, 7, 3 and 1 denote Northeast, Northwest, Southeast and Southwest respectively. Number 5 only appears at the end of the sequence indicating the stop of walking. You may assume that the input polygon is valid which means that the endpoint is always the start point and the sides of the polygon are not cross to each other.Each line may contain up to 1000000 digits.
Output
For each polygon, print its area on a single line.
Sample Input
4
5
825
6725
6244865
Sample Output
0
0
0.5
2
Source
POJ Monthly--2004.05.15 Liu Rujia@POJ		[S
                 原创力文档
原创力文档 
                         
                                    

文档评论(0)