因为题目要求同列相邻两格不同色,所以列与列之间不影响,可以逐列染色。如果一个格子的上面相邻的格子,已经被染色则染这个格子的时候,共有k-1中选择。反过来,如果一个格子位于第一列,或者上面相邻的格子是不能被染色的格子,则共有k中选择。虽然,矩阵的行数不定,但至少为所有不能被染色格子行标的最大值m。分别...
分类:
其他好文 时间:
2015-03-09 07:03:30
阅读次数:
139
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.此题是之前那道的Largest Rectangle in Hist...
分类:
其他好文 时间:
2015-03-09 07:01:30
阅读次数:
140
参考【1】:longest consecutive subsequence of a random permutation 第一个帖子: Theorem:The expected length of the longest increasing block in a random permu...
分类:
其他好文 时间:
2015-03-09 07:03:48
阅读次数:
206
Design an algorithm to find the kth number such that the only prime factors are 3, 5, and 7.The eligible numbers are like 3, 5, 7, 9, 15 ...ExampleIf ...
分类:
其他好文 时间:
2015-03-09 07:01:19
阅读次数:
183
assert语句assert语句用来声明某个条件是真的。例如,如果你非常确信某个你使用的列表中至少有一个元素,而你想要检验这一点,并且在它非真的时候引发一个错误,那么assert语句是应用在这种情形下的理想语句。当assert语句失败的时候,会引发一个AssertionError。测试程序:>>> ...
分类:
其他好文 时间:
2015-03-09 07:02:48
阅读次数:
159
稍微复杂地实现matplotlib绑定到PyQt5(有菜单)【知识点】 import matplotlib matplotlib.use("Qt5Agg")【效果图】【源代码】 1 import sys 2 import random 3 4 import matplotlib 5 ma...
分类:
其他好文 时间:
2015-03-09 07:02:16
阅读次数:
374
本文是由英文帮助翻译所得:1>task flows“任务流 task flows”可以包括非可视化的组件,比如方法调用。“页片段 page fragment”可以运行在一个页面的某个局部区域,最大限度地提高复用性。ADF Task Flow是在JSF Controller的基础上扩展而来的,它除了包...
分类:
其他好文 时间:
2015-03-09 06:59:48
阅读次数:
1481
Find K-th largest element in an array.NoteYou can swap elements in the arrayExampleIn array [9,3,2,4,8], the 3rd largest element is 4In array [1,2,3,4...
分类:
其他好文 时间:
2015-03-09 07:01:05
阅读次数:
181
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:
其他好文 时间:
2015-03-09 07:00:12
阅读次数:
178
很简单的实现matplotlib绑定到PyQt5【知识点】1 import matplotlib2 matplotlib.use("Qt5Agg")3 4 from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as Figu...
分类:
其他好文 时间:
2015-03-09 07:02:29
阅读次数:
467
Sort a linked list using insertion sort. 这道题考察了linkedList的知识点,以及insertion sort的基本概念。考察了网上的做法,是建一个dummy node做前置节点, 每次取unsorted list里面的一个节点,记录下下一跳位置,然后把...
分类:
其他好文 时间:
2015-03-09 07:01:23
阅读次数:
126
当新客户发来询价单,你及时回复后,却没有下文。是你报价太高吓跑了客户,还是报价太低,让客户一看就知道你不是行家,而不敢冒险与你做生意?对老客户报价也不容易。价压得厉害,不知该如何报价:报得太低,没钱赚;报得太高,又怕丢了定单。怎样报价才有效呢,外贸平台?有经..
分类:
其他好文 时间:
2015-03-09 01:56:54
阅读次数:
148
系统启动时自动运行开发的程序,采用计划任务.如果通过设置注册表来实现的,发现如果用户没有登陆桌面,就不能自动运行。所以采用计划任务,即使用用户不登陆,只要电脑开机或重启后,都能在后台运行开发的程序。
分类:
其他好文 时间:
2015-03-09 01:57:49
阅读次数:
256
cpu是执行指令的,指令是加载到内存里执行的,电脑开级的时候,内部电路会修改ip/Eip(指令寄存器)和cs的值。假如ip/Eip为xxxxh,32位时为xxxxxxxxhcs为yyyyh让cpu从内存yyyy:xxxx处读取指令开始执行然后ip/eip的值会根据此条指令的长度做相应的改变,指向下一条指令的地址。我..
分类:
其他好文 时间:
2015-03-09 01:56:17
阅读次数:
125
在使用vmware迁移linux系统过程中,发现部署后的linux系统无法启动网卡报错为Bringingupinterfaceeth0:Deviceeth0doesnotseemtobepresent,delayinginitialization错误原因,是因为linux网卡绑定了原mac地址导致解决方法为1.使用ifconfig-a查看当前主机mac地址2.修改eth0网卡硬..
分类:
其他好文 时间:
2015-03-09 01:56:34
阅读次数:
197
现在,我们必须准备好你的无线网卡。类型:airmon-ng你会看到你的无线网卡的名称。(被命名为“ATH0”)从替换“ATH0”。现在键入:airmon-ngstopath0ifconfigwifi0downmacchanger--mac00:11:22:33:44:55wifi0airmon-ngstartwifi0这些步骤做的是欺骗(假冒)的MAC地址,他们不..
分类:
其他好文 时间:
2015-03-09 01:55:51
阅读次数:
457
systemd里有rc-local.service,只需要再写一个rc.local的脚本即可。1、编辑/usr/lib/systemd/system/rc-local.service文件:[Unit]Description=/etc/rc.d/rc.localCompatibilityAfter=network.target[Service]Type=forkingExecStart=/etc/rc.d/rc.localstartTimeoutSec=0RemainA..
分类:
其他好文 时间:
2015-03-09 01:57:15
阅读次数:
14073