上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 32 下一页
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1325 Is It A Tree? Problem Description A tree is a well-known data structure that is either empty (null, 阅读全文
posted @ 2020-04-07 21:01 liyexin 阅读(271) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=1272 Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该 阅读全文
posted @ 2020-04-06 23:23 liyexin 阅读(210) 评论(0) 推荐(0)
摘要: More is better Problem Description Mr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the 阅读全文
posted @ 2020-04-06 22:17 liyexin 阅读(125) 评论(0) 推荐(0)
摘要: 地址:http://acm.hdu.edu.cn/showproblem.php?pid=3635 Dragon Balls Five hundred years later, the number of dragon balls will increase unexpectedly, so it' 阅读全文
posted @ 2020-04-06 22:02 liyexin 阅读(131) 评论(0) 推荐(0)
摘要: 地址:http://poj.org/problem?id=1182 Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这 阅读全文
posted @ 2020-04-06 00:00 liyexin 阅读(174) 评论(0) 推荐(0)
摘要: 地址:http://codeforces.com/contest/1332/problem/C 题意:给出长度为n的字符串,将它分成长度为k的若干个循环节,要求这些循环节为回文。操作是对单个字符进行更换,问最少需要操作多少次。 解析:每个i,下个循环节就有对应的si==si+k。所以这些循环节是要完 阅读全文
posted @ 2020-04-05 18:07 liyexin 阅读(166) 评论(0) 推荐(0)
摘要: 地址:http://codeforces.com/contest/1330 题意:题意不太好理解。简单来讲就是,给出一组数,能从1最多数到几,不够的用数来填,最多填x次。 解析:从1往前数,没有就填,填x次。填完后,记得再往后数,数到map[i]==0为止。 #include<iostream> # 阅读全文
posted @ 2020-04-04 17:38 liyexin 阅读(266) 评论(0) 推荐(0)
摘要: 地址:http://poj.org/problem?id=1988 Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. T 阅读全文
posted @ 2020-04-03 16:47 liyexin 阅读(202) 评论(0) 推荐(0)
摘要: 地址:http://codeforces.com/contest/1332 题意:一只猫,给出各个方向走多少次。给出初始坐标以及限制范围。不论走法,问是否会越界。 解析:这个题比较坑,比如样例二,如果只把猫限制到一条竖线或者一条横线上,那么只要存在左右走或上下走,一定会越界,这些一定要进行特判。其他 阅读全文
posted @ 2020-04-02 23:04 liyexin 阅读(260) 评论(0) 推荐(0)
摘要: 地址:http://codeforces.com/contest/1332 题意:细节多多。请一定认真阅读题目! 给出n个合数,对他们进行染色。要求任意两个相同颜色的数gcd>1。颜色的种类不能超过11个。而且如果染了m中颜色,那么1-m都必须每个至少染一次。 解析:唯一分解定理:任何一个大于1的自 阅读全文
posted @ 2020-04-02 22:56 liyexin 阅读(204) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 32 下一页