05 2015 档案

摘要:Problem DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share... 阅读全文
posted @ 2015-05-29 20:54 Painting、时光 阅读(698) 评论(0) 推荐(0)
摘要: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,... 阅读全文
posted @ 2015-05-29 19:27 Painting、时光 阅读(129) 评论(0) 推荐(0)
摘要:Mike is the president of country What-The-Fatherland. There arenbears living in this country besides Mike. All of them are standing in a line and they... 阅读全文
posted @ 2015-05-28 15:47 Painting、时光 阅读(197) 评论(0) 推荐(0)
摘要:Mike and some bears are playing a game just for fun. Mike is the judge. All bears except Mike are standing in ann × mgrid, there's exactly one bear in... 阅读全文
posted @ 2015-05-27 16:18 Painting、时光 阅读(186) 评论(0) 推荐(0)
摘要:Mike has a frog and a flower. His frog is named Xaniar and his flower is named Abol. Initially(at time0), height of Xaniar ish1and height of Abol ish2... 阅读全文
posted @ 2015-05-27 16:16 Painting、时光 阅读(406) 评论(0) 推荐(0)
摘要:Problem DescriptionAs this term is going to end, DRD needs to prepare for his final exams.DRD hasnexams. They are all hard, but their difficulties are... 阅读全文
posted @ 2015-05-27 00:14 Painting、时光 阅读(382) 评论(0) 推荐(0)
摘要:Problem DescriptionMike does not want others to view his messages, so he find a encode method Base64.Here is an example of the note in Chinese Passpor... 阅读全文
posted @ 2015-05-26 23:54 Painting、时光 阅读(219) 评论(0) 推荐(0)
摘要:1.hust上面两套树形DP2.hust上面两套区间DP3.学习哈希,巩固kmp,多刷几道熟悉4.刷hdu上面Dynamic Programming专题以及search专题5.学习二分图,网络流(√ ×)6.看大白书,把入门经典小白书例题刷一遍7.orz不知道什么时候能否刷完~~想到什么了再补充,在... 阅读全文
posted @ 2015-05-26 20:27 Painting、时光 阅读(107) 评论(0) 推荐(0)
摘要:Two soldiers are playing a game. At the beginning first of them chooses a positive integernand gives it to the second soldier. Then the second one tri... 阅读全文
posted @ 2015-05-26 20:15 Painting、时光 阅读(161) 评论(0) 推荐(0)
摘要:Two bored soldiers are playing card war. Their card deck consists of exactlyncards, numbered from1ton,all values are different. They divide cards betw... 阅读全文
posted @ 2015-05-26 18:12 Painting、时光 阅读(172) 评论(0) 推荐(0)
摘要:Colonel hasnbadges. He wants to give one badge to every of hisnsoldiers. Each badge has acoolness factor, which shows how much it's owner reached. Coo... 阅读全文
posted @ 2015-05-25 20:00 Painting、时光 阅读(169) 评论(0) 推荐(0)
摘要:Problem Description列变位法是古典密码算法中变位加密的一种方法,具体过程如下 将明文字符分割成个数固定的分组(如5个一组,5即为密钥),按一组一行的次序整齐排列,最后不足一组不放置任何字符,完成后按列读取即成密文。比如:原文:123456789密钥:4变换后的矩阵:12345678... 阅读全文
posted @ 2015-05-25 11:27 Painting、时光 阅读(394) 评论(0) 推荐(0)
摘要:Problem Description当今世界,网络已经无处不在了,小度熊由于犯了错误,当上了度度公司的网络管理员,他手上有大量的 IP列表,小度熊想知道在某个固定的子网掩码下,有多少个网络地址。网络地址等于子网掩码与 IP 地址按位进行与运算后的结果,例如:子网掩码:A.B.C.DIP 地址:a.... 阅读全文
posted @ 2015-05-25 10:52 Painting、时光 阅读(210) 评论(0) 推荐(0)
摘要:Problem Description近期B厂组织了一次大搬家,所有人都要按照指示换到指定的座位上。指示的内容是坐在位置i上的人要搬到位置j上。现在B厂有N个人,一对一到N个位置上。搬家之后也是一一对应的,改变的只有位次。在第一次搬家后,度度熊由于疏忽,又要求大家按照原指示进行了一次搬家。于是,机智... 阅读全文
posted @ 2015-05-25 10:51 Painting、时光 阅读(188) 评论(0) 推荐(0)
摘要:Problem DescriptionJGShining's kingdom consists of 2n(n is no more than 500,000) small cities which are located in two parallel lines.Half of these ci... 阅读全文
posted @ 2015-05-22 20:39 Painting、时光 阅读(112) 评论(0) 推荐(0)
摘要:Problem DescriptionNow I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more diffic... 阅读全文
posted @ 2015-05-22 19:50 Painting、时光 阅读(128) 评论(0) 推荐(0)
摘要:Problem DescriptionThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical str... 阅读全文
posted @ 2015-05-21 21:53 Painting、时光 阅读(123) 评论(0) 推荐(0)
摘要:Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7)... 阅读全文
posted @ 2015-05-21 16:10 Painting、时光 阅读(144) 评论(0) 推荐(0)
摘要:Little girl Susie went shopping with her mom and she wondered how to improve service quality.There arenpeople in the queue. For each person we know ti... 阅读全文
posted @ 2015-05-20 15:36 Painting、时光 阅读(316) 评论(0) 推荐(0)
摘要:Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and ... 阅读全文
posted @ 2015-05-20 15:35 Painting、时光 阅读(268) 评论(0) 推荐(0)
摘要:Little Susie, thanks to her older brother, likes to play with cars. Today she decided to set up a tournament between them. The process of a tournament... 阅读全文
posted @ 2015-05-20 15:34 Painting、时光 阅读(215) 评论(0) 推荐(0)
摘要:Little Susie listens to fairy tales before bed every day. Today's fairy tale was about wood cutters and the little girl immediately started imagining ... 阅读全文
posted @ 2015-05-20 15:33 Painting、时光 阅读(286) 评论(0) 推荐(0)
摘要:Problem DescriptionSVM(Support Vector Machine)is an important classification tool, which has a wide range of applications in cluster analysis, communi... 阅读全文
posted @ 2015-05-19 20:26 Painting、时光 阅读(146) 评论(0) 推荐(0)
摘要:Description把前n个正整数摆成1个环,如果环中所有相邻的2个数之和都是1个素数,该环称为1个n项素数和环。 输入1个整数n,输出共有多少种Input输入一个正整数nOutput输出环的个数,要求环的第一个数字是1Sample Input4Sample Output2HINT大意:回溯,要会... 阅读全文
posted @ 2015-05-19 16:58 Painting、时光 阅读(465) 评论(0) 推荐(0)
摘要:Problem DescriptionTom and Jerry are playing a game with tubes and pearls. The rule of the game is:1) Tom and Jerry come up together with a number K.2... 阅读全文
posted @ 2015-05-19 16:53 Painting、时光 阅读(192) 评论(0) 推荐(0)
摘要:Problem DescriptionFish likes to take photo with his friends. Several days ago, he found that some pictures of him were damaged. The trouble is that t... 阅读全文
posted @ 2015-05-18 16:59 Painting、时光 阅读(193) 评论(0) 推荐(0)
摘要:Description在n*n(1 #include#includeusing namespace std;int tot,n;int c[100];int vis[100];int path[100];bool flag; void dfs(int cur){ if(cur == n + 1... 阅读全文
posted @ 2015-05-17 20:26 Painting、时光 阅读(391) 评论(0) 推荐(0)
摘要:Problem DescriptionAfter losing all his chips when playing Texas Hold'em with Fsygd on the way to ZJOI2015, ZCC has just learned a black technology. N... 阅读全文
posted @ 2015-05-17 20:14 Painting、时光 阅读(222) 评论(0) 推荐(0)
摘要:Description多组测试数据 给你一棵树,n个点(n#include#include#includeusing namespace std;const int maxn = 10100;int mark[maxn],cot[maxn];vector G[10100];int dfs(int r... 阅读全文
posted @ 2015-05-14 00:10 Painting、时光 阅读(175) 评论(0) 推荐(0)
摘要:输入一个n,以及n个数据,输出最长的不下降的子序列大意:有两种思路:1.O(n^2)想法用一个num来记录以该数字为末数字的长度用一个if限制两个条件,后面小于前面并且后面的长度大于前面的长度+1那么说明需要更新了,最后只要遍历所有的数字在num中看以那个数字为开始点的长度最长。这个比较好理解#in... 阅读全文
posted @ 2015-05-13 19:39 Painting、时光 阅读(252) 评论(0) 推荐(0)
摘要:本文主要是由Wiskey大神的博客的结合少许个人的总结,传送门概念:状态压缩是以二进制来保存每一个的状态,比如总共的物品有n件,那么我一共的状态有2^n次,最大的状态用二进制表示为11....n个1...11,经常得到这样的状态转移方程dp[11001] = dp[10001] + dp[11000... 阅读全文
posted @ 2015-05-13 00:38 Painting、时光 阅读(256) 评论(0) 推荐(0)
摘要:DescriptionLet us define a regular brackets sequence in the following way:Empty sequence is a regular sequence.If S is a regular sequence, then (S) an... 阅读全文
posted @ 2015-05-12 21:44 Painting、时光 阅读(133) 评论(0) 推荐(0)
摘要:DescriptionThe railway line “Yekaterinburg-Sverdlovsk” with several stations has been built. This railway line can be represented as a line segment, r... 阅读全文
posted @ 2015-05-12 20:20 Painting、时光 阅读(202) 评论(0) 推荐(0)
摘要:DescriptionOnce upon a time an Eagle made a nest on the roof of a very large building. Time went by and some eggs appeared in the nest. There was a su... 阅读全文
posted @ 2015-05-12 19:29 Painting、时光 阅读(285) 评论(0) 推荐(0)
摘要:DescriptionMr. F. wants to get a document be signed by a minister. A minister signs a document only if it is approved by his ministry. The ministry is... 阅读全文
posted @ 2015-05-12 16:32 Painting、时光 阅读(130) 评论(0) 推荐(0)
摘要:DescriptionYou are given a number 1 ≤N≤ 50. Every ticket has its 2N-digit number. We call a ticket lucky, if the sum of its firstNdigits is equal to t... 阅读全文
posted @ 2015-05-12 15:21 Painting、时光 阅读(133) 评论(0) 推荐(0)
摘要:DescriptionThe owner of a casino for New Russians has a very refined sense of beauty. For example, after a game there remain two piles with the same n... 阅读全文
posted @ 2015-05-12 14:32 Painting、时光 阅读(197) 评论(0) 推荐(0)
摘要:DescriptionLet's remember one old joke:Once a gentleman said to another gentleman:— What if we play cards?— You know, I haven't played cards for ten y... 阅读全文
posted @ 2015-05-12 14:01 Painting、时光 阅读(216) 评论(0) 推荐(0)
摘要:DescriptionKolya has returned from a summer camp and now he's a realcommunication fiend. He spends all his free time on the Web chatting with his frie... 阅读全文
posted @ 2015-05-12 12:14 Painting、时光 阅读(136) 评论(0) 推荐(0)
摘要:DescriptionGiven set of line segments [Li, Ri] with integer coordinates of their end points. Your task is to find the minimal subset of the given set ... 阅读全文
posted @ 2015-05-11 16:56 Painting、时光 阅读(200) 评论(0) 推荐(0)
摘要:DescriptionConsider all the sequences with length (0#include#includeusing namespace std;int dp[45][2];int main(){ int n,k; dp[1][0] = dp[1][1]= ... 阅读全文
posted @ 2015-05-10 20:41 Painting、时光 阅读(193) 评论(0) 推荐(0)
摘要:DescriptionThe student Vasechkin was terribly unlucky at his oral examination. Of 42 examination questions, he didn't prepare only the last one, and h... 阅读全文
posted @ 2015-05-10 19:58 Painting、时光 阅读(200) 评论(0) 推荐(0)
摘要:DescriptionBackgroundWe wandered in the labyrinth for twenty minutes before finally entering the large hall. The walls were covered by mirrors here as... 阅读全文
posted @ 2015-05-10 14:35 Painting、时光 阅读(154) 评论(0) 推荐(0)
摘要:Problem DescriptionThere is a piece of paper in front of Tom, its length and width are integer. Tom knows the area of this paper, he wants to know the... 阅读全文
posted @ 2015-05-09 21:43 Painting、时光 阅读(173) 评论(0) 推荐(0)
摘要:DescriptionRest at the sea is wonderful! However, programmer Pasha became awfully bored of lying on a beach in Turkey; so bored that he decided to cou... 阅读全文
posted @ 2015-05-09 18:58 Painting、时光 阅读(237) 评论(0) 推荐(0)
摘要:DescriptionOne curious child has a set ofNlittle bricks (5 ≤N≤ 500). From these bricks he builds different staircases. Staircase consists of steps of ... 阅读全文
posted @ 2015-05-08 21:50 Painting、时光 阅读(266) 评论(0) 推荐(0)
摘要:DescriptionThere live square people in a square country. Everything in this country is square also. Thus, the Square Parliament has passed a law about... 阅读全文
posted @ 2015-05-08 20:27 Painting、时光 阅读(145) 评论(0) 推荐(0)
摘要:Programmers working on a large project have just received a task to write exactlymlines of code. There arenprogrammers working on a project, thei-th o... 阅读全文
posted @ 2015-05-08 19:12 Painting、时光 阅读(158) 评论(0) 推荐(0)
摘要:A map of some object is a rectangular field consisting ofnrows andncolumns. Each cell is initially occupied by the sea but you can cover some some cel... 阅读全文
posted @ 2015-05-08 17:57 Painting、时光 阅读(138) 评论(0) 推荐(0)
摘要:You are given a stringq. A sequence ofkstringss1, s2, ..., skis calledbeautiful, if the concatenation of these strings is stringq(formally,s1 + s2 + .... 阅读全文
posted @ 2015-05-08 17:53 Painting、时光 阅读(143) 评论(0) 推荐(0)
摘要:来自杰哥的模板/* 高精度模版 含大数开平方*/#include #include #include #include #include #include using namespace std;const int numlen = 105; // 位数int max(int a, int b... 阅读全文
posted @ 2015-05-08 16:54 Painting、时光 阅读(169) 评论(0) 推荐(1)
摘要:DescriptionLet’s considerK-based numbers, containing exactlyNdigits. We define a number to be valid if itsK-based notation doesn’t contain two success... 阅读全文
posted @ 2015-05-08 16:41 Painting、时光 阅读(151) 评论(0) 推荐(0)
摘要:DescriptionIf two people were born one after another with one second difference and one of them is a child, then the other one is a child too. We get ... 阅读全文
posted @ 2015-05-07 14:55 Painting、时光 阅读(185) 评论(0) 推荐(0)
摘要:DescriptionVasya is the beginning mathematician. He decided to make an important contribution to the science and to become famous all over the world. ... 阅读全文
posted @ 2015-05-07 13:12 Painting、时光 阅读(170) 评论(0) 推荐(0)
摘要:DescriptionFunctioning of a scientific conference is usually divided into several simultaneous sections. For example, there may be a section on parall... 阅读全文
posted @ 2015-05-06 22:06 Painting、时光 阅读(262) 评论(0) 推荐(0)
摘要:DescriptionGiven a 2-dimensional array of positive and negative integers, find the sub-rectangle with the largest sum. The sum of a rectangle is the s... 阅读全文
posted @ 2015-05-06 21:30 Painting、时光 阅读(131) 评论(0) 推荐(0)
摘要:DescriptionMany of SKB Kontur programmers like to get to work by Metro because the main office is situated quite close the station Uralmash. So, since... 阅读全文
posted @ 2015-05-06 20:31 Painting、时光 阅读(179) 评论(0) 推荐(0)
摘要:DescriptionLet’s considerK-based numbers, containing exactlyNdigits. We define a number to be valid if itsK-based notation doesn’t contain two success... 阅读全文
posted @ 2015-05-06 19:41 Painting、时光 阅读(135) 评论(0) 推荐(0)
摘要:DescriptionOn the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue and red c... 阅读全文
posted @ 2015-05-06 19:11 Painting、时光 阅读(265) 评论(0) 推荐(0)
摘要:DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (... 阅读全文
posted @ 2015-05-06 18:29 Painting、时光 阅读(245) 评论(0) 推荐(0)
摘要:Problem DescriptionMiceren likes exploration and he found a huge labyrinth underground!This labyrinth hasNcaves and some tunnels connecting some pairs... 阅读全文
posted @ 2015-05-05 15:45 Painting、时光 阅读(171) 评论(0) 推荐(0)
摘要:Problem DescriptionCloud and Miceren like watching movies.Today, they want to choose some wonderful scenes from a movie. A movie hasNscenes can be cho... 阅读全文
posted @ 2015-05-05 13:53 Painting、时光 阅读(194) 评论(0) 推荐(0)
摘要:Problem DescriptionBrotherK is very rich. He has a big company.One day, BrotherK wants to give an award to one of the employees in the company. It's s... 阅读全文
posted @ 2015-05-04 21:05 Painting、时光 阅读(177) 评论(0) 推荐(0)
摘要:拓扑排序是对ADG(有向无环图进行线性排序)模板:二维数组模拟链表#include#include#include#includeusing namespace std;int indegree[100];queue q;int n,m;bool map[100][100];int a[100];i... 阅读全文
posted @ 2015-05-01 20:26 Painting、时光 阅读(249) 评论(0) 推荐(0)
摘要:DescriptionJohn never knew he had a grand-uncle, until he received the notary's letter. He learned that his late grand-uncle had gathered a lot of mon... 阅读全文
posted @ 2015-05-01 16:33 Painting、时光 阅读(148) 评论(0) 推荐(0)
摘要:找钱问题描述:与背包问题不同,找钱问题是结果必须是把容量全部装满一.用的钱的最大最小数目把空间开大,所需求的dp值只是其中的一种特殊情况而已1.01背包模型,每种货币只能用一次最小求法#include#include#includeusing namespace std;int dp[50000],... 阅读全文
posted @ 2015-05-01 16:06 Painting、时光 阅读(350) 评论(0) 推荐(0)
摘要:DescriptionFarmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the sma... 阅读全文
posted @ 2015-05-01 14:41 Painting、时光 阅读(186) 评论(0) 推荐(0)