08 2016 档案
摘要:题目链接 http://acm.hust.edu.cn/vjudge/contest/130883#problem/C Problem Description Zero Escape, is a visual novel adventure video game directed by Kotaro
阅读全文
摘要:题目链接 http://acm.split.hdu.edu.cn/showproblem.php?pid=5379 Problem Description Little sun is an artist. Today he is playing mahjong alone. He suddenly
阅读全文
摘要:题目链接:HDU 5355 http://acm.split.hdu.edu.cn/showproblem.php?pid=5355 Problem Description There are m soda and today is their birthday. The 1-st soda has
阅读全文
摘要:原题链接 Problem Description There are n people and m pairs of friends. For every pair of friends, they can choose to become online friends (communicating
阅读全文
摘要:原题链接 Problem Description You are a "Problem Killer", you want to solve many problems. Now you have n problems, the i-th problem's difficulty is repres
阅读全文
摘要:原题链接 Problem Description Tom owns a company and he is the boss. There are n staffs which are numbered from 1 to n in this company, and every staff has
阅读全文
摘要:原题链接 Problem Description You may heard of the Joseph Problem, the story comes from a Jewish historian living in 1st century. He and his 40 comrade sol
阅读全文
摘要:原题链接 Problem Description Given some segments which are paralleled to the coordinate axis. You need to count the number of their intersection.The input
阅读全文
摘要:原题链接 描述 有N堆石子排成一排,每堆石子有一定的数量。现要将N堆石子并成为一堆。合并的过程只能每次将相邻的两堆石子堆成一堆,每次合并花费的代价为这两堆石子的和,经过N-1次合并后成为一堆。求出总的代价最小值。 对于石子合并问题,有一个最好的算法,那就是GarsiaWachs算法。时间复杂度为O(
阅读全文
摘要:题目链接 描述 暑假来了,hrdv 又要留学校在参加ACM集训了,集训的生活非常Happy(ps:你懂得),可是他最近遇到了一个难题,让他百思不得其解,他非常郁闷。。亲爱的你能帮帮他吗? 问题是我们经常见到的整数划分,给出两个整数 n , m ,要求在 n 中加入m - 1 个乘号,将n分成m段,求
阅读全文
摘要:原题链接 Problem Description The soil is cracking up because of the drought and the rabbit kingdom is facing a serious famine. The RRC(Rabbit Red Cross) o
阅读全文
摘要:51Node 1483 化学变换 有n种不同的化学试剂。第i种有ai升。每次实验都要把所有的化学试剂混在一起,但是这些试剂的量一定要相等。所以现在的首要任务是把这些化学试剂的量弄成相等。 有两种操作: · 把第i种的量翻倍,即第i种的量变成2ai。 · 把第i种的量减半,除的时候向下取整,即把第i种
阅读全文
摘要:2016暑假多校联合 Rikka with Sequence (线段树) Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka s
阅读全文
摘要:HDU 5818 Problem Description A stack is a data structure in which all insertions and deletions of entries are made at one end, called the "top" of the
阅读全文
摘要:2016暑假多校联合 Windows 10(HDU:5802) Problem Description Long long ago, there was an old monk living on the top of a mountain. Recently, our old monk found
阅读全文
摘要:2016暑假多校联合 Substring Problem Description ?? is practicing his program skill, and now he is given a string, he has to calculate the total number of its
阅读全文
摘要:2016暑假多校联合 To My Girlfriend Problem Description Dear GuoI never forget the moment I met with you.You carefully asked me: "I have a very difficult prob
阅读全文
摘要:2016暑假多校联合 A Simple Chess Problem Description There is a n×m board, a chess want to go to the position (n,m) from the position (1,1).The chess is able
阅读全文
摘要:int wa[maxn],wb[maxn],wv[maxn],ws[maxn]; int cmp(int *r,int a,int b,int l) {return r[a]==r[b]&&r[a+l]==r[b+l];} //就像论文所说,由于末尾填了0,所以如果r[a]==r[b](实际是y[a]==y[b]),说明待合并的两个长为j的字符串,前面那个一定不包含末尾0,因而后面这个的起始位...
阅读全文
摘要:2016暑假多校联合 World is Exploding Problem Description Given a sequence A with length n,count how many quadruple (a,b,c,d) satisfies: a≠b≠c≠d,1≤a<b≤n,1≤c<d
阅读全文
摘要:2016暑假多校联合 Another Meaning Problem Description As is known to all, in many cases, a word has two meanings. Such as “hehe”, which not only means “hehe”
阅读全文
摘要:2015-2016 ACM-ICPC, NEERC, Northern Subregional Contest D Problem D. Distribution in Metagonia Input file: distribution.in Output file: distribution.o
阅读全文