
题解报告
淼润淽涵
这个作者很懒,什么都没留下…
展开
-
CodeForces - 231B Magic, Wizardry and Wonders
Problem DescriptionVasya the Great Magician and Conjurer loves all kinds of miracles and wizardry. In one wave of a magic wand he can turn an object into something else. But, as you all know, there...原创 2019-07-31 07:55:48 · 194 阅读 · 0 评论 -
Codeforce 227B Effective Approach
Problem DescriptionOnce at a team training Vasya, Petya and Sasha got a problem on implementing linear search in an array.According to the boys, linear search works as follows. The array elements...原创 2019-07-26 10:25:48 · 139 阅读 · 0 评论 -
Codeforce B Array
Problem DescriptionYou've got an array a, consisting of n integers: a1, a2, ..., an. Your task is to find a minimal by inclusion segment [l, r] (1 ≤ l ≤ r ≤ n) such, that among numbers al, al + 1,...原创 2019-07-25 10:43:10 · 205 阅读 · 0 评论 -
Codeforces 954A - Diagonal Walking(简单数学)
Problem DescriptionMikhail walks on a 2D plane. He can go either up or right. You are given a sequence of Mikhail's moves. He thinks that this sequence is too long and he wants to make it as short ...原创 2019-05-13 17:31:33 · 245 阅读 · 0 评论 -
Codeforces 955B - Not simply beatiful strings(模拟)
Problem DescriptionLet's call a string adorable if its letters can be realigned in such a way that they form two consequent groups of equal symbols (note that different groups must contain differen...原创 2019-05-13 17:10:52 · 332 阅读 · 0 评论 -
CodeForces 955A - Feed the cat(模拟)
Problem DescriptionAfter waking up at hh:mm, Andrew realised that he had forgotten to feed his only cat for yet another time (guess why there's only one cat). The cat's current hunger level is H po...原创 2019-05-11 18:33:24 · 356 阅读 · 0 评论 -
Codeforced 957D - Riverside Curio
Problem DescriptionArkady decides to observe a river for n consecutive days. The river's water level on each day is equal to some real value.Arkady goes to the riverside each day and makes a mark...原创 2019-05-12 01:15:42 · 208 阅读 · 0 评论 -
CodeForces 959-A Mahmoud and Ehab and the even-odd game(模拟+找规律)
Problem DescriptionMahmoud and Ehab play a game called the even-odd game. Ehab chooses his favorite integer n and then they take turns, starting from Mahmoud. In each player's turn, he has to choos...原创 2019-05-07 22:46:20 · 297 阅读 · 0 评论 -
Codeforce 961-D Pair Of Lines (计算几何)
Problem Descriptionstandard outputYou are given n points on Cartesian plane. Every point is a lattice point (i. e. both of its coordinates are integers), and all points are distinct.You may dra...原创 2019-05-05 15:47:20 · 215 阅读 · 0 评论 -
CodeForces 961-A Tetris(模拟)
Problem DescriptionYou are given a following process.There is a platform with n columns. 1×1 squares are appearing one after another in some columns on this platform. If there are no squares in t...原创 2019-05-04 09:52:59 · 236 阅读 · 0 评论 -
POJ 2251 Dungeon Master(BFS)
Problem DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move...原创 2019-04-26 20:14:19 · 134 阅读 · 0 评论 -
HDU 2488 A Knight's Journey(dfs)
Problem DescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journeyaround the world. Whenever a knight moves, it ...原创 2019-04-22 21:53:06 · 126 阅读 · 0 评论 -
letters (dps)
Problem Description给出一个roe*col的大写字母矩阵,一开始的位置为左上角,你可以向上下左右四个方向移动,并且不能移向曾经经过的字母。问最多可以经过几个字母。思路: 基本的dfs代码:#include<iostream>using namespace std;const int Max = 30; int row, c...原创 2019-04-20 21:43:33 · 285 阅读 · 0 评论 -
八皇后问题(dfs)
Problem Description会下国际象棋的人都很清楚:皇后可以在横、竖、斜线上不限步数地吃掉其他棋子。如何将8个皇后放在棋盘上(有8 * 8个方格),使它们谁也不能被吃掉!这就是著名的八皇后问题。 对于某个满足要求的8皇后的摆放方法,定义一个皇后串a与之对应,即a=b1b2...b8,其中bi为相应摆法中第i行皇后所处的列数。已经知道8皇后问题一共有92组解(即92个不同的皇后串)...原创 2019-04-20 21:25:34 · 507 阅读 · 0 评论 -
绝地求生:大逃杀(dfs)
Problem Description绝地求生,是一款开放世界策略射击游戏,采用虚幻4引擎制作。 是一款大逃杀类型的游戏,每一局游戏将有100名玩家参与,他们将被投放在绝地岛(battlegrounds)的上空,游戏开始跳伞时所有人都一无所有。 游戏展开的方式是:玩家赤手空拳地分布在岛屿的各个角落,利用岛上多样的武器与道具。 随着时间的流逝,岛上的安全地带越来越少,特定地区也会发生轰炸的情况...原创 2019-04-17 19:39:04 · 1869 阅读 · 0 评论 -
HDU 1078 FatMouse and Cheese(dp&记忆化搜索)
Problem DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q &...原创 2019-04-14 23:07:13 · 166 阅读 · 0 评论 -
POJ 1088 滑雪 (记忆化搜索&DP)
DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21...原创 2019-04-14 23:00:25 · 160 阅读 · 0 评论 -
POJ 2955 Brackets(区间DP)
Problem DescriptionWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence, if s is a regular brackets sequence, then (s) an...原创 2019-04-08 22:22:22 · 136 阅读 · 0 评论 -
POJ 1651 Multiplication Puzzle(区间DP)
Problem DescriptionThe multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of ...转载 2019-04-07 23:28:56 · 227 阅读 · 0 评论 -
Light OJ 1422 Halloween Costumes(区间DP)
Problem DescriptionGappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Halloween, these parties are al...转载 2019-04-07 22:11:16 · 110 阅读 · 0 评论 -
HDU 1260 Tickets(DP)
Problem DescriptionJesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go...原创 2019-04-07 15:13:13 · 182 阅读 · 0 评论 -
HDU 1176免费馅饼
Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是...原创 2019-04-02 20:36:36 · 204 阅读 · 0 评论 -
HDU 1864 最大报销额(01背包)
Problem Description现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。Input测试输入包含若干测试用例。每个测试用例的第1行包含两个正数 ...原创 2019-04-01 14:54:04 · 105 阅读 · 0 评论 -
HDU 2159 FATE(二维背包)
Problem Description最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或者0以下时,xhd就不会玩这游戏。xhd还说了他最多只杀...原创 2019-03-31 16:42:06 · 176 阅读 · 0 评论 -
hdu 1058:Humble Numbers(动态规划 DP)
Problem DescriptionA number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the firs...原创 2019-03-31 16:23:59 · 234 阅读 · 0 评论 -
HDU 2602 Bone Collector(01背包)
Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave...原创 2019-03-31 13:15:51 · 183 阅读 · 0 评论 -
HDU 2191悼念512汶川大地震遇难同胞(多重背包转化为0-1背包)
Problem Description为了挽救灾区同胞的生命,心系灾区同胞的你准备自己采购一些粮食支援灾区,现在假设你一共有资金n元,而市场有m种大米,每种大米都是袋装产品,其价格不等,并且只能整袋购买。请问:你用有限的资金最多能采购多少公斤粮食呢?Input输入数据首先包含一个正整数C,表示有C组测试用例,每组测试用例的第一行是两个整数n和m(1<=n<...原创 2019-03-30 21:45:17 · 140 阅读 · 0 评论 -
题解报告Robberies(概率dp)
Problem DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided to...原创 2019-03-30 12:15:27 · 297 阅读 · 0 评论 -
HDU 1114 Piggy-Bank
DescriptionBefore ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea be...原创 2019-03-30 17:09:33 · 211 阅读 · 0 评论 -
Codeforces 957A - Tritonic Iridescence(模拟)
Problem DescriptionOverlooking the captivating blend of myriads of vernal hues, Arkady the painter lays out a long, long canvas.Arkady has a sufficiently large amount of paint of three colours: c...原创 2019-05-08 00:10:02 · 240 阅读 · 0 评论 -
洛谷-------P1201 [USACO1.1]贪婪的送礼者Greedy Gift Givers
Problem Description对于一群(NP个)要互送礼物的朋友,GY要确定每个人送出的钱比收到的多多少。在这一个问题中,每个人都准备了一些钱来送礼物,而这些钱将会被平均分给那些将收到他的礼物的人。然而,在任何一群朋友中,有些人将送出较多的礼物(可能是因为有较多的朋友),有些人有准备了较多的钱。给出一群朋友,没有人的名字会长于 14 字符,给出每个人将花在送礼上的钱,和将收到他的礼物...原创 2019-05-16 22:59:16 · 176 阅读 · 0 评论 -
CF1095A Repeating Cipher
题目描述Polycarp loves ciphers. He has invented his own cipher called repeating.Repeating cipher is used for strings. To encrypt the string s=s1s2…sm s=s_{1}s_{2} \dots s_{m} s=s1s2…sm ( 1≤m≤10 1 ...原创 2019-05-27 17:36:29 · 222 阅读 · 0 评论 -
CodeForces 246C . Beauty Pageant (思维)
题意:n个数a[1~n],每天可以选任意个数(每个数一天只能选一次),选k天,使得每天的和不同。分析:因为k<=n*(n+1)/2且a[i]会不相同,我们先对a排序,长度为1:a[1]a[2]……a[n]数目:n长度为2:a[n]+a[1]a[n]+a[2]……a[n]+a[n-1]数目:n-1长度为3a[n]+a[n-1]+a[1]a[n]+a[n-1]+a[2]……a[n]+a[n-1]+a[n-2]数目为n-2以此类推转载 2019-08-22 10:28:02 · 233 阅读 · 0 评论 -
CF-226D The table (思维)
Problem DescriptionHarry Potter has a difficult homework. Given a rectangular table, consisting of n × m cells. Each cell of the table contains the integer. Harry knows how to use two spells: the f...转载 2019-08-22 15:58:27 · 212 阅读 · 0 评论 -
CF-234B Reading
Problem DescriptionVasya is going to the Olympics in the city Ntown by train. The boy wants to read the textbook to prepare for the Olympics. He counted that he needed k hours for this. He also fou...原创 2019-08-22 17:37:15 · 238 阅读 · 0 评论 -
钞票买道具题解报告(dp)
Problem Description不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:"我要买道具!"地精商人:"我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水350块一个."死亡骑士:"好的,给我一个血瓶."说完他掏出那张N元的大钞递给地精商人.地...原创 2019-03-25 14:27:18 · 528 阅读 · 0 评论