作业帮 > 英语 > 作业

英语翻译只要大概翻译就可以了.Given a hash table of size N,we can define a

来源:学生作业帮 编辑:搜狗做题网作业帮 分类:英语作业 时间:2024/07/13 06:03:32
英语翻译
只要大概翻译就可以了.
Given a hash table of size N,we can define a hash function H(x) = x%N.Suppose that the
linear probing is used to solve collisions,we can easily obtain the status of the hash
table with a given sequence of input numbers.
However,now you are asked to solve the reversed problem:reconstruct the input sequence
from the given status of the hash table.Whenever there are multiple choices,the smallest
number is always taken.
Input
Your program must read test cases from the standard input.
Input consists of several test cases.For each test case,the first line contains a
positive integer N (
英语翻译只要大概翻译就可以了.Given a hash table of size N,we can define a
给定一个哈希表的大小N,我们可以定义一个哈希函数H(x)= x % N.假设
线性探测是用来解决冲突,我们可以很容易地获得状态的散列
表与给定序列的输入数字.
然而,现在需要解决的问题:重构的逆转输入序列
从给定的状态的哈希表.每当有多个选择,最小的
总是采取数量.
输入
你的程序必须读取测试用例从标准输入.
输入包含若干个测试用例.对于每个测试用例,第一行包含一个
正整数N(< = 1000),这是哈希表的大小.第二行包含
N个整数,用空格分隔.一个负整数代表一个空的细胞在散列
表.它是保证所有的非负整数表中是不同的.
输入以N是0.这种情况下不能被处理.
输出
对于每个测试用例,输出到标准输出.打印一行,包含输入
序列,这些数字用空格分隔.注意,必须没有额外的空间
在每一行的末尾.
示例输入