这道题的基本思路简单来说就是: 对给定的字符串$S1$排序,得到字符串$S2$,$S1$是各种情况中字符串末位的集合,$S2$也就是首位的集合,下标相同的属于同一种情况 每种情况中首位与末位字符在原字符串中都是相邻的(当然如果首位是原字符串的首位的话末位就是原字符串的末位了,但这种情况不会干扰我们解 ...
分类:
其他好文 时间:
2020-08-02 19:57:08
阅读次数:
93
1 class point: 2 row=0 3 col=0 4 def __init__(self,row,col): 5 self.row=row 6 self.col=col 7 def copy(self): 8 return point(row=self.row,col=self.col) ...
分类:
编程语言 时间:
2020-08-01 21:35:06
阅读次数:
113
SERVLET 1、Servlet原理 客户端发送请求至服务器;服务器启动并调用 Servlet,Servlet 根据客户端请求生成响应内容并将其传给服务器;服务器将响应返回客户端。下面就让我用一张原理图来展示一下吧。 2、Servlet的映射 我们需要将内容响应给浏览器时,我们需要使用到映射。在一 ...
分类:
编程语言 时间:
2020-08-01 21:18:11
阅读次数:
76
C++的break语句、continue语句、goto语句和return语句简要说明 ...
分类:
编程语言 时间:
2020-08-01 12:37:23
阅读次数:
71
直接贴代码了: ::v-deep .el-radio__label { width: 100% !important; text-overflow: ellipsis; white-space: normal; line-height: 18px; // word-wrap: break-word ...
分类:
其他好文 时间:
2020-07-30 22:11:29
阅读次数:
323
343. 整数拆分 题目来源:力扣(LeetCode)https://leetcode-cn.com/problems/integer-break 题目 给定一个正整数 n,将其拆分为至少两个正整数的和,并使这些整数的乘积最大化。 返回你可以获得的最大乘积。 示例 1: 输入: 2 输出: 1 解释 ...
分类:
编程语言 时间:
2020-07-30 21:51:08
阅读次数:
74
一维数组 一 概念 什么是数组? 一组具有相同数据类型的元素的集合。 元素:组成数组的基本单位。 注意: 1 数组的内存是连续的(长度有限) 2 数组长度:元素的个数 3 同一个数组存同样的数据类型 二 定义 // 数据类型 变量名 ;int num;// 元素类型 数组名[数组长度] ;int c ...
分类:
编程语言 时间:
2020-07-30 21:43:37
阅读次数:
66
Optional of 与 ofNullable 的区别 /** * Returns an {@code Optional} with the specified present non-null value. * * @param <T> the class of the value * @par ...
分类:
其他好文 时间:
2020-07-30 14:39:39
阅读次数:
64
(1)无边框窗口的拖动事件 新建一个MenuStrip,然后注册其MouseMove与MouseDown事件 private Point formPoint = new Point(); public MainForm() { InitializeComponent(); } private voi ...
示例对象: { name: 'a', next: [ { name: 'b', next: [ { name: 'd', next: [] }, { name: 'e', next: [] } ] }, { name: 'c', next: [ { name: 'f', next: [] }, { ...
分类:
Web程序 时间:
2020-07-29 21:58:21
阅读次数:
115