
数论
文章平均质量分 75
安静de想着网名
300字以内
展开
-
计算几何
1.1三角形1. 半周长 P=(a+b+c)/22. 面积 S=aHa/2=absin(C)/2=sqrt(P(P-a)(P-b)(P-c))3. 中线 Ma=sqrt(2(b^2+c^2)-a^2)/2=sqrt(b^2+c^2+2bccos(A))/24. 角平分线 Ta=sqrt(bc((b+c)^2-a^2))/(b+c)=2bccos(A/2)/(b+c)5. 高线 Ha=bs原创 2017-08-10 19:44:13 · 376 阅读 · 0 评论 -
Chess
Chess原创 2018-02-03 13:05:14 · 163 阅读 · 0 评论 -
小C的倍数问题
小C的倍数问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Problem Description根据小学数学的知识,我们知道一个正整数x是3的倍数的条件是x每一位加起来的和是3的倍数。反之,如果一个数每一位加起来是3的倍数,则这个数肯定是3的倍数。现在给定进制P原创 2017-08-14 19:04:56 · 221 阅读 · 0 评论 -
Winning Cells
GYM-101608-M原创 2018-02-03 12:58:02 · 287 阅读 · 0 评论 -
页面置换算法
CF-GYM-101498-F原创 2018-02-03 12:37:05 · 313 阅读 · 0 评论 -
宇宙通信
CF-101466-CLately the communication between planets has been an important issue, which is why the Earth has made many efforts to be connected to every other planet in the universe. The Universal N原创 2018-02-03 12:34:31 · 489 阅读 · 0 评论 -
分糖果
CF-gym-334-AGerald has n younger brothers and their number happens to be even. One day he bought n2 candy bags. One bag has one candy, one bag has two candies, one bag has three candies and so on. I原创 2018-01-29 20:16:26 · 275 阅读 · 0 评论 -
Gym - 101612A 点亮数字
Auxiliary Project原创 2017-11-27 23:29:48 · 379 阅读 · 0 评论 -
矩阵快速幂
求递推式,构造一个矩阵,根据矩阵乘法规则原创 2017-09-14 21:24:26 · 186 阅读 · 0 评论 -
位运算
位运算原创 2017-08-16 11:04:25 · 284 阅读 · 0 评论 -
About 日历
判断闰年,判断星期几原创 2017-08-12 14:54:25 · 507 阅读 · 0 评论 -
Lucas 组合数取模
组合数取模就是求 CnmmodpCmnmodpC^n_m\mod p 的值,当然根据n,m,pn,m,pn,m,p的取值范围不同,采取的方法也不一样。 ppp比较大就只能一个一个算如LL C_one_by_one(LL n, LL m)//组合数一个一个算但是不是很大的要预先处理好阶乘 数很大需要逆元typedef long long LL;LL MOD;LL fac[...原创 2018-01-31 20:53:05 · 255 阅读 · 0 评论 -
acm 模板
卢卡斯定理 主席树 Sunday AC自动机 链式前向星#include<string.h>#define MAX 10000struct node{ int to,nex,wei;}edge[MAX*2+5];int head[MAX+5],cnt;void add(int u,int v,int w)//添加一个单向边u->v 权为w {...原创 2017-08-11 17:47:51 · 340 阅读 · 0 评论 -
gym/100482/problem/G Pairs【逆元】
G. PairsThe pair in the land of 1000000007 is the pair of numbers a and b with the following relation: a × b = 1 (mod 1000000007). It is believed to be the sign of divine. Your task is to increase t...原创 2018-07-28 18:40:39 · 263 阅读 · 0 评论