摘要: 【分数类】 struct Fraction { private: i64 numerator; // 分子 i64 denominator; // 分母 // 化简分数 void reduce() { if (denominator == 0) { throw invalid_argument("分 阅读全文
posted @ 2025-09-06 23:00 White_ink 阅读(12) 评论(0) 推荐(0)
摘要: 【计算几何板子】 初始板子 遇到计算几何的题目就用这个模版来写 #include<bits/stdc++.h> using namespace std; #define endl '\n' #define whiteink signed main #define fi first #define s 阅读全文
posted @ 2025-07-19 22:06 White_ink 阅读(24) 评论(0) 推荐(0)
摘要: 【算法竞赛】一些好用的模版/注意要点 火车头(2025.10.03更新) #include<bits/stdc++.h> using namespace std; #define endl '\n' #define whiteink signed main #define fi first #def 阅读全文
posted @ 2025-01-12 15:56 White_ink 阅读(60) 评论(0) 推荐(0)
摘要: 【计算几何基础】 主要介绍一些高中数学的知识 卡精度 注意 \(\varepsilon\): 计算误差的产生:0.1这个不能完全被表示的数 常见爆精度情况 加减太多次:先加一些大数最后再减掉 加减法的误差会被乘除法放大 \(\sqrt{x}\),\(acos(x)\)等函数超过定义域 注意点 (1) 阅读全文
posted @ 2026-03-13 18:23 White_ink 阅读(1) 评论(0) 推荐(0)
摘要: https://www.bilibili.com/video/BV1HDg3z5EGT/?spm_id_from=333.1007.top_right_bar_window_custom_collection.content.click&vd_source=81dc23c30ec004cf560d9 阅读全文
posted @ 2026-03-03 21:16 White_ink 阅读(4) 评论(0) 推荐(0)
摘要: 【线性基】 与异或和有关的问题:01Trie、异或线性基 致谢 https://www.luogu.com.cn/article/zo12e4s5 阅读全文
posted @ 2026-02-08 22:27 White_ink 阅读(4) 评论(0) 推荐(0)
摘要: 【高斯消元】 时间复杂度\(O(n^{3})\) 高斯消元解决加法方程组 每次选绝对值最大的系数交换上来,然后消元 主元:系数不为0 自由元:系数为0 自由元之间相互独立,互不影响 主元的值可能会由自由元确定 唯一解:主元系数都不为0,值也不为0 矛盾解、多解: 若主元系数为0时,值不为0->矛盾 阅读全文
posted @ 2026-02-08 16:08 White_ink 阅读(4) 评论(0) 推荐(0)
摘要: 运算符重载 转换构造函数/类型转换函数 https://blog.csdn.net/lzm18064126848/article/details/50457636 eg 将double和Complex相加 operator double(){ return real; } #include<iost 阅读全文
posted @ 2026-01-20 20:48 White_ink 阅读(2) 评论(0) 推荐(0)
摘要: 【同余最短路】 【题目积累】 (板题)跳楼机 https://www.luogu.com.cn/problem/P3403 AC代码 本题最保险的做法是unsigned long long typedef pair<i64,int> PII; template<typename T> bool cm 阅读全文
posted @ 2025-11-11 00:52 White_ink 阅读(7) 评论(0) 推荐(0)
摘要: 【抛体运动】 阅读全文
posted @ 2025-11-04 01:44 White_ink 阅读(9) 评论(0) 推荐(0)
摘要: 【Keil Qt】 好用的注释 语法 /** * @brief Create new QToolButton * * @param name Name of button * @param iconPath Path to button icon. * @return QToolButton Cre 阅读全文
posted @ 2025-11-03 10:52 White_ink 阅读(7) 评论(0) 推荐(0)
摘要: 【线性代数】 【矩阵封装】 矩阵加法/乘法 //矩阵加乘封装:1-based //如不用取模:mod请用超大质数100000000000000003 const int MAX_SIZE=200; // 最大矩阵大小 struct Matrix{ int rows,cols; i64 M[MAX_S 阅读全文
posted @ 2025-10-09 09:36 White_ink 阅读(15) 评论(0) 推荐(0)
摘要: 【Linux串口通信】 阅读全文
posted @ 2025-10-03 21:58 White_ink 阅读(5) 评论(0) 推荐(0)