Problem Description
During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, villages connected by tunnels lay in a line. Except the two at the ends, every village wa...
分类:
其他 时间:
2015-03-25 21:39:09
收藏:
0 评论:
0 赞:
0 阅读:
234
Problem Description
Given three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitra...
分类:
其他 时间:
2015-03-25 21:38:39
收藏:
0 评论:
0 赞:
0 阅读:
228
话不多说直接贴代码public class SessionListener implements HttpSessionListener { // 保存session和username的映射
private static HashMap hUserName = new HashMap(); private int MaxSession;
private int activ...
分类:
其他 时间:
2015-03-25 21:38:29
收藏:
0 评论:
0 赞:
0 阅读:
425
安装好后,
把汉化文件夹准备好复制到:
首先在 Finder 的菜单栏上,点击前往->前往文件夹,复制 /Applications/OmniGraffle.app/Contents/Resources 路径,
打开后,复制下载的 DMG 安装包中的「zh_CN.lproj」目录到此文件夹,最后重启软件。...
分类:
其他 时间:
2015-03-25 21:38:09
收藏:
0 评论:
0 赞:
0 阅读:
370
Description
The Little Elephant very much loves sums on intervals.
This time he has a pair of integers l and r(l?≤?r). The Little
Elephant has to find the number of such integers x(l?≤?x?≤?r), t...
分类:
其他 时间:
2015-03-25 21:37:49
收藏:
0 评论:
0 赞:
0 阅读:
238
题目大意给出一个网格图,每个格子上有移动次数限制。每次可以交换相邻的两个棋子(有公共点就算相邻)。给出一个初始状态,问最少需要多少步达到目标状态。思路这个题主要是限制是每个格子,而不是棋子。我们对每个格子拆点,相邻的格子之间连边,经过一个格子的时候的费用是2,流量是(正常的流量+这个点是入点+这个点是出点)/2,在连S和T的时候要将费用设成-1。这样跑出来的最小费用的一半就是答案。
注意要特判一下...
分类:
其他 时间:
2015-03-25 21:37:19
收藏:
0 评论:
0 赞:
0 阅读:
169
Repository
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 2664 Accepted Submission(s): 1045
Problem Description
When you go shopp...
分类:
其他 时间:
2015-03-25 21:37:09
收藏:
0 评论:
0 赞:
0 阅读:
227
这题真的是恶心到爆炸啊
通过这题整理了下圆相关的计算几何模板(基本都是参考别人的)
代码:
#include
#include
#include
#include
#include
using namespace std;
struct Point {
double x, y;
Point() {}
Point(double x, double y) {
...
分类:
其他 时间:
2015-03-25 21:36:59
收藏:
0 评论:
0 赞:
0 阅读:
177
遇到PX Deq: reap credit等待事件...
分类:
其他 时间:
2015-03-25 21:36:49
收藏:
0 评论:
0 赞:
0 阅读:
346
public static void main(String[] args) throws IOException {
String str = "本帖最后由henry.cao于昨日编辑此类信息也显示出来了";
BufferedReader in;
Pattern pattern = Pattern.compile("([\u672C|\u5E16|\u6700|\u540E|\u7531]...
分类:
其他 时间:
2015-03-25 21:36:39
收藏:
0 评论:
0 赞:
0 阅读:
212
标题:六角填数
如图【1.png】
所示六角形中,填入1~12的数字。 使得每条直线上的数字之和都相同。
图中,已经替你填好了3个数字,请你计算星号位置所代表的数字是多少?
请通过浏览器提交答案,不要填写多余的内容。简单的枚举排列,只要提前将12个结点标号,来判断六个线段总和是否相等。
# include
# include
# include
using name...
分类:
其他 时间:
2015-03-25 21:36:29
收藏:
0 评论:
0 赞:
0 阅读:
530
1. openGL的矩阵
openGL的矩阵是列优先排序的。就是说,矩阵的数据是存贮在一维数组中,数据上传到openGL处理的时候,会把一维数据的每一行当做列来处理。比如说,一个4*4的矩阵在数组中的排列如下:
matrix44 = {
m0, m1, m2, m3,
m4, m5, m6, m7,
m8, m9, m10, m11...
分类:
其他 时间:
2015-03-25 21:36:19
收藏:
0 评论:
0 赞:
0 阅读:
244
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine i...
分类:
其他 时间:
2015-03-25 21:35:59
收藏:
0 评论:
0 赞:
0 阅读:
104
题目:Tr ATime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 66 Accepted Submission(s): 57 Problem DescriptionA为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9...
分类:
其他 时间:
2015-03-25 21:35:49
收藏:
0 评论:
0 赞:
0 阅读:
286
自己写的,有什么错误,请多多指教。
1. 什么是行内元素,什么是块级元素?你所知道的行内元素有哪些,块级元素又有哪些?CSS的盒模型是什么(可用文字或图像来描述)?
块元素:,
行内元素:
块元素会独占一行,其宽度自动填满父元素的宽度。
行内元素不会独占一行,相邻的行内元素会排列在同一行里,直到一行排不下才会换行,其宽度随元素的内容而变化。块元素可以设置width和heigh...
分类:
其他 时间:
2015-03-25 21:35:29
收藏:
0 评论:
0 赞:
0 阅读:
164
最近公司在做 一个飞信的一个功能!消息列表和QQ 的类似。
图:
其是很简单,之前在github 搜索的 sliderList, sliderLayout.我都用不了。因为代码导入到 Eclispe 中无法使用。 这是网址: http://blog.csdn.net/phj_981805903/article/details/21394241...
分类:
其他 时间:
2015-03-25 21:35:09
收藏:
0 评论:
0 赞:
0 阅读:
193
这一题,典型的贪心,题目意思很容易看懂,加工木块,计算设置木块的时间,后面的木块重量和长度都大于等于前面的,就可以不用重新设置,但按长度排序或重量排序,按从大到小或从小到大都可以。这一点大家想想为什么。
这里我用的是长度来排序,长度相同的,按重量来排序。
一开始我是这么想的,排好序之后,从中找到可以一次消掉最多木块的一组,这样一直消下去,但是,很可惜,超时了。后来想想,没有必要去找,直接从前往...
分类:
其他 时间:
2015-03-25 21:34:59
收藏:
0 评论:
0 赞:
0 阅读:
99
平台:Windows 7 x86,OpenCV2.4.9,OpenNI1.5.4.0,VS2010
首先采用了双边滤波对或得的彩色图像进行滤波,然后保存滤波后的图像。
#include
#include
#include
#include
#include
using namespace std;
using namespace xn;
using n...
分类:
其他 时间:
2015-03-25 21:34:49
收藏:
0 评论:
0 赞:
0 阅读:
571
在我改进的RobHess源码中,拼接的顺序大致如下:
1.读取图片,使用opencv的undistort函数来对摄像机拍摄的图片进行畸变矫正。
2.为每幅图想调用sift_features函数,检测特征点。
3.用第i幅图的特征点建立kd树,用第i+1幅图的特征点在建立好的kd树进行搜索,初步筛选出第一批特征点。
4.在之前筛选出的特征点的基础上,用RANSAC算法进行二次筛选,并计算得出每...
分类:
其他 时间:
2015-03-25 21:34:29
收藏:
0 评论:
0 赞:
0 阅读:
271
我的复杂度控制在o(n)
首先看题目:
给定K个整数组成的序列{ N1, N2, ..., NK },“连续子列”被定义为{ Ni, Ni+1, ..., Nj },其中
1
输入格式:
输入第1行给出正整数 K (
输出格式:
在一行中输出最大子列和。如果序列中所有整数皆为负数,则输出0。
输入样例:
6
-2 11 -4 13 -5 -2
...
分类:
其他 时间:
2015-03-25 21:34:09
收藏:
0 评论:
0 赞:
0 阅读:
385