加载中
1026. Maximum Difference Between Node and Ancestor

Problem Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val - B.val| and A is an ancestor of B. (A node A i...

2019/05/07 23:16
256
1027. Longest Arithmetic Sequence

Problem Given an array A of integers, return the length of the longest arithmetic subsequence in A. Recall that a subsequence of A is a list A[i_1], A[i_2], ..., A[i_k] with 0 <...

1031. Maximum Sum of Two Non-Overlapping Subarrays

Problem Given an array A of non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengths L and M. (For clarificati...

2019/05/05 19:07
219
1034. Coloring A Border

Problem Given a 2-dimensional grid of integers, each value in the grid represents the color of the grid square at that location. Two squares belong to the same connected compone...

2019/05/01 16:16
153
1035. Uncrossed Lines

Problem We write the integers of A and B (in the order they are given) on two separate horizontal lines. Now, we may draw a straight line connecting two numbers A[i] and B[j] as...

Linux命令学习——split

split命令用来分割文件。 常用的参数有: -a,指定分割生成的新文件的文件名后缀长度。 -b,以byte为单位指定分割后单个文件的大小。 -l,以行为单位指定分割后单个文件大小。 可以在被分割的...

2019/04/29 11:24
118
Linux命令学习——wc

wc命令的作用是统计文件中的行数、词数、字符数。 常用的参数有: -l --lines,输出行数。 -w --words,输出词数。 -m --chars,输出字符数。 -c --bytes,输出字节数。 如果同时使用上述几个...

2019/04/21 17:33
123
屏蔽TensorFlow的日志信息

使用TensorFlow时,可能会出现一些Warning等等的日志信息,这是因为TensorFlow的默认日志等级为0。TensorFlow的日志等级由环境变量TF_CPP_MIN_LOG_LEVEL决定,将日志等级设置为1可以屏蔽INF...

2019/04/06 21:00
3.1K
fsync和fdatasync

在看LevelDB源码的时候,看到PosixWritableFile类的Sync函数用到了fsync和fdatasync两个Linux系统调用来将文件的修改同步到磁盘上,所以粗浅的学习了一下这两个系统调用,在此做一下记录。 ...

2019/04/05 23:47
214
register关键字

register关键字从c++11开始已经弃用了,但是在看SuRF代码(https://www.cnblogs.com/YuNanlong/p/10235793.html) 的时候,还是看到了这个关键字的使用,所以粗浅的学习了一下这个关键字,在此...

2019/04/05 23:46
108
fopen函数出现段错误

昨天写代码的时候突然发现了一个问题,当使用fopen("<filepath>", "r")时,如果filepath不存在,那么fopen函数并不是像我们往常的认知那样返回NULL值,而是出现段错误,后来发现,fopen的文档...

2019/04/05 23:45
2.4K
Linux命令学习——strings

strings命令的作用是打印文件中的可打印字符。 常用的参数有: -f --print-file-name,在每个输出的字符串前打印文件名。 -t [radix] --radix=[radix],输出每个字符串在文件中的偏移量,rad...

2019/04/05 23:45
210
CentOS7重置root密码

一不小心忘记了CentOS7的root密码,现在记录一下找回密码的过程。 重启系统,在grub页面下选择最近的启动选项,按键盘上的e进入编辑页面。 在第14行,也就是linux16开头的那一行,将下图中划...

2019/04/05 23:40
131

没有更多内容

加载失败,请刷新页面

返回顶部
顶部