2018年10月22日

HDU - 1233 (最小生成树)

摘要: AC代码: include include using namespace std; const int N = 110; struct node{ int u, v, w; }q[N N]; int pre[N]; int n, m; void init(){ for(int i = 1; i 阅读全文

posted @ 2018-10-22 21:41 坤sir 阅读(158) 评论(0) 推荐(0) 编辑

kuangbin专题六 最小生成树 题解

摘要: 最小生成树总结 自从学习了最小生成树,就感觉这是图论里面最简单的题目了吧!!!难点在于如何分析题目是一道最小生成树题,然后再构建图 求最小生成树有三种算法:Kruskal、Prim和Boruvka。在我做过的题目中基本都是用前两种算法做的,最后一种基本没用。 Kruskal算法的基本思想是以变为主导 阅读全文

posted @ 2018-10-22 20:17 坤sir 阅读(195) 评论(0) 推荐(0) 编辑

STL之vector

摘要: STL之vector 只简单介绍一下基础用法,更深层用法自行百度 vector向量容器不但能像数组那样对元素进行随机访问,还能在尾部插入元素,是一种简单、高效的容器。 PS:vector具有内存自动管理功能,对于插入和删除的元素,可动态调整算占内存空间。 使用vector,需要头文件 创建vecto 阅读全文

posted @ 2018-10-22 13:05 坤sir 阅读(99) 评论(0) 推荐(0) 编辑

2018年10月9日

ZOJ 2750 Idiomatic Phrases Game(Dijkstra)

摘要: 题目链接 Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. This game will gi 阅读全文

posted @ 2018-10-09 09:48 坤sir 阅读(316) 评论(0) 推荐(0) 编辑

2018年10月8日

Poj 1135 Domino Effect

摘要: 题目链接 Domino Effect Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12518 Accepted: 3144 Description Did you know that you can use domino bo 阅读全文

posted @ 2018-10-08 12:50 坤sir 阅读(237) 评论(3) 推荐(0) 编辑

2018年10月6日

poj 1782 Run Length Encoding

摘要: 题目链接 Run Length Encoding Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 5006 Accepted: 1560 Description Your task is to write a program th 阅读全文

posted @ 2018-10-06 11:42 坤sir 阅读(125) 评论(0) 推荐(0) 编辑

2018年10月4日

ZOJ Play on Words

摘要: 题目链接 Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is 阅读全文

posted @ 2018-10-04 08:47 坤sir 阅读(189) 评论(0) 推荐(0) 编辑

2018年9月29日

HDU - 6273 Master of GCD

摘要: Hakase has n numbers in a line. At first, they are all equal to 1. Besides, Hakase is interested in primes. She will choose a continuous subsequence [ 阅读全文

posted @ 2018-09-29 21:14 坤sir 阅读(137) 评论(0) 推荐(0) 编辑

Poj 1679 The Unique MST

摘要: The Unique MST Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 36725 Accepted: 13381 Description Given a connected undirected graph, tell i 阅读全文

posted @ 2018-09-29 11:11 坤sir 阅读(117) 评论(0) 推荐(0) 编辑

Poj 3026 Borg Maze

摘要: Borg Maze Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17943 Accepted: 5759 Description The Borg is an immensely powerful race of enhanc 阅读全文

posted @ 2018-09-29 09:48 坤sir 阅读(113) 评论(0) 推荐(0) 编辑

导航