组合数学
文章平均质量分 72
Dream_Maker_yangkai
OIER 原dream_maker_yk
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforces 932E Team work 【组合计数+斯特林数】
Codeforces 932E Team work You have a team of N people. For a particular task, you can pick any non-empty subset of people. The cost of having x people for the task is xk. Output the sum of costs o...原创 2018-07-12 18:26:43 · 441 阅读 · 0 评论 -
Codeforces 15E Triangles 【组合计数】
Codeforces 15E Triangles Last summer Peter was at his granny’s in the country, when a wolf attacked sheep in the nearby forest. Now he fears to walk through the forest, to walk round the forest, ev...原创 2018-07-12 22:08:55 · 541 阅读 · 0 评论 -
Codeforces 382E Ksenia and Combinatorics 【组合计数】*
Codeforces 382E Ksenia and Combinatorics Ksenia has her winter exams. Today she is learning combinatorics. Here’s one of the problems she needs to learn to solve. How many distinct trees are there...原创 2018-07-12 23:32:58 · 478 阅读 · 0 评论 -
BZOJ4517 Sdoi2016 排列计数 【DP+组合计数】*
BZOJ4517 Sdoi2016 排列计数 Description 求有多少种长度为 n 的序列 A,满足以下条件: 1 ~ n 这 n 个数在序列中各出现了一次 若第 i 个数 A[i] 的值为 i,则称 i 是稳定的。序列恰好有 m 个数是稳定的 满足条件的序列可能很多,序列数对 10^9+7 取模。 Input 第一行一个数 T,表示有 T 组数据。 接下来 T 行,每行两个整数 n、m...原创 2018-09-18 15:43:49 · 337 阅读 · 0 评论 -
BZOJ3444 最后的晚餐【细节题+组合数学】*
BZOJ3444 最后的晚餐 Description 【问题背景】 高三的学长们就要离开学校,各奔东西了。某班n人在举行最后的离别晚餐时,饭店老板觉得十分纠结。因为有m名学生偷偷找他,要求和自己暗恋的同学坐在一起。 【问题描述】 饭店给这些同学提供了一个很长的桌子,除了两头的同学,每一个同学都与两个同学相邻(即坐成一排)。给出所有信息,满足所有人的要求,求安排的方案总数(这个数字可能很大,请输...原创 2018-09-18 19:07:25 · 441 阅读 · 0 评论 -
BZOJ3209 花神的数论题 【组合数学+数位DP+快速幂】*
BZOJ3209 花神的数论题 Description 背景 众所周知,花神多年来凭借无边的神力狂虐各大 OJ、OI、CF、TC …… 当然也包括 CH 啦。 描述 话说花神这天又来讲课了。课后照例有超级难的神题啦…… 我等蒟蒻又遭殃了。 花神的题目是这样的 设 sum(i) 表示 i 的二进制表示中 1 的个数。给出一个正整数 N ,花神要问你 派(Sum(i)),也就是 sum(1)—sum...原创 2018-09-18 21:05:22 · 289 阅读 · 0 评论
分享