数学
文章平均质量分 67
ummmmm
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[拆分质因数] 求1e6区间内的数的因数之和 GYM 101652C
https://vj.e949.cn/f8d37a96d021442108f4492dfd021271?v=1541730304 #include <bits/stdc++.h> #define ll long long #define ull unsigned long long using namespace std; const int mn = 1e6...原创 2018-11-16 13:05:03 · 624 阅读 · 0 评论 -
[分解质因数/阶乘素因子的幂] C. Trailing Loves (or L'oeufs?) CF1114C
C. Trailing Loves (or L'oeufs?) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The number "zero" is called "love" (or "l'oeuf" t...原创 2019-02-25 19:37:47 · 477 阅读 · 0 评论 -
[线段树+欧拉函数+状态压缩] 区间修改 求区间积的欧拉函数 CF1114F
F. Please, another Queries on Array? time limit per test 5.5 seconds memory limit per test 256 megabytes input standard input output standard output You are given an arraya1,a2,…,ana1,a2,…,a...原创 2019-02-28 19:37:02 · 445 阅读 · 0 评论 -
[BFS] 求一定数位和的D的最小倍数 CFcontest1070A
余数500 * 数位和5000 = 25w种情况 BFS先达到该种状态的一定数值最小 #include <bits/stdc++.h> using namespace std; struct node { int num, yu, sum; }; queue<node> que; node fr[520][5020]; bool vis[520][5020];...原创 2018-12-10 18:27:48 · 301 阅读 · 0 评论 -
[map] 求多向量交点数量 CF975D
D. Ghosts time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ghosts live in harmony and peace, they travel the space without any pur...原创 2018-12-01 21:08:56 · 363 阅读 · 0 评论 -
[素数筛] 求n的不同因数之和能组成的连续1~x的x ZOJ4040
Number Theory Time Limit: 1 Second Memory Limit: 65536 KB Given an integer , calculate the smallest positive integer that is not a sum of distinct divisors of . Input There are multiple test ...原创 2018-11-19 19:18:16 · 284 阅读 · 0 评论 -
[位运算] F. AND Graph CF987F
F. AND Graph time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output You are given a set of size mm with integer elements between 00 and ...原创 2018-11-21 21:41:44 · 273 阅读 · 0 评论 -
输出n以内互质数对 CodeForce1009D
D. Relatively Prime Graph time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Let's call an undirected graph G=(V,E)G=(V,E) relativel...原创 2018-11-19 12:32:37 · 504 阅读 · 0 评论 -
[求逆序对] Petr and Permutations CF987E
E. Petr and Permutations time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petr likes to come up with problems about randomly gener...原创 2018-11-21 16:39:45 · 418 阅读 · 0 评论 -
[概率论] 取手机 长沙理工大学校赛C
链接:https://www.nowcoder.com/acm/contest/96/C题目描述durong有a台iphonex和b台s8,并且放在一个保险箱里,durong现在一台一台从保险箱随机拿出这些手机,现在他想知道第k次拿出s8的概率是多少输入描述:第一行一个正整数T,表示数据组数。(1<=T<=10000) 接下来T行输入a,b,k 其中(1<=a,b,k<=1...原创 2018-04-15 10:57:19 · 365 阅读 · 0 评论 -
[逆元] 1-n中改小一个 使 % p == q gym101620
#include <bits/stdc++.h> #define ll long long using namespace std; const int mn = 20000000 + 10; ll n, p, q; ll qpow(ll x, ll y) { ll ans = 1; while (y) { if (y & 1) ans =...原创 2018-11-08 20:49:00 · 181 阅读 · 0 评论 -
【树形DP+逆元】求树上不为祖孙的集合数 洛谷P5007
题目描述 给定一棵以 1 为根的有根树,定义树的一个毒瘤集为一个集合,并且集合中任意两个元素之间不存在祖先与后代关系。 定义一个毒瘤集的毒瘤指数为集合内所有元素的价值之和 要求给定树的所有毒瘤集的毒瘤指数之和,答案对 100000007 取模。 但这个问题太难了,所以我们考虑化简。 因为点的编号跟它毒瘤指数密切相关,所以我们将会再给出一个整数 T,T = 1 表示 i 号点的毒瘤指数为 ...原创 2018-11-05 23:33:07 · 327 阅读 · 0 评论 -
[AC自动机+高斯消元] 求多个序列各自出现概率 HDU5955
Guessing the Dice Roll Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1566 Accepted Submission(s): 457 Problem Description There are N...原创 2018-10-11 20:56:22 · 269 阅读 · 0 评论 -
[扩展gcd] 清帝之惑之康熙 Vijos1009
背景康熙是中国历史乃至世界历史中最伟大的帝王之一,清除螯拜,撤除三藩,统一台湾,平定准葛尔叛乱;与此同时,出众的他也被世界各国遣清使臣所折服。康熙是历史上少有的全人,不仅文武兼得,而且在各各方面都有见地,比如说航海、数学、英语、构图、建筑等等。一个最好的例子可以证明:康熙当年演算代数题的草稿纸至今仍然保存完好。话说康熙掌权之后,每天都抽空做数学题,特别是无聊题。这些天,某某老师开始教他做一些奇怪的...原创 2018-07-07 20:28:59 · 388 阅读 · 0 评论 -
【几何】 Pair Of Lines CF contest961 D
D. Pair Of Linestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n points on Cartesian plane. Every point is a lattice point (i. e. b...原创 2018-07-06 12:21:32 · 244 阅读 · 0 评论 -
Maximum Multiple HDU6298 2018多校第一场
Maximum Multiple Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21 Accepted Submission(s): 10 Problem Description Given an integer n, ...原创 2018-07-23 18:14:31 · 462 阅读 · 0 评论 -
有理数转分数 校OJ2384
题目描述ZhouZhentao的数学很差很差,最近他在复习《小学数学》中的有理数部分,但是他遇到了困难,因此请机智的你们来帮忙了。课本上写着这样一道题:无限循环小数是有理数,有理数都可以表示成分数形式。现在给出一个无限循环小数 A(0<A<1),请你计算A的最简分数形式。为了方便,我们用X表示无限循环小数A的循环节:例如 X=3 时,对应的小数A是 0.333333......例如 X...原创 2018-05-17 21:45:44 · 1322 阅读 · 0 评论 -
【辛普森积分】初中平面几何 校OJ2441 ∫baf(x)dx≈(b−a)/6*[f(a)+4f((a+b)/2)+f(b)]
∫baf(x)dx≈b−a6[f(a)+4f(a+b2)+f(b)]∫abf(x)dx≈b−a6[f(a)+4f(a+b2)+f(b)]辛普森积分 ↑ 。∫baf(x)dx≈b−a6[f(a)+4f(a+b2)+f(b)]#include <bits/stdc++.h> using namespace std; const double efs = 1e-4; double r; ...原创 2018-05-17 21:07:55 · 513 阅读 · 0 评论
分享