题目链接:http://poj.org/problem?id=1556 Time Limit: 1000MS Memory Limit: 10000K Description You are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y…
Time Limit: 8000MS Memory Limit: 262144K Total Submissions: 17538 Accepted: 5721 Description In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate th…
棋盘游戏 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3328 Accepted Submission(s): 1965 Problem Description 小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格…
B. Legacy 题目连接: http://codeforces.com/contest/786/problem/B Description Rick and his co-workers have made a new radioactive formula and a lot of bad guys are after them. So Rick wants to give his legacy to Morty before bad guys catch them. There are…
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4725 有n个点,每个点都有一个层l[i],相邻层的边有一条无向带权边,权值为都为C,另外还有m条边,每条边对应的u v w 最后求1到n的最小权值和是多少: 如果直接建图的话会TLE:这里把层数扩展为点n+1----n+n:然后在连接各种关系对应的图,最后用spfa求最短路即可,注意扩点之后点的个数: #include <iostream> #include <stdio.h…
题目:option=com_onlinejudge&Itemid=8&page=show_problem&problem=1008">uva10067 Playing with Wheels 题意:给出一个机器,有四个循环的轮子.见图,然后给出一个初始数和目标数,然后期间不能出现的数字,每一分钟能够拨动一个数.问你最短须要的时间. 分析:这个题目能够转化为求图的最短路. 由于有对于一个当前状态.有8种能够转化为的状态,那么我们能够把每一种状态转化为一个点,然后状态之…
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1384 Intervals Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4841 Accepted Submission(s): 1815 Problem Description You are given n closed, in…
The Shortest Path in Nya Graph Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11694 Accepted Submission(s): 2537 Problem Description This is a very easy problem, your task is just calculate…