ACM入门。

简介:
这是我在DIY部落发布的一个活动,它很好的介绍了如何踏进ACM的大门。
欢迎看到本文的朋友参与活动:
http://bbs.diybl.com/68/20091007/7119.html

活动参与方式:到北大ACM JudgeOnline做1775题
活动奖励:根据排名奖励不同的分数(详见奖励规则)
活动结束日期:2009年10月31日

参与活动的步骤:
1 到北大ACM网站注册一个ID(已注册的可跳过这一步)。http://acm.pku.edu.cn/JudgeOnline/
2 做题号为1775的题目,这道题目难度不大,入门级的。(可以搜索题号,或者参见链接:http://acm.pku.edu.cn/JudgeOnline/problem?id=1775
3 用C/C++实现了题目的要求后提交代码,如果Accept,那么恭喜你已经成功完成了,不过如果追求更好的成绩那还没完。
4 你的程序运行花费时间/运行占用空间/代码长度等指标会被用来作为参考依据排名,好的程序排名靠前,你可以优化代码多次提交,系统记录最好的成绩。
5 如果你对成绩满意了,那么可以到这里跟帖领奖了,跟帖按如下格式:(点题目页面下面的Status,然后浏览到自己的答题记录即可看到这些信息)
38   147265(3)   sinojelly   28K  0MS  C++  506B     2004-08-17 23:19:51
6 跟帖不代表领奖了,要等到活动结束后一周内,再修改领奖贴补充答题的源代码,才能正式领奖,一周内不修改的视为放弃领奖权利。

注意事项:
1 如果你后面有更好的成绩了,可以修改帖子更新成绩。统计以2009年11月1日凌晨0点时的数据为准。会到北大网站查看大家最新的相对排名。
2 如果你之前没有做过ACM题目,不知道怎么做题,那么可以到下面网址先做最简单的a+b程序热身一下。 http://acm.pku.edu.cn/JudgeOnline/problem?id=1000
3 答题的时间都必须是本帖发帖后的时间。

奖励规则:
活动总分:100分
奖励:参加活动的都有奖。名次靠前的奖励多。
第一名:活动总分 * 30 %
第二名:活动总分 * 25 %
第三名:活动总分 * 20 %
剩余的25%的分数按平均方式奖励给其它参与者,所以分数多少视参与人数而定,但最高不超过15分(如果剩余分数不能整除人数,则按向下取整的方法给分)。

附题目描述如下:(做题必须登录上面的网址)


Sum of Factorials
Time Limit: 1000MS Memory Limit: 30000K
Total Submissions: 8985 Accepted: 2874
Description
John von Neumann, b. Dec. 28, 1903, d. Feb. 8, 1957, was a Hungarian-American mathematician who made important contributions to the foundations of mathematics, logic, quantum physics,meteorology, science, computers, and game theory. He was noted for a phenomenal memory and the speed with which he absorbed ideas and solved problems. In 1925 he received a B.S. diploma in chemical engineering from Zurich Institute and in 1926 a Ph.D. in mathematics from the University of Budapest. His Ph.D. dissertation on set theory was an important contribution to the subject. At the age of 20, von Neumann proposed a new definition of ordinal numbers that was universally adopted. While still in his twenties, he made many contributions in both pure and applied mathematics that established him as a mathematician of unusual depth. His Mathematical Foundations of Quantum Mechanics (1932) built a solid framework for the new scientific discipline. During this time he also proved the mini-max theorem of GAME THEORY. He gradually expanded his work in game theory, and with coauthor Oskar Morgenstern he wrote Theory of Games and Economic Behavior (1944). 
There are some numbers which can be expressed by the sum of factorials. For example 9,9=1!+2!+3! Dr. von Neumann was very interested in such numbers. So, he gives you a number n, and wants you to tell him whether or not the number can be expressed by the sum of some factorials. 
Well, it's just a piece of cake. For a given n, you'll check if there are some xi, and let n equal to Σ 1<=i<=tx i!. (t >=1 1, xi >= 0, xi = xj iff. i = j). If the answer is yes, say "YES"; otherwise, print out "NO".
Input
You will get several non-negative integer n (n <= 1,000,000) from input file. Each one is in a line by itself. 
The input is terminated by a line with a negative integer.
Output
For each n, you should print exactly one word ("YES" or "NO") in a single line. No extra spaces are allowed.
Sample Input
9
-1
Sample Output
YES
Source
Asia Guangzhou 2003













本文转sinojelly51CTO博客,原文链接:http://blog.51cto.com/sinojelly/210037,如需转载请自行联系原作者
相关文章
|
13天前
|
数据采集 人工智能 安全
|
8天前
|
编解码 人工智能 自然语言处理
⚽阿里云百炼通义万相 2.6 视频生成玩法手册
通义万相Wan 2.6是全球首个支持角色扮演的AI视频生成模型,可基于参考视频形象与音色生成多角色合拍、多镜头叙事的15秒长视频,实现声画同步、智能分镜,适用于影视创作、营销展示等场景。
631 4
|
8天前
|
机器学习/深度学习 人工智能 前端开发
构建AI智能体:七十、小树成林,聚沙成塔:随机森林与大模型的协同进化
随机森林是一种基于决策树的集成学习算法,通过构建多棵决策树并结合它们的预测结果来提高准确性和稳定性。其核心思想包括两个随机性:Bootstrap采样(每棵树使用不同的训练子集)和特征随机选择(每棵树分裂时只考虑部分特征)。这种方法能有效处理大规模高维数据,避免过拟合,并评估特征重要性。随机森林的超参数如树的数量、最大深度等可通过网格搜索优化。该算法兼具强大预测能力和工程化优势,是机器学习中的常用基础模型。
348 164
|
7天前
|
机器学习/深度学习 自然语言处理 机器人
阿里云百炼大模型赋能|打造企业级电话智能体与智能呼叫中心完整方案
畅信达基于阿里云百炼大模型推出MVB2000V5智能呼叫中心方案,融合LLM与MRCP+WebSocket技术,实现语音识别率超95%、低延迟交互。通过电话智能体与座席助手协同,自动化处理80%咨询,降本增效显著,适配金融、电商、医疗等多行业场景。
358 155

热门文章

最新文章