05 2016 档案
摘要:D. Developing Game 题目连接: http://www.codeforces.com/contest/377/problem/D Description Pavel is going to make a game of his dream. However, he knows tha
阅读全文
摘要:C. Captains Mode 题目连接: http://codeforces.com/contest/377/problem/C Description Kostya is a progamer specializing in the discipline of Dota 2. Valve Co
阅读全文
摘要:B. Preparing for the Contest 题目连接: http://codeforces.com/contest/377/problem/B Description Soon there will be held the world's largest programming con
阅读全文
摘要:A. Maze 题目连接: http://codeforces.com/contest/377/problem/A Description Pavel loves grid mazes. A grid maze is an n × m rectangle maze where each cell i
阅读全文
摘要:队友扒的uwi的读入挂,非常强,再也不用担心java比C++慢了…… import java.util. ; import java.math. ; import java.io.ByteArrayInputStream; import java.io.IOException; import jav
阅读全文
摘要:Bigger系列题解 Bigger Python 坑点在于要高精度以及表达式求值,用java写可以很容易避免高精度问题 然后这道题就可以AC了 代码 import java.io. ; import java.util. ; import java.math. ; import java.text.
阅读全文
摘要:E. The Last Fight Between Human and AI 题目连接: http://codeforces.com/contest/676/problem/E Description 100 years have passed since the last victory of t
阅读全文
摘要:D. Theseus and labyrinth 题目连接: http://www.codeforces.com/contest/676/problem/D Description Theseus has just arrived to Crete to fight Minotaur. He fou
阅读全文
摘要:C. Vasya and String 题目连接: http://www.codeforces.com/contest/676/problem/C Description High school student Vasya got a string of length n as a birthday
阅读全文
摘要:B. Pyramid of Glasses 题目连接: http://www.codeforces.com/contest/676/problem/B Description Mary has just graduated from one well known University and is
阅读全文
摘要:A. Nicholas and Permutation 题目连接: http://www.codeforces.com/contest/676/problem/A Description Nicholas has an array a that contains n distinct integer
阅读全文
摘要:B. DZY Loves Modification 题目连接: http://www.codeforces.com/contest/446/problem/B Description As we know, DZY loves playing games. One day DZY decided t
阅读全文
摘要:A. DZY Loves Sequences 题目连接: http://www.codeforces.com/contest/446/problem/A Description DZY has a sequence a, consisting of n integers. We'll call a
阅读全文
摘要:题解下载地址: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
阅读全文
摘要:B. DZY Loves FFT 题目连接: http://codeforces.com/contest/444/problem/B Description DZY loves Fast Fourier Transformation, and he enjoys using it. Fast Fou
阅读全文
摘要:A. DZY Loves Physics 题目连接: http://codeforces.com/contest/444/problem/A Description DZY loves Physics, and he enjoys calculating density. Almost everyt
阅读全文
摘要:1301 : 筑地市场 题目连接: http://hihocoder.com/problemset/problem/1301 Description 筑地市场是位于日本东京都中央区筑地的公营批发市场,为东京都政府设置的中央批发市场之一,亦是日本最大的鱼市场。其规模之大与知名度之广,不只是东京,更是日
阅读全文
摘要:1300 : 展胜地的鲤鱼旗 题目连接: http://hihocoder.com/problemset/problem/1300 Description 岩手县北上市的「北上市立公园展胜地」,是陆奥国三大樱花名所之一。每年的四月中旬到五月初,这里都会举办盛大的祭奠。除了可以在盛开的樱花步道上乘坐观
阅读全文
摘要:1299 : 打折机票 题目连接: http://hihocoder.com/problemset/problem/1299 Description 因为思念新宿的"小姐姐"们,岛娘计划6月份再去一趟东京,不过这次看来她需要自掏腰包。经过了几天的夜战,岛娘终于在体力耗尽之前,用Python抓下了所有
阅读全文
摘要:E. Correct Bracket Sequence Editor 题目连接: http://www.codeforces.com/contest/670/problem/E Description Recently Polycarp started to develop a text edito
阅读全文
摘要:D1. Magic Powder 1 题目连接: http://www.codeforces.com/contest/670/problem/D1 Description This problem is given in two versions that differ only by constr
阅读全文
摘要:C. Cinema 题目连接: http://www.codeforces.com/contest/670/problem/C Description Moscow is hosting a major international conference, which is attended by n
阅读全文
摘要:B. Game of Robots 题目连接: http://www.codeforces.com/contest/670/problem/B Description In late autumn evening n robots gathered in the cheerful company o
阅读全文
摘要:A. Holidays 题目连接: http://www.codeforces.com/contest/670/problem/A Description On the planet Mars a year lasts exactly n days (there are no leap years
阅读全文
摘要:1515 明辨是非 题目连接: https://www.51nod.com/onlineJudge/questionCode.html !problemId=1515 Description 给n组操作,每组操作形式为x y p。 当p为1时,如果第x变量和第y个变量可以相等,则输出YES,并限制他
阅读全文
摘要:花了接近2周时间,读完了三体 读后感如下: 云天明是个智障 End
阅读全文
摘要:4554: [Tjoi2016&Heoi2016]游戏 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4554 Description 在2016年,佳缘姐姐喜欢上了一款游戏,叫做泡泡堂。简单的说,这个游戏就是在一张地图上放上若干个炸弹,
阅读全文
摘要:4419: [Shoi2013]发微博 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4419 Description 刚开通的SH微博共有n个用户(1..n标号),在短短一个月的时间内,用户们活动频繁,共有m条按时间顺序的记录: ! x
阅读全文
摘要:4403: 序列统计 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4403 Description 给定三个正整数N、L和R,统计长度在1到N之间,元素大小都在L到R之间的单调不降序列的数量。输出答案对10^6+3取模的结果。 Inpu
阅读全文
摘要:2016年6月1日08:29:32 这个是五月涂的,还是扔到五月吧,自己越来越是个智障了…… 2016年5月28日23:45:57 今天自己出的题都放出来了,把大家都干死了,很开心! 晚上去看夏日祭了,自己的青春也快被燃烧殆尽了…… 2016年5月24日00:12:20 听到这句话的时候,感觉整个人
阅读全文
摘要:4448: [Scoi2015]情报传递 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4448 Description 奈特公司是一个巨大的情报公司,它有着庞大的情报网络。情报网络中共有n名情报员。每名情报员口J 能有 若T名(可能没有
阅读全文
摘要:4421: [Cerc2015] Digit Division 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4421 Description 给出一个数字串,现将其分成一个或多个子串,要求分出来的每个子串能Mod M等于0. 将方案数(
阅读全文
摘要:4408: [Fjoi 2016]神秘数 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=4408 Description 一个可重复数字集合S的神秘数定义为最小的不能被S的子集的和表示的正整数。例如S={1,1,1,4,13}, 1 =
阅读全文
摘要:3674: 可持久化并查集加强版 题目连接: http://www.lydsy.com/JudgeOnline/problem.php?id=3674 Description Description: 自从zkysb出了可持久化并查集后…… hzwer:乱写能AC,暴力踩标程 KuribohG:我不
阅读全文
摘要:C. Fox and Card Game 题目连接: http://codeforces.com/contest/388/problem/C Description Fox Ciel is playing a card game with her friend Fox Jiro. There are
阅读全文
摘要:B. Fox and Minimal path 题目连接: http://codeforces.com/contest/388/problem/B Description Fox Ciel wants to write a task for a programming contest. The ta
阅读全文
摘要:A. Fox and Box Accumulation 题目连接: http://codeforces.com/contest/388/problem/A Description Fox Ciel has n boxes in her room. They have the same size an
阅读全文
摘要:题解在下已经写过一次了,所以就不再写了,下面只有代码 题解下载(1):http://pan.baidu.com/s/1hsAUjMs 题解下载(2):http://pan.baidu.com/s/1mhC7EYk A 卿学姐与公主 代码 include include include include
阅读全文