原创 UVA10791----Minimum Sum LCM
問題描述: LCM (Least Common Multiple) of a set of integers is defined as the minimum number, which is a multiple of all in
原创 今天一個也沒寫出來
給兩個鏈接 這個沒寫出來 http://www.cnblogs.com/scau20110726/archive/2012/12/21/2828420.html 這個寫的不好 http://blog.csdn.net/mobius_st
原创 Fibonacci Heap實現
本算法是對<算法導論>相關章節僞代碼的實現: 先貼代碼: #include<iostream> #include<fstream> #include<cstdlib> using namespace std; class Fibonac
原创 Kruskal算法
算法導論第23章第2節 #include<iostream> #include<cmath> using namespace std; struct node{ node(int i,int j,int l):x(i),y(j),le
原创 Floyd_Warshall Algorithm
本算法是對算法導論上相關章節僞代碼的實現: #include<iostream> #include<fstream> #include<algorithm> using namespace std; #define MAX 32767
原创 binomial heap實現
本算法是對<算法導論>相關章節的實現: 下面貼代碼: #include<iostream> #include<cstdlib> using namespace std; struct node { node(int d):data(d
原创 hihoCoder之正則表達式
題目: 時間限制:1000ms 單點時限:1000ms 內存限制:256MB 描述 給定一個字符串,判斷其是否爲合法的正則表達式。 一個正則表達式定義爲: 1:0是正則表達式,1也是正則表達式。 2:P和Q都是正則表達式,則PQ是正
原创 修改圖片的MIME類型及使其名稱排序的腳本
correctMIMEType模塊: import os,sys,shelve,time def correctMIMEType(): moduleFileName='correctMIMEType.py' fileTypeFil
原创 Android Selector用法
網上有很多這方面的資料,但都不能用。 像下面這個: <?xml version="1.0" encoding="utf-8" ?> <selector xmlns:android="http://schemas.android.co
原创 POJ 1508-------Skyscraper Floor
問題描述: Skyscraper Floors Time Limit: 10000MS Memory Limit: 10000K Total Submissions: 810 Accepted: 175 Description Wh
原创 POJ 1600 Centipede Collisions
問題描述: Description A small boy named Tommy has some toy centipedes that are a series of 1 centimeter segments. Tommy a
原创 表達式樹及其變體,以及我是如何藉着個原理實現簡易計算器的功能的
本題來源:《算法競賽入門》第11章11.11.2 本題給的解法: 核心代碼: int build_tree(string exp,int l,int r) { cout<<"l="<<l<<"\tr="<<r<<endl; int c
原创 Single-source shortest paths in directed graphs
此算法爲<算法導論>中第24章第2小節關於single-source shortest paths in directed graphs原理的實現. 原著P592 #include<iostream> using namespace s
原创 Shortest paths and matrix multiplication
本算法是對<算法導論>第25章第一節的實現 有三個版本: 第一個,普通版本: //SLOW-ALL-PAIRS-SHORTEST-PATHS #include<iostream> using namespace std; #define
原创 Prim算法
本算法是對《算法導論》相關章節僞代碼的實現: 這是第一次寫的: #include<iostream> #include<fstream> #include<cmath> #include<algorithm> using namespac