ural 1221. Malevich Strikes Back!】的更多相关文章

1221. Malevich Strikes Back! Time limit: 1.0 secondMemory limit: 64 MB After the greatest success of Malevich's "Black Square" the famous artist decided to create a new masterpiece. He took a large sheet of checked paper and filled some cells wi…
http://acm.timus.ru/problem.aspx?space=1&num=1221 算是枚举的 题目意思是必须划出这样的 11011 10001 00000 10001 11011 注意中间必须是完整的0,不多不少,旁边的1也是如此 不多不少 才可以 题目很简单 预处理出1的个数 以及以当前0为最低顶角的最大正方形的边长 判断一下1的个数是否满足就可 #include <iostream> #include<cstdio> #include<cstri…
本来就是个很水的题  就是枚举起点长度然后直接判断就行了   但是比赛的时候写了个大bug 还找不出来     自己太水了 #include <cstdio> #include <cstring> using namespace std; int g[110][110]; int findd(int len, int x, int y) { int k = (y+len+y)/2; int r = 0; for(int i = 0; i <= len; i++) { for(…
1221: [HNOI2001] 软件开发 Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 1428  Solved: 791[Submit][Status][Discuss] Description 某软件公司正在规划一项n天的软件开发计划,根据开发计划第i天需要ni个软件开发人员,为了提高软件开发人员的效率,公司给软件人员提供了很多的服务,其中一项服务就是要为每个开发人员每天提供一块消毒毛巾,这种消毒毛巾使用一天后必须再做消毒处理后才能使用.消…
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串中心位置,RMQ询问LCP = min (height[rank[l]+1] to height[rank[r]]),注意的是RMQ传入参数最好是后缀的位置,因为它们在树上的顺序未知,且左边还要+1. #include <cstdio> #include <algorithm> #in…
2071. Juice Cocktails Time limit: 1.0 secondMemory limit: 64 MB Once n Denchiks come to the bar and each orders a juice cocktail. It could be from 1 to 3 different juices in each cocktail. There are three juices in the bar: apple, banana and pineappl…
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best programmer in the world! Now he regularly takes part in various programming contests, attentively listens to problems analysis and upsolves problems. But…
2070. Interesting Numbers Time limit: 2.0 secondMemory limit: 64 MB Nikolay and Asya investigate integers together in their spare time. Nikolay thinks an integer is interesting if it is a prime number. However, Asya thinks an integer is interesting i…
2069. Hard Rock Time limit: 1.0 secondMemory limit: 64 MB Ilya is a frontman of the most famous rock band on Earth. Band decided to make the most awesome music video ever for their new single. In that music video Ilya will go through Manhattan standi…
2068. Game of Nuts Time limit: 1.0 secondMemory limit: 64 MB The war for Westeros is still in process, manpower and supplies are coming to an end and the winter is as near as never before. The game of thrones is unpredictable so Daenerys and Stannis…