上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 53 下一页
摘要: 最短路程 给定一个 $n$ 个节点的树。 节点编号为 $1 \sim n$。 树中所有边均为双向边,且长度均已知。 你需要从 $1$ 号点出发,沿着一条路径遍历树中所有点,路径中可以包含重复的点和边。 要求,你的行程总长度应尽可能短。 请你计算,你所需的行程总长度的最小可能值。 注意,你可以在任意点 阅读全文
posted @ 2022-10-16 11:48 onlyblues 阅读(41) 评论(0) 推荐(0) 编辑
摘要: F. Multi-Colored Segments Dmitry has $n$ segments of different colors on the coordinate axis $Ox$. Each segment is characterized by three integers $l_ 阅读全文
posted @ 2022-10-15 19:52 onlyblues 阅读(80) 评论(0) 推荐(0) 编辑
摘要: E. Sending a Sequence Over the Network The sequence $a$ is sent over the network as follows: sequence $a$ is split into segments (each element of the 阅读全文
posted @ 2022-10-13 12:01 onlyblues 阅读(111) 评论(0) 推荐(0) 编辑
摘要: D. Equal Binary Subsequences Everool has a binary string $s$ of length $2n$. Note that a binary string is a string consisting of only characters $0$ a 阅读全文
posted @ 2022-10-11 19:37 onlyblues 阅读(116) 评论(0) 推荐(0) 编辑
摘要: C1. Good Subarrays (Easy Version) This is the easy version of this problem. In this version, we do not have queries. Note that we have multiple test c 阅读全文
posted @ 2022-10-11 16:08 onlyblues 阅读(144) 评论(0) 推荐(0) 编辑
摘要: B. Playing with GCD You are given an integer array $a$ of length $n$. Does there exist an array $b$ consisting of $n+1$ positive integers such that $a 阅读全文
posted @ 2022-10-11 15:31 onlyblues 阅读(231) 评论(1) 推荐(1) 编辑
摘要: Minimum Swaps To Make Sequences Increasing You are given two integer arrays of the same length nums1 and nums2 . In one operation, you are allowed to 阅读全文
posted @ 2022-10-10 21:08 onlyblues 阅读(52) 评论(0) 推荐(0) 编辑
摘要: Using a Robot to Print the Lexicographically Smallest String You are given a string s and a robot that currently holds an empty string t . Apply one o 阅读全文
posted @ 2022-10-09 23:28 onlyblues 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 最小移动距离 平面上有 $n$ 个点,编号为 $1 \sim n$。 对于每个点 $i$($1 \leq i \leq n$),都存在一条从点 $i$ 到点 $a_i$($1 \leq a_i \leq n$,$a_i$ 可以等于 $i$)的有向边。 所有边的长度均为 $1$。 请你判断是否存在一个 阅读全文
posted @ 2022-10-09 09:55 onlyblues 阅读(131) 评论(0) 推荐(0) 编辑
摘要: Maximum Deletions on a String You are given a string s consisting of only lowercase English letters. In one operation, you can: Delete the entire stri 阅读全文
posted @ 2022-10-06 17:04 onlyblues 阅读(37) 评论(0) 推荐(0) 编辑
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 53 下一页
Web Analytics