摘要: n个点n条边 BZOJ1040 骑士(自己搜,luogu无) very good 题解 阅读全文
posted @ 2021-11-18 20:26 latent_Lin 阅读(22) 评论(0) 推荐(0)
摘要: 题目传送门 神奇的解法(不同于俺的暴力算法):分层图处理,变DAG后保证第二层图,不再重复第一层图经过点(某篇洛谷题解说的) 俺的代码↓ #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<ma 阅读全文
posted @ 2021-11-11 19:38 latent_Lin 阅读(36) 评论(0) 推荐(0)
摘要: 传送门 题不难,但性质很难想(老子模拟赛时没看懂……) 用了一个新玩意(bitset) #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<map> #include<stack> #inclu 阅读全文
posted @ 2021-11-11 19:24 latent_Lin 阅读(31) 评论(0) 推荐(0)
摘要: 定义:bitset<301> b; 运用题目传送门 阅读全文
posted @ 2021-11-11 18:48 latent_Lin 阅读(30) 评论(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 阅读(40) 评论(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 阅读(29) 评论(0) 推荐(0)
摘要: //某题代码#include<iostream> #include<cstdio> #include<map> #include<cstring> using namespace std; long long a[100001],cnt=1; long long Max(long long AA,l 阅读全文
posted @ 2021-11-07 20:17 latent_Lin 阅读(42) 评论(0) 推荐(0)
摘要: STL是个好东西!!! 阅读全文
posted @ 2021-10-17 21:48 latent_Lin 阅读(30) 评论(0) 推荐(0)
摘要: 这道题记录状态的思想挺好的 假如棋子在(i,j): 那么它上面空格的编号为((i-1)*4+(j-1)*4+0) 那么它下面空格的编号为((i-1)*4+(j-1)*4+1) 那么它左面空格的编号为((i-1)*4+(j-1)*4+2) 那么它右面空格的编号为((i-1)*4+(j-1)*4+3) 阅读全文
posted @ 2021-08-20 21:17 latent_Lin 阅读(62) 评论(0) 推荐(0)
摘要: (1)杨辉三角 #include<iostream> #include<cstdio> #include<cmath> #include<map> #include<queue> #include<algorithm> #include<cstring> #include<string> using 阅读全文
posted @ 2021-08-20 08:43 latent_Lin 阅读(48) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示