Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我是这样推的!!!!In Reply To:这题。。公式怎么得出来的? Posted by:Roba at 2006-11-06 16:16:03 我推的是打不开的情况.. 打不开的情况其实就是k个盒子里面放的 是这K个盒子上对应的锁..所以就算把这k个盒子全打开了也拿不到剩下盒子的钥匙 一共是k!种方法.. 所以不能打开所有的情况其实就是n-1个盒子里放的钥匙刚好对应的是这n-1个盒子上的锁 从n-2个里面选出n-3个和1,2够成了了n-1个盒子. 总数=c(n-2,n-3)*(n-1)!; 答案=n!-总数=2*(n-1)!; Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator