摘要: 例题1: Question : char a[20]; int *ptr = (int * )a; ptr++ Practice : Reason : Reason : #include <bits/stdc++.h> using namespace std; int main() { char a 阅读全文
posted @ 2017-10-08 14:08 799 阅读(2617) 评论(0) 推荐(0) 编辑
摘要: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. Note:Could you optimize your algorithm to us 阅读全文
posted @ 2017-10-07 21:07 799 阅读(174) 评论(0) 推荐(0) 编辑
摘要: < 不得不吐槽一句,博客园的体验真的不如印象笔记,图片缩小太不方便阿而且界面乱而且丑> Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5,Return [ [1 阅读全文
posted @ 2017-10-07 19:29 799 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (C) (without duplicates) and a target number (T), find all unique combinations in C where the candidate numbers sums 阅读全文
posted @ 2017-10-07 15:50 799 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1.catch 单个文件资源下载:(测试证明 2017年的单个文件就可以了,2010年需要一个包的文件,歌颂技术进步) https://raw.githubusercontent.com/philsquared/Catch/master/single_include/catch.hpp 2.catc 阅读全文
posted @ 2017-10-07 14:39 799 阅读(1913) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; #define MAXSIZE 100 #define OK 1 typedef int Ststus ; typedef char TElemType ; typedef struct BiThrNode { TElemType data; ... 阅读全文
posted @ 2016-11-19 16:35 799 阅读(111) 评论(0) 推荐(0) 编辑
摘要: #include #include #define LIST_INIT_SIZE 100 #define LISTINCREMEMT 10 #define OK 1 #define OVERFLOW -2 #define ERROR -1 typedef int ElemType; typedef int Status; typedef struct { ElemType *elem... 阅读全文
posted @ 2016-11-08 20:02 799 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 转化为七位数字 阅读全文
posted @ 2016-10-06 15:16 799 阅读(108) 评论(0) 推荐(0) 编辑
摘要: map是有序的好处 阅读全文
posted @ 2016-10-06 15:12 799 阅读(101) 评论(0) 推荐(0) 编辑
摘要: problem:http://acm.hdu.edu.cn/showproblem.php?pid=4329 题意:模拟 a. p(r)= R'/i rel(r)=(1||0) R是前n次输入有关URL的个数 R'是后n次已经输入有关URL的个数 b. 另加:输入 istringstream 阅读全文
posted @ 2016-10-06 15:10 799 阅读(143) 评论(0) 推荐(0) 编辑