1957

无聊蛋疼的1957写的低端博客
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 7 ··· 22 下一页

2014年10月16日

摘要: 很眼熟。。。就是一个二分。。。class Solution {public: int findMin(vector &num) { int size = num.size() - 1; int l = 0; int r = size; w... 阅读全文

posted @ 2014-10-16 10:51 1957 阅读(2401) 评论(1) 推荐(0)

2014年9月28日

摘要: 新题。。。不过很简单。。半年才更新一个题。。。class Solution {public: int maxProduct(int arr[], int n) { int pmax = arr[0]; int pmin = arr[0]; int an... 阅读全文

posted @ 2014-09-28 11:00 1957 阅读(752) 评论(0) 推荐(0)

2014年8月14日

摘要: join x == x >>= id看看bind >>= 要求是左边m a右边 a -> m b但是id是 a -> aso.... a = m bso... x = m(m b)m (m b) -> mb那就是。。。join啦 阅读全文

posted @ 2014-08-14 12:40 1957 阅读(167) 评论(0) 推荐(0)

2014年6月29日

摘要: 申请事情应该从去年(2013)说起,好基友从百度离职跳到了Google,回学校打印本科成绩单,然后晚上在scuacm群里,结果Dr. zuo问我想去实习么,正好有学长可以内推。 于是乎写了简历,然后提交了。没过几天Google就联系我安排面试了,很仓促T_T,啥都没准备,感觉被挂了应该很正常吧。面试... 阅读全文

posted @ 2014-06-29 05:27 1957 阅读(1138) 评论(1) 推荐(0)

2014年4月4日

摘要: http://www.haskell.org/pipermail/beginners/2011-March/006477.htmlThe point is that the type of id has to be unified with the type of flip's (first) argument.flip :: (a -> b -> c) -> (b -> a -> c)id :: t -> tSo we have to unify (a -> b -> c) and (t -> t). Fully parenthe 阅读全文

posted @ 2014-04-04 11:47 1957 阅读(244) 评论(0) 推荐(0)

2014年3月9日

摘要: leetcode新题,好久没更新了的感觉class Solution {public: void reverseWords(string &s) { vector res; int i = 0; int len = s.size(); //trim while(s[i] == ' ' && i < len) i++; while(s[len-1] == ' ' && i < len) len--; while(i < len) { int start =... 阅读全文

posted @ 2014-03-09 20:29 1957 阅读(945) 评论(0) 推荐(0)

2014年3月1日

摘要: redis-server忘了把配置里面的daemonize的no改成yes所以把redis-server加入到了/etc/rc.local里面,在服务器启动的时候就会阻塞在这里,导致服务器不能启动。[解决方案]使用GRUB时,可以添加一个S(大写S)到内核命令行,可以进入单用户模式。要做到这样, 需要重新起动系统,当GRUB的屏幕出现时: 1、使用方向键选择你希望引导的内核。 2、按下e键以编辑这个命令行。 3、选择以单词kernel起头的这行。4、按下e键以编辑这个命令行。5、在行末添加一个字母S 6、回车接受改动。7、按b键接受修改并且启动内核。这样就会进入单用户模式,可以在bash下执行 阅读全文

posted @ 2014-03-01 15:03 1957 阅读(8295) 评论(0) 推荐(0)

2014年1月31日

摘要: Local Binary Pattern确实够简单。。。先写个代码在这儿,空了再弄#include #include #include using namespace std;using namespace cv;void LBP(const Mat& src , Mat& dst) { int rows =src.rows; int cols = src.cols; auto expand = [&](int x , int y) { int dx[] = {-1,-1,-1,0,1,1,1,0}; int dy[] = {-1,0,1,... 阅读全文

posted @ 2014-01-31 00:18 1957 阅读(562) 评论(0) 推荐(0)

2014年1月22日

摘要: 问题就是找两个排序数组里面第k大的数我们在A,B前k/2里面,比较A[k/2] , B[k/2]哪个小说明第k个肯定不在里面,可以抛弃,然后继续递归处理class Solution {public: /** * choice k/2 from a, and k/2 from b * compare the last * if b[k/2] > a[k/2], drop a[k/2], kth must not in a[k/2] * otherwise the same */ double findMedianSortedArrays(int A[],... 阅读全文

posted @ 2014-01-22 23:03 1957 阅读(273) 评论(0) 推荐(0)

2014年1月21日

摘要: T_TDP,但是还是DFS+record,我就是这么屌丝用trie树来加速了下(感觉用处不大DFS策略就是从当前往后找,能break就从这里break继续找如果找到最后,那么就是一个解record记录的就是从当前位置断开,后面那部分的解vector如果有了就不用再算了(这个重复很多然后就是把当前的和... 阅读全文

posted @ 2014-01-21 13:36 1957 阅读(893) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 22 下一页