
数据结构
「已注销」
这个作者很懒,什么都没留下…
展开
-
【学习笔记】数据结构--最短路径问题(弗洛伊德和迪迦特斯拉)
前向星void add_edge(int u, int v, int w) { //加边,u起点,v终点,w边权 edge[cnt].to = v; //终点 edge[cnt].w = w; //权值 edge[cnt].next = head[u];//以u为起点上一条边的编号,也就是与这个边起点相同的上一条边的编号 head[u] = cnt++;//更新以u为起点上一条边的编号}弗洛伊德(floyd)void Floyd(MGraph *mGraph, int **iArrPath原创 2020-09-04 15:41:49 · 307 阅读 · 0 评论 -
【模板】大数(更新中)
大数乘以正整数string Multiply(string s,int x) //大数乘以整形数{ reverse(s.begin(),s.end()); int cmp=0; for(int i=0;i<s.size();i++) { cmp=(s[i]-'0')*x+cmp; s[i]=(cmp%10+'0'); cmp/=10; } while(cmp) { s+=(cm原创 2020-08-09 15:29:26 · 160 阅读 · 0 评论 -
HDU 6799 Parentheses Matching (2020杭电多校训练第三场)
HDU Parentheses Matching 2020 第三场 1009杭电OJ6799Problem DescriptionGiven a string P consisting of only parentheses and asterisk characters (i.e. “(”, “)” and “"), you are asked to replace all the asterisk characters in order to get a balanced parenthesi原创 2020-07-29 20:33:05 · 303 阅读 · 0 评论