Implemented BFS, DFS and A* To compile this project, use the following command: g++ -o search main.cpp Then you can run it: ./search The input is loaded from a input file in.txt Here is the format of the input file: The first line of the input file shoud contain two chars indicate the source and destination city for breadth first and depth first algorithm. The second line of input file shoud be an integer m indicate the number of connections for the map. Following m lines describe the map, each line represents to one connection in this form: dist city1 city2, which means there is a connection between city1 and city2 with the distance dist. The following input are for A* The following line contains two chars indicate the source and destination city for A* algorithm. Then there is an integer h indicate the number of heuristic. The following h lines is in the form: city dist which means the straight-line distance from the city to B is dist.
標簽: Implemented following compile command
上傳時間: 2014-01-01
上傳用戶:lhc9102
Securing Apache 2: Step-by-Step When choosing a web server, Apache very often wins against its competitors because of stability, performance, that fact that it s open source, and many other advantages. But when deciding on which version of Apache to use, the choice is not always so simple. On the one hand there is a very popular, stable version used by millions of users, version 1.3, and on the other hand, there is an enhanced and re-designed version 2.0.
標簽: Apache Step-by-Step Securing choosing
上傳時間: 2015-09-06
上傳用戶:gundamwzc
A fast lexical analyser generator. It is a tool for generating programs that perform pattern-matching on text. there are many applications for Flex, including writing compilers in conjunction with GNU Bison
標簽: pattern-matchin generating generator analyser
上傳時間: 2013-12-15
上傳用戶:aig85
This folder contains all the codes based on Matlab Language for the book <《Iterative Methods for Linear and Nonlinear Equations》, and there are totally 21 M files, which can solve most of linear and nonlinear equations problems.
標簽: Iterative the for Language
上傳時間: 2013-12-23
上傳用戶:cazjing
megahal is the conversation simulators conversing with a user in natural language. The program will exploit the fact that human beings tend to read much more meaning into what is said than is actually there MegaHAL differs from conversation simulators such as ELIZA in that it uses a Markov Model to learn how to hold a conversation. It is possible to teach MegaHAL to talk about new topics, and in different languages.
標簽: conversation conversing simulators language
上傳時間: 2015-10-09
上傳用戶:lnnn30
Input The first line of the input contains a single integer T (1 <= T <= 20), the number of test cases. Then T cases follow. The first line of each case contains N, and the second line contains N integers giving the time for each people to cross the river. Each case is preceded by a blank line. there won t be more than 1000 people and nobody takes more than 100 seconds to cross. Output For each test case, print a line containing the total number of seconds required for all the N people to cross the river. Sample Input 1 4 1 2 5 10 Sample Output 17
標簽: the contains integer number
上傳時間: 2015-10-27
上傳用戶:plsee
Input The input contains blocks of 2 lines. The first line contains the number of sticks parts after cutting, there are at most 64 sticks. The second line contains the lengths of those parts separated by the space. The last line of the file contains zero. Output The output should contains the smallest possible length of original sticks, one per line. Sample Input 9 5 2 1 5 2 1 5 2 1 4 1 2 3 4 0 Sample Output 6 5
標簽: contains The blocks number
上傳時間: 2015-10-27
上傳用戶:lepoke
Input The input consists of two lines. The first line contains two integers n and k which are the lengths of the array and the sliding window. there are n integers in the second line. Output there are two lines in the output. The first line gives the minimum values in the window at each position, from left to right, respectively. The second line gives the maximum values. Sample Input 8 3 1 3 -1 -3 5 3 6 7 Sample Output -1 -3 -3 -3 3 3 3 3 5 5 6 7
上傳時間: 2014-12-21
上傳用戶:hongmo
[輸入] 圖的頂點個數(shù)N,圖中頂點之間的關(guān)系及起點A和終點B [輸出] 若A到B無路徑,則輸出“there is no path” 否則輸出A到B路徑上個頂點 [存儲結(jié)構(gòu)] 圖采用鄰接矩陣的方式存儲。 [算法的基本思想] 采用廣度優(yōu)先搜索的方法,從頂點A開始,依次訪問與A鄰接的頂點VA1,VA2,...,VAK, 訪問遍之后,若沒有訪問B,則繼續(xù)訪問與VA1鄰接的頂點VA11,VA12,...,VA1M,再訪問與VA2鄰接頂點...,如此下去,直至找到B,最先到達B點的路徑,一定是邊數(shù)最少的路徑。實現(xiàn)時采用隊列記錄被訪問過的頂點。每次訪問與隊頭頂點相鄰接的頂點,然后將隊頭頂點從隊列中刪去。若隊空,則說明到不存在通路。在訪問頂點過程中,每次把當前頂點的序號作為與其鄰接的未訪問的頂點的前驅(qū)頂點記錄下來,以便輸出時回溯。 #include<stdio.h> int number //隊列類型 typedef struct{ int q[20]
標簽: 輸入
上傳時間: 2015-11-16
上傳用戶:ma1301115706
EDB (Evan s Debugger) is a QT4 based binary mode debugger with the goal of having usability on par with OllyDbg. It uses a plugin architecture, so adding new features can be done with ease. The current release is for Linux, but future releases will target more platforms. Release focus: Major feature enhancements Changes: A new disassembly engine. A bug that could cause crashing was fixed. there is a new flags breakdown in the register view, an environment view plugin, and improved analysis (including a good speed increase). A bug in QT where disabled events could be triggered has been worked around.
標簽: usability Debugger debugger binary
上傳時間: 2013-12-21
上傳用戶:gundamwzc
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1