02 2019 档案

摘要:POJ 3614 #include <iostream> #include <cmath> #include <cstdio> #include <cstring> #include <string> #include <algorithm> #include <queue> #include <s 阅读全文
posted @ 2019-02-25 21:11 阿斯水生产线 阅读(296) 评论(0) 推荐(0)
摘要:优先队列问题 就是一个队列按照从小到大事先排好序了 priority_queue<int, vector<int>, less<int>>s; //less表示按照递减(从大到小)的顺序插入元素priority_queue<int, vector<int>, greater<int>>s; //gr 阅读全文
posted @ 2019-02-06 18:33 阿斯水生产线 阅读(398) 评论(0) 推荐(0)
摘要:记忆话递归 动态规划法: 阅读全文
posted @ 2019-02-01 13:35 阿斯水生产线 阅读(170) 评论(0) 推荐(0)
摘要:快速幂取模(二分思想) 打了好多次比赛都用到快速幂,然而总是记得不太熟,今天写下来自己的模板 直接进行循环求幂的时间复杂度体现在for循环中,为O(b).这个算法存在着明显的问题,如果a和b过大,很容易就会溢出。 那么,我们先来看看第一个改进方案:在讲这个方案之前,要先有这样一个公式: ab mod 阅读全文
posted @ 2019-02-01 10:47 阿斯水生产线 阅读(204) 评论(0) 推荐(0)