Problem Address:http://poj.org/problem?id=3984 求迷宮的最短路徑。 本來是打算試一下怎麼求迷宮的,結果最後做出來了。 BFS搜尋,同時記錄到達每一步的最小步數。 輸出路徑時則向前遞迴。 一次RTE後改大數組,然後AC。然後就不改了,直接儲存…… 如此淩亂的代碼啊……不堪入目啊…… 也正是由於如此淩亂、如此長的代碼,結果在Best solutions of Problem 3984中排到了第一頁…… 等以後需要的時候重新寫一份好的BFS求迷宮最短路徑。
Problem Address:USACO 1.4 【前言】 這道題我一共提交了19次,終於在第19次的時候過掉了。 那個內流滿面啊! 一直被不知名的錯誤羈絆著。 Execution error: Your program had this runtime error: Bad syscall #32000175 (RT_SIGPROCMASK) [email kolstad if you think this is wrong]. Your program
Problem Address:http://poj.org/problem?id=1625 【前言】這是我在POJ上的第100道題。前天做到了99,本來想隨便找一道完成100的,結果沒找著。昨天找了一道自動機+DP的。提交後返回WA。得知是高精度,才改寫了加法運算。返回了AC,成功達到100。昨天CSDN說是什麼七一維護,沒法發解題報告。特此紀念第一百道題。 【思路】同上一篇一樣的思路,構造出AC自動機,包括空節點和失敗指標的構造,以及所謂子串為非法串的串也為非法串。這樣之後就可以開始DP。
題目:hdu1068 pku1466方法:最大獨立集、最大匹配思想:最大獨立集指的是兩兩之間沒有邊的頂點的集合,頂點最多的獨立整合為最大獨立集。二分圖的最大獨立集=節點數-(減號)最大匹配數。For the study reasons it is necessary to find out the maximum set satisfying the condition: there are no two students in the set who have been
data segment note db "please input a number(0~8):$" crlf db 13,10,'$' result db "!= $" n db ?data endscode segment assume cs:code,ds:datastart: mov ax,data mov ds,ax lea dx,note mov ah,09 int 21h call
題目:hdu1548代碼:// Dijkstra演算法,用floyd演算法逾時// floor A,and go to floor B,how many times at least he havt to press the button "UP" or "DOWN"?// 1 <= N,A,B <= 200 A single 0 indicate the end of the input.//If you can't reach floor B,printf