码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
zoj 3820
树的直径是指树的最长简单路。求法: 两遍BFS :先任选一个起点BFS找到最长路的终点,再从终点进行BFS,则第二次BFS找到的最长路即为树的直径; 原理: 设起点为u,第一次BFS找到的终点v一定是树的直径的一个端点 证明: 1) 如果u 是直径上的点,则v显然是直径的终点(因为如果v不是的话,则...
分类:其他好文   时间:2014-10-17 00:26:23    阅读次数:235
zoj 3367 Counterfeit Money(dp)
先搞定这题。ZOJ1985 Largest Rectangle in a Histogram再做这题。先枚举第二个矩形对第一个矩形的偏移量(x,y),再进行2维DP,复杂度为O(n^2 *n^2),即O(n^4).#include using namespace std;const int maxn...
分类:其他好文   时间:2014-10-17 00:07:53    阅读次数:405
zoj 3822 Domination (概率DP)
Domination Time Limit: 8 Seconds      Memory Limit: 131072 KB      Special Judge Edward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his fr...
分类:其他好文   时间:2014-10-16 19:51:23    阅读次数:325
zoj 3329 One Person Game (概率DP )
One Person Game Time Limit: 1 Second      Memory Limit: 32768 KB      Special Judge There is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 ha...
分类:其他好文   时间:2014-10-16 19:09:22    阅读次数:268
2014ACM/ICPC亚洲区域赛牡丹江站现场赛-K ( ZOJ 3829 ) Known Notation
Known Notation Time Limit: 2 Seconds      Memory Limit: 65536 KB Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also k...
分类:其他好文   时间:2014-10-16 03:40:51    阅读次数:191
BZOJ 3540 realtime-update 解题
分析一下题意,大约是给定一串牛,然后找到一个跨越距离最长的牛子串使得在这个范围内白牛和花牛一样多. 白牛可以任意涂成花牛.既然"白牛可以任意涂成花牛",那么我们需要找到一个最长的子串使得长度为偶且白牛数>=花牛.注意这里的"最长"不指元素个数最多.按照牛们排个序,那么就在一条线上了.然后...细节明...
分类:其他好文   时间:2014-10-16 01:52:11    阅读次数:167
ZOJ 3829 贪心 思维题
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3829 现场做这道题的时候,感觉是思维题,自己智商不够,不敢搞,想着队友智商好,他们搞吧,但是没出来这题...... 以后任何时候,都自信点....该想的还是好好自己想,这类题感觉就是先去找性质,然后一点点找规律,如果必要的话,自己提出一点猜想,然后如果自己举不出来反例,...
分类:其他好文   时间:2014-10-16 01:14:11    阅读次数:191
2014ACM/ICPC亚洲区域赛牡丹江站现场赛-I ( ZOJ 3827 ) Information Entropy
Information Entropy Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Information Theory is one of the most popular courses in Marjar University. In this course, there is an...
分类:其他好文   时间:2014-10-16 01:01:15    阅读次数:334
2014ACM/ICPC亚洲区域赛牡丹江站现场赛-A ( ZOJ 3819 ) Average Score
Average Score Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob is a freshman in Marjar University. He is clever and diligent. However, he is not good at math, especially in Mathematical A...
分类:其他好文   时间:2014-10-16 00:48:01    阅读次数:428
ACM学习历程——ZOJ 3829 Known Notation (2014牡丹江区域赛K题)(策略,栈)
DescriptionDo you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also known as post...
分类:其他好文   时间:2014-10-16 00:15:21    阅读次数:587
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!