| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 436 人关注过本帖
标题:垃圾题目,谁会做?
取消只看楼主 加入收藏
gavinlove
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-5-18
收藏
 问题点数:0 回复次数:1 
垃圾题目,谁会做?

Entropy

Time Limit:1000MS Memory Limit:30000K
Total Submit:197 Accepted:46 Special Judged

Description

In 1948 Claude E. Shannon in "The Mathematical Theory of Communication"' has introduced his famous formula for the entropy of a discrete set of probabilities p1, ... , pn:

H=-Σpilog2pi


We will apply this formula to an arbitrary text string by letting pi be the relative frequencies of occurrence of characters in the string. For example, the entropy of the string "Northeastern European Regional Contest" with the length of 38 characters (including 3 spaces) is 3.883 with 3 digits after decimal point. The following table shows relative frequencies and the corresponding summands for the entropy of this string.


Your task is to find a string with the given entropy.

Input

The input consists of a single real number H (0.00 <= H <= 6.00) with 2 digits after decimal point.

Output

Write to the output file a line with a single string of at least one and up to 1000 characters '0'-'9', 'a'-'z', 'A'-'Z', '.' (dot), and spaces. This string must have the entropy within 0.005 of H.

Sample Input

3.88

Sample Output

Northeastern European Regional Contest

搜索更多相关主题的帖子: 垃圾 
2006-05-18 15:45
gavinlove
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-5-18
收藏
得分:0 
请大家帮帮忙!万分感激
2006-05-18 15:51
快速回复:垃圾题目,谁会做?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016767 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved