摘要:```cpp#include #include using namespace std;int a[100][100];bool visited[100];int dist[100];void DijkstraPath(int n){ dist[0] = 0; int i; for...
阅读全文
08 2015 档案
摘要:```cpp#include #include using namespace std;int a[100][100];bool visited[100];int dist[100];void DijkstraPath(int n){ dist[0] = 0; int i; for...
阅读全文
摘要:> 这是我现在写的版本,我觉得应该算是最凝练的了. 哈哈,容我臭美一下.(我是指那个删除的函数,感觉比那个书上的要好. 主要是我喜欢用二级指针, 而那本书上用的是一级指针加返回一个指针来重建链.)```CPP#include using namespace std;struct Node{ i...
阅读全文
摘要:```cpp//输入的时候加不加空格都行,因为是前缀表达式.//但是输出中应该要加空格,因为有可能几个数字是挨在一起的情况.//has not complete the `to_prifix`, because i do not know how to do it.#include #include...
阅读全文
摘要:```cpp#include #include using namespace std;struct Node{ int val; Node* left; Node* right; Node(int x_) : val(x_), left(NULL), right(NULL){}};void InO...
阅读全文
|