摘要:
给出n个点。问选出4个点作为定点,能够组成多少个平行与坐标轴的矩形。 点按照x排序 n^2挑选出 垂直x轴的线段,按照y1排序 #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namesp 阅读全文
posted @ 2023-04-21 23:03
towboat
阅读(20)
评论(0)
推荐(0)
摘要:
给你一个递增序列的第一位a1,最后一位an,求有多少个序列满足: 以a1为首,an为尾 1、B(1) = A(1) 2、后面每项满足 A[j]=B[j], A(j-1) < B(j) ≤ A(j), 且bj能整除A(j) - A(j-1)。 F[ i ] [ j ] 最后一位为j 的方案数 #inc 阅读全文
posted @ 2023-04-21 22:09
towboat
阅读(37)
评论(0)
推荐(0)
摘要:
const int N =1e5+4; int fac[N] ,fm[N]; inline int kpow(int a, int b) { int res = 1; for (; b; b >>= 1) { if (b & 1) res = res * a % mod; a = a * a % m 阅读全文
posted @ 2023-04-21 16:56
towboat
阅读(288)
评论(0)
推荐(0)
摘要:
Devu 有 n 个花瓶,第 ii 个花瓶里有 fi 朵花。他现在要选择 s 朵花。 你需要求出有多少种方案。两种方案不同当且仅当两种方案中至少有一个花瓶选择花的数量不同 可重复集的组合数 Ce( n,m) = C(m-1,m+n-1 ) namo用容斥原理 #include<iostream> # 阅读全文
posted @ 2023-04-21 16:49
towboat
阅读(34)
评论(0)
推荐(0)