随笔分类 -  其他 暴力

1
摘要:1001 区间的价值: RMQ+扫描法 我们预处理RMQ求任意区间的最大值 预处理出以a[i]为最小值 能向左延伸 向右延伸的 L[i], R[i] 那么对于 一个答案 (L[i], R[i]) *rmq(L[i],R[i]) 为此长度的答案,我们可以发现他是可以更新到小于其长度的所有长度答案的,更 阅读全文
posted @ 2016-05-22 16:48 meekyan 阅读(1282) 评论(4) 推荐(0)
摘要:C. New Year and DominoThey say "years are like dominoes, tumbling one after the other". But would a year fit into a grid? I don't think so.Limak is a ... 阅读全文
posted @ 2015-12-31 23:54 meekyan 阅读(383) 评论(0) 推荐(0)
摘要:GTW likes functionMemory Limit: 131072/131072 K (Java/Others)问题描述现在给出下列两个定义: f(x)=f_{0}(x)=\sum_{k=0}^{x}(-1)^{k}2^{2x-2k}C_{2x-k+1}^{k},f_{n}(x)=f(f_... 阅读全文
posted @ 2015-12-13 13:34 meekyan 阅读(364) 评论(0) 推荐(0)
摘要:A. Vasya and FootballVasya has started watching football games. He has learned that for some fouls the players receive yellow cards, and for some foul... 阅读全文
posted @ 2015-11-19 22:18 meekyan 阅读(206) 评论(0) 推荐(0)
摘要:题意:求给出图的表面积,不包括底面///1085422276#includeusing namespace std ;typedef long long ll;#define mem(a) memset(a,0,sizeof(a))#define meminf(a) memset(a,127,siz... 阅读全文
posted @ 2015-11-19 14:18 meekyan 阅读(191) 评论(0) 推荐(0)
摘要:Dancing Stars on MeProblem DescriptionThe sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observ... 阅读全文
posted @ 2015-11-19 14:08 meekyan 阅读(352) 评论(0) 推荐(0)
摘要:Almost Sorted ArrayProblem DescriptionWe are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, ... 阅读全文
posted @ 2015-11-19 14:04 meekyan 阅读(443) 评论(0) 推荐(0)
摘要:A. 2CharAndrew often reads articles in his favorite magazine 2Char. The main feature of these articles is that each of them uses at most two distinct ... 阅读全文
posted @ 2015-11-05 12:39 meekyan 阅读(268) 评论(0) 推荐(0)
摘要:B. Dreamoon and WiFiDreamoon is standing at the position0on a number line. Drazil is sending a list of commands through Wi-Fi to Dreamoon's smartphone... 阅读全文
posted @ 2015-11-02 15:53 meekyan 阅读(625) 评论(0) 推荐(0)
摘要:B. The Child and SetAt the children's day, the child came to Picks's house, and messed his house up. Picks was angry at him. A lot of important things... 阅读全文
posted @ 2015-10-31 00:49 meekyan 阅读(239) 评论(0) 推荐(0)
摘要:H - SudokuDescriptionYi Sima was one of the best counselors of Cao Cao. He likes to play a funny game himself. It looks like the modern Sudoku, but sm... 阅读全文
posted @ 2015-10-30 20:00 meekyan 阅读(636) 评论(0) 推荐(0)
摘要:E. Three StatesThe famous global economic crisis is approaching rapidly, so the states of Berman, Berance and Bertaly formed an alliance and allowed t... 阅读全文
posted @ 2015-10-30 15:50 meekyan 阅读(225) 评论(0) 推荐(0)
摘要:GT and setAccepts: 35Submissions: 194Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)问题描述有NN个集合,每个集合中有A_iA​i​​个数。你要将这NN... 阅读全文
posted @ 2015-10-21 18:28 meekyan 阅读(343) 评论(0) 推荐(0)
摘要:GT and numbers问题描述给出两个数NN和MM。NN每次可以乘上一个自己的因数变成新的NN。求最初的NN到MM至少需要几步。如果永远也到不了输出-1−1。输入描述第一行读入一个数TT表示数据组数。接下来TT行,每行两个数NN和MM。T\leq1000T≤1000, 1\leq N \leq... 阅读全文
posted @ 2015-10-19 21:14 meekyan 阅读(202) 评论(0) 推荐(0)
摘要:D. Once Again...You are given an array of positive integersa1, a2, ..., an × Tof lengthn × T. We know that for ... 阅读全文
posted @ 2015-10-05 17:25 meekyan 阅读(484) 评论(0) 推荐(0)
摘要:描述给定n个关于X的不等式,问最多有多少个成立。每个不等式为如下的形式之一:X CX >= C输入第一行一个整数n。以下n行,每行一个不等式。数据范围:1 0样例输出2题目并没有要求X一定是整数。所以如果算法是枚举X然后统计成立的不等式数目的话,需要每次+0.5枚举所有可能X。//作者:10854... 阅读全文
posted @ 2015-08-30 22:00 meekyan 阅读(321) 评论(0) 推荐(0)
摘要:G -Good elementsTime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87954#problem/GDescriptionYou are give... 阅读全文
posted @ 2015-08-16 00:15 meekyan 阅读(187) 评论(0) 推荐(0)
摘要:F. The Pool for Lucky OnesTime Limit: 20 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100637/problem/FDescriptionA new swimming pool has been ... 阅读全文
posted @ 2015-07-25 00:53 meekyan 阅读(275) 评论(0) 推荐(0)
摘要:D. Equivalent StringsTime Limit: 2 SecMemory Limit: 256 MB题目连接http://codeforces.com/contest/559/problem/BDescriptionToday on a lecture about strings G... 阅读全文
posted @ 2015-07-23 02:06 meekyan 阅读(219) 评论(0) 推荐(0)
摘要:EvilTime Limit: 5 SecMemory Limit: 256 MB题目连接http://codeforces.com/gym/100463/attachmentsDescriptionRichard is evil. He wants to give another geometry... 阅读全文
posted @ 2015-07-21 21:45 meekyan 阅读(235) 评论(4) 推荐(0)

1