求一道acm题的翻译,如果可以的请帮忙分析下,不要翻译工具翻出来的不通文本

来源:百度知道 编辑:UC知道 时间:2024/06/17 14:08:52
Here we suppose, that A <= B, p >= 0, and ``div 2" is an integer division by 2.
Let M, N (1 <= N <= M <= 200) and a binary real number 0.b(1)b(2)...b(p) (1 <= p <= 400) be given. Write a program to find out the corresponding u(1), u(2), ..., u(N) sequence, i.e. to find a sequence with G(1,T,0.b(1)b(2)...b(p)) number in lexicographical order of all possible {u(i)} for the given M and N (T is the quantity of such sequences). Numeration begins with 1. Keep in mind that in lexicographical order {l(i)} proceeds {h(i)} if after omitting equal beginnings, the first number of {l(i)} tail is smaller than the first number or {h(i)} tail. Following example illustrates the list of all possible sequences for M = 4 and N = 3 in lexicographical order.

A note (it does not concern the solution of this task):

The choice of random binary vector 0.b(1)b(2)...b(p) does not give an absolute uniform random data generator if we use the Formula. However,

在这里,我们假设,一个“ = B的,磷” = 0 , ``股利2 “是一个整数司2 。

设M ,氮( 1 “为N ” = M “ = 200 )和一个二元实数0.b (一)乙( 2 ) ...建筑物(规划) ( 1 ” = p “ = 400 )得到。编写程序,找出相应的U ( 1 ) ,德国( 2 ) , ... , ü ( N )的序列,即找到一个序列与G ( 1 , , 0.b (一)乙( 2 ) ...建筑物(规划) )号码辞书为了一切可能( ü (一) )为给定的M和N ( T是数量的此类序列) 。计算始于1 。请记住,在辞书秩序(升(一)收益) (小时(一) )如果省略平等开始后的第一个数目(升(一) )尾巴小于第一个数字或(小时(一) )尾巴。下面的例子说明了一切可能的名单序列对M = 4和N = 3的辞书秩序。

一份说明(它不关心解决这一任务) :

选择随机二进制向量0.b (一)乙( 2 ) ...建筑物(规划)并没有给一个绝对统一的随机数据生成器,如果我们使用的公式。但是,考虑到一个事实,即[ a , b ]上的间隔大,我们应获得分配适用于大多数情况下。