上一页 1 ··· 3 4 5 6 7
摘要: 题目描述 Although Inzane successfully found his beloved bone, Zane, his owner, has yet to return. To search for Zane, he would need a lot of money, of whi 阅读全文
posted @ 2020-04-30 09:25 liuzhaoxu 阅读(179) 评论(0) 推荐(0)
摘要: 米特是D星球上一种非常神秘的物质,蕴含着巨大的能量。在以米特为主要能源的D星上,这种米特能源的运输和储 存一直是一个大问题。D星上有N个城市,我们将其顺序编号为1到N,1号城市为首都。这N个城市由N 1条单向高速 通道连接起来,构成一棵以1号城市(首部)为根的树,高速通道的方向由树中的儿子指向父亲。 阅读全文
posted @ 2020-04-29 14:23 liuzhaoxu 阅读(168) 评论(0) 推荐(0)
摘要: 返回你要搜到的数组的右端点的下一位 #include <cstdio> #include <cmath> #include <algorithm> using namespace std; int main(){ int a[5]={1,2,3}; int x=lower_bound(a,a+4,6 阅读全文
posted @ 2020-04-25 18:06 liuzhaoxu 阅读(321) 评论(0) 推荐(1)
摘要: 基环树 阅读全文
posted @ 2020-04-24 15:37 liuzhaoxu 阅读(202) 评论(0) 推荐(0)
摘要: 题目链接: https://www.luogu.com.cn/problem/CF1215D 题意: 一张票有n位数,如果这张票的前一半数字的和等于后一半数字的和(n一定是偶数),就称这张票为快乐票。有些数被擦除了,标记为’?’(’?‘的个数也是偶数),现在Monocarp 和 Bicarp 进行一 阅读全文
posted @ 2020-04-24 14:39 liuzhaoxu 阅读(241) 评论(0) 推荐(0)
摘要: Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting. The game consists of multiple rounds. Its rules are 阅读全文
posted @ 2020-04-22 13:57 liuzhaoxu 阅读(143) 评论(0) 推荐(0)
摘要: 本题中,我们将用符号[c]表示对c向下取整,例如:[3.0」= [3.1」=[3.9」=3。蛐蛐国最近蚯蚓成灾了!隔壁跳 蚤国的跳蚤也拿蚯蚓们没办法,蛐蛐国王只好去请神刀手来帮他们消灭蚯蚓。蛐蛐国里现在共有n只蚯蚓(n为正整 数)。每只蚯蚓拥有长度,我们设第i只蚯蚓的长度为a_i(i=1,2,... 阅读全文
posted @ 2020-04-22 13:10 liuzhaoxu 阅读(160) 评论(0) 推荐(0)
摘要: 题目 An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of the pole, it i 阅读全文
posted @ 2020-04-15 07:33 liuzhaoxu 阅读(232) 评论(0) 推荐(0)
摘要: 主要就是看直接连到根节点的树边。 阅读全文
posted @ 2020-04-12 23:55 liuzhaoxu 阅读(364) 评论(0) 推荐(0)
摘要: 最短下车时间,思维 阅读全文
posted @ 2020-04-11 15:47 liuzhaoxu 阅读(517) 评论(0) 推荐(0)
摘要: 这道题其实就是一道无根树上树的直径的问题: 如图,首先根据上面的做法,用两次BFS求出树的直径,即AB。 那么其实发现在实际上,问题要求max{AB+BC}(BC<AC)或max{AB+AC}(AC<BC),那么这两个式子可以合并成求max{AB+min{BC,AC}}。 只要确定了直径的端点A、B 阅读全文
posted @ 2020-04-09 17:50 liuzhaoxu 阅读(156) 评论(0) 推荐(0)
摘要: 推导式子 阅读全文
posted @ 2020-04-09 12:46 liuzhaoxu 阅读(374) 评论(0) 推荐(0)
摘要: 树形DP 阅读全文
posted @ 2020-04-07 18:11 liuzhaoxu 阅读(190) 评论(0) 推荐(0)
摘要: Farmer John has arranged his N (1 ≤ N ≤ 5,000) cows in a row and many of them are facing forward, like good cows. Some of them are facing backward, th 阅读全文
posted @ 2020-04-06 13:55 liuzhaoxu 阅读(171) 评论(0) 推荐(0)
摘要: 思维 阅读全文
posted @ 2020-04-04 22:23 liuzhaoxu 阅读(172) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7