
搜索
星辰浩宇
路在脚下
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ-1321 棋盘问题
问题描述:在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。输入:输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及摆放棋子的数目。 n <= 8 , k...原创 2019-04-06 20:17:17 · 232 阅读 · 0 评论 -
FZU - 2150 Fire Game
Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and then they start...原创 2019-04-09 21:04:56 · 780 阅读 · 0 评论 -
POJ - 3414 Pots (BFS+二维数组)
You are given two pots, having the volume ofAandBliters respectively. The following operations can be performed:FILL(i) fill the poti(1 ≤i≤ 2) from the tap; DROP(i) empty the po...原创 2019-04-09 19:32:02 · 299 阅读 · 0 评论 -
POJ-3126 Prime Path (BFS数组)
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter of se...原创 2019-04-08 19:47:40 · 130 阅读 · 0 评论 -
Find The Multiple poj-1426
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 greate...原创 2019-04-08 15:43:54 · 114 阅读 · 0 评论 -
POJ 3279 Fliptile(二进制搜索)
FliptileDescriptionFarmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which they manipulate an M × ...原创 2019-04-08 14:22:29 · 187 阅读 · 0 评论 -
POJ2251:Dungeon Master(BFS三维)
DescriptionYou 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 takes one minute to move one unit ...原创 2019-04-07 21:41:04 · 181 阅读 · 0 评论 -
POJ 3278 Catch That Cow 【bfs+dp】
Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 32679Accepted: 10060DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediatel...原创 2019-04-07 21:38:56 · 218 阅读 · 0 评论 -
五子棋
#include<bits/stdc++.h>using namespace std;const int N=25; int a[N][N];/*int check1(int i,int j)//检验左方向{ if(a[i][j-1]>=1&&a[i][j-2]>=1&&a[i][j-3]>=1&&a[i]...原创 2019-04-06 22:15:49 · 162 阅读 · 0 评论 -
路径之谜(dfs)
路径之谜小明冒充X星球的骑士,进入了一个奇怪的城堡。城堡里边什么都没有,只有方形石头铺成的地面。假设城堡地面是 n x n 个方格。【如图1.png】所示。按习俗,骑士要从西北角走到东南角。可以横向或纵向移动,但不能斜着走,也不能跳跃。每走到一个新方格,就要向正北方和正西方各射一箭。(城堡的西墙和北墙内各有 n 个靶子)同一个方格只允许经过一次。但不必走完所有的方格。...原创 2019-05-22 17:10:28 · 399 阅读 · 1 评论