- 博客(303)
- 问答 (1)
- 收藏
- 关注
原创 hadoop自定义输出文件名
hadoop自定义输出文件名使用MultipleOutputs可以定义输出文件名的前缀,但文件名总是会出现讨厌的-00000,我们可以通过查看源码,发现输出文件名FileOutputFormat中的某个函数实现,如下: public Path getDefaultWorkFile(TaskAttemptContext context,String extension) throws IOExc
2015-10-20 15:41:43 2987 1
原创 hdu 5381 The sum of gcd
题意: 对于每次查询,计算∑i=lr∑j=irgcd(ai,ai+1,…,aj)\sum_{i=l}^{r}\sum_{j=i}^{r}gcd(a_i, a_{i+1}, \dots, a_j) 想法: 首先需要对于每一个ii预处理出[i,i→n][i, i \to n]这些区间的gcdgcd情况,即gcd(a[i]),gcd(a[i],a[i+],…,gcd(a[i],a[i+1
2015-08-14 10:30:58 2267 2
原创 poj 2482 Stars in Your Window
Stars in Your WindowTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9762 Accepted: 2692DescriptionFleeting time does not blur my memory of you. Can it r
2014-08-03 11:49:01 1194
原创 hdu 4893 Wow! Such Sequence!
Wow! Such Sequence!Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 976 Accepted Submission(s): 298Problem DescriptionRecentl
2014-07-29 23:05:37 1456
原创 poj 2420 A Star not a Tree?
A Star not a Tree?Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3568 Accepted: 1778DescriptionLuke wants to upgrade his home computer network from 10m
2014-07-29 22:55:44 1095
原创 hdu 3932 Groundhog Build Home
Groundhog Build HomeTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1463 Accepted Submission(s): 646Problem DescriptionGroun
2014-07-28 19:35:38 960
原创 poj 1699 Best Sequence
Language:DefaultBest SequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4806 Accepted: 1900DescriptionThe twenty-first century is a biology-tec
2014-07-27 14:30:33 885
原创 hdu 4866 Shooting
ShootingTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 846 Accepted Submission(s): 165Problem DescriptionIn the shooting g
2014-07-27 12:46:54 1426 2
原创 SPOJ 10628. Count on a tree
10628. Count on a treeProblem code: COTYou are given a tree with N nodes.The tree nodes are numbered from 1 to N.Each node has an integer weight.We will ask you to perform th
2014-07-26 23:16:09 1625
原创 CSU oj 1322: ZZY‘s new company
地址:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=13221322: ZZY‘s new companyTime Limit: 3 Sec Memory Limit: 312 MBSubmit: 153 Solved: 18[Submit][Status][Web Board]Description
2014-07-26 16:50:26 1748
原创 hdu 4757 Tree
TreeTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 946 Accepted Submission(s): 263Problem Description Zero and One are g
2014-07-26 11:11:35 1095
原创 spoj TTM To the moon
To the moonTime Limit: 1000MS Memory Limit: Unknown 64bit IO Format: %lld & %llu[Submit] [Go Back] [Status] DescriptionBackgroundTo The Moon is a indepen
2014-07-25 21:04:10 1024
原创 HDU 4619 Warm up 2
Warm up 2Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1666 Accepted Submission(s): 747Problem Description Some 1×2 domino
2014-07-23 18:47:39 791
原创 HDU 4737 A Bit Fun
A Bit FunTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1728 Accepted Submission(s): 880Problem DescriptionThere are n numbe
2014-07-21 19:44:22 879
原创 HDU 4734 F(x)
F(x)Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1422 Accepted Submission(s): 560Problem DescriptionFor a decimal number x
2014-07-21 18:51:48 924
原创 hihocoder #1033 : 交错和
描述给定一个数 x,设它十进制展从高位到低位上的数位依次是 a0, a1, ..., an - 1,定义交错和函数:f(x) = a0 - a1 + a2 - ... + ( - 1)n - 1an - 1例如:f(3214567) = 3 - 2 + 1 - 4 + 5 - 6 + 7 = 4给定 l, r, k,求在 [l, r] 区间中,所
2014-07-21 14:39:06 4840 1
原创 hdu 4507 吉哥系列故事——恨7不成妻
吉哥系列故事——恨7不成妻Time Limit: 1000/500 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1459 Accepted Submission(s): 426Problem Description 单身! 依然单身!
2014-07-21 13:48:59 2135
原创 Codeforces Round #257 (Div. 2) ABCD
A: int n,m;int a[110];queueq;int main(){ n=input(),m=input(); rep(i,1,n+1) a[i]=input(); rep(i,1,n+1) q.push(i); int ans; while(!q.empty()){ int x=q.front();q.pop(); ans=x; a[x]-=m; i
2014-07-20 09:58:18 888
原创 CodeForces School Team Contest #1 (Winter Computer School 2010/11) J. Spelling Check
J. Spelling Checktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPetya has noticed that when he types usin
2014-07-19 18:21:27 1253
原创 Codeforces Beta Round #7 D. Palindrome Degree
D. Palindrome Degreetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputString s of length n is called k-palind
2014-07-19 11:18:15 1208
原创 FZU Problem 2082 过路费
Problem 2082 过路费Accept: 123 Submit: 499Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description有n座城市,由n-1条路相连通,使得任意两座城市之间可达。每条路有过路费,要交过路费才能通过。每条路的过路费经常会更新,现问你,当前情况下,从城市a到城
2014-07-18 20:50:41 930
原创 Codeforces Round #199 (Div. 2) E. Xenia and Tree
E. Xenia and Treetime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputXenia the programmer has a tree consistin
2014-07-18 15:19:45 1039
原创 Codeforces Round #200 (Div. 1) D. Water Tree
D. Water Treetime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMad scientist Mike has constructed a rooted t
2014-07-17 18:54:34 1058
原创 Codeforces Round #225 (Div. 2) E. Propagating tree
E. Propagating treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIahub likes trees very much. Recently h
2014-07-17 18:38:04 939
原创 hdu 4288 Coder
CoderTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2799 Accepted Submission(s): 1117Problem Description In mathematics a
2014-07-17 10:56:33 648
原创 zoj 3299 Fall the Brick
Fall the BrickTime Limit: 3 Seconds Memory Limit: 32768 KBNow the God is very angry, so he wants to punish the lazy, greedy humans. He chooses to throw some lines of bricks (just down fro
2014-07-17 09:09:24 789
原创 hdu 4007 Dave
DaveTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2832 Accepted Submission(s): 944Problem DescriptionRecently, Dave is bori
2014-07-15 14:21:15 770
原创 Codeforces Round #FF (Div. 2) E.DZY Loves Fibonacci Numbers
E. DZY Loves Fibonacci Numberstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn mathematical terms, the s
2014-07-15 11:05:43 1466
原创 UVA 12436 Rip Van Winkle's Code
O - Rip Van Winkle's CodeTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 12436DescriptionDRip Van Winkle's Code
2014-07-10 20:23:07 1240
原创 FZU 2105 Digits Count
Problem 2105 Digits CountAccept: 150 Submit: 880Time Limit: 10000 mSec Memory Limit : 262144 KB Problem DescriptionGiven N integers A={A[0],A[1],...,A[N-1]}. Here we have some op
2014-07-09 21:01:00 876
原创 hdu 3627 Giant For
Giant ForTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2404 Accepted Submission(s): 536Problem DescriptionIt is known to u
2014-07-09 17:08:22 808
原创 hdu 4856 Tunnels
TunnelsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 24 Accepted Submission(s): 5Problem DescriptionBob is travelling in Xi
2014-07-08 17:45:18 959
原创 hdu 4452 Running Rabbits
Running RabbitsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 976 Accepted Submission(s): 695Problem DescriptionRabbit Tom a
2014-07-07 20:55:29 1118
原创 hdu 4442 Physical Examination
Physical ExaminationTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5376 Accepted Submission(s): 1468Problem DescriptionWANGP
2014-07-07 20:54:24 1127
原创 hdu 4568 Hunter
HunterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1110 Accepted Submission(s): 312Problem Description One day, a hunter
2014-07-07 20:49:26 823
原创 Codeforces Round #136 (Div. 1) B. Little Elephant and Array
B. Little Elephant and Arraytime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Little Elephant loves play
2014-07-06 14:07:46 943
原创 AcDream OJ 1127 Base Station
Base StationTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 512000/256000 KB (Java/Others)SubmitStatistic Next ProblemProblem Description 移动通信系统中,通信网的建立主要通过基站来完成。基站可以分为主
2014-07-05 11:08:50 987 1
原创 hdu4841 圆桌问题
圆桌问题Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 18 Accepted Submission(s): 3Problem Description圆桌上围坐着2n个人。其中n个人是好人,另外n个人是
2014-07-01 17:02:02 2069 1
原创 poj 3237 Tree
TreeTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 3532 Accepted: 989DescriptionYou are given a tree with N nodes. The tree’s nodes are numbered 1 thr
2014-06-25 21:17:38 1348
原创 Spoj Query on a tree II (LCA)
You are given a tree (an undirected acyclic connected graph) with N nodes, and edges numbered 1, 2, 3...N-1. Each edge has an integer value assigned to it, representing its length.We will ask you
2014-06-24 10:22:38 900
空空如也
求教,hadoop-2.2.0升级hadoop-2.6.0。
2015-09-06
TA创建的收藏夹 TA关注的收藏夹
TA关注的人