ZOJ
文章平均质量分 80
h1021456873
这个作者很懒,什么都没留下…
展开
-
ZOJ 2412 Farm Irrigation (DFS+模拟)
Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has a different type o原创 2015-07-25 15:09:31 · 369 阅读 · 1 评论 -
ZOJ 3607Lazier Salesgirl (模拟题)
Description Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell the i-th customer a piece of bread for price pi. But she is so lazy th原创 2016-04-20 17:17:25 · 609 阅读 · 0 评论 -
ZOJ 3603 Draw Something Cheat (模拟)
Description Have you played Draw Something? It's currently one of the hottest social drawing games on Apple iOS and Android Devices! In this game, you and your friend play in turn. You need to pick原创 2016-04-19 22:16:35 · 463 阅读 · 0 评论 -
ZOJ 3600 Taxi Fare (细节题)
Description Last September, Hangzhou raised the taxi fares. The original flag-down fare in Hangzhou was 10 yuan, plusing 2 yuan per kilometer after the first 3km and 3 yuan per kilometer after 10k原创 2016-04-19 20:39:06 · 616 阅读 · 0 评论 -
ZOJ 3715 投票选国王 (枚举+贪心+模拟)
题意: 在幼儿园里..每个小朋友投一票选举领导...得票最多的小朋友成为领导(若有多个..则多个领导)..现在有个小朋友相当唯一的领导..于是准备贿赂一些小朋友..让他们把票投给自己...每个小朋友要买通..必须满足给他的糖数...问这个小朋友最少用多少的糖使得他成为唯一的leader~ 题解:原创 2016-04-13 20:36:31 · 583 阅读 · 0 评论 -
ZOJ 3929 Deque and Balls (放球问题_DP思维好题)
题目大意:给出一个序列,按照顺序一个一个放入双端队列(可以放在头部也可以放在尾部)问,xi>xi+1的期望是多少? 思路:有点动态规划的味道,已知前面i个都放好了,那么下一个i+1个放进了会造成多少的贡献,因为第i+1个可以放前可以放后, 那么ans*2,再考虑第i+1个数与其他数字造成的贡献。。。此时你会找到回来,a1,a2两次,之后a3=4,a4=8..... so...原创 2016-04-12 01:38:24 · 769 阅读 · 0 评论 -
ZOJ 3326 日历 (打表)
Description In order to encourage Hiqivenfin to study math, his mother gave him a sweet candy when the day of the month was a prime number. Hiqivenfin was happy with that. But several days later, h原创 2016-03-13 00:03:22 · 385 阅读 · 1 评论 -
HDU 1394&& ZOJ 1484 求最小的逆序数 (线段树)
Problem Description The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj. For a given sequence of numbers a1, a2, ..., an, if we mov原创 2015-12-10 19:01:03 · 285 阅读 · 0 评论 -
2015 浙江省赛 Beauty of Array (思维题)
Description Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to know the summation of the beauty of原创 2016-03-05 12:31:19 · 1023 阅读 · 1 评论 -
2015 浙江省赛 Team Formation (思维题)
Description For an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of his university. Edward knows the skill level of each stud原创 2016-03-05 12:29:45 · 681 阅读 · 1 评论 -
第十一届浙江省程序设计竞赛
A.Pokemon Master Calem and Serena are pokemon masters. One day they decided to have a pokemon battle practice before Pokemon World Championships. Each of them has some pokemons in each's team.原创 2016-03-16 20:02:03 · 922 阅读 · 1 评论 -
ZOJ Fiddlesticks (简单模拟)
Fiddlesticks is a popular hero in LOL. When he uses third skill, he can summon a crow to attack one enemy while causing damage to the enemy. And then, the crow will attack another enemy. Now there a原创 2015-09-12 14:13:52 · 554 阅读 · 1 评论 -
POJ 1300 Door Man(欧拉回路_格式控制*)
Description You are a butler in a large mansion. This mansion has so many rooms that they are merely referred to by number (room 0, 1, 2, 3, etc...). Your master is a particularly absent-minded lou原创 2015-08-19 13:57:42 · 551 阅读 · 0 评论 -
POJ 1789 Truck History (prime_裸题)
Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of a原创 2015-08-17 12:44:27 · 722 阅读 · 0 评论 -
ZOJ QS Network (prime_裸题)
In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each other via networks. If two QS want to get connected, they need to buy two network adapter原创 2015-08-17 11:30:30 · 616 阅读 · 0 评论 -
ZOJ 1649 Rescue BFS (搜索)
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to save Angel. Their task is: approach Angel. We assume that "approach原创 2015-07-27 15:03:09 · 540 阅读 · 0 评论 -
POJ 1979 Red and Black (DFS)
/*简单的dfs题,注意map数组清零 注意题目中地图输入的行列顺序,陷阱!*/ Description There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From原创 2015-07-26 12:24:20 · 337 阅读 · 0 评论 -
HDU1232 畅通工程 (并查集)
Problem Description 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N (原创 2015-07-27 15:15:47 · 426 阅读 · 1 评论 -
zoj 3953 三区间重合(贪心)
Chiaki has n intervals and the i-th of them is [li, ri]. She wants to delete some intervals so that there does not exist three intervals a, b and c such that a intersects with b, b intersects with c原创 2017-04-11 20:14:05 · 365 阅读 · 0 评论