码迷,mamicode.com
首页 >  
搜索关键字:calculate prime s    ( 3428个结果
PE-7 10001st prime
结果:104743 ...
分类:其他好文   时间:2018-12-09 20:39:53    阅读次数:162
codeforces679A_Bear and Prime 100 交互题
传送门 第一道交互题 题意: 思路: 解释: fflush只能加于你的输出后 电脑的反馈前 ...
分类:其他好文   时间:2018-12-09 10:38:12    阅读次数:193
求a^b的约数对mod取模
const int maxn=30000+5; int prime[maxn]; void marktable(int n){ memset(prime,0,sizeof(prime)); for(int i=2;i T fast_mod(T a,T b,T1 Mod){ a%=mod; if(b=... ...
分类:其他好文   时间:2018-12-08 19:41:13    阅读次数:186
莫比乌斯函数
const int maxn=1000000+5; bool check[maxn]; int prime[maxn],mu[maxn]; void Moblus(int n){ memset(check,0,sizeof(check)); mu[1]=1; int tot=0; for(int i... ...
分类:其他好文   时间:2018-12-08 19:38:52    阅读次数:151
欧拉筛&&线性筛
复杂度 n 代码 include using namespace std; bool vis[10000000]; int prime[10000]; int Oulashai(int n){ memset(vis,0,sizeof(vis)); int cnt=0; for(int i=2;i n ...
分类:其他好文   时间:2018-12-07 16:45:48    阅读次数:156
HDU1003 Max Sum 解题报告
[toc] 题目信息 Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub sequence. For example, given ( ...
分类:其他好文   时间:2018-12-05 18:34:20    阅读次数:224
LeetCode 371. Sum of Two Integers
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and . Example: Given a = 1 and b = 2, return 3. ...
分类:其他好文   时间:2018-12-03 22:08:48    阅读次数:207
常微分方程
利用首次积分法(First Integral)求解对称形式的常微分方程组:\[\frac{{\rm\,d}x}{-x+y+z}=\frac{{\rm\,d}y}{x-y+z}=\frac{{\rm\,d}z}{x+y-z}\] \[\frac{{\rm\,d}x}{-x^2+y^2+z^2}=\fr ...
分类:其他好文   时间:2018-12-03 10:26:11    阅读次数:339
「LeetCode」0952-Largest Component Size by Common Factor(Go)
分析 代码 go var isPrime[100005] bool var pa[100005] int func initPrimeNumbers() { isPrime[0]=false isPrime[1]=false for i:=2;itmp) { break } if(tmp%prime ...
分类:其他好文   时间:2018-12-02 22:36:33    阅读次数:155
CodeForces - 1073E :Segment Sum (数位DP)
You are given two integers l l and r r (l≤r l≤r ). Your task is to calculate the sum of numbers from l l to r r (including l l and r r ) such that eac ...
分类:其他好文   时间:2018-12-01 21:57:27    阅读次数:186
3428条   上一页 1 ... 53 54 55 56 57 ... 343 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!