上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 43 下一页
摘要: EntropyTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 3314Accepted: 1323DescriptionAn entropy encoder is a data encoding method that achieves lossless data compression by encoding a message with "wasted" or "extra" information removed. In other words, entropy encoding r 阅读全文
posted @ 2012-08-04 13:26 可笑痴狂 阅读(1052) 评论(0) 推荐(0)
摘要: 前缀式计算时间限制:1000 ms | 内存限制:65535 KB难度:3描述先说明一下什么是中缀式:如2+(3+4)*5这种我们最常见的式子就是中缀式。而把中缀式按运算顺序加上括号就是:(2+((3+4)*5))然后把运算符写到括号前面就是+(2 *( +(3 4) 5) )把括号去掉就是:+ 2 * + 3 4 5最后这个式子就是该表达式的前缀表示。给你一个前缀表达式,请你计算出该前缀式的值。比如:+ 2 * + 3 4 5的值就是 37输入有多组测试数据,每组测试数据占一行,任意两个操作符之间,任意两个操作数之间,操作数与操作符之间都有一个空格。输入的两个操作数可能是小数,数据保证输入的 阅读全文
posted @ 2012-08-04 13:13 可笑痴狂 阅读(586) 评论(0) 推荐(0)
摘要: 表达式求值时间限制: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)
摘要: 表达式求值时间限制:3000 ms | 内存限制:65535 KB难度:4描述ACM队的mdd想做一个计算器,但是,他要做的不仅仅是一计算一个A+B的计算器,他想实现随便输入一个表达式都能求出它的值的计算器,现在请你帮助他来实现这个计算器吧。比如输入:“1+2/4=”,程序就输出1.50(结果保留两位小数)输入第一行输入一个整数n,共有n组测试数据(n<10)。每组测试数据只有一行,是一个长度不超过1000的字符串,表示这个运算式,每个运算式都是以“=”结束。这个表达式里只包含+-*/与小括号这几种符号。其中小括号可以嵌套使用。数据保证输入的操作数中不会出现负数。数据保证除数不会为0输出 阅读全文
posted @ 2012-08-02 23:57 可笑痴狂 阅读(1036) 评论(0) 推荐(0)
摘要: D的小L时间限制:4000 ms | 内存限制:65535 KB难度:2描述 一天TC的匡匡找ACM的小L玩三国杀,但是这会小L忙着哩,不想和匡匡玩但又怕匡匡生气,这时小L给匡匡出了个题目想难倒匡匡(小L很D吧),有一个数n(0<n<10),写出1到n的全排列,这时匡匡有点囧了,,,聪明的你能帮匡匡解围吗?输入第一行输入一个数N(0<N<10),表示有N组测试数据。后面的N行输入多组输入数据,每组输入数据都是一个整数x(0<x<10)输出按特定顺序输出所有组合。特定顺序:每一个组合中的值从小到大排列,组合之间按字典序排列。样例输入223样例输出1221123 阅读全文
posted @ 2012-08-02 20:58 可笑痴狂 阅读(501) 评论(0) 推荐(0)
摘要: Bad Hair DayTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 10300Accepted: 3458DescriptionSome of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top 阅读全文
posted @ 2012-08-02 11:17 可笑痴狂 阅读(1736) 评论(0) 推荐(1)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 43 下一页