Anoyer_元戎内推:AEMTt
Anoyer_元戎内推:AEMTt
全部文章
ACM
51nod(2)
51Nod-题解(4)
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的博客
全部文章
/ ACM
(共7篇)
Codeforces Round #525 (Div. 2) -C. Ehab and a 2-operation task
博主链接 题目链接 Note In the first sample, the array is already increasing so we don’t need any operations. In the second sample: In the first...
ACM
题解
Codeforces
2018-12-05
0
510
Codeforces Round #525 (Div. 2)-B. Ehab and subtraction
博主链接 题目链接 Note In the first sample: In the first step: the array is [1,2,3][1,2,3], so the minimum non-zero element is 1. In the second step: t...
ACM
题解
Codeforces
2018-12-05
0
528
Codeforces Round #512---C. Vasya and Golden Ti
博主链接 题目 题意: 给你一个由0-9组成的串,问能不能将串分成2份及两份以上,使每份数和相等 解题思路: 先特判下如果串中只有一种字符且串长度大于2则肯定可以,然后求出把0消去后串的前缀和(因为0对和没影响。再枚举i(i从1到n)位的前缀和num[i],再看看(i-n)中有...
ACM
Codeforces
2018-09-23
0
528
逆元模版(比较全)
博主链接 //费马小定理求逆元 ll quick_mod(ll a,ll b,ll c) //快速幂计算(a^b)%c { ll ans = 1; while(b) { if(b&1) //相当于b%2==1 ...
ACM
2018-09-15
0
451
浮点型数据高精度乘法
/*有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
HDU-1686- Oulipo KMP匹配
HDU-1686- Oulipo PJ的女朋友是一个书法家,喜欢写一些好看的英文书法。有一天PJ拿到了她写的纸条,暗示要送给他生日礼物。PJ想知道自己想要的礼物是不是就是她送的,于是想看看自己想要的在纸条中出现了多少次。 Input 第一行输入一个整数代表数据的组数 每组数据第一行一个...
ACM
POJ
2018-08-02
0
587