算法学习文章整理(持续更新)

运行以下代码快速找到位置和链接QvQ

点击查看代码
#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
string s[N],L[N];
int cnt;
string qa;
int main()
{
	cnt=3;/////////////////////////////////////////////////////// 
	s[0]="JOHNSON";L[0]="https://zhuanlan.zhihu.com/p/436924556";
	s[1]="伸展树";L[1]="https://www.cnblogs.com/baijian0212/p/splay.html";
	s[2]="可持久化线段树"; L[2]="https://www.cnblogs.com/cold-jelly/p/18894210";
	
	
	
	
	
	
	
	
	

	cin>>qa;
	for(int i=0;i<=cnt;i++)
	{
		if(s[i]==qa)
		{
			cout<<"在标号 "<<i<<endl;
			cout<<L[i]<<endl;
			return 0; 
		}
	}
	
	cout<<"没有找到,请换一个问法吧QAQ"<<endl;
	cout<<"有英文的用全部大写,例:JOHNSON。"<<endl; 
	cout<<"树之类用中文,其余正常情况下是中文"<<endl;
	return 0;
}

0.全源最短路Johnson算法:使用 Dijkstra算法和 Bellman-Ford算法作为子程序。[https://zhuanlan.zhihu.com/p/436924556]()

1.伸展树(SPLAY):
这篇文章是每个操作单独拆开讲解的,比较详细https://www.cnblogs.com/baijian0212/p/splay.html

2.可持久化线段树:
这篇建立过程十分清楚,图画得很好https://www.cnblogs.com/cold-jelly/p/18894210

posted @ 2026-07-09 16:54  一只好好好好猫  阅读(4)  评论(0)    收藏  举报