返回   cpper编程论坛 > 灌水/杂烩/BT
注册账号 论坛帮助 会员列表 日历事件 搜索 今日新帖 标记版面已读

灌水/杂烩/BT 所有非技术的东西都往这里来

回复
 
LinkBack 主题工具 显示模式
  #1 (permalink)  
旧 2007-03-25
cat cat 当前离线
高级会员
 
注册日期: 2003-11-06
帖子: 1,563
文章: 6
cat 正向着好的方向发展
默认 另一道有趣的面试题

桌子上有100个硬币,10个反面朝上,90个正面朝上。现在蒙上你的眼睛,要求你把硬币分成2堆,在过程中可以翻转硬币,要求最后每一堆反面朝上的硬币数目相同。
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #2 (permalink)  
旧 2007-03-25
polyrandom 的头像
超级版主
 
注册日期: 2002-09-03
帖子: 3,138
文章: 20
polyrandom 正向着好的方向发展
默认

1.如果你是麻将高手,就可以自己摸出5个反面,独立成一堆。
2.如果你不是麻将高手,分成两堆,10 & 90,把10的那一对全反一下。
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #3 (permalink)  
旧 2007-03-25
普通会员
 
注册日期: 2003-06-14
住址: 上海
帖子: 73
euph 正向着好的方向发展
默认

呵呵,找个盲人过来,手摸辨别之
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #4 (permalink)  
旧 2007-03-25
polyrandom 的头像
超级版主
 
注册日期: 2002-09-03
帖子: 3,138
文章: 20
polyrandom 正向着好的方向发展
默认

找别人帮忙是作弊
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #5 (permalink)  
旧 2007-03-26
liuxinyu 的头像
高级会员
 
注册日期: 2006-02-09
帖子: 311
文章: 49
liuxinyu 正向着好的方向发展
默认

想破了头了。是不是可以这么形式化一把:

n枚硬币,m枚向下的。

分成两堆,一堆p枚,一堆n-p枚。
  • 其中p枚中,有x枚向下的,p-x枚向上的。
  • 另外n-p枚中,有m-x枚向下的。

因此,将p枚一堆全部翻转后,有p-x枚向下的,x枚向上的。
若m=p,则两堆都有m-x枚向下的。
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #6 (permalink)  
旧 2007-03-26
sankt 的头像
普通会员
 
注册日期: 2006-03-09
帖子: 60
sankt 正向着好的方向发展
发送 MSN 消息给 sankt
默认

偶觉得凭手感是最快的
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #7 (permalink)  
旧 2007-03-27
polyrandom 的头像
超级版主
 
注册日期: 2002-09-03
帖子: 3,138
文章: 20
polyrandom 正向着好的方向发展
默认

引用:
作者: sankt 查看帖子
偶觉得凭手感是最快的
不是的,100个硬币,取出10个,然后翻一下,很快的。如果你要用手摸,可能要摸95个
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
  #8 (permalink)  
旧 2007-07-25
sankt 的头像
普通会员
 
注册日期: 2006-03-09
帖子: 60
sankt 正向着好的方向发展
发送 MSN 消息给 sankt
默认 回复: 另一道有趣的面试题

引用:
作者: polyrandom 查看帖子
不是的,100个硬币,取出10个,然后翻一下,很快的。如果你要用手摸,可能要摸95个

今晚又看了此贴,polyrandom正解,不服都不行啊。
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
回复时引用此帖
回复

书签

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码
Trackbacks are 启用
Pingbacks are 启用
Refbacks are 启用



所有时间均为格林尼治时间 +9。现在的时间是 08:57 AM


Powered by vBulletin® 版本 3.7.0
版权所有 ©2000 - 2009,Jelsoft Enterprises Ltd.
(C) Copy Right All Right Reserved 2001 - 2007

Search Engine Friendly URLs by vBSEO 3.1.0