2017年9月3日
摘要: 小明有n(1 using namespace std; int dp[2010][2010]; int main() { int n; while (cin n) { vector v(n); memset(dp, 0, sizeof dp); for (int i = 0; i v[i]; // 阅读全文
posted @ 2017-09-03 17:07 Beserious 阅读(1226) 评论(7) 推荐(0) 编辑
摘要: Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R = L). You might 阅读全文
posted @ 2017-09-03 12:28 Beserious 阅读(262) 评论(0) 推荐(0) 编辑
摘要: Given a non empty special binary tree consisting of nodes with the non negative value, where each node in this tree has exactly two or zero sub node. 阅读全文
posted @ 2017-09-03 11:13 Beserious 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Given a non negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. 阅读全文
posted @ 2017-09-03 11:11 Beserious 阅读(407) 评论(0) 推荐(0) 编辑