前阵子参加了Google的code jam,没有编程功底的人果然过不了第一关,不过事后重新做做还是挺有意思的,例如第一轮第三场的第二题,题目如下:
小明玩个游戏,一开始有N个火车车厢,每个车厢里都有字母,现在要组装火车,要求把所有车厢连在一起组成字符串,这个字符串要求相同的字母只能相邻,问现在有几种组装的方式。例如有三个车厢a,a,ab,组装的方式就有123,213两种。
题目讲完,现在来分析...
分类:
其他好文 时间:
2014-05-25 18:23:05
阅读次数:
214
继续并发专题~
这次介绍CyclicBarrier:看一眼API的注释:
/**
* A synchronization aid that allows a set of threads to all wait for
* each other to reach a common barrier point. CyclicBarriers are
* useful in program...
分类:
编程语言 时间:
2014-05-25 18:15:06
阅读次数:
316
WTF forms 借助 CSS 提供友好的 HTML 表单控件,专为 IE9+ 以及最新的
Chrome、Safari 和 Firefox 浏览器。以文件输入控件的改进,使用 label 包裹在 input
的外贸,所以自定义控件可以正确触发文件浏览器,并且定义了点击时的样式,像复选框和单选框还有...
分类:
Web程序 时间:
2014-05-25 14:17:57
阅读次数:
394
在项目中要集成Xabber,将它作为一个Lib, 。。。。。 Xabber 原有代码 /** *
Base entry point. * * @author alexander.ivanov */ public class Application
extends android.app.Applic...
分类:
移动开发 时间:
2014-05-25 13:54:13
阅读次数:
257
http://www.cnblogs.com/yank/archive/2008/08/14/1267746.htmlhttp://code.google.com/p/lhgcalendar/downloads/detail?name=lhgcalendar-3.0.0.rar&can=2&qlhg...
分类:
Web程序 时间:
2014-05-25 13:39:57
阅读次数:
262
Go是一款先进的持续集成和发布管理系统,由ThoughtWorks开发。(不要和Google的编程语言Go混淆了!)其前身为CruiseControl,是ThoughtWorks在做咨询和交付交付项目时自己开发的一款开源的持续集成工具。后来随着持续集成及持续部署的火热,ThoughtWorks专门成...
分类:
其他好文 时间:
2014-05-25 12:32:57
阅读次数:
440
Problem Description
We have a special convex that all points have the same distance to origin point.
As you know we can get N segments after linking the origin point and the points on the convex. ...
分类:
其他好文 时间:
2014-05-25 09:50:19
阅读次数:
217
寻找图中最小连通的路径,图如下:
算法步骤:
1. Sort all the edges in non-decreasing order of their weight.
2. Pick the smallest edge. Check if it forms a cycle with the spanning tree
formed so far. If cycle is n...
分类:
其他好文 时间:
2014-05-25 07:35:59
阅读次数:
301
Problem Description
We have a special convex that all points have the same distance to origin point.
As you know we can get N segments after linking the origin point and the points on the convex. ...
分类:
其他好文 时间:
2014-05-25 06:55:54
阅读次数:
188
本文首发于烂泥行天下。最近一段时间,一直在学习有关Nagios监控系统的相关知识。有关Nagios监控系统,你可以在百度或者google搜索下,那文章是一堆一堆的。让人看起来很简单。但是在实际的搭建过程中,却不是那么回事。下面就把自己在搭建过程的步骤及注意的事项记录下来。在..
分类:
移动开发 时间:
2014-05-25 05:37:41
阅读次数:
312