上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 35 下一页
摘要: https://nanti.jisuanke.com/t/41299 分析:题目给出a,b,mod求满足条件的最小a,由题目的式子得,每次只要能递归下去,b就会+1,所以就可以认为b其实是次数,什么的次数?对数函数的反函数。。。。即题目求a的a次方的a次方.....一直搞b次后求得的答案。 #inc 阅读全文
posted @ 2019-09-02 18:53 starve_to_death 阅读(681) 评论(0) 推荐(0) 编辑
摘要: 在数论中,欧拉定理,(也称费马-欧拉定理)是一个关于同余的性质定理。了解欧拉定理之前先来看一下费马小定理: a是不能被质数p整除的正整数,则有a^(p-1) ≡ 1 (mod p) 欧拉给出了推广形式 若n,a为正整数且互质,则,其中φ(n)表示小于等于n的数中与n互质的数的数目。可以看出费马小定理 阅读全文
posted @ 2019-09-01 21:34 starve_to_death 阅读(443) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/gym/102222/problem/F fory #include<bits/stdc++.h> using namespace std; typedef long long ll; #define lson root<<1,l,midd #define 阅读全文
posted @ 2019-08-31 15:05 starve_to_death 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 简单的树链剖分+线段树 #include<bits\stdc++.h> using namespace std; #define pb push_back #define lson root<<1,l,midd #define rson root<<1|1,midd+1,r const int M= 阅读全文
posted @ 2019-08-30 09:11 starve_to_death 阅读(142) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=5452 题意:给个图T(图G的最小生成树),然后再给定图G的剩余边,问你从图T中当且割一条边的情况再割图G中不属于图T的边,使整个图(图G)不联通,求最小割; 分析:1、只能并且要求割图T中的一条边,所以只能割叶子 阅读全文
posted @ 2019-08-29 11:31 starve_to_death 阅读(129) 评论(1) 推荐(0) 编辑
摘要: 学习粗:https://blog.csdn.net/creatorx/article/details/75446472 主要解决 可查询历史版本的线段树,区间第k大问题 我们询问【L,R】时,我们就认为是第R棵树减去第L-1棵树;(详情:https://blog.csdn.net/bestFy/ar 阅读全文
posted @ 2019-08-26 22:26 starve_to_death 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 04 http://acm.hdu.edu.cn/showproblem.php?pid=6705 分析;先把每条边以 形式放进堆,堆按路径权值从小到大排序,然后每次取出堆顶,用v的出边扩展 新的路径。但是一个点的出度可能会非常大(如菊花图),可以发现,将出边排序之后, 每次只需要扩 展当前点最小的 阅读全文
posted @ 2019-08-24 00:03 starve_to_death 阅读(108) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/890/F 题意:二维平面中有n个气球,你可以横着社三法子弹,竖着射三发子弹,且横着子弹的关系是y,y+r,y+2*r,竖着是x,x+r,x+2*r。问你怎么射才能射爆最多的气球。 分析:(代码注释) #include<bits 阅读全文
posted @ 2019-08-19 14:42 starve_to_death 阅读(197) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/887/E 树状数组做法(代码有注释) #include<bits/stdc++.h> using namespace std; typedef long long ll; const int M=4e5+5; int x[M] 阅读全文
posted @ 2019-08-19 11:46 starve_to_death 阅读(133) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/889/D(超大背包) #include<bits/stdc++.h> using namespace std; //__ #define pb push_back typedef long long ll; typedef u 阅读全文
posted @ 2019-08-15 19:40 starve_to_death 阅读(137) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 35 下一页