
搜索-dfs
文章平均质量分 81
snowy_smile
终于在ICPC World Final里拿到了气球!
再努力一点吧,坚持下去吧,梦想是会实现的! 人生会有低谷,但我更相信,未来也会有更多梦想能够实现~
展开
-
【HDU5559 2015合肥赛区H】【观察找规律 构造】Frog and String 用最多k个字符构造长度为n的m不同回文串的串
Frog and StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 61 Accepted Submission(s): 20Special JudgeProblem DescriptionF原创 2015-11-16 18:44:23 · 2481 阅读 · 3 评论 -
【[Offer收割]编程练习赛23 A】【爆搜】H国的身份证号码I
题目1 : H国的身份证号码I时间限制:10000ms单点时限:1000ms内存限制:256MB描述H国的身份证号码是一个N位的正整数(首位不能是0)。此外,由于防伪需要,一个N位正整数是合法的身份证号码当且仅当每位数字都小于等于K,并且任意相邻两位数字的乘积也小于等于K。例如对于K=5, 101、211、210等都是合法的号码,而1原创 2017-08-20 14:37:53 · 876 阅读 · 0 评论 -
【“盛大游戏杯”第15届上海大学程序设计联赛 O】【爆搜 最短路】随机传送 需要补题解
随机传送迷宫发布时间: 2017年7月9日 18:17 最后更新: 2017年7月9日 21:04 时间限制: 1000ms 内存限制: 128M描述小Y做了一个随机迷宫生成器,生成的迷宫可以用n∗m的矩阵来表示,人物可以从迷宫的起点开始,每个单位时间选择往上下左右走一步,但不能走到不能通行的格子或者走出矩阵外。在迷宫中会有不定数量的传送门,其中传送门入口与原创 2017-07-26 16:09:13 · 773 阅读 · 0 评论 -
【Codeforces Round 375 (Div 2) D】【简单dfs】Lakes in Berland
D. Lakes in Berlandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe map of Berland is a rectangle of th原创 2016-10-04 10:18:45 · 611 阅读 · 0 评论 -
【HDU5743 2016 Multi-University Training Contest 2J】【dfs展开式DP 前缀和思想】Join The Future 40个数已知区间和为奇或偶输出方案
Join The FutureTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 118 Accepted Submission(s): 43Problem DescriptionProfessor Zhang原创 2016-07-28 10:39:55 · 830 阅读 · 0 评论 -
【Codeforces Round 362 (Div 2)D】【树的遍历 概率均分思想】Puzzles 兄弟节点的等概率遍历下 树的遍历每点期望时间戳
D. Puzzlestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBarney lives in country USC (United States of Cha原创 2016-07-26 10:33:03 · 738 阅读 · 0 评论 -
【2016杭电女生赛1005】【暴力 bfs or dfs or 模拟】girlcat 数女生数和猫咪数
#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define MS(x,y) memset(x,y,sizeof(x))#define MC(x,y) memcpy(x原创 2016-05-22 22:35:50 · 1108 阅读 · 0 评论 -
【ZOJ3921 2016年浙大2月月赛G】【爆搜+智商贪心剪枝 好题】Guan Dan 2副牌取27张最少出光牌次数
Guan DanTime Limit: 2 Seconds Memory Limit: 65536 KBBob is playing a poker game called GuanDan. The rules are similar to PaoDeKuai and DouDiZhu. Basically, the game is played on two decks原创 2016-03-01 17:58:45 · 1277 阅读 · 0 评论 -
【IndiaHacks 2016 - Online Edition (Div 1 + Div 2) ErrichtoB】【爆搜dfs】 Bear and Compressing 字符串变换前2位变
Bear and Compressingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLimak is a little polar bear. Polar be原创 2016-03-21 09:23:38 · 661 阅读 · 0 评论 -
【Good Bye 2014A】【水题 dfs】New Year Transportation 可否传送到t点
New Year Transportationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNew Year is coming in Line World! I原创 2016-03-21 09:06:05 · 908 阅读 · 0 评论 -
【Wunder Fund Round 2016 (Div 1 + Div 2 combined)D】【贪心 dfs】Hamiltonian Spanning Tree 树的最小链划分
D. Hamiltonian Spanning Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA group of n cities is connect原创 2016-03-01 18:13:29 · 833 阅读 · 0 评论 -
【Codeforces Round 272 (Div 2)B】【暴力dfs or 组合数】Dreamoon and WiFi 问号填加减方案数使得最后恰好增量为aim
B. Dreamoon and WiFitime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDreamoon is standing at the position 0 on原创 2015-12-25 22:23:20 · 899 阅读 · 0 评论 -
【ZSTU4210 2015年12月浙理工校赛 A】【DFS爆搜】孙壕请一盘青岛大虾呗 n个消费点m个购物点最后一位置恰好消费完
4210: 孙壕请一盘青岛大虾呗Time Limit: 5 Sec Memory Limit: 128 MBSubmit: 585 Solved: 249Description话说那一年zstu与gdut进行了一场PK赛,很侥幸的zstu赢了。按照约定,gdut的孙壕得请客。大家呼声很高,均高呼:“孙壕请一盘青岛大呗!”作为gd的一壕,孙壕爽快的答应了。不过zsj说原创 2015-12-23 12:12:08 · 1907 阅读 · 0 评论 -
【Educational Codeforces Round 1D】【DFS 联通块打标记法】Igor In the Museum 联通块内墙的面数
D. Igor In the Museumtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIgor is in the museum and he wants to se原创 2015-11-19 11:14:18 · 512 阅读 · 0 评论 -
【FOJ2207 11月月赛C】【DFS栈性质应用 离线处理】以撒的结合 从x到y路径上的第k个点 询问众多
Problem 2207 以撒的结合Accept: 30 Submit: 98Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description小茗同学最近在认真地准备比赛,所以经常玩以撒的结合。《以撒的结合》是一款由Edmund McMillen,Florian Himsl 开发,并由原创 2015-11-18 21:21:15 · 1072 阅读 · 0 评论 -
【HDU5546 2015 CCPC 南阳国赛G】【DFS】Ancient Go 棋盘围杀 优化写法O(n^2)
#include#include#includeusing namespace std;#define MS(x,y) memset(x,y,sizeof(x))#define MC(x,y) memcpy(x,y,sizeof(x))typedef long long LL;const int Z=1e9+7;const int N=12;const int dy[4]={-1原创 2015-11-02 00:32:51 · 1467 阅读 · 0 评论 -
【HDU5547 2015 CCPC 南阳国赛H】【DFS】Sudoku 4x4棋盘的填充
#include#include#define MS(x,y) memset(x,y,sizeof(x))int casenum,casei;int n;char s[10][10];bool line[4][4];bool list[4][4];bool sqr[4][4];int bl[4][4];bool dfs(int y,int x){ while(s[y][x]原创 2015-11-02 00:31:21 · 1318 阅读 · 0 评论 -
【HDU6196 2017 ACM ICPC Asia Regional Shenyang Online C】【爆搜 + 剪枝】happy happy happy 爸爸儿子轮流两头取数 爸爸想输且输少
happy happy happyTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 143 Accepted Submission(s): 22Problem DescriptionToday, Bob原创 2017-09-11 09:53:35 · 2061 阅读 · 15 评论