![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
菜圾
Hi, it's your Accepted !
展开
-
I - 09----BFS
DescriptionThe 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 ma...原创 2017-05-24 00:21:11 · 189 阅读 · 0 评论 -
HDU5974 - The 2016 ACM-ICPC Asia Dalian Regional Contest - D - A Simple Math Problem - (数论LCM,dfs)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5974题意:给出a和b,让找到X和Y满足:X+Y=a; LCM(X,Y)=b;LCM为最小公倍数,(1≤a≤2*10^4),(1≤b≤10^9),注意:测试样例很多。解析:首先考虑lcm的性质,假设有等式lcm(a,b)=x; 将x分解质因数得:x=p1^num1*p2^num2...原创 2018-10-03 21:50:45 · 171 阅读 · 0 评论 -
2015 Multi-University Training Contest 2 - Friends - (DFS)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5305题意:有n个人,其中有m对朋友关系,每队关系中两个人可以是网上交流或面对面交流,通过分配给所有关系以居停交流方式,若果分配完毕后每个人的网上交流朋友都与面对面交流的朋友一样多,那么这个分配是有效的,问共有多少种有效分配。解析:容易想到DFS,但直接做时间复杂度为2^28,这里进行剪枝,即先...原创 2018-07-16 22:00:57 · 118 阅读 · 0 评论 -
CodeForces - 89C - Chip Play - (DFS,十字链表)
题目链接:http://codeforces.com/problemset/problem/89/CC. Chip Playtime limit per test4 secondsThe first line contains two integers n and m (1 ≤ n, m, n × m ≤ 5000). Then follow n lines containing m charac...原创 2018-05-17 11:50:55 · 431 阅读 · 0 评论 -
16级暑假练习赛二--A--(搜索)
Bessie is in Camelot and has encountered a sticky situation: she needs to pass through the forest that is guarded by the Knights of Ni. In order to pass through safely, the Knights have demanded that原创 2017-08-15 19:07:45 · 235 阅读 · 0 评论 -
S - 19-----深搜
Description自从2006年3月10日至11日的首届数独世界锦标赛以后,数独这项游戏越来越受到人们的喜爱和重视。 据说,在2008北京奥运会上,会将数独列为一个单独的项目进行比赛,冠军将有可能获得的一份巨大的奖品———HDU免费七日游外加lcy亲笔签名以及同hdu acm team合影留念的机会。 所以全球人民前仆后继,为了奖品日夜训练茶饭不思。当然也包括初学者linle,不过原创 2017-06-02 23:23:44 · 399 阅读 · 0 评论 -
T - 20---广搜(按层展开)
DescriptionBackgroundMr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him? The ProblemYour ta原创 2017-05-20 18:35:35 · 274 阅读 · 0 评论 -
F - 06----深搜
DescriptionTechnicians in a pathology lab analyze digitized images of slides. Objects on a slide are selected for analysis by a mouse click on the object. The perimeter of the boundary of an obj原创 2017-05-21 18:13:10 · 218 阅读 · 0 评论 -
O - 15----(二分查找)
DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever. It wa原创 2017-05-20 17:25:11 · 226 阅读 · 0 评论 -
B - 02
DescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is two原创 2017-05-19 23:42:09 · 213 阅读 · 0 评论 -
J - 10----递归
DescriptionA 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 chips, S1 and S2, each stack containin原创 2017-05-30 15:12:27 · 229 阅读 · 0 评论 -
L - 12
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原创 2017-05-27 11:50:20 · 211 阅读 · 0 评论 -
Q - 17-------深搜(输出每种方案)
DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime. No原创 2017-05-15 00:09:09 · 314 阅读 · 0 评论 -
D - 04-------深搜典型(统计方案数)
Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及原创 2017-05-14 13:41:03 · 303 阅读 · 0 评论 -
P - 16------深搜典型(分块应用)
The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land into numerous square plots. It then analyzes each原创 2017-05-13 18:12:45 · 273 阅读 · 0 评论 -
H - 08---深搜(回溯之用)
DescriptionGiven 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 greater than原创 2017-05-12 00:06:25 · 229 阅读 · 0 评论 -
G - 07-----广搜典型(队列)
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 is at a point K (0 ≤ K ≤ 100,000) on the same number line. Farmer John has two modes o原创 2017-05-13 16:30:36 · 267 阅读 · 0 评论 -
HihoCoder 1426 - 2016 ACM-ICPC Asia Beijing Regional Contest - E.What a Ridiculous Election(BFS预处理)
题目链接:The 2016 ACM-ICPC Asia Beijing Regional Contest - E.What a Ridiculous Election - HihoCoder 1426题意:有1e5组样例,每组样例给出一个长度为5由'0'~'9'组成的字符串S,并且对于字符串有以下3种操作:操作1:交换字符串中相邻的两个字符,此操作可以进行任意次。 操作2:将某个字符+1...原创 2018-10-04 18:58:59 · 218 阅读 · 0 评论