摘要: 由于题目告诉肯定至少存在一种解,故只需要根据条件遍历一下, vector makeExpression(int y) { vector res; for(int i = -1000; i =-1000 && k<=1000 && k!=0 && k!=1){ ... 阅读全文
posted @ 2014-06-19 21:11 OpenSoucre 阅读(142) 评论(0) 推荐(0) 编辑
摘要: Given a 2D board containing'X'and'O', capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region... 阅读全文
posted @ 2014-06-19 17:17 OpenSoucre 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep... 阅读全文
posted @ 2014-06-19 15:45 OpenSoucre 阅读(148) 评论(0) 推荐(0) 编辑
摘要: There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[... 阅读全文
posted @ 2014-06-19 15:10 OpenSoucre 阅读(260) 评论(0) 推荐(0) 编辑