传送门 第一道交互题 题意: 思路: 解释: fflush只能加于你的输出后 电脑的反馈前 ...
分类:
其他好文 时间:
2018-12-09 10:38:12
阅读次数:
193
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
[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
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
分析 代码 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
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