Givennpoints on a 2D plane, find the maximum
number of points that lie on the same straight line.public class Solution { /**
* This program is used t....
分类:
其他好文 时间:
2014-06-03 17:05:21
阅读次数:
434
系统版本: Linux (Ubuntu) 其他桌面发行版应该也行。相关命令: lspci,
cvt, xrandr在桌面分辨率不正常显示桌面或者没有最佳的分辨率时,需要修改添加适合的桌面分辨率模式。首先,先查看显卡:$:lspic | grep
VGA通过上面的命令查看显卡信息。确认是否正确安装了显...
分类:
系统相关 时间:
2014-06-03 16:39:28
阅读次数:
407
STL的map表里有一个erase方法用来从一个map中删除掉指令的节点eg:map
mapTest;typedef map::iterator ITER;ITER
iter=mapTest.find(key);mapTest.erase(iter);像上面这样只是删除单个节点,map的形为不会出现...
分类:
其他好文 时间:
2014-06-03 16:11:29
阅读次数:
239
Emag eht htiw Em PlehDescriptionThis problem is
a reverse case of the problem 2996. You are given the output of the problem H
and your task is to find...
分类:
其他好文 时间:
2014-06-03 15:33:20
阅读次数:
347
Best Time to Buy and Sell Stock IISay you have
an array for which theithelement is the price of a given stock on dayi.Design an
algorithm to find the ...
分类:
其他好文 时间:
2014-06-02 15:01:53
阅读次数:
305
【题目】
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.
For example,
Given:
s1 = "aabcc",
s2 = "dbbca",
When s3 = "aadbbcbcac", return true.
When s3 = "aadbbbaccc", return false.
【题意】
给定字符串s1,s2,s3, 判断s3是不是s1和s2中的字交叉组合...
分类:
其他好文 时间:
2014-06-02 10:58:24
阅读次数:
211
1. matches() 匹配全部Pattern p =
Pattern.compile("reg");Matcher m =
p.matcher("String");System.out.println(m.matches());2:(matches
和find不要一起用,用reset()吐出来)...
分类:
编程语言 时间:
2014-06-02 10:19:32
阅读次数:
390
DescriptionThe police office in Tadu City
decides to say ends to the chaos, as launch actions to root up the TWO gangs in
the city, Gang Dragon and Ga...
分类:
其他好文 时间:
2014-06-02 09:38:19
阅读次数:
219
Given a stringS, find the longest palindromic
substring inS. You may assume that the maximum length ofSis 1000, and there
exists one unique longest pa...
分类:
编程语言 时间:
2014-06-02 09:22:03
阅读次数:
328
不知道大家有没有碰到这种文件,因为是乱码,文件无法删除,这时我们就可以考虑用下面的命令进行删除文件或目录 ls -i //列出文件节点 find ./
-inum XXX(节点号) -print -exec rm -rf {} \; //删除节点号文件 find . -inum XXXX(节点号) ...
分类:
系统相关 时间:
2014-06-02 06:37:25
阅读次数:
370