
#数学
v
小鱼yn
简介
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
十个利用矩阵乘法解决的经典题目
转自:http://www.matrix67.com/blog/archives/276 十个利用矩阵乘法解决的经典题目 好像目前还没有这方面题目的总结。这几天连续看到四个问这类题目的人,今天在这里简单写一下。这里我们不介绍其它有关矩阵的知识,只介绍矩阵乘法和相关性质。 不要以为数学中的...转载 2020-03-03 13:14:56 · 670 阅读 · 0 评论 -
poj 1006、2891(中国剩余定理 及扩展 模板)
中国剩余定理来源及推导:https://www.cnblogs.com/MashiroSky/p/5918158.html中国剩余定理(CRT)表述及模板:https://blog.youkuaiyun.com/acdreamers/article/details/8050018中国剩余定理——求解一次同余式组x≡ai(mod mi)x\equiv a_i(mod\ m_i)x≡ai(mod mi)的方法:注:要求所有的模数mim_imi互质int CRT(int* a,int*原创 2020-07-18 16:39:30 · 524 阅读 · 1 评论 -
质数打表———埃氏筛&&欧拉筛
质数:一个大于1的自然数,除了1和他本身没有其他因数的数叫做质数(素数),否则称为合数。如何判断一个数是否为质数:从2枚举到n-1,判断是否存在n的因子,复杂度O(n)从2枚举到 n\ \sqrt[]{n} n ,复杂度O(n),因为n的因子总是成对出现的,若m是它的因子,那么n/m也是它的因子,所以不用再遍历 n\ \sqrt[]{n} n ~...原创 2019-07-11 12:57:08 · 548 阅读 · 3 评论 -
Leading and Trailing(简单数论)
You are given two integers: n and k, your task is to find the most significant three digits, and least significant three digits of nk.InputInput starts with an integer T (≤ 1000), denoting the numbe...原创 2019-10-20 12:56:27 · 366 阅读 · 0 评论