Anoyer_元戎内推:AEMTt
Anoyer_元戎内推:AEMTt
全部文章
分类
51nod(2)
51Nod-题解(4)
ACM(7)
ACM模板(1)
ACM模版(1)
AC自动机(1)
C/C++(1)
Camp(11)
Codeforces(9)
Hash(1)
HDU(8)
POJ(2)
其他(1)
字符串(2)
字符串模版(1)
未归档(83)
输入外挂(1)
题解(13)
归档
标签
去牛客网
登录
/
注册
Anoyer_元戎内推:AEMTt的博客
全部文章
(共149篇)
基数排序MSD
博主链接 #include<stdio.h> #include<iostream> #include<algorithm> #include<string> #include<malloc.h> using namespace std;...
2018-09-15
0
527
浮点型数据高精度乘法
/*有2堆石子。A B两个人轮流拿,A先拿。每次可以从一堆中取任意个或从2堆中取相同数量的石子,但不可不取。拿到最后1颗石子的人获胜。假设A B都非常聪明,拿石子的过程中不会出现失误。给出2堆石子的数量,问最后谁能赢得比赛。 例如:2堆石子分别为3颗和5颗。那么不论A怎样拿,B都有对应的方法拿到最后...
ACM
2018-09-15
0
624
分解出一个数的所有质因子
//n为要分解的数 //Fac数组存所有质因子 //cnt为质因子个数 void primeFactor(int n){ while(n%2==0){ Fac[cnt++]=2; n/=2; } // 经过第二步, 此时 n 一定为奇数 ...
ACM
2018-09-15
0
510
杜教筛--求积性函数前缀和
博主链接 模版中以求欧拉函数和莫比乌斯函数前缀和为例 #include<stdio.h> #include<bits/stdc++.h> #define ll long long int; #define N 2001000 #define ni 50000000...
2018-09-15
0
409
求大数的n次方对m取模(欧拉降幂)
博主链接 #include <stdio.h> #include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int MAXN ...
2018-09-15
0
383
Miller-Rabin素性测试
博主链接 /* * 随机素数测试(伪素数原理理) * CALL: bool res = miller(n); * 快速测试n是否满⾜足素数的“必要”条件,出错概率极低 * 对于任意奇数n > 2和正整数s,算法出错概率≤2^(-s) */ #include<s...
2018-09-15
0
492
博弈论模版(Bash博弈,Nim博弈,威佐夫博弈,SG打表)
博主链接 Bash--两人从一堆a个石子里面轮流取石子,每次最多去b个,取到最后一个石子获胜 int main() { int t; scanf("%d", &t); while (t--) { int a, b,flag; scanf("%...
2018-09-12
0
450
51Nod---1678 lyk与gcd (莫比乌斯反演)
题目链接 这天,lyk又和gcd杠上了。 它拥有一个n个数的数列,它想实现两种操作。 1:将 ai 改为b。 2:给定一个数i,求所有 gcd(i,j)=1 时的 aj 的总和。 Input 第一行两个数n,Q(1<=n,Q<=100000)。 接下来一行n个数表示ai(1&...
2018-09-05
0
576
B. The Bits--Codeforces Round #502 (in memory of Leopoldo Taravilse, Div. 1 + Div. 2)
B. The Bits B. The Bits time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Rudolf is on his way...
codeforces
ACM
算法
2018-08-09
0
642
51nod 1117聪明的木匠
聪明的木匠 基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 一位老木匠需要将一根长的木棒切成N段。每段的长度分别为L1,L2,…,LN(1 <= L1,L2,…,LN <= 1000,且均为整数)个长度单位。我们认为切割时仅在整数点处切且没有木材损失。...
2018-08-05
0
588
首页
上一页
6
7
8
9
10
11
12
13
14
15
下一页
末页