#include #include #include #include using namespace std; typedef long long ll; const int maxn=1e5+7; int belong[maxn],l[maxn],r[maxn],block,num,n,q; l... ...
分类:
其他 时间:
2016-12-16 07:59:29
收藏:
0 评论:
0 赞:
0 阅读:
216
SPFA 迪杰斯特拉 floyd--dp算法。。dp[k][i][j]中间经过1~k,i,j的最短路,dp[k][i][j]=min(dp[k-1][i][j],dp[k-1][i][k]+dp[k-1][k][j]) 后面都是k-1...因为。。k还没算出来呢。。怎么能依赖没有计算出的项呢。。 ...
分类:
其他 时间:
2016-12-16 07:59:04
收藏:
0 评论:
0 赞:
0 阅读:
241
本题精妙之处在于:1. 如何最快找到possible的line的x axis(我最开始想到要用quickselect find median的方法,结果别人有min max方法) 2. 如何最方便确定一个点关于该line的reflection是否存在,由于既有x又有y,不太好处理,别人有个聪明的办法 ...
分类:
其他 时间:
2016-12-16 07:58:34
收藏:
0 评论:
0 赞:
0 阅读:
213
Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest formed n ...
分类:
其他 时间:
2016-12-16 07:58:11
收藏:
0 评论:
0 赞:
0 阅读:
206
Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. ...
分类:
其他 时间:
2016-12-16 07:57:49
收藏:
0 评论:
0 赞:
0 阅读:
182
115. Distinct Subsequences 96. Unique Binary Search Trees ...
分类:
其他 时间:
2016-12-16 07:57:15
收藏:
0 评论:
0 赞:
0 阅读:
216
在这里主要介绍ServletContext怎么从.properties文件中用键得到值的。 ServletContext读取的.properties文件一般放在的位置有:1直接放在WebRoot下面.2.放在WebRoot下面的某个文件夹下面.3.放在WEB-INF下面某个文件夹的下面。 特别注意不 ...
分类:
其他 时间:
2016-12-16 07:56:46
收藏:
0 评论:
0 赞:
0 阅读:
234
1 #include 2 #include 3 #include 4 5 typedef struct student { 6 char *name; 7 }; 8 9 void scan(student stu[], int &n){ 10 char str[1024]; 11 scanf("%d... ...
分类:
编程语言 时间:
2016-12-16 07:56:24
收藏:
0 评论:
0 赞:
0 阅读:
308
why not 为什么不(与“why”相对应,是它的反面) how对策 how设计 how对策 how设计 key-memo 次关键(重要性比“key ”低一级) memo 再次级关键(重要性比“key ”低两级,比“key-memo”低一级) key-memo 次关键(重要性比“key ”低一级) ...
分类:
编程语言 时间:
2016-12-16 07:56:06
收藏:
0 评论:
0 赞:
0 阅读:
207
在真实的场景通常会使用 floating IP 访问 VIP,今天我们会给 VIP 关联一个 floating IP,再进行测试。 ...
分类:
其他 时间:
2016-12-16 07:55:43
收藏:
0 评论:
0 赞:
0 阅读:
259
Problem: Find the sum of all left leaves in a given binary tree. Summary: 求左子叶之和。 Analysis: 1. 求左子叶之和,即需要遍历整棵二叉树,常规的方法则为递归。首先我想到的是调用子函数,在子函数中递归,每递归至一个 ...
分类:
其他 时间:
2016-12-16 07:55:18
收藏:
0 评论:
0 赞:
0 阅读:
187
usermod 命令修改系统帐户文件来反映通过命令行指定的变化 1. 首先看看usermod都是有哪些参数 [root@hxweb101 ~]$ usermod --help Usage: usermod [options] LOGIN Options: -a, --append append th ...
分类:
系统服务 时间:
2016-12-16 07:54:48
收藏:
0 评论:
0 赞:
0 阅读:
356
Problem: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those lett ...
分类:
其他 时间:
2016-12-16 07:54:23
收藏:
0 评论:
0 赞:
0 阅读:
205
HashSet + Queue: 吃东西的时候保留尾巴,不吃的时候删去尾巴 one case to notice蛇转弯的时候,要先删去尾巴,再把新的点加进去。如果这个顺序不对的话,本来不会撞上尾巴的结果会判断会撞上 如果没有39行,程序会说dir没有initialize, 其实更好的写法应该是 ...
分类:
其他 时间:
2016-12-16 07:53:57
收藏:
0 评论:
0 赞:
0 阅读:
219
1 #include 2 #include 3 //打印数组元素 4 void print(int arr[], int n){ 5 for(int i = 0; i 2 #include 3 //打印数组元素 4 void print(int arr[], int n){ 5 for(int i ... ...
分类:
编程语言 时间:
2016-12-16 07:53:26
收藏:
0 评论:
0 赞:
0 阅读:
260
本题和House Robber差不多,分成两种情况来解决。第一家是不是偷了,如果偷了,那么最后一家肯定不能偷。 1 class Solution(object): 2 def rob(self, nums): 3 """ 4 :type nums: List[int] 5 :rtype: int 6 ...
分类:
其他 时间:
2016-12-16 07:53:10
收藏:
0 评论:
0 赞:
0 阅读:
236
HashMap ...
分类:
其他 时间:
2016-12-16 07:52:48
收藏:
0 评论:
0 赞:
0 阅读:
280
以上是我需要注意的要求 ...
分类:
数据库技术 时间:
2016-12-16 07:52:17
收藏:
0 评论:
0 赞:
0 阅读:
234
结构化方法与面向对象方法 14231011 金燊 目录 一、结构化方法 二、面向对象方法 三、比较 四、总结与展望 五、参考文献 背景: 各种软件开发方法是伴随着60年代的“软件危机”产生的。为了应对大规模软件的开发中,遇到的各种困难,人们创造了各种方法指导软件的开发。这些方法大致可分为三类: 结构 ...
分类:
其他 时间:
2016-12-16 07:50:58
收藏:
0 评论:
0 赞:
0 阅读:
188
Shell文件包含 shell也可以包含外部脚本,语法格式如下: . filename 或 source filename 例如创建两个shell脚本。 脚本1:test1.sh url = "www.baidu.com" 脚本2:test2.sh . ./test1.sh echo "$url" ...
分类:
系统服务 时间:
2016-12-16 07:50:35
收藏:
0 评论:
0 赞:
0 阅读:
342