摘要: 传送门 题不难,但性质很难想(老子模拟赛时没看懂……) 用了一个新玩意(bitset) #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<map> #include<stack> #inclu 阅读全文
posted @ 2021-11-11 19:24 latent_Lin 阅读(41) 评论(0) 推荐(0)
摘要: 定义:bitset<301> b; 运用题目传送门 阅读全文
posted @ 2021-11-11 18:48 latent_Lin 阅读(33) 评论(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 阅读(51) 评论(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 阅读(37) 评论(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 阅读(47) 评论(0) 推荐(0)
摘要: STL是个好东西!!! 阅读全文
posted @ 2021-10-17 21:48 latent_Lin 阅读(35) 评论(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 阅读(82) 评论(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 阅读(63) 评论(0) 推荐(0)
摘要: 高精加 string jia(string a,string b){ string jg=""; int i,j,k,c=0; int a1[1001]={0},b1[1001]={0},c1[1001]={0}; for(i=1;i<=a.size();i++) a1[i]=a[a.size()- 阅读全文
posted @ 2021-08-19 20:59 latent_Lin 阅读(67) 评论(0) 推荐(0)
摘要: 传送门 LCA 但桶用的很妙 真的很妙b( ̄▽ ̄)d #include<iostream> #include<cstdio> using namespace std; int Size1=500000,dist[1000001],h1[1000001],h2[1000001],b1[1000001] 阅读全文
posted @ 2021-08-19 20:54 latent_Lin 阅读(86) 评论(0) 推荐(0)