hdu 5745 dp+bitset優化

分析: 這題其實是一個 dp[105][103][3] 的空間和時間優化,因爲其是一個bool的形式,咱們可讓第一維存在bitset中,第二維滾動數組實現,來優化空間。至於時間就是bitset進行邏輯運算是按照字節來的常數優化了不少。ios #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #
相關文章
相關標籤/搜索