搜尋(二分,三分,bfs)

來源:互聯網
上載者:User

1   
http://acm.hdu.edu.cn/showproblem.php?pid=2199    Can you solve this equation?

二分,精度我取了1e-7

 

2
    http://acm.hdu.edu.cn/showproblem.php?pid=2899    Strange fuction

區間上的函數值不是單調的,單是凹的,所以其一階導數是單調的,二分

 

3
    http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3366  Light Bulb

以前用高數求導做得煩死,現在用三分簡潔多了,注意精度要1e-8,1e-7就是wa

 

4   
http://acm.hdu.edu.cn/showproblem.php?pid=1372    Knight Moves

java中沒struct用class,這個題目不map也可以,每次都會把走過的再走,浪費時間

 

5    http://acm.hdu.edu.cn/showproblem.php?pid=1969    Pie

二分

 

6    http://acm.hdu.edu.cn/showproblem.php?pid=3418  Beautiful Dream

二分

 

7 http://acm.hdu.edu.cn/showproblem.php?pid=1253  勝利大逃亡

走過的路標記呀,不然mle,隊列肯定刷爆,

            if (cur.step + z - 1 - cur.z + r - 1 - cur.y + c - 1 - cur.x > lim)
                continue;

這個剪枝要記住了!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.