题目:Givennpoints on a 2D plane, find the maximum
number of points that lie on the same straight
line.算法分析:定义最大直线为符合相同条件的直线中通过点最多的那条直线。对每个点p,计算其它的点与p形成的...
分类:
其他好文 时间:
2014-05-16 23:26:31
阅读次数:
389
第一种:使用命令修改(直接即时生效,重启失效)#ifconfig eth0
192.168.0.1 netmask 255.255.255.0
up说明:eth0是第一个网卡,其他依次为eth1,eth*192.168.0.1是给网卡配置的第一个网卡配置的ip地址netmask
255.255.25...
分类:
系统相关 时间:
2014-05-14 09:09:43
阅读次数:
428
一、概念 建立时间和保持时间都是针对触发器的特性说的。 时序图如下:建立时间(Tsu:set
up time)
是指在触发器的时钟信号上升沿到来以前,数据稳定不变的时间,如果建立时间不够,数据将不能在这个时钟上升沿被稳定的打入触发器,Tsu就是指这个最小的稳定时间。保持时间(Th:hold...
分类:
其他好文 时间:
2014-05-14 04:04:58
阅读次数:
359
You are given annxn2D matrix representing an
image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this
in-place?思路:先将矩阵转置,然后将第一列与最后...
分类:
其他好文 时间:
2014-05-14 03:09:35
阅读次数:
225
/media : Mount point for removeable
mediaPurposeThis directory contains subdirectories which are used as mount
points for removeable media such as flo...
分类:
其他好文 时间:
2014-05-13 16:37:16
阅读次数:
362
A:A. Points and Segments (easy)
题目看了n久,开始觉得尼玛这是div2的题目么,题目还标明了easy。。
意思是给你一n个点,m个区间,在n个点上放蓝球或者红球,然后让你找一种选择方案使得m个区间内的蓝球和红球数量之差不超过1.
开始想过用dfs,不过这只是div2的A题而已。。
然后想了下,直接输出010101序列不就可以么。
交了一发,发现...
分类:
其他好文 时间:
2014-05-13 15:42:51
阅读次数:
296
??
Hurry Up
Accepted : 88
Submit : 345
Time Limit : 1000 MS
Memory Limit : 65536 KB
Problem Description
GG is some what afraid of his MM. Once his MM a...
分类:
其他好文 时间:
2014-05-13 09:13:47
阅读次数:
355
题目来源:POJ 3090 Visible Lattice Points
题意:哪些点可以看到
思路:
F1: 0/1 1/1
F2: 0/1 1/2 1/1
F3: 0/1 1/3 1/2 2/3 1/1
F4: 0/1 1/4 1/3 1/2 2/3 3/4 1/1
F5: 0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1
F6:...
分类:
其他好文 时间:
2014-05-13 08:35:54
阅读次数:
324
A Points and Segments (easy)
智商题,(智商急~)
/***********************************************************
*分析:只要按Xi从小到大染成1010101010... ,
*1、0间隔的的序列就能保证对于任意区间[l, r]中1的个数和0的个数之差小于等于1。
*注意:由于输入的Xi可能是无...
分类:
其他好文 时间:
2014-05-13 06:22:24
阅读次数:
274
原题地址:http://oj.leetcode.com/problems/binary-tree-level-order-traversal-ii/题意:Given
a binary tree, return thebottom-up level ordertraversal of its node...
分类:
编程语言 时间:
2014-05-12 22:03:27
阅读次数:
581