华南农业大学 2009 ACM题目.doc

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

6754?Keyboard of a Mobile Telephone 时间限制:500MS? 内存限制:1000K 提交次数:0 通过次数:0 题型: 编程题???语言: 无限制 描述 Now almost every student has a mobile telephone. But do you have making attention to the keyboard of a mobile telephone? This is the keyboard of a normal mobile telephone: It will show different letters if you press one key different times, for example you press the key “2” once it will show a letter ‘a’, twice show a ‘b’. And notice that press the key ‘0’ once will show a space. Now give you a sentence, which contains only lowercases and space, calculate how much times to press the keyboard at least to show the sentence. Input The first line contains an integer n, which means the number of cases. Per case consist of only one sentence, which contains only lowercases and spaces and its length less or equal 200. Output Per case output an integer, which is the least times to press the keyboard, in one line. Sample Input 1 this problem is so easy Sample Output 53 Source By Hanqiu 6755?Right-angled Triangle 时间限制:612MS? 内存限制:1000K 提交次数:0 通过次数:0 题型: 编程题???语言: 无限制 描述 Right-angled triangle is very important in plane geometry, just as the primes in numeral system. Now there is an interesting problem about right-angled triangle. As we all know, if we choose three points in a coordinate system and these points according to some conditions, they can form a right-angled triangle. And there is an example in the picture: the △OPQ forms a right-angled triangle. If give a integer n, there are many ways to choose two points that according three condition: 1) each co-ordinate is integer 2) lies between 0 and n inclusive, that is 0 = x1, y1, x2, y2 = n, 3) the two points and the origin point can form a right-angled triangle. And the following picture is one example which n = 2, and it shows that there are 14 different ways to choose two points to forms a right-angled triangle with origin point And this is the problem, give you a integer n, you should calculate how many ways to choose tw

文档评论(0)

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

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

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档