hdu 1204 糖果大戰 (Markov Chains求期望)
糖果大戰 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Ja
NYOJ 737 石子合並(一) (區間DP+平行四邊形優化)
定義狀態dp [ i ] [ j ]為從第i個石子到第j個石子的合並最小代價。沒有優化的代碼如下:耗時248ms。#include #include #incl
The 12th Zhejiang Provincial Collegiate Programming Contest(部分)
A Ace of Aces Time Limit: 2 Seconds Memory Limit: 65536 KBThere is a mysterious
C++刪除大量重復數字並且按升序排序(自己寫setbit來實現,時間空間都十分優化)
#include using namespace std;templateclass Bitset{ public: Bitset() { _Tidy();