
数学
文章平均质量分 53
Treasure-u
这个作者很懒,什么都没留下…
展开
-
F. GCD and LCM ( ICL 2016 (GP of Tatarstan))
题目描述:给定一个数字n,有n个位置,给定这n个位置的最大公因数和最小公倍数,请问这n个位置有多少种可能(结果对1e9 + 9)取余解题前置知识:1.一个数是可以拆分成多个质因子相乘,如果一个数是许多个数字的最大公因数,那么最大公因数对应质因子位置上面的指数应该是这些质因子对应指数的最小值;最小公倍数则是对应质因子位置上面的指数最大值2.容斥定理:以3个集合A,B,C为例,我们如果需要求出A BC,那么实际上我们是以这样一个式子来解决的:那么对于这道题来说,我们需要怎么解决呢?...原创 2021-11-05 13:24:58 · 190 阅读 · 0 评论 -
Interstellar … Fantasy 题解
题目大意:在一个三维空间中,给定一个球,给定两个点,询问这两个点的最短距离解体思路:首先我们可以思考这样一种情况,两个点的连线没有经过球,显而易见我们可以想到球心到直线的距离大于半径;但是如果两点都在球的外面,但是球心到直线的距离小于R的时候需要特判,剩下的经过圆的只需要考虑到二维就行了(因为球的任何一个面都是⚪)#include <bits/stdc++.h>using namespace std;typedef long double ld;const ld eps =原创 2021-10-19 18:43:49 · 186 阅读 · 0 评论 -
2021牛客国庆集训派对day6 C Generation I
题目描述:Oak is given N empty and non-repeatable sets which are numbered from 1 to N.Now Oak is going to do N operations. In the i-th operation, he will insert an integer x between 1 and M to every set indexed between i and N.Oak wonders how many different原创 2021-10-06 19:25:37 · 111 阅读 · 0 评论 -
2021 ICPC第二场网络赛 G题题解
Given2nintegers,a1,a2,…,an,b1,b2,…,bn, and an integert. You need to calculate:InputThe first line consists of two integersn,t.In the followingnlines, thei-th line consists of two integersai,bi.1≤n≤100000,−100≤ai,bi≤100,0≤t≤5....原创 2021-09-27 15:53:10 · 834 阅读 · 0 评论