原创 BFS算法求解0-1路徑問題
#include "stdio.h" #include "stdlib.h" #include "string.h" int queue[203],visit[203],path[203],parent[203],s,e,n; int
原创 下載百度排行榜音樂的程序(Perl)
下載百度排行榜音樂的程序(Perl) #!/usr/bin/perl use FindBin '$Bin'; use URI::Escape; use lib $Bin; use lib "$Bin/../conf/"; use Con
原创 trie樹的DFS遍歷
//trie樹的dfs遍歷 #include "stdio.h" #include "stdlib.h" #include "string.h" #define MAXN 10009 typedef struct trie {
原创 學習計劃
有時間學習以下源碼: Hadoop, spserver, apache, memcached, STL, Nuth, Sphinx, libevent, ProtoBuf, Thrift, ClearSilver, gtest, glog
原创 Huffman Entropy Encoding
/*哈夫曼編碼示例程序,來自百度百科*/ #include<stdio.h> #include<stdlib.h> #include<malloc.h> #include<string.h> #define N 100 #define
原创 發現一本不錯的書《Linux 多線程服務端編程:使用 muduo C++ 網絡庫》
《Linux 多線程服務端編程:使用 muduo C++ 網絡庫》 記錄一下,有空好好學習。難得的適合用於學習的好書。
原创 test
/* 由樹的先序遍歷,中序遍歷,求樹的後序遍歷。 使用棧stack作爲輔助數據結構,後序遍歷是“左右中”,進棧順序是“中右左”,與之正好相反。 用visit[]表示該點的後續結點是否被訪問過。如已被訪問過,該點退棧,如未被訪問
原创 TopCoder競賽介紹
競賽背景 TopCoder成立於2001年,它的客戶包括Google、MS、YAHOO、Intel、 Motorola和SUN等世界上頂級的IT公司。每年TopCoder都會舉辦若干個編程競賽和錦標賽,其總獎金金額高達
原创 試一下HTML格式文本
Source Code Problem: 3273 User: qiuzhenguang Memory: 720K Time: 47MS Language: GCC Result: Accepted Source Code
原创 A*算法求解圖像的邊界鏈碼
/* 網上找來的A*算法,據說可以以較快速地找到圖像的邊界鏈碼, 寫得太高深了,還沒看明白。放在這裏有時間再來學習。 */ #include "stdio.h" #include "stdlib.h" #include "string.h
原创 旋轉門算法
讀取數據 if (1>2) fid = fopen('data.txt','r'); t=zeros(6000,6); for i=1:6000 tline = fgets(fid,100); j=1;state=0;base
原创 控制檯程序使用打開文件對話框
#include <afx.h> #include <afxdlgs.h> #include <windows.h> #include <iostream> using namespace std; /* 控制檯打開文件對話框,VC6.0
原创 NZIT筆試題測試程序
#include "stdio.h" #include "stdlib.h" int main() { unsigned short A=10; printf("HelloWorld!/n"); printf("~A=%u/n
原创 Graham Scan Algorithm solve convex hull problem
#include <algorithm> #include <iostream> #define MAXN 5000 using namespace std; int n; typedef struct Point { int x;
原创 next_permutation
//SRM496 next_permutation() STL function ,perfict use! #include <vector> #include <algorithm> #include <iterator> #inc