摘要: 神奇!!! 阅读全文
posted @ 2021-08-11 19:46 latent_Lin 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 1 for(int i = 1; i <= n; ++i) //预先算出log_2(i)+1的值,用的时候直接调用就可以了 2 lg[i] = lg[i-1] + (1 << lg[i-1] == i); //看不懂的可以手推一下 3 for(int i = 1; i <= n; ++i){ //约 阅读全文
posted @ 2020-08-21 07:51 latent_Lin 阅读(180) 评论(9) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2024-04-27 19:34 latent_Lin 阅读(1) 评论(0) 推荐(0) 编辑
摘要: import numpy as np import matplotlib.pyplot as plt # Fixing random state for reproducibility np.random.seed(19680801) plt.title('My second Python plot 阅读全文
posted @ 2023-10-30 15:26 latent_Lin 阅读(4) 评论(0) 推荐(0) 编辑
摘要: https://www.csdn.net/tags/OtTaYgzsMDk1ODYtYmxvZwO0O0OO0O0O.html https://www.csdn.net/tags/MtTacgxsNTg0NTktYmxvZwO0O0OO0O0O.html https://blog.csdn.net/ 阅读全文
posted @ 2022-10-28 20:49 latent_Lin 阅读(22) 评论(0) 推荐(0) 编辑
摘要: n个点n条边 BZOJ1040 骑士(自己搜,luogu无) very good 题解 阅读全文
posted @ 2021-11-18 20:26 latent_Lin 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 题目传送门 神奇的解法(不同于俺的暴力算法):分层图处理,变DAG后保证第二层图,不再重复第一层图经过点(某篇洛谷题解说的) 俺的代码↓ #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<ma 阅读全文
posted @ 2021-11-11 19:38 latent_Lin 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 传送门 题不难,但性质很难想(老子模拟赛时没看懂……) 用了一个新玩意(bitset) #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<map> #include<stack> #inclu 阅读全文
posted @ 2021-11-11 19:24 latent_Lin 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 定义:bitset<301> b; 运用题目传送门 阅读全文
posted @ 2021-11-11 18:48 latent_Lin 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 题目传送门 #include<iostream> #include<cstdio> #include<cstring> #include<queue> #define INF 0x3f3f3f3f using namespace std; int dis[10000001],vis[10000001 阅读全文
posted @ 2021-11-08 20:29 latent_Lin 阅读(32) 评论(0) 推荐(0) 编辑
摘要: T1:[CSP-J 2021] 插入排序 洛谷84 cena60(STL的锅) 启发一:线段树压缩内存(尽量不要用STL存数,严重拖慢速度!) 发现一个map的优化 启发二:(1 3 3 2 个数排名为 1 3 4 2(即第一个3与第二个3不一样))可以将范围(1,maxn_shu)拖到(1,n*m 阅读全文
posted @ 2021-11-07 21:49 latent_Lin 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-11-07 20:30 latent_Lin 阅读(14) 评论(0) 推荐(0) 编辑