"link" 题目大意:Petya写了一个假的序列求max cpp int fast_max(int n, int a[]) { int ans = 0; int offset = 0; for (int i = 0; i using namespace std; const int xkj = 1 ...
分类:
其他好文 时间:
2019-03-06 15:09:05
阅读次数:
154
命令: spider.py 用hashlib来制作哈希值来放在Redis中, 可以减少放在Redis中的为了校验是否存在的内容 spider.py settings.py pipelines.py ...
分类:
其他好文 时间:
2019-03-06 00:55:27
阅读次数:
175
59、(16-8)choosetwo:WhichtwostatementsaretrueregardingtheUSINGandONclausesintablejoins?A)TheONclausecanbeusedtojointablesoncolumnsthathavedifferentnamesbutcompatibledatatypes.B)Amaximumofonepairofcolum
分类:
数据库 时间:
2019-03-05 13:56:20
阅读次数:
129
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l ...
分类:
其他好文 时间:
2019-03-05 11:15:23
阅读次数:
140
A .Little Pony and Expected Maximum pro:给定M,N,表示一个M面的骰子,甩N次,问出现的最大的数的期望。 sol:容斥,f(i)表示最大数<=i的期望,那么最大数=x的期望就是f(x)-f(x-1); B .Little Pony and Harmony Ch ...
分类:
其他好文 时间:
2019-03-04 21:01:52
阅读次数:
238
Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l ...
分类:
其他好文 时间:
2019-03-04 09:31:18
阅读次数:
160
常见面试题【问题1】为什么连接的时候是三次握手,关闭的时候却是四次握手? 答:因为当Server端收到Client端的SYN连接请求报文后,可以直接发送SYN+ACK报文。其中ACK报文是用来应答的,SYN报文是用来同步的。但是关闭连接时,当Server端收到FIN报文时,很可能并不会立即关闭SOC ...
分类:
其他好文 时间:
2019-02-26 21:09:35
阅读次数:
169
1.ReentrantLock是基于AQS实现的一种重入锁。 2.先介绍下公平锁/非公平锁 公平锁 公平锁是指多个线程按照申请锁的顺序来获取锁。 非公平锁 非公平锁是指多个线程获取锁的顺序并不是按照申请锁的顺序,有可能后申请的线程比先申请的线程优先获取锁。有可能,会造成优先级反转或者饥饿现象。 3. ...
分类:
其他好文 时间:
2019-02-26 19:14:21
阅读次数:
157
题目如下: We are given the root node of a maximum tree: a tree where every node has a value greater than any other value in its subtree. Just as in the pr ...
分类:
其他好文 时间:
2019-02-24 23:11:15
阅读次数:
346
Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead. Note:The sum of ...
分类:
其他好文 时间:
2019-02-24 10:27:27
阅读次数:
124