zoj 3652 Maze】的更多相关文章

Maze Time Limit: 2 Seconds      Memory Limit: 65536 KB Celica is a brave person and believer of a God in the bright side. He always fights against the monsters that endanger humans. One day, he is asked to go through a maze to do a important task. Th…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4842 要注意题目中两点: 1.在踏入妖怪控制的区域那一刹那,先减行动力,然后才能杀妖怪 2.在妖怪控制区域行动力也会恢复 3.妖怪也许不在自己的控制区域 #include <cstdio> #include <cstring> #include <algorithm> #include <queue> using namespace st…
L - One-Dimensional Maze Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3992 Description BaoBao is trapped in a one-dimensional maze consisting of \(n\) grids arranged in a row! The grids are num…
主题链接: PKU:http://poj.org/problem?id=3652 ZJU:http://acm.zju.edu.cn/onlinejudge/showProblem.do? problemId=1933 HDU:http://acm.hdu.edu.cn/showproblem.php?pid=2721 Description WhatNext Software creates sequence generators that they hope will produce fai…
poj 2096 题目:http://poj.org/problem?id=2096 f[ i ][ j ] 表示收集了 i 个 n 的那个. j 个 s 的那个的期望步数. #include<cstdio> #include<cstring> #include<algorithm> #define db double using namespace std; ; db n,s,f[N][N]; int main() { scanf("%lf%lf"…
题意: 一条长度为n的直线,你一开始在位置m上 其中每个整点都有一个字符'L'或'R',如果是'L'那么你必须往左走一步,否则往右走一步 如果你到达位置1或位置n你任务就完成了 不过有可能你永远到不了1或n,比如RRRRLLLL这样的情况 但你可以修改字符,求能完成任务的最小修改次数 思路: 如果往右走,碰到左转就变成右转,计算L的个数即可,反之也是 左右端点不计入结果 代码: #include<iostream> #include<cstdio> using namespace…
题目传送门 /* BFS+模拟:dp[i][j][p] 表示走到i,j,方向为p的步数为多少: BFS分4种情况入队,最后在终点4个方向寻找最小值:) */ #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <queue> using namespace std; ; cons…
转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并查集======================================[HDU]1213   How Many Tables   基础并查集★1272   小希的迷宫   基础并查集★1325&&poj1308  Is It A Tree?   基础并查集★1856   More i…
POJ 2251 Dungeon Master /UVA 532 Dungeon Master / ZOJ 1940 Dungeon Master(广度优先搜索) Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It ta…
Mission Impossible Time Limit: 2 Seconds                                     Memory Limit: 65536 KB                                         Now a spy is besieged in a maze. He knows that there is a telegraph transmitter  in the maze somewhere. So he…