what's xxxk-means clustering tends to find clusters of comparable spatial extent, while the expectation-maximization mechanism allows clusters to have...
分类:
其他好文 时间:
2014-07-20 09:17:04
阅读次数:
227
# include
# include
# include
# define max(x,y) x>y?x:y;
int v[1001];//价值
int w[1001];//重量
int dp[1001][1001];
int main()
{
int n,m;
while(scanf("%d%d",&m,&n)!=EOF)
{
memset(dp,...
分类:
其他好文 时间:
2014-07-19 23:38:19
阅读次数:
309
int gcd(int n,int m)//n>m
{
//最大公约数
int r;
while(m)
{
r = n%m;
n = m;
m = r;
}
return n;
}
int kgcd(int a,int b)
{
if(!a) return b;
if(!b) retu...
分类:
其他好文 时间:
2014-07-19 23:37:19
阅读次数:
309
例如这个函数 def fab(max): n, a, b = 0, 0, 1 while n < max: yield b # print b a, b = b, a + b n = n + 1 简单地讲,yield 的...
分类:
编程语言 时间:
2014-07-19 23:15:12
阅读次数:
247
#include #include #include using namespace std;int main(){ string s("Somewhere down the road"); istringstream iss(s); while (iss) ...
分类:
编程语言 时间:
2014-07-19 23:13:54
阅读次数:
248
最长公共子序列求解问题。 1 #include 2 #include 3 const int maxn=1000; 4 char s1[maxn],s2[maxn]; 5 int c[maxn][maxn]; 6 int main() 7 { 8 while(scanf("%s%s",s1,...
分类:
其他好文 时间:
2014-07-19 14:30:43
阅读次数:
223
There are two identical boxes. One of them contains n balls, while the other box contains one ball. Alice and Bob invented a game with the boxes and b...
分类:
其他好文 时间:
2014-07-19 14:25:51
阅读次数:
228
?Problem A HDU 4450 水题,签到题水题。。没啥好说的。给大家签到用的。 1 #include 2 int main(){ 3 int n,a,ans; 4 while(scanf("%d",&n),n){ 5 ans = 0; 6 ...
分类:
其他好文 时间:
2014-07-19 13:33:32
阅读次数:
300
Using cron seems
to add another entry point into your application, while Quartz would
integrate into it. So you would be forced to deal with some inter-process communication if you wanted to pass...
分类:
其他好文 时间:
2014-07-19 11:11:44
阅读次数:
373
边吃边敲,效率就是高
代码如下:
#include
#include
#define MAX 1000050
char s[MAX],ss[MAX*2];
int p[MAX*2];
int min(int a,int b){return a>b?b:a;}
int main()
{
int i,id,mx,max,n,j;
j=1;
while(scanf("%s",s...
分类:
其他好文 时间:
2014-07-19 02:31:25
阅读次数:
166