04 2022 档案

摘要:P3369 【模板】普通平衡树 方法一: //avl数组版 #include<bits/stdc++.h> using namespace std; const int maxn=100010; struct avlnode{ int val; int size; int cnt; int heig 阅读全文
posted @ 2022-04-10 21:29 心悟&&星际 阅读(58) 评论(0) 推荐(0) 编辑
摘要:定义:因子和函数σ定义为整数n的所有正因子之和,记为σ(n)。下面是1~12的σ(n) n 1 2 3 4 5 6 7 8 9 10 11 12 σ(n) 1 3 4 7 6 12 8 15 13 18 12 28 定理:设正整数n有素因子分解,那么 阅读全文
posted @ 2022-04-08 09:54 心悟&&星际 阅读(272) 评论(0) 推荐(0) 编辑
摘要:P1177 【模板】快速排序 //动态开点线段树,指针版 #include<bits/stdc++.h> using namespace std; const int maxn=100010; typedef struct node{ int cnt; node* ls; node* rs; }no 阅读全文
posted @ 2022-04-08 08:42 心悟&&星际 阅读(44) 评论(0) 推荐(0) 编辑
摘要:P3919 【模板】可持久化线段树 1(可持久化数组) #include<cstdio> #include<cstring> #include<iostream> #define R register int using namespace std; const int N=1000009,M=50 阅读全文
posted @ 2022-04-07 10:09 心悟&&星际 阅读(29) 评论(0) 推荐(0) 编辑
摘要:基数排序是按照低位先排序,然后收集;再按照高位排序,然后再收集;依次类推,直到最高位。有时候有些属性是有优先级顺序的,先按低优先级排序,再按高优先级排序。最后的次序就是高优先级高的在前,高优先级相同的低优先级高的在前。 算法描述 1.取得数组中的最大数,并取得位数; 2.arr为原始数组,从最低位开 阅读全文
posted @ 2022-04-02 21:54 心悟&&星际 阅读(92) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示