摘要:
表达式求值时间限制:3000 ms | 内存限制:65535 KB难度:3描述Dr.Kong设计的机器人卡多掌握了加减法运算以后,最近又学会了一些简单的函数求值,比如,它知道函数min(20,23)的值是20,add(10,98)的值是108等等。经过训练,Dr.Kong设计的机器人卡多甚至会计算一种嵌套的更复杂的表达式。假设表达式可以简单定义为:1.一个正的十进制数x是一个表达式。2.如果x和y是表达式,则函数min(x,y)也是表达式,其值为x,y中的最小数。3.如果x和y是表达式,则函数max(x,y)也是表达式,其值为x,y中的最大数。4.如果x和y是表达式,则函数add(x,y)也是 阅读全文
posted @ 2012-08-03 22:18
可笑痴狂
阅读(1440)
评论(0)
推荐(0)
摘要:
Round and Round We GoTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 10483Accepted: 4802DescriptionA cyclic number is an integer n digits in length which, when multiplied by any integer from 1 to n, yields a"cycle"of the digits of the original number. That is, if you consider the 阅读全文
posted @ 2012-08-03 19:33
可笑痴狂
阅读(1025)
评论(0)
推荐(0)
摘要:
Fence RepairTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 15706Accepted: 4998DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ 20,000) planks of wood, each having some integer length Li (1 ≤ Li ≤ 阅读全文
posted @ 2012-08-03 17:22
可笑痴狂
阅读(3239)
评论(0)
推荐(0)
摘要:
1751: E: ExpressionsTime Limit: 2000 ms Memory Limit: 10000 kB Total Submit : 86(18 users)Accepted Submit : 14(13 users)Page View : 2351Font Style: Aa Aa Aa Arithmetic expressions are usually written with the operators in between the two operands (which is called infix notation). For example, (x+y). 阅读全文
posted @ 2012-08-03 16:19
可笑痴狂
阅读(486)
评论(0)
推荐(0)
摘要:
/* 功能Function Description: 赫夫曼编码---正误待验证(调试时候感觉有地方好像出错了) 开发环境Environment: DEV C++ 4.9.9.1 技术特点Technique: 版本Version: 作者Author: 可笑痴狂 日期Date: 20120803 备注Notes: 作用: 输入大写字母组成的字符串,然后以其出现的次数为权重进行编码*/#include<iostream>#incl... 阅读全文
posted @ 2012-08-03 11:26
可笑痴狂
阅读(410)
评论(0)
推荐(0)