摘要: Wand FZU - 2282 错拍公式:有十本书放在书架上,问重新摆放之后没有书在自己原来的位置上的摆放方式有多少种? 设n本书的错拍方式为D[n],那么把第n本书放在第k个位置,k有n-1种取值。对于第k个元素,要么放在第n个位置,此时剩下的就是n-2个元素的错拍 D[n-2],如果第k个元素不 阅读全文
posted @ 2018-05-18 17:30 Flower_Z 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Given l1,r1,l2,r2,l3,r3,l4,r4, please count the number of four-tuples (x1,x2,x3,x4) such that li≤ xi≤ ri and x1≠x2,x2≠x3,x3≠x4,x4≠x1. The answer 阅读全文
posted @ 2018-05-18 17:30 Flower_Z 阅读(168) 评论(0) 推荐(0) 编辑