摘要:
题解下载地址:http://pan.baidu.com/s/1eSx27Jk 题解下载地址:http://pan.baidu.com/s/1qYDxlhi 阅读全文
摘要:
中位数计数 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5701 Description 中位数定义为所有值从小到大排序后排在正中间的那个数,如果值有偶数个,通常取最中间的两个数值的平均数作为中位数。 现在有n个数,每个数都是独一无二的,求出每个数 阅读全文
摘要:
区间交 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5700 Description 小A有一个含有n个非负整数的数列与m个区间。每个区间可以表示为li,ri。 它想选择其中k个区间, 使得这些区间的交的那些位置所对应的数的和最大。 例如样例中,选 阅读全文
摘要:
货物运输 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5699 Description 公元2222年,l国发生了一场战争。 小Y负责领导工人运输物资。 其中有m种物资的运输方案,每种运输方案形如li,ri。表示存在一种货物从li运到ri。 这里有 阅读全文
摘要:
瞬间移动 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5698 Description 有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第n行第m列 阅读全文
摘要:
区间的价值 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5696 Description 我们定义“区间的价值”为一段区间的最大值 最小值。 一个区间左端点在L,右端点在R,那么该区间的长度为(R−L+1)。 现在聪明的杰西想要知道,对于长度为k的 阅读全文
摘要:
Gym Class 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5695 Description 众所周知,度度熊喜欢各类体育活动。 今天,它终于当上了梦寐以求的体育课老师。第一次课上,它发现一个有趣的事情。在上课之前,所有同学要排成一列, 假设最 阅读全文
摘要:
BD String 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5694 Description Problem Description 众所周知,度度熊喜欢的字符只有两个:B和D。 今天,它发明了一种用B和D组成字符串的规则: S(1)=B S( 阅读全文
摘要:
D Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5693 Description 众所周知,度度熊喜欢的字符只有两个:B 和D。 今天,它发明了一个游戏:D游戏。 度度熊的英文并不是很高明,所以这里的D,没什么高深的含义,只是代指等差数列 阅读全文
摘要:
Snacks 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5692 Description 百度科技园内有n个零食机,零食机之间通过n−1条路相互连通。每个零食机都有一个值v,表示为小度熊提供零食的价值。 由于零食被频繁的消耗和补充,零食机的价值v 阅读全文
摘要:
Sitting in Line 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5691 Description 度度熊是他同时代中最伟大的数学家,一切数字都要听命于他。现在,又到了度度熊和他的数字仆人们玩排排坐游戏的时候了。游戏的规则十分简单,参与游 阅读全文
摘要:
All X 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5690 Description F(x,m) 代表一个全是由数字x组成的m位数字。请计算,以下式子是否成立: F(x,m) mod k ≡ c Input 第一行一个整数T,表示T组数据。 阅读全文
摘要:
C. Old Berland Language 题目连接: http://www.codeforces.com/contest/37/problem/C Description Berland scientists know that the Old Berland language had exa 阅读全文
摘要:
B. Computer Game 题目连接: http://www.codeforces.com/contest/37/problem/B Description Vasya’s elder brother Petya loves playing computer games. In one of 阅读全文
摘要:
A. Towers 题目连接: http://www.codeforces.com/contest/37/problem/A Description Little Vasya has received a young builder’s kit. The kit consists of severa 阅读全文
摘要:
E. Trains and Statistic 题目连接: http://www.codeforces.com/contest/675/problem/E Description Vasya commutes by train every day. There are n train station 阅读全文
摘要:
D. Tree Construction 题目连接: http://www.codeforces.com/contest/675/problem/D Description During the programming classes Vasya was assigned a difficult p 阅读全文
摘要:
C. Money Transfers 题目连接: http://www.codeforces.com/contest/675/problem/C Description There are n banks in the city where Vasya lives, they are located 阅读全文
摘要:
B. Restoring Painting 题目连接: http://www.codeforces.com/contest/675/problem/B Description Vasya works as a watchman in the gallery. Unfortunately, one o 阅读全文
摘要:
A. Infinite Sequence 题目连接: http://www.codeforces.com/contest/675/problem/A Description Vasya likes everything infinite. Now he is studying the propert 阅读全文
摘要:
Prince and Princess 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4685 Description There are n princes and m princesses. Princess can marry any prin 阅读全文
摘要:
King's Quest 题目连接: http://poj.org/problem?id=1904 Description Once upon a time there lived a king and he had N sons. And there were N beautiful girls 阅读全文
摘要:
zxa and xor 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5683 Description zxa had a great interest in exclusive disjunction(i.e. XOR) recently, the 阅读全文
摘要:
zxa and leaf 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5682 Description zxa have an unrooted tree with n nodes, including (n−1) undirected edges 阅读全文
摘要:
zxa and set 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4681 Description zxa has a set A={a1,a2,⋯,an}, which has n elements and obviously (2n−1) n 阅读全文
摘要:
String 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4681 Description Given 3 strings A, B, C, find the longest string D which satisfy the following 阅读全文
摘要:
Sum Of Gcd 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4676 Description Given you a sequence of number a1, a2, ..., an, which is a permutation of 阅读全文
摘要:
B. Robin Hood 题目连接: http://www.codeforces.com/contest/671/problem/B Description We all know the impressive story of Robin Hood. Robin Hood uses his ar 阅读全文
摘要:
A. Recycling Bottles 题目连接: http://www.codeforces.com/contest/671/problem/A Description It was recycling day in Kekoland. To celebrate it Adil and Bera 阅读全文
摘要:
B. Different is Good 题目连接: http://www.codeforces.com/contest/672/problem/B Description A wise man told Kerem "Different is good" once, so Kerem wants 阅读全文
摘要:
A. Summer Camp 题目连接: http://www.codeforces.com/contest/672/problem/A Description Every year, hundreds of people come to summer camps, they learn new a 阅读全文
摘要:
D. Bear and Two Paths 题目连接: http://www.codeforces.com/contest/673/problem/D Description Bearland has n cities, numbered 1 through n. Cities are connec 阅读全文
摘要:
C. Bear and Colors 题目连接: http://www.codeforces.com/contest/673/problem/C Description Bear Limak has n colored balls, arranged in one long row. Balls a 阅读全文
摘要:
B. Problems for Round 题目连接: http://www.codeforces.com/contest/673/problem/B Description There are n problems prepared for the next Codeforces round. T 阅读全文
摘要:
A. Bear and Game 题目连接: http://www.codeforces.com/contest/673/problem/A Description Bear Limak likes watching sports on TV. He is going to watch a game 阅读全文
摘要:
C. Zero One 题目连接: http://codeforces.com/contest/135/problem/C Description Little Petya very much likes playing with little Masha. Recently he has rece 阅读全文
摘要:
B. Rectangle and Square 题目连接: http://codeforces.com/contest/135/problem/B Description Little Petya very much likes rectangles and especially squares. 阅读全文
摘要:
A. Replacement 题目连接: http://codeforces.com/contest/135/problem/A Description Little Petya very much likes arrays consisting of n integers, where each 阅读全文
摘要:
D. DZY Loves Strings 题目连接: http://codeforces.com/contest/444/problem/D Description DZY loves strings, and he enjoys collecting them. In China, many pe 阅读全文
摘要:
C. DZY Loves Colors 题目连接: http://codeforces.com/contest/444/problem/C Description DZY loves colors, and he enjoys painting. On a colorful day, DZY get 阅读全文