02 2015 档案

摘要:dp,精华是从右下角开始。class Solution {public: int calculateMinimumHP(vector > &dungeon) { int m = dungeon.size(); int n = dungeon[0].size(); ... 阅读全文
posted @ 2015-02-15 11:22 阿牧遥 阅读(244) 评论(0) 推荐(0)
摘要:试了一把树状数组,代码果然很简单。#include #include #include #include #include #include using namespace std;vector cnt;vector arr; // effective index: 1..Nint lowb(int... 阅读全文
posted @ 2015-02-09 14:54 阿牧遥 阅读(147) 评论(0) 推荐(0)
摘要:第一题,送分题。第二题,#include #include #include #include using namespace std;class TravellingSalesmanEasy {public: int getMaxProfit(int M, vector profit, vec... 阅读全文
posted @ 2015-02-05 21:45 阿牧遥 阅读(208) 评论(0) 推荐(0)