DescriptionNchildren are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three gr...
分类:
其他好文 时间:
2015-03-08 18:31:41
阅读次数:
147
题目大意:给你一个只有1 2 3 的序列,要你排序,每次可以交换任意两个元素,问最小交换次数是多少思路:贪心,先排1 ,如果1已经在位置上了,那就不要动了,如果是2那就和最前面的1交换,如果是3,那就和后面的1交换 1 /*{ 2 ID:a4298442 3 PROB:sort3 4 LANG:C+...
分类:
其他好文 时间:
2015-03-07 13:51:39
阅读次数:
109
Description描述Famous Berland ACM-ICPC team Anisovka consists of three programmers: Andrew, Michael and Ilya. A long time ago, during the first few mont...
分类:
其他好文 时间:
2015-03-07 10:09:49
阅读次数:
149
在gearman的官网http://gearman.org/有以下的一段说明A Gearman powered application consists of three parts: a client, a worker, and a job server.The client is respon...
分类:
其他好文 时间:
2015-03-05 12:27:28
阅读次数:
189
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. You may assume that each input
would have exact...
分类:
其他好文 时间:
2015-03-04 17:08:53
阅读次数:
138
Problem Description
Here is a famous story in Chinese history.
"That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others."
"Both of Tian and the king have three horses in...
分类:
其他好文 时间:
2015-03-04 17:05:30
阅读次数:
203
前几天学习jqm+phonegap,用到了一个jquery插件jsrender,(由于app不能用asp.net的服务端控件了,所以我也是醉了。。。),用于循环展示一下数据。下面是我用到的几个简单用法://code belows //step three//m为ajax返回的json对象 var h...
分类:
Web程序 时间:
2015-03-04 12:33:11
阅读次数:
163
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. You may assume that each input would have exact...
分类:
其他好文 时间:
2015-03-03 09:54:43
阅读次数:
119
Python的一个很重要的方面就是:函数式编程(functional programming),即可以再原本传递参数和值的地方传递函数。lambda x: x%3 == 0 和以下等价:def by_three(x): return x %3 == 0 我们不需要真的给函数一个名字,其也可...
分类:
编程语言 时间:
2015-03-02 14:45:17
阅读次数:
147
记忆化搜索。 1 /* 3419 */ 2 #include 3 #include 4 #include 5 6 #define MAXN 10 7 8 int ans; 9 int n[3];10 int x[3];11 bool visit[MAXN];12 int cnt[MAXN]...
分类:
其他好文 时间:
2015-02-28 12:42:09
阅读次数:
150