上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 32 下一页
摘要: 基本思想: 无; 关键点: 无; #include<iostream> #include<string> #include<vector> #include<algorithm> #include<set> using namespace std; const int maxn = 1000000; 阅读全文
posted @ 2020-03-14 00:03 暮云林凌 阅读(135) 评论(0) 推荐(0)
摘要: 关键点: 无; 基本思想: 无; #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int ht[101]; int main() { int n; int a; 阅读全文
posted @ 2020-03-13 23:51 暮云林凌 阅读(144) 评论(0) 推荐(0)
摘要: 基本思想: 无; 关键点: 无; #include<iostream> #include<string> #include<vector> #include<queue> using namespace std; const int maxn = 1000000; int num[maxn]; in 阅读全文
posted @ 2020-03-13 23:47 暮云林凌 阅读(236) 评论(0) 推荐(0)
摘要: 基本思想: 优先队列保证数值最小; 关键点: 无; #include<iostream> #include<string> #include<vector> #include<queue> using namespace std; int main() { int n; int a; while ( 阅读全文
posted @ 2020-03-12 20:08 暮云林凌 阅读(190) 评论(0) 推荐(0)
摘要: 基本思想: 优先队列问题,但是也可以直接sort cmp解决,感觉有点累赘,思想受限; 关键点: 无; #include<queue> #include<vector> #include<iostream> #include<string> #include<cmath> #include<algo 阅读全文
posted @ 2020-03-12 19:20 暮云林凌 阅读(167) 评论(0) 推荐(0)
摘要: 优先队列是建立在队列的基础上来进行求解的; 仍然具有相同的函数操作,但是唯一不同的是增加了一个新的特性:根据自定义可以对队列内输出顺序进行控制; 情况一:当如果使用普通数值来说: 简单的定义方式: priority_queue<int>q; 这种是最简单的不定义控制方式的操作,默认将队列内的元素从大 阅读全文
posted @ 2020-03-12 18:07 暮云林凌 阅读(417) 评论(0) 推荐(0)
摘要: 基本思想: 无; 关键点: 无; #include<iostream> #include<string> #include<vector> using namespace std; void devide(string s, int n, int& r) { for (int i = 0; i < 阅读全文
posted @ 2020-03-12 01:02 暮云林凌 阅读(183) 评论(0) 推荐(0)
摘要: 基本思想: 无; 关键点: 无; #include<string> #include<vector> #include<iostream> #include<algorithm> #include<math.h> using namespace std; void add(string& a, st 阅读全文
posted @ 2020-03-12 00:43 暮云林凌 阅读(173) 评论(0) 推荐(0)
摘要: 基本思想: 注意取模公式: 关键点: 无; #include<iostream> #include<vector> using namespace std; const int mod = 10000; int a, b, p, q, k; int num[mod]; void init() { n 阅读全文
posted @ 2020-03-12 00:24 暮云林凌 阅读(301) 评论(0) 推荐(0)
摘要: 刚开始用的字符串来做,爆时间了; 采用如上推导,可以变成快速幂取模,这样一切就明了了; 还要注意,有的测试点算出了Nr=0,根据定律,只能得到N=k-1; 关键点: 无; #include<iostream> #include<string> #include<vector> using names 阅读全文
posted @ 2020-03-11 23:54 暮云林凌 阅读(226) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 32 下一页