
dfs
AllBLue1117
这个作者很懒,什么都没留下…
展开
-
SDUT3524 友谊的小船
题目链接:http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=3524&cid=1741 第一次写博客,在校集训队可能算是比较晚的了,但是已经下定决心要做好ACM(受到了很大的刺激。。),就先拿这道前几天机试的水题写一下吧! 题目描述算是比较啰嗦的了,简单来说就是给定n个整数(A1,A2,..An),从第一个数(假设下标为i)开始往后选择第i*2原创 2016-05-05 21:58:18 · 726 阅读 · 0 评论 -
数据结构实验之图论四:迷宫探索
数据结构实验之图论四:迷宫探索 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 有一个地下迷宫,它的通道都是直的,而通道所有交叉点(包括通道的端点)上都有一盏灯和一个开关;请问如何从某个起点开始在迷宫中点亮所有的灯并回到起点? Input 连续T组数据输入,原创 2016-11-14 11:33:57 · 397 阅读 · 0 评论 -
SDUT 3363 数据结构实验之图论七:驴友计划m
题目链接 :http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=3363 数据结构实验之图论七:驴友计划 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 做为一个资深驴友,小新有一张珍原创 2016-05-09 19:55:42 · 473 阅读 · 0 评论 -
图的深度遍历
图的深度遍历 Time Limit: 1000MS Memory Limit: 65536KB Submit Statistic Problem Description 请定一个无向图,顶点编号从0到n-1,用深度优先搜索(DFS),遍历并输出。遍历时,先遍历节点编号小的。 Input 输入第一行为整数n(0 Output 输出有n行,对应n组输出,每行为原创 2016-11-09 10:59:52 · 471 阅读 · 0 评论 -
POJ 2488 A Knight's Journey
A Knight's Journey Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41039 Accepted: 13964 Description Background The knight is getting bored of seeing the原创 2016-08-03 10:44:47 · 317 阅读 · 0 评论 -
POJ 3083 C - Children of the Candy Corn
#include #include #include #include using namespace std; int sx, sy, ex, ey, d1,d2, n, m, next[4][2]={{-1,0},{0,1},{1,0},{0,-1}}; char s[40+5][40+5]; struct node { int x, y, step; };原创 2016-08-02 10:36:51 · 795 阅读 · 0 评论 -
POJ 2956 The Pilots Brothers' refrigerator
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23729 Accepted: 9147 Special Judge Description The game “The Pilots原创 2016-07-26 11:19:04 · 536 阅读 · 0 评论 -
POJ 1753 Flip Game
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 39989 Accepted: 17358 Description Flip game is played on a rectangular 4x4 field with two-sided p原创 2016-07-26 10:00:04 · 461 阅读 · 0 评论 -
贪心算法小白の人品测试
http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=3555&cid=1755 小白の人品测试 Time Limit: 1000MS Memory limit: 65536K 题目描述 现在有n个人,编号从1到n ,每个人有一个 人品值 这是一个赤裸裸的金钱关系的世界 如果小白想要小黑直接帮他一原创 2016-06-01 13:01:21 · 769 阅读 · 0 评论 -
SDUT 3297 奇妙的23点
题目链接 :http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=3297 奇妙的23点 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 题意很简单,给出5个数字,你可以使用 ‘ + ’ , ‘ - ’ ,原创 2016-05-14 21:43:25 · 402 阅读 · 0 评论