Problem Description
To see a World in a Grain of Sand
And a Heaven in a Wild Flower,
Hold Infinity in the palm of your hand
And Eternity in an hour.
—— William Blake
听说lcy帮大家预定了新马泰7日游,Wisk...
分类:
其他好文 时间:
2014-05-26 05:53:31
阅读次数:
238
10001st prime
Problem 7
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10 001st prime number?
使用埃拉托斯特尼筛法,不懂得自行Wiki
我的py...
分类:
其他好文 时间:
2014-05-26 05:35:25
阅读次数:
248
题目链接:
http://poj.org/problem?id=1182
题目为:
食物链
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 42412
Accepted: 12366
Description
动物王国中有三类动物A,B,...
分类:
其他好文 时间:
2014-05-26 04:53:29
阅读次数:
236
Problem Description
Today is Yukari's n-th birthday. Ran and Chen hold a celebration party for her. Now comes the most important part, birthday cake! But it's a big challenge for them to place n ca...
分类:
其他好文 时间:
2014-05-26 04:38:35
阅读次数:
239
Watch The Movie
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)
Total Submission(s): 5106 Accepted Submission(s): 1614
Problem Description
New semester i...
分类:
其他好文 时间:
2014-05-26 04:30:16
阅读次数:
223
Problem Description
Everybody knows any number can be combined by the prime number.
Now, your task is telling me what position of the largest prime factor.
The position of prime 2 is 1, prime 3 is ...
分类:
其他好文 时间:
2014-05-26 04:29:14
阅读次数:
371
Problem Description
In a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes of the regular polygon, can you calculate t...
分类:
其他好文 时间:
2014-05-26 03:50:40
阅读次数:
252
http://poj.org/problem?id=3463
大致题意:给出一个有向图,从起点到终点求出最短路和次短路的条数之和。
解法:
用到的数组:dis[i][0]:i到起点的最短路,dis[i][1]:i到起点的严格次短路
vis[i][0],vis[i][1]:同一维的vis数组,标记距离是否已确定
sum[i][0]:i到起点的最短路条数,sum[i][1]:...
分类:
其他好文 时间:
2014-05-24 21:50:31
阅读次数:
287
Problem Description
有一种纸牌游戏,很有意思,给你N张纸牌,一字排开,纸牌有正反两面,开始的纸牌可能是一种乱的状态(有些朝正,有些朝反),现在你需要整理这些纸牌。但是麻烦的是,每当你翻一张纸牌(由正翻到反,或者有反翻到正)时,他左右两张纸牌(最左边和最右边的纸牌,只会影响附近一张)也必须跟着翻动,现在给你一个乱的状态,问你能否把他们整理好,使得每张纸牌都正面朝上,如果可以,最...
分类:
其他好文 时间:
2014-05-24 21:43:28
阅读次数:
246
题目:http://poj.org/problem?id=2104
划分树待我好好理解下再写个教程吧,觉得网上的内容一般,,,
模板题:
贴代码:
#include
#include
#include
#include
using namespace std;
#define CLR(a) memset(a,0,sizeof(a))
const int MAXN = 100010...
分类:
其他好文 时间:
2014-05-24 18:10:18
阅读次数:
276