http://poj.org/problem?id=1066大意;
问在房间中有一份宝藏,但是房间中有一些隔板,问最少需要通过多少隔板思路: 链接宝藏与爆破地点,枚举每一条直线寻找最少破坏的隔板。。 1 #include 2
#include 3 #include 4 using na...
分类:
其他好文 时间:
2014-05-13 22:33:47
阅读次数:
372
后缀数组或者AC自动机都可以,模板题。/**************************************************************
Problem: 3172 User: BLADEVIL Language: C++ Result: Ac...
分类:
其他好文 时间:
2014-05-13 21:25:44
阅读次数:
433
Hard Disk Drive
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 647 Accepted Submission(s): 350
Problem Description
Yesterday ...
分类:
其他好文 时间:
2014-05-13 15:19:16
阅读次数:
290
最短路+01背包
In Action
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3857 Accepted Submission(s): 1229
Problem Description
...
分类:
其他好文 时间:
2014-05-13 14:39:21
阅读次数:
175
A New Growth Industry
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1197 Accepted Submission(s): 474
Problem Description
A...
分类:
其他好文 时间:
2014-05-13 14:37:18
阅读次数:
354
题意很简单,求sum(gcd(i,n)) 1
这题看到后第一反应并没有里用积性函数的性质,不过也可以做,欣慰的是我反应还是比较快的
设f(n)=gcd(1,n)+gcd(2,n)+....+gcd(n-1,n) + gcd(n,n),
用g(n,i)表示满足 gcd(x,n)=i的 x的个数 (x小于n),则 f(n)=sum{i*g(n,i)};
同时又利用 扩展欧几里德的性...
分类:
其他好文 时间:
2014-05-13 13:40:58
阅读次数:
365
Max Sum of Max-K-sub-sequence
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 5690 Accepted Submission(s): 2059
Problem Description
...
分类:
其他好文 时间:
2014-05-13 11:38:49
阅读次数:
256
Problem Description
Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grav...
分类:
其他好文 时间:
2014-05-13 06:58:19
阅读次数:
523
Count the string
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4239 Accepted Submission(s): 1977
Problem Description
It is wel...
分类:
其他好文 时间:
2014-05-13 00:14:55
阅读次数:
357