1、quick-find 算法 2、quick-union 算法 3、加权 quick-union 算法 ...
分类:
其他好文 时间:
2016-10-02 19:27:18
阅读次数:
126
题目大意:求当前串中只含q的连续子串的个数 题目思路:水题,但要注意的是计算过程中可能超int范围; 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<vector> 5 #include<stdio. ...
分类:
其他好文 时间:
2016-10-02 15:10:08
阅读次数:
154
Find a path Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1536 Accepted Submission(s): 673 Prob ...
分类:
其他好文 时间:
2016-10-02 15:07:34
阅读次数:
215
###################unit4###############################################1.管理输入输出############################在linux系统中,正确输出的编号为1,错误输出编号为2在系统中用普通用户执行"student"find/etc-namepasswd因为student用户权限问题会有以下输出find:‘/et..
分类:
其他好文 时间:
2016-10-02 07:12:00
阅读次数:
197
##1##管理输入输出在linux系统中,正确输出的编号为1,错误输出编号为2在系统中用普通用户执行"student"find/etc-namepasswd因为student用户权限问题会有以下输出find:‘/etc/pki/CA/private’:Permissiondenied##没有进入权力,报错find:‘/etc/pki/rsyslog’:Permissiondenie..
分类:
系统相关 时间:
2016-10-02 07:06:26
阅读次数:
210
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. ...
分类:
其他好文 时间:
2016-10-02 00:42:23
阅读次数:
137
Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic ...
分类:
其他好文 时间:
2016-10-02 00:29:22
阅读次数:
127
题意:在他眼前有一个小写字母组成的字符串SSS,他想找出SSS的所有仅包含字母'q'的连续子串。 析:这个题,很容易发现,有 n 个连续个q,就是前 n 项和。注意不要超 int。 代码如下: ...
分类:
其他好文 时间:
2016-10-02 00:15:19
阅读次数:
222
http://poj.org/problem?id=1568 (题目链接) 题意 两人下4*4的井字棋,给出一个残局,问是否有先手必胜策略。 Solution 极大极小搜索。。 这里有个强力优化,若已经被下了的的格子数cnt小于等于4的话,那么一定是平局至于为什么,自己YY一下发现好像是这样的。。 ...
Write a function to find the longest common prefix string amongst an array of strings. ...
分类:
其他好文 时间:
2016-10-02 00:10:17
阅读次数:
156