上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 39 下一页
摘要: You are given strings. Your task is to determine if the given stringscontains two non-overlapping substrings "AB" and "BA" (the substrings can go in a... 阅读全文
posted @ 2015-06-05 17:01 Painting、时光 阅读(264) 评论(0) 推荐(0) 编辑
摘要: You havenproblems. You have estimated the difficulty of thei-th one as integerci. Now you want to prepare a problemset for a contest, using some of th... 阅读全文
posted @ 2015-06-05 16:59 Painting、时光 阅读(295) 评论(0) 推荐(0) 编辑
摘要: Problem Description给定序列A={A1,A2,...,An}, 要求改变序列A中的某些元素,形成一个严格单调的序列B(严格单调的定义为:Bi= temp a[i]即使小到最小仍旧比后面一个数大,说明不可行3.其他情况为了保证严格递增 temp--二分左闭右开#include#inc... 阅读全文
posted @ 2015-06-02 21:30 Painting、时光 阅读(289) 评论(0) 推荐(0) 编辑
摘要: Problem Description传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子。这可是一件大事,关系到人民的住房问题啊。村里共有n间房间,刚好有n家老百姓,考虑到每家都要有房住(如果有老百姓没房子住的话,容易引起不安定因素),每家必须分配到一间房子且只能得到一... 阅读全文
posted @ 2015-06-02 14:39 Painting、时光 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 匈牙利算法(hungary)详解请看http://philoscience.iteye.com/blog/1754498匈牙利算法是用来计算最大匹配,用了增广路思想增广路径有如下特性:1. 有奇数条边2. 起点在二分图的X边,终点在二分图的Y边3. 路径上的点一定是一个在X边,一个在Y边,交错出现。... 阅读全文
posted @ 2015-06-01 21:57 Painting、时光 阅读(776) 评论(0) 推荐(0) 编辑
摘要: 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、时光 阅读(679) 评论(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、时光 阅读(121) 评论(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、时光 阅读(188) 评论(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、时光 阅读(181) 评论(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、时光 阅读(391) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 39 下一页