原创 用A*算法解決八數碼問題 MATLAB

代碼: bashuma.m function []=bashuma global e; %open表計數 global i; %close表計數 global m; %循環次數計數 a=0;b=0;n=0;i=0; e=1;m=0

原创 HDU 1247 Hat’s Words

Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words i

原创 HDU 1556 Color the ball

Problem Description N個氣球排成一排,從左到右依次編號爲1,2,3....N.每次給定2個整數a b(a <= b),lele便爲騎上他的“小飛鴿"牌電動車從氣球a開始到氣球b依次給每個氣球塗一次顏色。但是N次以

原创 山東省第四屆 A Rescue The Princess

題目描述     Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the p

原创 HDU 1257 最少攔截系統

Problem Description 某國爲了防禦敵國的導彈襲擊,發展出一種導彈攔截系統.但是這種導彈攔截系統有一個缺陷:雖然它的第一發炮彈能夠到達任意的高度,但是以後每一發炮彈都不能超過前一發的高度.某天,雷達捕捉到敵國的

原创 北京林業大學“計蒜客”杯程序設計競賽 網絡賽 G. 易彰彪的一張表 (KMP)

易彰彪最近有點奇怪,一向愛打遊戲他最近居然盯着一張全是大小寫字母的表在看,好像在找什麼東西。他說,這是他女神給他的一張表,他需要回答女神的問題——在忽略大小寫(即大寫字母和小寫字母視爲同一字母)的情況下,是否能在表中找到某一連續的字符

原创 ZOJ 1079 Robotic Jigsaw

 Statement of the Problem Your task here is to write a program to aid in the assembly of a jigsaw puzzle by a robot. Th

原创 HDU 1016 Prime Ring Problem

Prime Ring Problem Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submis

原创 北京林業大學“計蒜客”杯程序設計競賽 網絡賽 B. 大釘騎馬走江湖 (廣搜)

 1000ms 32768K 江湖是什麼,對於在象棋界廝殺的大釘來說,江湖就是一個矩陣,他的目標,就是在江湖之中騎着馬,從他的位置出發,走到終點。 當然,大釘的馬也遵從中國象棋中的“馬走日”的規則,而且在矩陣中,也會有一些障礙物,馬不

原创 ZOJ 146 - The 13th Zhejiang Provincial Collegiate Programming Contest - C Defuse the Bomb

Defuse the Bomb Time Limit: 2 Seconds      Memory Limit: 65536 KB The bomb is about to explode! Please defuse it as so

原创 HDU 2612 Find a way (廣搜,隊列)

Find a way Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s):

原创 HDU 1087 Super Jumping! Jumping! Jumping!

Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU.

原创 HDU 2693 Bone Collector II

Problem Description The title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" co

原创 北京林業大學“計蒜客”杯程序設計競賽 網絡賽 A. 喝酒

王大釘喜歡喝酒,存貨都喝完了,他就去樓下買,正好樓下的商店爲了響應學校的 ACM 校賽推出了優惠活動:凡是在本店買的啤酒,喝完以後 33 個空瓶可以換一瓶,44 個瓶蓋也可以換一瓶酒。 王大釘覺得太合算了,決定多買,現在他手裏的錢可

原创 HDU 1241 Oil Deposits(DFS)

Oil Deposits Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s):