随笔分类 - 

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页
摘要:d_f_s 附赠双倍经验,好耶! 然后爆搜就行 #include<bits/stdc++.h> using namespace std; int T,n,ans,sum[25]; void dfs(int x)//x为出牌次数 { if (x>=ans) return; //顺子 int k=0;/ 阅读全文
posted @ 2024-09-18 20:22 yzc_is_SadBee 阅读(12) 评论(0) 推荐(0)
摘要:摘自: 一看题目,像个搜索 再一看,像个广度优先搜索 既然是BFS,那我们首先要搞出一个(一堆)队列 那问题是队列里咱们存啥呢??? 首先,按照广搜解决“迷宫问题”的国际惯例,肯定要先把坐标和步数存到里面! 可是,这似乎不大够? 因为荆轲还有两种技能:隐身和瞬移。 隐身:balabala…… 瞬移: 阅读全文
posted @ 2024-09-18 19:58 yzc_is_SadBee 阅读(16) 评论(0) 推荐(0)
摘要:不如搜索 折半搜索 第一眼2^40,死的透透滴 所以想到折半 如图: 这是普通搜索: 这是折半搜索: 原谅我图画的丑 所以,我们可以对两边开展搜索 将前一半的搜索状态存入a数组,后一半存入b数组。 排序后mlogm查找即可 #include<bits/stdc++.h> using namespac 阅读全文
posted @ 2024-09-18 19:31 yzc_is_SadBee 阅读(12) 评论(0) 推荐(0)
摘要:good rmq #include<bits/stdc++.h> using namespace std; struct node { int num; int lid,rid; int w; int data; bool operator <(node i)const { return data< 阅读全文
posted @ 2024-09-18 19:07 yzc_is_SadBee 阅读(15) 评论(0) 推荐(0)
摘要:see you again #include<bits/stdc++.h> using namespace std; int n,m,x,y,v,Lok[500010],Rok[500010],Lban[500010],Rban[500010],pre[500010],ans[500010]; bo 阅读全文
posted @ 2024-09-13 20:31 yzc_is_SadBee 阅读(14) 评论(0) 推荐(0)
摘要:题解 总之,赞美太阳 #include <bits/stdc++.h> using namespace std; inline int read(){ char c;int f=1,res=0; while(c=getchar(),!isdigit(c))if(c=='-')f*=-1; while 阅读全文
posted @ 2024-09-13 20:14 yzc_is_SadBee 阅读(25) 评论(0) 推荐(0)
摘要:题解其1 最终看着写的题解 #include <bits/stdc++.h> using namespace std; inline void read(long long&x){ char c11=getchar();x=0;while(!isdigit(c11))c11=getchar(); w 阅读全文
posted @ 2024-09-13 19:43 yzc_is_SadBee 阅读(15) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 15 下一页