18XiWenjuan
18XiWenjuan
全部文章
搜索
dp(29)
MFC(5)
STL(6)
分治(2)
博弈(6)
图论(39)
字符串(4)
思想(14)
思维(33)
数据结构(12)
数论(45)
日常小技巧(1)
暴力|模拟(30)
未归档(12)
水|坑(23)
深度学习(2)
计算几何(6)
计蒜客(1)
赛后补题(22)
题解(2)
归档
标签
去牛客网
登录
/
注册
18XiWenjuan的博客
Hello World
全部文章
/ 搜索
(共10篇)
n皇后(dfs)
Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量。 Ou...
2020-09-21
0
644
POJ - 1321 棋盘问题(搜索)
在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示...
2020-09-21
0
499
POJ - 2251 Dungeon Master(搜索)
You 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....
2020-09-21
0
477
POJ - 3278 Catch That Cow (搜索)
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 numb...
2020-09-21
0
697
POJ - 1426 Find The Multiple (暴力搜索)
Given 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 m...
2020-09-21
0
505
POJ - 3126 Prime Path (搜索)
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 r...
2020-09-21
0
686
POJ - 3087 Shuffle'm Up(搜索)
A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker c...
2020-09-21
0
460
POJ - 3414 Pots (bfs+路径标记)
You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i ...
2020-09-21
0
517
POJ - 3984 迷宫问题(bfs+路径标记)
定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横...
2020-09-21
0
441
ICPC North Central NA Contest 2017 E Is-A? Has-A? Who Knowz-A?(搜索 || floyd传递闭包)
Two familiar concepts in object oriented programming are the is-a and has-a relationships. Given two classes A and B, we say that A is-a B if A is a s...
2020-09-21
0
551