摘要: 1 #include 2 #define For(i,j,k) for(int i=j;i=k;i--) 4 #define LL long long 5 using namespace std ; 6 inline int read() { 7 int x = 0, f = 1; 8 char ch = getchar(); 9 while(ch'9... 阅读全文
posted @ 2018-02-12 20:38 third2333 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 洛谷P3018 [USACO11MAR]树装饰Tree Decoration树形DP 因为要求最小,我们就贪心地用每个子树中的最小cost来支付就行了 阅读全文
posted @ 2018-02-12 14:52 third2333 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 洛谷P2237 [USACO14FEB]自动完成Auto-completeTrie树 阅读全文
posted @ 2018-02-12 13:42 third2333 阅读(209) 评论(0) 推荐(0) 编辑