作者KitWoolsey (猫)
看板puzzle
标题[问题] 猜数字要几次才猜的到?
时间Sun Jan 9 17:57:20 2011
Let n be a positive integer, and x an unknown non-negative integer less than
n.
Suppose you may ask questions of the form "Is x less than t?",
where t is an arbitrary integer,
but the answer to each question will be told only after
you ask another question (i. e., the answers are delayed by one question;
note that the last question will not be answered at all). How large may n be
so that you can still guarantee to determine x with only 30 questions?
令N为一正整数, x是一比n小的非负整数.
假设你可以提问如" x是否比t小?" 这种类型的问题 , t是多少由你自己决定.
但是对方的回答会在你问下一问题之後回答----也就是回答会"延迟"一题才答出
(也就是说 你问的最後一个问题根本就不会被回答XD)
那麽假如你问30个问题就保证可以知道x是多少,n的最大值是多少?
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 218.166.106.13