ACM
切克脑
这个作者很懒,什么都没留下…
展开
-
Vladik and flights CodeForces - 743A
Vladik is a competitive programmer. This year he is going to win the International Olympiad in Informatics. But it is not as easy as it sounds: the question Vladik face now is to find the cheapest way原创 2017-07-26 16:32:02 · 204 阅读 · 0 评论 -
May Day Holiday
As a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays and weekends. Each weekend, which consists of Saturday and Sunday, is a原创 2017-07-21 16:25:16 · 284 阅读 · 0 评论 -
F - Red and Black 简单搜索
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 a tile, he can move to one of four adjacent tiles. But he can'原创 2017-07-20 17:42:08 · 311 阅读 · 0 评论 -
Convert QWERTY to Dvorak
Edward, a poor copy typist, is a user of the Dvorak Layout. But now he has only a QWERTY Keyboard with a broken Caps Lock key, so Edward never presses the brokenCaps Lock key. Luckily, all the other原创 2017-07-21 16:14:05 · 303 阅读 · 0 评论 -
Colour sequence HDU - 1683
We have a pile of cards consisting of 100 cards that are coloured on both sides. There is a finite number of colours (at most 26). In addition there are special cards called jokers. Jokers have a joke原创 2017-07-28 15:14:34 · 196 阅读 · 0 评论 -
IMBA? HDU - 4218
As a kind problem setter, I should warn you, as you may already notice the sample output, it’s a horrible problem and very IMBA (imbalanced). Today we learn circle, a circle is a simple shape of Euc原创 2017-07-28 15:36:07 · 539 阅读 · 0 评论 -
DFS深度优先搜索
他是从某种状态开始,不断的转移状态直到无法转移,然后回退到前一步的状态,继续转移到其他状态,如此不断地重复,直到找到那个最终的解---------------挑战程序设计1、部分和问题 给定整数A1,A2……An 判断是否可以从中选出若干数,使他们的和恰好为k限定条件、:1-10的八次方的八次方-10的八次方的八次方inputn=4;a={1,2,原创 2017-08-27 16:30:06 · 189 阅读 · 0 评论 -
Pizza Separation CodeForces - 895A 暴力解决
Students Vasya and Petya are studying at the BSU (Byteland State University). At one of the breaks they decided to order a pizza. In this problem pizza is a circle of some radius. The pizza was delive原创 2017-12-04 22:22:39 · 249 阅读 · 0 评论 -
Wrath CodeForces - 892B 简单最小路径
Hands that shed innocent blood!There are n guilty people in a line, thei-th of them holds a claw with length Li. The bell rings and every person kills some of people in front of him. All people原创 2017-12-06 20:40:17 · 264 阅读 · 0 评论 -
CodeForces - 912A
During the winter holidays, the demand for Christmas balls is exceptionally high. Since it's already 2018, the advances in alchemy allow easy and efficient ball creation by utilizing magic crystals.原创 2018-01-23 17:43:38 · 222 阅读 · 0 评论 -
CodeForces - 912B
Since Grisha behaved well last year, at New Year's Eve he was visited by Ded Moroz who brought an enormous bag of gifts with him! The bag contains n sweet candies from the good ol' bakery, each labe原创 2018-01-23 17:54:46 · 214 阅读 · 0 评论 -
CodeForces - 916A
Jamie loves sleeping. One day, he decides that he needs to wake up at exactly hh: mm. However, he hates waking up, so he wants to make waking up less painful by setting the alarm at a lucky time. He原创 2018-01-23 18:00:15 · 200 阅读 · 0 评论 -
Ace of Aces
There is a mysterious organization called Time-Space Administrative Bureau (TSAB) in the deep universe that we humans have not discovered yet. This year, the TSAB decided to elect an outstanding membe原创 2017-07-21 17:17:58 · 355 阅读 · 0 评论 -
棋盘问题 --搜索
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n 当为-1 -1时表示输入原创 2017-07-22 14:38:46 · 270 阅读 · 0 评论 -
Blown Garland CodeForces - 758B
Nothing is eternal in the world, Kostya understood it on the 7-th of January when he saw partially dead four-color garland.Now he has a goal to replace dead light bulbs, however he doesn't know how原创 2017-07-23 14:20:04 · 263 阅读 · 0 评论 -
RunningMan FZU - 2221
ZB loves watching RunningMan! There's a game in RunningMan called 100 vs 100.There are two teams, each of many people. There are 3 rounds of fighting, in each round the two teams send some people to转载 2017-07-26 15:55:01 · 357 阅读 · 0 评论 -
Common Tangents FZU - 2213
Two different circles can have at most four common tangents.The picture below is an illustration of two circles with four common tangents.Now given the center and radius of two circles, your原创 2017-07-26 15:13:42 · 171 阅读 · 0 评论 -
Chloe and the sequence CodeForces - 743B
Chloe, the same as Vladik, is a competitive programmer. She didn't have any problems to get to the olympiad like Vladik, but she was confused by the task proposed on the olympiad.Let's consider the原创 2017-07-26 15:04:55 · 363 阅读 · 0 评论 -
Hongcow Solves A Puzzle CodeForces - 745B
Hongcow likes solving puzzles.One day, Hongcow finds two identical puzzle pieces, with the instructions "make a rectangle" next to them. The pieces can be described by an n by m grid of characters,原创 2017-07-26 07:38:11 · 184 阅读 · 0 评论 -
Bachgold Problem CodeForces - 749A
Bachgold problem is very easy to formulate. Given a positive integer n represent it as a sum of maximum possible number of prime numbers. One can prove that such representation exists for any intege原创 2017-07-26 07:30:43 · 182 阅读 · 0 评论 -
Display Size CodeForces - 747A
A big company decided to launch a new series of rectangular displays, and decided that the display must have exactly n pixels.Your task is to determine the size of the rectangular display — the numb翻译 2017-07-24 16:02:43 · 273 阅读 · 0 评论 -
Decoding CodeForces - 746B
Polycarp is mad about coding, that is why he writes Sveta encoded messages. He calls the median letter in a word the letter which is in the middle of the word. If the word's length is even, the median原创 2017-07-24 15:49:06 · 385 阅读 · 0 评论 -
Mammoth's Genome Decoding CodeForces - 747B
The process of mammoth's genome decoding in Berland comes to its end!One of the few remaining tasks is to restore unrecognized nucleotides in a found chain s. Each nucleotide is coded with a capital原创 2017-07-24 15:38:53 · 255 阅读 · 0 评论 -
N种方法妙讲LIS算法
LIS转载 2017-07-23 20:29:25 · 315 阅读 · 0 评论 -
Ubiquitous Religions POJ - 2524 ------并查集
There are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your university beli原创 2017-07-23 16:51:23 · 153 阅读 · 0 评论 -
The Suspects POJ - 1611 --并查集
Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to s翻译 2017-07-23 15:51:14 · 178 阅读 · 0 评论 -
蓝桥杯——方格分割
题目:6x6的方格,沿着格子的边线剪开成两部分。要求这两部分的形状完全相同。如图:p1.png, p2.png, p3.png 就是可行的分割法。试计算:包括这3种分法在内,一共有多少种不同的分割方法。注意:旋转对称的属于同一种分割法。请提交该整数,不要填写任何多余的内容或说明文字。题目分析: 答案:509最初的思维是从6成6的表格中 ,从左上角开始搜索,同时根据第二块所要走的方向,右下角开始移动...翻译 2018-03-31 10:49:07 · 486 阅读 · 0 评论