当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2983:Integer Transmission

题目描述
You're transmitting an n -bits unsigned integer k through a simulated network. The i -th bit counting from left is transmitted at time i (e.g. 4-bit unsigned integer 5 is transmitted in this order: 0-1-0-1). The network delay is modeled as follows: if a bit is transmitted at time i , it may arrive at as early as i + 1 and as late is i + d + 1 , where d represents the maximal network delay. If more than one bit arrived at the same time, they could be received in any order.

For example, if you're transmitting a 3-bit unsigned integer 2 (010) for d = 1 , you may receive 010, 100 (first bit is delayed) or 001 (second bit is delayed).

Write a program to find the number of different integers that could be received, and the smallest/largest ones among them.
输入解释
The input contains several test cases. Each case consists of three integers n, d, k (1<=n<=64, 0<=d<=n, 0<=k < 2^n) , the number of bits transmitted, the maximal network delay, and the integer transmitted. The last test case is followed by a single zero, which should not be processed.
输出解释
For each test case, print the case number and the number of different integers that could be received, followed by the minimal and maximal one among them.
输入样例
3 0 2 
3 1 2 
10 2 888 
7 3 107 
0
输出样例
Case 1: 1 2 2 
Case 2: 3 1 4 
Case 3: 25 490 984 
Case 4: 19 47 122
来自杭电HDUOJ的附加信息
Recommend gaojie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-2983

最后修改于 2020-10-25T22:58:55+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)