2024年12月9日

摘要: // 887. 求组合数 III.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // /* https://www.acwing.com/problem/content/889/ 给定 n 组询问,每组询问给定三个整数 a,b,p,其中 p 是质数,请你输出 Cbamod 阅读全文
posted @ 2024-12-09 17:00 itdef 阅读(14) 评论(0) 推荐(0)
摘要: // 886. 求组合数 II.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // /* https://www.acwing.com/problem/content/888/ 给定 n 组询问,每组询问给定两个整数 a,b,请你输出 Cbamod(109+7) 的值。 阅读全文
posted @ 2024-12-09 16:59 itdef 阅读(21) 评论(0) 推荐(0)
摘要: 卡特兰数列的三种方式 h(0)=1 h(1) = 1; 1 h(n)= h(n-1)*(4*x-2)/ (x+1) 2 C(2*n)(n)/(n+1) 3 C(2*n)(n)-C(2*n)(n-1) 公式1 // 889. 满足条件的01序列.cpp : 此文件包含 "main" 函数。程序执行将在 阅读全文
posted @ 2024-12-09 16:01 itdef 阅读(47) 评论(0) 推荐(0)

导航