码迷,mamicode.com
首页 >  
搜索关键字:zoj 3456    ( 3447个结果
UESTC 2014 Summer Training #3 Div.2
(更新中)A:ZOJ 3611BFS+状态压缩【题意】:给定一张n*m的图,图上每个点有如下情况:L,R,D,U:代表在该点上只能往它已经给定的方向前进。#,W:不能走到该点。$:走到该点,可以花两分钟得到一分值,然后可以从该点向任意方向走。0:走到该点后可以向任意方向走。然后给你起点和终点坐标,问...
分类:其他好文   时间:2014-07-19 00:01:21    阅读次数:269
ZOJ 1610 Count the Colors
线段树:延伸标记+暴力更新 记得刚学线段树的时候做这题WA了一版。。。。。现在分分钟搞定。。。。 Count the Colors Time Limit: 2 Seconds      Memory Limit: 65536 KB Painting some colored segments on a line, some previously painted segm...
分类:其他好文   时间:2014-07-18 23:07:26    阅读次数:330
ZOJ 2334 HDU 1512 Monkey King
题意: 猴子们打架 认识的猴子不会打架 两只猴子打完以后就认识了 A认识B B认识C A也认识C 每次打架由两伙猴子进行 分别选出自己的最高战斗力 在战斗之后两只猴子战斗力减半 给出m次打架 输出打架后这一伙猴子里的最强战斗力 思路: 判断两只猴子是不是一伙的 用到并查集 快速找出一伙猴子中的最强战斗力用到堆 但打完架两伙猴子合并时堆需要nlogn复杂度 因此用左偏树代替堆...
分类:其他好文   时间:2014-07-18 22:37:45    阅读次数:235
ZOJ 2771
DescriptionConsidering a light entering three adjacent planes of glass.At any meeting surface, the light may either reflect or continue straight throu...
分类:其他好文   时间:2014-07-18 21:11:27    阅读次数:207
ZOJ 3527
这题难在破环。对于不是环的情况,只需按照一般的树形DP来做,一步一步往根递推就可以了。对于环,则枚举其中一点的两种情况,取或不取,然后再递推,就可以了。当到达某结点的下一结点为环开始的点时,退出即可。 1 #include 2 #include 3 #include 4 #include 5...
分类:其他好文   时间:2014-07-18 16:24:37    阅读次数:201
ZOJ 2965 Accurately Say CocaCola
A - Accurately Say "CocaCola"!DescriptionIn a party held by CocaCola company, several students stand in a circle and play a game.One of them...
分类:其他好文   时间:2014-07-18 00:01:04    阅读次数:239
Zoj 3088 Easter Holidays SPFA+枚举
其实就是枚举最高点和起点,然后以最高点为源点在两张图上分别做spfa。一遍最短路,一遍最长路。暴露出来的问题:思维不够清晰,代码能力还不够#include #include #include #include #include #include #include #include #include ...
分类:其他好文   时间:2014-07-17 18:16:43    阅读次数:206
ZOJ 1649
这题要用BFS去做,要注意的是’x‘,这里可以有优先队列去做,会很简单;另一个要注意的是,a只有一个,r可能有很多个,所以可以用a去找最接近的r;#include #include #include "string.h"using namespace std;struct step{ int x,y...
分类:其他好文   时间:2014-07-17 18:13:36    阅读次数:180
zoj 1037 Gridland (简单)
GridlandTime Limit:2 Seconds Memory Limit:65536 KBBackgroundFor years, computer scientists have been trying to find efficient solutions to different c...
分类:其他好文   时间:2014-07-17 18:12:39    阅读次数:247
ZOJ 1008
这一题用了DFS对每一种方法进行尝试,直到有一种成功的就possible;#include #include "string.h"using namespace std;int diff;int card[26][4]; //用于记录不同卡片的上、右、下、左、方向的数字int ca...
分类:其他好文   时间:2014-07-16 15:21:44    阅读次数:201
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!