
搜索
我会魔法丶
nul
展开
-
POJ - 1426 Find The Multiple (dfs)
题目:Find The MultipleGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not grea...原创 2019-03-26 09:59:50 · 156 阅读 · 0 评论 -
POJ - 1011 Sticks(dfs+剪枝)
题目:SticksGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks ...原创 2019-03-26 14:09:12 · 167 阅读 · 0 评论 -
POJ - 1321 棋盘问题(dfs)
题目:棋盘问题在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k...原创 2019-03-26 22:52:13 · 157 阅读 · 0 评论 -
OpenJ_Bailian - 4103 踩方格(dfs)
题目链接:https://vjudge.net/problem/OpenJ_Bailian-4103AC代码#include <iostream>#include <cstdio>#include <fstream>#include <algorithm>#include <cmath>#include <deque...原创 2019-03-27 23:36:22 · 187 阅读 · 0 评论 -
OpenJ_Bailian - 2815 城堡问题(dfs+染色)
题目链接:https://vjudge.net/problem/OpenJ_Bailian-2815AC代码#include <iostream>#include <cstdio>#include <fstream>#include <algorithm>#include <cmath>#include <deque...原创 2019-03-27 23:44:28 · 208 阅读 · 0 评论 -
POJ - 3984 迷宫问题(染色+dfs)
题目链接:https://vjudge.net/problem/POJ-3984题解:没有用到队列,和小队里的人探讨了一下,想了一个染色+dfs的方法AC代码#include <iostream>#include <cstdio>#include <fstream>#include <algorithm>#include &l...原创 2019-04-09 22:26:56 · 363 阅读 · 0 评论 -
OpenJ_Bailian - 4001 Catch That Cow(简单bfs+优先队列)
Catch That CowDescriptions:Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow i...原创 2019-05-25 15:21:15 · 204 阅读 · 0 评论