![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
深搜
欧莎
啦啦啦,啦啦啦,让我们一起洗刷刷
展开
-
左手定则
左手定则Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainSubmit Status PID: 4358玩过RPG(尤其是国产RPG)的童鞋都应该对迷宫这种神棍的设定深恶痛绝,尤其是当你转了半小时之后发转载 2016-05-01 10:53:05 · 3834 阅读 · 0 评论 -
hdu 5546 Ancient Go(dfs)
题目链接#include<stdio.h>#include<iostream>#include<algorithm>#include<string.h>#include<math.h>using namespace std;int t, vis[12][12], flag;char str[12][12];int dis[4][2]= {1,0,0,1,-1,0,0,-1};voi原创 2017-04-26 20:08:14 · 250 阅读 · 0 评论 -
hdu 5706 GirlCat(DFS)
Problem Description As a cute girl, Kotori likes playing Hide and Seek'' with cats particularly. Under the influence of Kotori, many girls and cats are playingHide and Seek” together. Koroti shots a原创 2017-05-03 19:15:07 · 396 阅读 · 0 评论 -
hdu 4771 Stealing Harry Potter's Precious(bfs+dfs)
Stealing Harry Potter's PreciousTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3717 Accepted Submission(s): 1643Problem Description Harr原创 2017-05-03 15:49:08 · 379 阅读 · 0 评论 -
hdu 蜘蛛牌(DFS + 剪枝)
Problem Description蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从A到10,且随机的在一行上展开,编号从1到10,把第i号上的牌移到第j号牌上,移原创 2017-03-17 10:24:24 · 534 阅读 · 0 评论 -
Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) C (dfs+vector)
C. Andryusha and Colored Balloonstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndryusha goes through a park each原创 2017-03-06 19:58:05 · 219 阅读 · 0 评论 -
poj 1186 方程的解数 (hash+双向dfs)
Description已知一个n元高次方程: 其中:x1, x2,...,xn是未知数,k1,k2,...,kn是系数,p1,p2,...pn是指数。且方程中的所有数均为整数。 假设未知数1 1 方程的整数解的个数小于231。 ★本题中,指数Pi(i=1,2,...,n)均为正整数。 Input第1行包含一个整数n。第2行包含一个整数M。第3行到第n原创 2017-02-23 15:48:10 · 411 阅读 · 0 评论 -
hud oj 1813 Escape from Tetris
Problem Description由于整日整夜地对着这个棋盘,Lele终于走火入魔。每天一睡觉,他就会梦到自己会被人被扔进一个棋盘中,一直找不到出路,然后从梦中惊醒。久而久之,Lele被搞得精神衰弱。梦境是否会成为现实,谁也说不准,不过不怕一万只怕万一。现在Lele每次看到一个棋盘,都会想象一下自己被关进去以后要如何逃生。Lele碰到的棋盘都是正方形的,其中有些格子是坏的,不可原创 2017-01-12 17:41:37 · 264 阅读 · 0 评论 -
hdu oj 1560 DNA sequence(IDA*)
Problem DescriptionThe twenty-first century is a biology-technology developing century. We know that a gene is made of DNA. The nucleotide bases from which DNA is built are A(adenine), C(cytosine)原创 2017-01-12 10:13:28 · 365 阅读 · 0 评论 -
玲珑学院 1058 - Coco
DESCRIPTIONCoco just learned a math operation call mod.Now,there is an integer aa and nn integers b1,…,bnb1,…,bn. After selecting some numbers from b1,…,bnb1,…,bn in any order, say原创 2016-11-26 20:47:44 · 293 阅读 · 0 评论 -
poj Lake Counting (dfs)
DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 <= N <= 100; 1 <= M <= 100) squares. Each square contains原创 2016-12-01 20:40:06 · 253 阅读 · 0 评论 -
poj 2255 Tree Recovery 递归
DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. This is an example of o原创 2016-12-01 18:37:29 · 256 阅读 · 0 评论 -
hdu oj 1013 Digital Roots(dfs)
Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the result原创 2016-12-01 16:10:51 · 181 阅读 · 0 评论 -
nyist 20 吝啬的国度
描述在一个吝啬的国度里有N个城市,这N个城市间只有N-1条路把这个N个城市连接起来。现在,Tom在第S号城市,他有张该国地图,他想知道如果自己要去参观第T号城市,必须经过的前一个城市是几号城市(假设你不走重复的路)。输入第一行输入一个整数M表示测试数据共有M(1每组测试数据的第一行输入一个正整数N(1随后的N-1行,每行有两个正整数a,b(1输出每组测试数据输N原创 2016-10-18 21:39:46 · 265 阅读 · 0 评论 -
hdu 1728 逃离迷宫(dfs+剪枝)
这里写链接内容题目意思:不用翻译了,就是给定一个最多转弯的数目,让求如果她所走的转弯次数不超过k,问她能不能到达目的地思路:这道题刚开始用的广搜,中间出现了很多bug 都来跳不出来了,又看看博客,广搜就是在一个方向上一直搜,搜不到了换方向,直到搜到为止且转弯数小于等于k,这是广搜的思路#include<stdio.h>#include<iostream>#include<algorithm>原创 2016-08-15 14:29:43 · 498 阅读 · 0 评论 -
hdu 2553 N皇后问题(dfs+回溯)
题目链接点这里N皇后和八皇后是一样的 ,在小白书的123页,我今天也是刚学,做的第一个题,还是我看的书代码如下#include<stdio.h>#include<iostream>#include<string.h>using namespace std;int vis[3][23],p[15];int n,sum;void dfs(int row){ if(row==n+1)原创 2016-08-16 17:58:07 · 301 阅读 · 0 评论