上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 97 下一页
摘要: Problem Description The only difference between easy and hard versions is the size of the input. You are given a string ss con... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(7) 评论(0) 推荐(0)
摘要: Problem Description nn robots have escaped from your laboratory! You have to find them as soon as possible, because these robot... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(7) 评论(0) 推荐(0)
摘要: Problem Description You are given an array aa consisting of nn integers a1,a2,…,an. You want to split it into exactly kk non-em... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(8) 评论(0) 推荐(0)
摘要: Problem Description Alice and Bob have received three big piles of candies as a gift. Now they want to divide these candies as ... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(15) 评论(0) 推荐(0)
摘要: Problem Description A bracket sequence is a string, containing only characters "(", ")", "[" and "]". A correct bracket sequen... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(17) 评论(0) 推荐(0)
摘要: Problem Description The Little Elephant loves numbers. He has a positive integer x. The Little Elephant wants to find the numb... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(3) 评论(0) 推荐(0)
摘要: Problem Description The Little Elephant has got a problem — somebody has been touching his sorted by non-decreasing array a of ... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(5) 评论(0) 推荐(0)
摘要: 上午做了两道 dfs 的题,都 TLE 了一个点,被剪枝优化卡的死死的,但对 dfs 的可行性剪枝和搜索顺序优化有些心得,前者需要根据题意进行数学推导得到一个范围,有时需要用到不等式,后者需要根据题意判断是否能为逆序,搜索顺序的优化看似普通,但有时能得到极高的... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(4) 评论(0) 推荐(0)
摘要: 【概述】 从一个点出发,经过一条简单路径回到起点,称为图的环,而图的负权环就是环中所有的边的权值均为负值。 所谓负权环问题,就是判断图中是否存在一个环,里面包含的边的边权总和 Q; Q.push(0); while(!Q.empty()){ ... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(106) 评论(0) 推荐(0)
摘要: 【概述】 从一个点出发,经过一条简单路径回到起点,称为图的环,而图的最小环就是所有环中长度最小的。 所谓最小环问题,最小环就是指在一张图中找出一个环,使得这个环上的各条边的权值之和最小。 【求最小环】 Floyd 算法可以在求最短路的同时求出图的最小环。 记两... 阅读全文
posted @ 2022-09-20 22:53 老程序员111 阅读(33) 评论(0) 推荐(0)
上一页 1 ··· 65 66 67 68 69 70 71 72 73 ··· 97 下一页