摘要: class Solution {public: bool canJump(int A[], int n) { if (A == NULL || n sum(n, 0); int jump = A[n-1]; for (int i=n-... 阅读全文
posted @ 2014-07-16 16:38 卖程序的小歪 阅读(239) 评论(0) 推荐(0) 编辑
摘要: class Solution {private: int queen_num; vector > res;public: vector > solveNQueens(int n) { res.clear(); queen_num = n; ... 阅读全文
posted @ 2014-07-16 10:13 卖程序的小歪 阅读(155) 评论(0) 推荐(0) 编辑
摘要: class Solution {public: string countAndSay(int n) { vector num; num2digit(1, num); vector tmp; for (int i = 1; i &digit... 阅读全文
posted @ 2014-07-16 09:12 卖程序的小歪 阅读(152) 评论(0) 推荐(0) 编辑