Given a triangle, find the minimum path sum from
top to bottom. Each step you may move to adjacent numbers on the row below.For
example, given the fol...
分类:
其他好文 时间:
2014-05-08 21:08:25
阅读次数:
407
练习题(这里贴的是自己写的代码,
网上给的题目代码我会附加在最下面)1.编写shell脚本,计算1-100的和; 1 #!/bin/bash 2 #caculate the sum of
numbers from 1 to 100 3 4 sum=0 5 for i in `seq 1 100`;....
分类:
其他好文 时间:
2014-05-07 19:34:54
阅读次数:
305
http://acm.fzu.edu.cn/problem.php?pid=2171 Problem
2171 防守阵地 II Accept: 73Submit: 256Time Limit: 3000 mSecMemory Limit :...
分类:
其他好文 时间:
2014-05-07 18:41:12
阅读次数:
440
Problem DescriptionA number of students sit in a
circle facing their teacher in the center. Each student initially has an even
number of pieces of can...
分类:
其他好文 时间:
2014-05-07 17:53:27
阅读次数:
499
敌兵布阵Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 37903 Accepted
Submission(s): 15985 Problem ...
分类:
其他好文 时间:
2014-05-07 17:52:06
阅读次数:
317
要求给定树,与路径和,判断是否存在从跟到叶子之和为给定值的路径。比如下图中,给定路径之和为22,存在路径,因此返回true;否则返回false. 5 / \ 4
8 / / \ 11...
分类:
其他好文 时间:
2014-05-07 10:15:46
阅读次数:
270
Given a binary tree, find the maximum path
sum.The path may start and end at any node in the tree.For example:Given the
below binary tree, 1 ...
分类:
其他好文 时间:
2014-05-07 09:36:09
阅读次数:
300
题目地址:http://acm.fzu.edu.cn/problem.php?pid=2035题目意思也很好懂,就是处理如何判断多边行是否对称。先找出所有点的中点,然后一共有2×N个点,依次检查是否关于XY的连线对称代码如此:#include
#include #include #define Ma...
分类:
其他好文 时间:
2014-05-06 14:06:01
阅读次数:
282
1题目:给定K个整数的序列{ N1, N2, ..., NK },其任意连续子序列可表示为{
Ni, Ni+1, ..., Nj },其中 1 int main(){ int n, a[10001], left, beforeleft, right,
i, max, sum; while...
分类:
其他好文 时间:
2014-05-06 13:18:27
阅读次数:
366
1题目:Problem
Description搬寝室是很累的,xhd深有体会.时间追述2006年7月9号,那天xhd迫于无奈要从27号楼搬到3号楼,因为10号要封楼了.看着寝室里的n件物品,xhd开始发呆,因为n是一个小于2000的整数,实在是太多了,于是xhd决定随便搬2*k件过去就行了.但还是会...
分类:
其他好文 时间:
2014-05-06 12:03:38
阅读次数:
258