poj
luxxxxxxx_
这个作者很懒,什么都没留下…
展开
-
poj 3723 Conscription 最小生成树
Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to be his soldiers. To collect a soldier without any privilege,转载 2018-02-06 18:36:18 · 181 阅读 · 0 评论 -
POJ 3278 Catch That Cow 【bfs+队列】
Input Line 1: Two space-separated integers: N and K Output Line 1: The least amount of time, in minutes, it takes for Farmer John to catch the fugitive cow. Sample Input 5 17 Sample Ou转载 2018-02-06 21:43:06 · 122 阅读 · 0 评论 -
poj 3614
Language: DefaultSunscreenTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4499 Accepted: 1565DescriptionTo avoid unsightly burns while tanning, each of the C (1 ≤ C ≤ 2500) cows must cover h...原创 2018-03-17 12:03:54 · 154 阅读 · 0 评论 -
POJ 1979
.代表黑格子,#代表红格子,@代表人的位置。只能在黑格子上移动,首先我们找到人的位置,然后dfs一次,把黑格子替换成红格子。每dfs一次,一个黑格子就变成红格子。直至所有的可以行走的黑格子变成红格子后,结果就出来了。深搜就是一直往前不行回退#include<cstdio> int W, H; char map[21][21]; int dx[4] = { 0, 0, 1, -1 };/...原创 2018-03-29 15:33:45 · 155 阅读 · 0 评论