摘要: Largest Palindromic Number You are given a string $num$ consisting of digits only. Return the largest palindromic integer (in the form of a string) th 阅读全文
posted @ 2022-08-21 22:00 onlyblues 阅读(22) 评论(0) 推荐(0) 编辑
摘要: Maximum Segment Sum After Removals You are given two 0-indexed integer arrays $nums$ and $removeQueries$, both of length $n$. For the $i^{th}$ query, 阅读全文
posted @ 2022-08-21 19:07 onlyblues 阅读(45) 评论(0) 推荐(0) 编辑
摘要: Time Needed to Rearrange a Binary String You are given a binary string $s$. In one second, all occurrences of 01 are simultaneously replaced with 10 . 阅读全文
posted @ 2022-08-21 16:19 onlyblues 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 最大周长 给定二维平面上的 $n$ 个不共线的点,这 $n$ 个点组成的多边形是凸多边形 。 这些点按顺时针顺序依次编号为 $1 \sim n$。 我们将两点 $p_1(x_1,y_1)$ 和 $p_2(x_2,y_2)$ 之间的距离定义为它们的曼哈顿距离:$d(p_1,p_2)=|x_1−x_2| 阅读全文
posted @ 2022-08-21 13:20 onlyblues 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 集合询问 有一个整数集合,初始时集合为空。 现在,要对该集合进行 t 次操作,操作分为以下三种: + x ,将一个非负整数 $x$ 添加至集合中。注意,集合中可以存在多个相同的整数。 - x,从集合中删除一个非负整数 $x$。可以保证执行此操作时,集合中至少存在一个 $x$。 ? s,询问操作,给定 阅读全文
posted @ 2022-08-21 10:05 onlyblues 阅读(20) 评论(0) 推荐(0) 编辑
Web Analytics