• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • YouClaw
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
Andromeda_Galaxy
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

随笔分类 -  模板

1 2 下一页

 
计算几何题目总结 (只保证模板正确 代码过题)
摘要:凸包 poj 1113 Graham Scan 算法 极角排序+栈模拟 //#include<bits/stdc++.h> #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include 阅读全文
posted @ 2019-10-15 10:33 Andromeda_Galaxy 阅读(248) 评论(0) 推荐(0)
dfs序 线段树 dfs序列 主席树
摘要:并查集 #include<stdio.h> int stt[10005]; void sset(int x) { for(int i=1;i<=x;i++) stt[i]=i; } int ffind(int x) { if(x==stt[x]) return x; else return stt[ 阅读全文
posted @ 2019-09-05 19:55 Andromeda_Galaxy 阅读(327) 评论(0) 推荐(0)
拉格朗日乘子法
摘要:https://www.cnblogs.com/sddai/p/5728195.html 详细讲解 https://blog.csdn.net/qq_40036484/article/details/80457800 一般讲解 阅读全文
posted @ 2019-07-19 22:54 Andromeda_Galaxy 阅读(139) 评论(0) 推荐(0)
组合数学 待补题
摘要:HDU 4372 - Count the Buildings(组合计数) 第一类斯特拉数 阅读全文
posted @ 2019-07-17 15:37 Andromeda_Galaxy 阅读(135) 评论(0) 推荐(0)
杜教筛 (包括线筛) 莫比乌斯函数前缀和 欧拉函数前缀和 因数和函数前缀和 因子个数前缀和 ( 分析 )
摘要:线筛各种函数 元函数 恒等函数 单位函数 莫比乌斯函数 欧拉函数 因子个数函数 因子和函数 #include<bits/stdc++.h> #define ll long long using namespace std; const int maxn=1e6+10; int e[maxn]; in 阅读全文
posted @ 2019-07-10 09:41 Andromeda_Galaxy 阅读(762) 评论(0) 推荐(0)
计算几何题目总结
摘要:模板 (只用这一个) 点 线 圆 //#include<bits/stdc++.h> #include <iostream> #include <stdio.h> #include <string.h> #include <algorithm> #include <queue> #include < 阅读全文
posted @ 2019-07-08 16:32 Andromeda_Galaxy 阅读(217) 评论(0) 推荐(0)
一周训练总结 6.29-7.4
该文被密码保护。
posted @ 2019-07-05 15:05 Andromeda_Galaxy 阅读(1) 评论(0) 推荐(0)
- Power Strings (字符串哈希) (KMP)
摘要:https://www.cnblogs.com/widsom/p/8058358.htm (详细解释) //#include<bits/stdc++.h> #include<vector> #include<cstdio> #include<cstring> #include<iostream> # 阅读全文
posted @ 2019-05-04 15:18 Andromeda_Galaxy 阅读(1125) 评论(0) 推荐(0)
2019南昌邀请赛 L 计算几何 G(待补)
摘要:#include const double PI=acos(-1.0); const double TT=PI/3; using namespace std; struct Point { double x,y; Point(){} Point(double x, double y) :x(x), y(y){} };; struct Segment{ Point a,b; Segment(... 阅读全文
posted @ 2019-04-20 19:48 Andromeda_Galaxy 阅读(349) 评论(0) 推荐(0)
Visible Lattice Points SPOJ - VLATTICE 三维+莫比乌斯反演
摘要:#include #define ll long long using namespace std; const int maxn=1e7+10; int vis[maxn]; int mu[maxn]; int prime[maxn]; int tot=0; int sum1[maxn]; int sum2[maxn]; void get_mu() { mu[1]=1; vis[1]=... 阅读全文
posted @ 2019-04-14 12:05 Andromeda_Galaxy 阅读(178) 评论(0) 推荐(0)
P2257 莫比乌斯+整除分块
摘要:#include #define ll long long using namespace std; const int maxn=1e7+10; int vis[maxn]; int mu[maxn]; int prime[maxn]; int tot=0; int sum1[maxn]; int sum2[maxn]; void get_mu() { mu[1]=1; vis[1]=... 阅读全文
posted @ 2019-04-13 18:57 Andromeda_Galaxy 阅读(222) 评论(0) 推荐(0)
P2568 莫比乌斯反演+整除分块
摘要:#include<bits/stdc++.h> #define LL long long using namespace std; const int maxn=1e7+10; bool vis[maxn]; int prime[maxn]; int mu[maxn]; int sum1[maxn] 阅读全文
posted @ 2019-04-13 12:21 Andromeda_Galaxy 阅读(230) 评论(0) 推荐(0)
洛古 P2568 莫比乌斯+暴力
摘要:#include #define LL long long using namespace std; const int maxn=1e7+10; bool vis[maxn]; int prime[maxn]; int mu[maxn]; int sum[maxn]; int cnt=0; void get_mu()// mo bi su si han shu { mu[1]=1; ... 阅读全文
posted @ 2019-04-11 21:15 Andromeda_Galaxy 阅读(239) 评论(0) 推荐(0)
bzoj 4589 FWT
摘要:#include #define ll long long using namespace std; const int maxn=5e4+100; const int mod=1e9+7; const int MOD=1e9+7; const int inv2=5e8+4; int a[1>1,j=0;j>=1; } FWT(b,-1); } int main() { g... 阅读全文
posted @ 2019-04-11 19:36 Andromeda_Galaxy 阅读(134) 评论(0) 推荐(0)
poj 1151 (未完成) 扫描线 线段树 离散化
摘要:#include #include #include #include using namespace std; #define y1 y11 #define ls rt vx; vector vy; double x[maxn]; double y[maxn]; struct node { int yl,yr,k; }pp[maxn]; vector vxxx[maxn]; double tr... 阅读全文
posted @ 2019-03-21 21:32 Andromeda_Galaxy 阅读(151) 评论(0) 推荐(0)
倍增 ST表
摘要:void make_ST(){ for(int i=1;i<=n;i++){ st[i][0]=height[i]; for(int j=1;i+(1<<j)-1<=n;j++){ st[i][j]=min(st[i][j-1],st[i+(1<<(j-1))][j-1]); } } } 阅读全文
posted @ 2019-03-21 19:28 Andromeda_Galaxy 阅读(158) 评论(0) 推荐(0)
QMD ST表 倍增
摘要:#include #include using namespace std; const int maxn=1e5+10; int a[maxn]; int st[maxn][50]; int ST[maxn][50]; int quick(int a,int n) { int ans=1; while(n) { if(n&1) ans*=a; ... 阅读全文
posted @ 2019-03-20 13:34 Andromeda_Galaxy 阅读(214) 评论(0) 推荐(0)
SG函数 2019- 杭师范校赛
摘要:#include using namespace std; const int maxn=1e6+10; int sg[maxn]; int f[maxn]; int s[maxn]; void make_SG() { memset(sg,0,sizeof(sg)); int n=200; for(int i=1;i>T; while(T--) { ... 阅读全文
posted @ 2019-03-19 18:28 Andromeda_Galaxy 阅读(213) 评论(0) 推荐(0)
C# 作业
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Wind... 阅读全文
posted @ 2019-03-18 15:14 Andromeda_Galaxy 阅读(147) 评论(0) 推荐(0)
快快读 离散化 牛客题
摘要:#include //#define int long long #define ll long long using namespace std; struct FastIO { static const int S = 4e6; int wpos; char wbuf[S]; FastIO() : wpos(0) {} inline int xchar... 阅读全文
posted @ 2019-03-16 18:44 Andromeda_Galaxy 阅读(170) 评论(0) 推荐(0)
 

1 2 下一页

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3