板子

考点列表(附板子)

我不能白给啊啊啊啊啊!!!!! 我会在这里将最近的考到的知识点罗列,也当是快速复习与刷题计划吧。 Part1 数论相关 计数类 Lucas定理 点击查看代码 const int Mod = ?; int powM(int x, int y = Mod-2) { int ret = 1; while ......
板子 考点

板子

线段树 #include<bits/stdc++.h> using namespace std; struct node { int l,r; long long pre,add,chen; } t[1000000]; long long a[1000000]; long long n,m,mod; ......
板子

各种OI板子

以下内容不定时更新,想到啥写啥。。 读写优化 快读 code template <class T> inline void read(T &res) { char ch = getchar(); bool f = 0; res = 0; for(; !isdigit(ch); ch = getcha ......
板子

xcpc自用板子

Bellman-Ford最短路O(nm) int INF = 0x3f3f3f3f; struct edge { int from, to, cost; }edges[12405]; int n,m; edge es[1000]; int d[2510]; void shortest_path(in ......
板子 xcpc

板子

缺省源 \(85\) #include <bits/stdc++.h> #include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; #define For(i ......
板子

LCT板子

//我坚信LCT可以平替树剖 #include<bits/stdc++.h> #define ls t[o].ch[0] #define rs t[o].ch[1] #define int long long using namespace std; const int N=500010; cons ......
板子 LCT

多项式板子

FFT const double pi=acos(-1.0); int rev[N]; void FFT(complex<double> *a,int nr,int flag){ for(int i=0;i<nr;i++){ if(i<rev[i]) swap(a[i],a[rev[i]]); } ......
多项式 板子

【学习笔记】(13) 平衡树——记住不的板子

Treap Splay 无旋Treap——fhq treap 简介 就是没有旋转操作的 Treap,一些性质什么的都跟 Treap 类似。 算法介绍 (1)merge(x,y) 将两棵“有序”(x中元素的权值最大值小于 y 中元素权值最小值)的Treap合并成一棵。 int ch[N][2], sz ......
板子 笔记 13

板子

图论 Tarjan求强连通分量 int n, m, tot, top, cnt; int dfn[N], low[N]; int q[N], ins[N], c[N]; vector<int> eg[N], scc[N], neg[N]; int cd[N]; void tarjan(int u){ ......
板子

字符串哈希板子

字符串哈希板子 http://oj.daimayuan.top/course/7/problem/485 单哈希 # include<bits/stdc++.h> using namespace std; const int N = 2e5+10; const int p = 9999971,bas ......
板子 字符串 字符

多项式Vector封装板子

配合 多项式操作 食用 只要把最高次幂为 \(vector.size()\) 的多项式直接传入即可。 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; ......
多项式 板子 Vector

linux板子在LVGL下显示图片显示,有残影、毛刺现象。

1.BUG描述(如下图残影),时钟指针和汉字有毛刺。 2.解决办法 改变设备树的“pixel clock” SPI写反了RGB的配置顺序,更改SPI配置寄存器的代码,调整RGB顺序。 ......
毛刺 板子 现象 图片 linux

CF70D Professor's task 题解 & 动态凸包板子

CF70D Professor's task 题解 前言 此篇题解用的是 \(Andrew\),不想看这种做法的可以绕道。 题意 动态凸包板子题。 维护动态凸包。两种操作,加一个点或查询一个点是否在凸包内。 题解 首先你得会静态二维凸包。 维护二维凸包的方法挺多的,比如什么 \(Andrew\) 算 ......
凸包 题解 板子 Professor 动态

一点板子

快读、关同步 int read(){ int f=1,x=0;char c=getchar(); while(!isdigit(c)) { if(c=='-')f=-1; c=getchar(); } while(isdigit(c)){ x=x*10+c-'0'; c=getchar(); } r ......
板子

只是一些板子

### 说不上全,想起来就添 #### 平衡树 splay ``` #include using namespace std; #define il inline const int DWDB_221E=122300; #define Croll(i,l,r) for(int i=l;i1) {tr ......
板子 只是

alopPnP冰沙板子配置文件

如下 # Smoothieboard configuration file, see http://smoothieware.org/configuring-smoothie # NOTE Lines must not exceed 132 characters, and '#' character ......
板子 alopPnP 文件

acm竞赛板子(自用)

# 月影几度凉的板子 ## 基础算法 ### 前缀和与差分 #### 二维前缀和 ![](https://s2.loli.net/2023/03/17/kql2ZPWi1XpedHf.png) 如图所示,左边红框中所有数字的和 $$ S[i][j]=S[i-1][j]+S[i][j-1]-S[i-1 ......
板子 acm

板子

### LCT ```cpp struct LinkCutTree { struct Node { int ch[2]; int fa; int rev_tag; // ... }; vector tree; map, bool> edge; void init(int n /* ... */) { ......
板子

平衡树板子

# 替罪羊 ```cpp #include #include using namespace std; const int MaxN = 4e5 + 10; const double eps = 0.75; int d[MaxN], l[MaxN], r[MaxN], cnt[MaxN], sum[ ......
板子

二分板子

1.求最大值最小 while (l <= r){ mid = (l + r) >> 1; if (check(mid)) ans = mid, r = mid - 1; else l = mid + 1; } 例题 洛谷p3853 路标设置 code#include<bits/stdc++.h> u ......
板子

第一个板子--快读

template inline T read() { T num = 0; int neg = 0; char c = getchar(); while (!isdigit(c) and c != '-') { c = getchar(); } if (c == '-') neg = 1; else ......
板子

计算几何の板子

### 一 精度处理 $eps$和$sgn$ ```cpp const double eps=1e-8; int sgn(double x){//判断大小 if(fabs(x)<eps)return 0; else return x<0?-1:1; } ``` ### 二 点 ##### 1 点的初 ......
板子 几何

常用板子

### 树状数组 点击查看代码 ``` int c[N]; int ask(int x){ int res = 0; for(; x; x -= x & -x) ans += c[i]; return ans; } void add(int i, int x){ for(; x ......
板子 常用

【小结】简单的板子

持续更新中~ # 索引 >1 快读快写 >>1.0 快读快写 >2 数据结构 >>2.0 堆 >>2.1 线段树 >>2.2 树状数组 >>2.3 st表 >>2.4 单调栈 >>2.5 单调队列 >>2.6 可持久化数据结构 >>> 2.6.0 可持久化数组 >>> 2.6.1 可持久化线段树 > ......
板子 小结

数论板子

### exgcd 点击查看代码 ``` __int128 exgcd(__int128 as,__int128 bs,__int128 &x,__int128 &y){ if(bs==0){ x=1; y=0; return as; } __int128 ans=exgcd(bs,as%bs,y, ......
数论 板子

板子哲学汇总

密码:#39C5BB [树状数组](https://www.cnblogs.com/sonnety-v0cali0d-kksk/p/17498855.html "树状数组") [tarjan](https://www.cnblogs.com/sonnety-v0cali0d-kksk/p/17498 ......
板子 哲学

EP3C40F484C8N+cyusb3014 该板子之前批量过,现在没有板子了,只有完整的开发资料。

EP3C40F484C8N+cyusb3014 该板子之前批量过,现在没有板子了,只有完整的开发资料。包含FPGA源码,usb源码。资料里有原理图和pcbID:5730605186874401 ......
板子 开发资料 只有 资料 cyusb

板子

# 板子 博主线上考试自己用的板子。 ## 快读 ```cpp char buf[1=mod)?x-mod:x;} inline void add(int &x,int y){x=add(x+y);return ;} inline int sub(int x){return (x>=1; } ret ......
板子

阴阳师藏宝阁链接估号/性价比分析 - 板子酱鉴宝屋

如果您对藏宝阁的账号价格不够了解,就可能买到低性价比的账号。“板子酱鉴宝屋”就能提供您所需的帮助,用科学的方法让您以合理的价格买到符合心意的账号,以小代价获得更大的收益。快来选择我们的服务吧! ## 如何估价 闲鱼号:板子酱鉴宝屋 https://m.tb.cn/h.UBOEANq?tk=r5VSd ......
板子 阴阳 性价比 链接

[P3880](树套树板子)

维护一段区间内的排名,第k小,前驱,后继 线段树套平衡树即可 线段树上的每一个节点都建一棵平衡树维护所在的这一区间 修改和查前驱和后继就在线段树上对相应的区间进行操作即可$O(log^2)$ 查排名就查找每一小段区间内此数的排名求和(一个数排名的定义为小于此数的数量+1) 有一个小细节就是查每一段区 ......
板子 P3880 3880