(本文章於2010.03.21PM11:16分第二次更新)
這是趙老師要我們寫的第二份作業
因為還沒有老師教作業的截止日期
所以source code我先鎖上
等時間到了會自動打開
程式執行時的圖示:
【程式碼】:
以下內容已經經過作者加密,請輸入正確密碼才可觀看。XcOZTMKBITM5IQEhMCEhMCEtwpzCs8O0cz3CncOVcg8dZhZuVjkVLcO3w4DCo8Otw4pEw67Dk8OrwpHCk8KAwosqNkwtwrvDviE0NSHCjMOswp7Dm8O9XcKlTsKEw7ZOwrnDmy3DjGXCugIrEMOKw5HCgsKywoLDq8KbasKLw7Qtw7nCtwjDlw7Du8KOR8OSw4lOw6xaw4LDkMOkLcK1XjzCgMOnXMO6wqjCj8KMFmXCqcO5JlktTnPCtcOqcsOGH8Kkw6PCkcKSH8KPwopYITkhLcODwrTCnShmITkhITQ1IcKhwo/DtcKeSsOaw67CtHstw63DihjCicKUwqovw59/KcKFUMOgbBfCmC1Yw5EvUWklwr/oq7PlrK0jMcKNw6TlrITkuLDmlokt6YSVJsOHw7kFK8OOblEhOSHCmsOlPSEwIVxULcOAa8KkaMK8OBzClHY9UVrCvMKVwpBRLVDCmcK76Kqi5a6j5omF6L6D5YSi55qD5a+N5LuZ5pa96YaNwqk7GS3CuXksdsO/e1DDlDbDgcKsw6XDvAHCosKbLcO1BSXCgTLCmMK3w4bCr8K9EwjDt8KKworCuS3Dv8Kww61IRMKuwq3CjcOuL8KbbsKJwr0VwpAtLsKvdl7DncKew6vCqOeauuWvvuS6leaog+W8u+avjOWzrOa/hi3nrYfmsKwwd2MTA8O1Uh1OwrUUXMOwTS0dw4HCicOvLMK6XMONwqjCq3EhMzMhXngaw44twpfDpDlFGhjDv1bChRo/OcKs5a2N5Lq85qu7LeW8uOauo+WwuMOf5q+65bGk5o+O6KOoITM0IcOkwr7Cp8OWITEwIcK4CC0uw4NqwrBUfMKJwpnDvsKvwqLCrR3CpQ9oLcKMQMOHwozoqonnr7HmqZblvpTnmqDlpq3mlrLlhonlvpIZUwEtwoXClDxCA8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M0IRktKMOLITMzIcK6ccOXGcKyw4zDiMOYBMKkwrnCvsOCLcKDw5zDrzrCl2MhMCHCisOiwovCvMKtwpvCscORKC0TIB9hSzrDvcKnLEhQwoDCoUXChsKiLcOQw5bDql3DgiE0NSHDpWbDnMO3wpTCqnzDt8O4Ky1xw7nCrsO1TSvDqXk+eMOldwjCjTnCuC3CncKXwp/CvGXClARRw7bClcOtfh1PIMKlLR/Cu8Kxw57CigPCuWnDisK7wosoVMKSGA==
以下內容已經經過作者加密,請輸入正確密碼才可觀看。
上面程式碼
我是在Visual c++上跑的
DevC++我沒跑過,請自己嘗試一下
另外還需要以下這個東西搭配使用
請下載玩跟你的程式檔放在一起,不然的話請將程式碼中路徑更改一下
htm瀏覽圖示
htm原始碼圖示
htm檔案下載
如果發現文章有錯誤,歡迎留言告知謝謝指教
內容為原創物件,未經同意請勿轉載
不好意思,可以麻煩跟妳要一下原始程式碼嗎???
回覆刪除我是別校的,最近也有類似的作業,想研究看看~
謝謝︿︿不方便公開可以直接寄給我沒關係,拜託~
arou65271@hotmail.com
再次感謝~
這個作業只是將課本上面的程式碼打上VISUAL C++或者DEVC ++上面,基本上就會執行出來了,我只是再把它加上幾行程式碼,測試一下他搜尋的時間...等而已
回覆刪除如果你學過C那麼應該是不需要跟我要,因為好像沒必要...。
如果你真的很想要,但你想不出該怎麼下手,我可以給妳我自己做的程式碼,不過你必須讓我了解到你在這題下了多少功夫?與你寫C的程式是?你會用逐步執行麼?
(主要是我最近看到不少人跟我要答案都是拿來抄作業,這違反了我的本意...)
您好,我只知道KMP的演算法概念,但是寫成程式我就卡住了~
回覆刪除例如:本文S=oxoxxoxo,P=xoxo,失敗函數是-1 -1 0 1
一開始先比較前面4個~等於比4次,然後在第4個位置錯誤~
所以P就移到1的位置,也就是本文的第2個開始比~
為什麼呢?因為失敗函數告訴我們在0 1的時候是一樣的,不需要重新比較~
然後做第2次開始比對時,只需要從剛剛錯誤的地方開始比,因為失敗函數告訴我們前面一定是一樣的~......................
就這樣一直比下去~最後就可以找出答案~
考試我會,但是打成程式我就真的不知道該怎麼下手了~
而且老師又要我們程式可以算出比較的次數~~"更是令我頭疼~
我程式的開發環境是Dev-C++~
逐步執行是??先輸入檔名然後打字搜尋的意思嗎?
不好意思,打擾了,阿添~
作者已經移除這則留言。
回覆刪除逐步執行的意思是可以讓程式一行一行執行程式碼,這樣就可以看到一些參數的變化,比較容易解決程式的一些BUG,建議你使用VISUAL C來執行
回覆刪除請收信
好︿︿謝謝!!!
回覆刪除