http://acm.hdu.edu.cn/showproblem.php?pid=2066
求多源多汇的最短路,n最大为1000,floyd三重循环会超时。继续dijkstra吧。
#include
#include
#include
#include
#include
#include
#include
#include
#define LL long long
#...
分类:
其他好文 时间:
2014-05-18 18:26:39
阅读次数:
238
http://acm.hdu.edu.cn/showproblem.php?pid=3790
有两个条件:距离和花费。首先要求距离最短,距离相等的条件下花费最小。
dijkstra,只是在判断条件时多考虑了花费。
注意重边。
#include
#include
#include
#include
#include
#include
#include
#incl...
分类:
其他好文 时间:
2014-05-18 15:14:22
阅读次数:
235
hadoop streaming允许我们使用任何可执行脚本来处理按行组织的数据流,数据取自UNIX的标准输入STDIN,并输出到STDOUT
通过设定mapper为‘RandomSample.py 10’,我们按十分之一的采样率,没有设定特殊的reducer,一般默认使用IdentityReducer(把输入直接转向输出)
通过HDFS的命令getMerge(输出合并)或其他文件操作,可以获得...
分类:
其他好文 时间:
2014-05-18 15:12:21
阅读次数:
380
本篇介绍为了保证Hadoop集群平稳地运行,需要深入掌握的知识,以及一些管理监控的手段,日常维护的工作。...
分类:
其他好文 时间:
2014-05-18 05:32:10
阅读次数:
546
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=3376
http://acm.hdu.edu.cn/showproblem.php?pid=2686
http://poj.org/problem?id=3422
POJ 3422为从矩阵左上角走到右下角,最多走k次,每个格子里的数字只能算一次,后面可以重复经过,求经过的各个数字的和的最大...
分类:
其他好文 时间:
2014-05-18 05:30:06
阅读次数:
358
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4648
Magic Pen 6
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 1857 Accepted Submiss...
分类:
其他好文 时间:
2014-05-18 04:56:14
阅读次数:
317
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4810
思路:先把每个数字按位分离出来,存放1的个数,那么每位0的个数为n - 1的个数,然后利用组合数学和异或的原理,枚举奇数个1的情况,然后利用乘法和加法计数原理累加出来的就是该位的答案,最后乘上改为对应的数值最后加起来就是答案
代码:
#include
#include
const _...
分类:
其他好文 时间:
2014-05-18 04:30:41
阅读次数:
257
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4662
MU Puzzle
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 1296 Accepted Submissio...
分类:
其他好文 时间:
2014-05-18 04:16:16
阅读次数:
407
概览
这个入门教程描述了native(本地?原生?)hadoop库,包含了一小部分关于native hadoop共享库的讨论。
This guide describes the native hadoop library and includes a small discussion about native shared libraries.
注意: 根据你的环境,词组 "native l...
分类:
其他好文 时间:
2014-05-18 03:21:01
阅读次数:
458