摘要: string multiply(string num1, string num2) { if (num1 == "0" || num2 == "0") return "0"; int sa = num1.size(); int sb = num2.size(); vector temp(sa + sb, 0); for (int i = sa - 1; i >= 0;... 阅读全文
posted @ 2016-03-08 21:07 HUSTLX 阅读(132) 评论(0) 推荐(0) 编辑
摘要: vector plusOne(vector& digits) { vector res; int carry = 1; for (int i = digits.size() - 1; i >= 0; i--) { int sum = carry + digits[i]; carry = sum / 10; res.push_back(su... 阅读全文
posted @ 2016-03-08 20:15 HUSTLX 阅读(143) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std;string addBinary(string a, string b) { int carry = 0; int len = a.size() > b.size() ? a.size() : b.size(); string res; for ... 阅读全文
posted @ 2016-03-08 19:59 HUSTLX 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} };ListNode* addTwoNumbers(ListNode* l1, ... 阅读全文
posted @ 2016-03-07 16:49 HUSTLX 阅读(140) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; vector> fourSum(vector& nums, int target) { vector> res; sort(nums.begin(), nums.end()); int len = nums.size(); for (i... 阅读全文
posted @ 2016-03-07 16:48 HUSTLX 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; int threeSumClosest(vector& nums, int target) { sort(nums.begin(), nums.end()); int len = nums.size(); int min = INT_MAX; ... 阅读全文
posted @ 2016-03-07 14:57 HUSTLX 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std;vector> threeSum(vector& nums) { sort(nums.begin(), nums.end()); int len = nums.size(); vector> res; for (int i = 0; i num... 阅读全文
posted @ 2016-03-07 10:22 HUSTLX 阅读(179) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std;vector twoSum(vector& nums, int target) { int len = nums.size(); map temp; vector re; for (int i = 0; i second); re.push_... 阅读全文
posted @ 2016-03-07 09:09 HUSTLX 阅读(166) 评论(0) 推荐(0) 编辑
摘要: bool isValidSerialization(string preorder) { int len = preorder.size(); vector temp; bool flag = true; for (int i = 0; i 1 && temp[sz - 1] == '#'&&temp[sz - 2] == '#') { temp.p... 阅读全文
posted @ 2016-03-06 14:43 HUSTLX 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 1引言 数字识别是模式识别领域 中的一个重要分支,数字识别一般通过特征匹配及特征判别的传统方法进行处理。特征匹配通常适用于规范化的印刷体字符的识别,而 特征判别多用于手写字符识别,这些方法还处于探索阶段,识别率还比较低。随着神经网络技术的飞速发展,其本身具有的高度并行性、较强的自组织能力和容错性、较 阅读全文
posted @ 2016-03-05 20:57 HUSTLX 阅读(14660) 评论(0) 推荐(0) 编辑