1.Problem DescriptionGiven a sequence
a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a
sub-sequence. For example, given (6,-1,5,4,-...
分类:
其他好文 时间:
2014-06-02 17:36:53
阅读次数:
234
http://poj.org/problem?id=3101这道题就是求所有分子的最小共倍数和分母的最大公约数。 1 import
java.math.BigInteger; 2 import java.util.*; 3 import java.util.Arrays; 4 public
clas...
分类:
其他好文 时间:
2014-06-02 16:48:42
阅读次数:
255
Problem
Description度度熊是一只喜欢探险的熊,一次偶然落进了一个m*n矩阵的迷宫,该迷宫只能从矩阵左上角第一个方格开始走,只有走到右上角的第一个格子才算走出迷宫,每一次只能走一格,且只能向上向下向右走以前没有走过的格子,每一个格子中都有一些金币(或正或负,有可能遇到强盗拦路抢劫,度...
分类:
其他好文 时间:
2014-06-01 12:29:57
阅读次数:
246
题目链接:http://poj.org/problem?id=3252题意:给出一个二进制区间,求出0的个数不小于1的个数这样的二进制个数解法:数位DP,定义状态dp[len][num_zero][num_one],num_zero
定义为写0的个数。 1 #include 2 #include 3...
分类:
其他好文 时间:
2014-06-01 12:06:33
阅读次数:
191
In the 2020 grid below, four numbers along a diagonal line have been marked in red.
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 ...
分类:
其他好文 时间:
2014-06-01 10:04:38
阅读次数:
419
题目链接:点击打开链接
寒假安排
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 128000/64000 KB (Java/Others)
SubmitStatistic Next
Problem
Problem Description
寒假又快要到了,不过对于lzx来说,头疼的事又来了,因为众多的后...
分类:
其他好文 时间:
2014-06-01 09:43:08
阅读次数:
209
title:
A Pythagorean triplet is a set of three natural numbers, a
b
c, for which,
a2 + b2 =
c2
For example, 32 + 42 = 9 + 16 = 25 = 52.
There exists exactly one Pythagorean triplet for wh...
分类:
其他好文 时间:
2014-06-01 09:17:53
阅读次数:
251
title:
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
翻译:
10以下的质数的和为2 + 3 + 5 + 7 = 17。
请求出200,0000以下所有质数的和。
import math,time
d...
分类:
其他好文 时间:
2014-06-01 09:12:31
阅读次数:
239
title:
Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.
37107287533902102798797998220837590246510135740250
4637693767749000971264812489697007805041701826053...
分类:
其他好文 时间:
2014-06-01 08:53:33
阅读次数:
276
士兵队列训练问题
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 3356 Accepted Submission(s): 1552
Problem Description
某部队进行新兵队列训练,将新兵从一...
分类:
其他好文 时间:
2014-06-01 01:28:09
阅读次数:
288