- 博客(96)
- 收藏
- 关注
转载 电脑快捷键
Ctrl + A 全选Ctrl + C 复制Ctrl + V 粘贴Ctrl + F 查找Ctrl + H 历史纪录Ctrl + I 收藏夹Ctrl + N 新窗口Ctrl + R 刷新Ctrl + S 保存Ctrl + W 关闭当前窗口Ctrl + X 剪切Ctrl + Z 撤销Ctrl + 方向键 选中桌面图标F1 帮助F2 重命...
2019-05-11 14:09:00
233
转载 WPF中矢量图标库
https://www.iconfont.cn/search/index?searchType=icon&q=人员转载于:https://www.cnblogs.com/Leozi/p/10838521.html
2019-05-09 15:03:00
1137
转载 字符与整数互换
#include<iostream>#include<cstdio>整数转换为字符串:#include<cstring>#include<algorithm>#include<stdlib.h>using namespace std;int main(){ int num = 1...
2019-05-08 22:47:00
245
转载 最长回文子序列个数
memset(dp,0,sizeof(dp)); for(int i=0;i<len;i++) dp[i][i]=1; for(int i=1;i<len;i++) { int temp=0; for(int j=0;j+i<len;j++) ...
2019-05-08 22:47:00
189
转载 字典序全排列
#include<iostream>#include<cstdio>#include<algorithm> #include<cstring>using namespace std;int change(int a[],int x,int y){ int t=0; t=a[x]; a...
2019-05-08 22:46:00
143
转载 字符串匹配
https://vjudge.net/contest/262078#problem/B#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<map>#define INF 0x3f3f3f3...
2019-05-08 22:46:00
125
转载 子集和问题拓展
#include<iostream>using namespace std;long long P=1e17;int main(){ long long n,a[40],sum,count,min=P,k; while(cin>>n) { if(n==0) break; ...
2019-05-08 22:45:00
122
转载 字典树前缀出现次数
#include<iostream>#include<cstring>#include<cstdio>using namespace std;typedef long long ll;int tree[500000][27],sum[500000],tot;char a[15];int insertit(){ ...
2019-05-08 22:45:00
147
转载 整形数据字符型交替输入
#include<iostream>#include<cstdio>#include<algorithm>const long long p=10000;using namespace std;int main(){ char ch; int a[p],n,i,x; cin>>n;...
2019-05-08 22:44:00
245
转载 周期字符串
#include<iostream>#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>typedef long long LL;using namespace std;int main(){ ch...
2019-05-08 22:44:00
259
转载 辗转相除最小公倍数的递归求法
#include<iostream>using namespace std;int gcd(int a,int b){ return a%b?gcd(b,a%b):b;}int main(){ cout<<gcd(3,12)<<endl;}转载于:https://www.cnblogs.com/Leozi/p/10...
2019-05-08 22:43:00
187
转载 与丑数类似的质因子
#include<iostream>using namespace std;const long long p=1e5+5;const long long q=1e18;long long min(long long x,long long y,long long z){ long long k1; k1=x<y?x:y;...
2019-05-08 22:42:00
119
转载 辗转相除法求最小公约数
#include<iostream>using namespace std;int main(){ long long m,n,k,s=m,j=n; while(cin>>m>>n) { if(m<n) { m=m+n; ...
2019-05-08 22:42:00
102
转载 优先队列自定义优先级
#include<iostream>#include<queue>using namespace std;struct node{ int x; int y; friend bool operator < (node a,node b) { if(a.x==b.x) ...
2019-05-08 22:41:00
580
转载 有向图的二分匹配
RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪酷儿做par...
2019-05-08 22:41:00
340
转载 用函数求lnx,lgx等
https://blog.youkuaiyun.com/liujian20150808/article/details/50628061转载于:https://www.cnblogs.com/Leozi/p/10835523.html
2019-05-08 22:40:00
2061
转载 优先队列
#include<iostream>#include<queue>using namespace std;struct node{ int x; int y; friend bool operator < (node a,node b) { return a.x>b.x; ...
2019-05-08 22:40:00
96
转载 一维开灯问题
https://vjudge.net/contest/258290#problem/B#include<iostream>#include<cstdio>#include<algorithm>#include<cstring>#include<map>#include<set&g...
2019-05-08 22:39:00
159
转载 线段树懒惰标记的区间查询与区间修改
#include<iostream>#include<cstring>#include<cstdio>using namespace std;typedef long long ll;ll w[100010],ans;ll n;struct node{ ll st; ll ed; ll su...
2019-05-08 22:38:00
188
转载 线段树区间询问,单点修改
#include<iostream>#include<algorithm>#include<cstdio>using namespace std;int val[200010],ans;struct node{ int lf; int rg; int mx;}a[800020];void B...
2019-05-08 22:38:00
126
转载 线段树改变区间值
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<map>#define INF 0x3f3f3f3f#define ONF 0xc0c0c0c0using namespace std;...
2019-05-08 22:36:00
153
转载 无向边的二分匹配
Jimmy is studying Advanced Graph Algorithms at his university. His most recent assignment is to find a maximum matching in a special kind of graph. This graph is undirected, has N vertices and ...
2019-05-08 22:35:00
113
转载 拓展欧几里得—青蛙的约会
两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,它们觉得只要一直朝着某个方向跳下去,总能碰到对方的。但是除非这两只青蛙在同一时间跳到同一点上,不然是永远都不可能碰面的。为了帮助这两...
2019-05-08 22:34:00
72
转载 拓扑排序
#include<iostream>#include<cstring>#include<queue>using namespace std;int mapp[505][505],vis[1000],a[505];int main(){ int n,m,cont,x,y; while(cin>>...
2019-05-08 22:34:00
75
转载 素数位数的判断
https://blog.youkuaiyun.com/M___er/article/details/51332387转载于:https://www.cnblogs.com/Leozi/p/10835442.html
2019-05-08 22:33:00
132
转载 素数打表
const int N = 100001;int mark[N],prime[N],cont=0;void prime_table(){ memset(mark,0,sizeof(mark)); mark[0] = mark[1] = 1; for(long long i=2;i<N;i++) { if(ma...
2019-05-08 22:32:00
78
转载 素数筛法优化
#include<iostream>#include<cstring>using namespace std;const int p=10000;int main(){ bool isprime[10005]; int a[10000],count; count=0; memset(isprime,t...
2019-05-08 22:32:00
110
转载 四个数之和为零
#include<iostream>#include<algorithm>using namespace std;int main(){ long long a[1005],n,g,k,l,r; cin>>n; for(int i=0;i<n;i++) cin>>a[i];...
2019-05-08 22:31:00
256
转载 斯特林公式求阶乘长度
#define PI 3.1415926535898#define e 2.718281828459const long long Mod=1e9+7;int main(){ long long t,n,res; cin>>t; while(t--) { cin>>n; ...
2019-05-08 22:30:00
132
转载 三位坐标的建立
#include<iostream>#include<queue>#include<cstring>using namespace std;struct node{ int x,y,z; int step;};int move1[6][3]={-1,0,0,1,0,0,0,1,0,0,-1,0,0,0,1...
2019-05-08 22:30:00
167
转载 三个数之和为零
#include<iostream>#include<algorithm>using namespace std;int main(){ long long a[1005],n,k,c,d=0; cin>>n; for(int i=0;i<n;i++) { cin>...
2019-05-08 22:29:00
229
转载 区间素数筛
#include<iostream>#include<cstdio>#include<cstring>#include<cstdlib>typedef long long LL;using namespace std;const int N = 1e6+5;bool isprime[N];bool low...
2019-05-08 22:29:00
68
转载 求排序需要交换的次数
#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int main(){ int n,Line[10005],t,cont; scanf("%d",&n);...
2019-05-08 22:28:00
529
转载 奇数偶数关系
#include<iostream>using namespace std;int main(){ long long n,ans; while(cin>>n) { ans=0; for(;n>=1;) { if(n%2!=0) ...
2019-05-08 22:28:00
346
转载 欧拉线性筛
#include<iostream>#include<cstring>#include<cstdio>using namespace std;int prime[100001],mark[1000001];//prime是素数数组,mark为标记不是素数的数组int tot,phi[100001];//phi为φ(),tot为1...
2019-05-08 22:27:00
68
转载 欧拉定理求逆元
#include<iostream>using namespace std;long long phi(long long x){ long long res=x,a=x; for(int i=2;i*i<=a;i++) { if(a%i==0) { res=re...
2019-05-08 22:26:00
403
转载 欧几里得拓展
#include<iostream>using namespace std;long long x,y,g;long long ex_gcd(long long a,long long b){ if(b==0) { x=1;y=0;g=a; } else { ex_gcd...
2019-05-08 22:26:00
88
转载 欧拉函数求在1-n-1与n互质的个数
long long phi(long long x){ long long res=x,a=x,i; for(i=2;i*i<=a;i++) { if(a%i==0) { res=res/i*(i-1); while(a%i==0) ...
2019-05-08 22:26:00
385
转载 卢卡斯公式-组合数取模
#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#define Mod 10007using namespace std;typedef long long ll;ll F...
2019-05-08 22:25:00
295
转载 快速幂取模拓展
#include<iostream>#include<cstring>using namespace std;const long long p=1e7;int main(){ char a[150]; long long m,n,k,t,ans,lenth; while(cin>>a>>...
2019-05-08 22:24:00
71
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人