问题: 给定一个n,有数组1~n, 排列该数组,使得数组两两元素之间的差值有k种。 Example 1: Input: n = 3, k = 1 Output: [1, 2, 3] Explanation: The [1, 2, 3] has three different positive int ...
分类:
其他好文 时间:
2020-04-19 14:58:40
阅读次数:
57
System function basename :指定一个路径,basename命令会把最后一个[/]字符后面的字符串显示出来。 dirname :指定一个路径,dirname命令会把最后一个[/]字符前面的字符串显示出来。 ...
分类:
系统相关 时间:
2020-04-18 23:23:31
阅读次数:
130
请查看下面来自美术老师的活动内容: Hello Year Three Let’s watch the video and learn how to draw a flower bouquet for this week. 这周我们一起观看视频来学习如何画花束吧! https://v.youku.co ...
分类:
其他好文 时间:
2020-04-17 23:32:19
阅读次数:
72
codeforces-1335-E Three Blocks Palindrome 传送门: easy:https://codeforces.com/contest/1335/problem/E1 hard:https://codeforces.com/contest/1335/problem/E2 ...
分类:
其他好文 时间:
2020-04-14 22:44:12
阅读次数:
74
就是我这个菜鸡,赛时写出了 E2 的做法,但是算错复杂度,导致以为自己的做法只能AC E1,就没交到 E2 上,然后赛后秒A..... 题意 定义一种字串为形如:$[\underbrace{a, a, \dots, a}_{x}, \underbrace{b, b, \dots, b}_{y}, \ ...
分类:
其他好文 时间:
2020-04-14 12:23:10
阅读次数:
63
题面 题意 给定一个长度为 n 的数列 定义要求的回文子数列满足下图条件 其中 x 与 y 可以为 0 即这个回文子数列可以是 数字完全相同 的一个子数列 也可以是 只包含两种数字 ,且其中一种 平均分布 在另一种数字的两侧 求出最长的回文子数列长度 解题思路 在输入时往vector里记录下每个数字 ...
分类:
其他好文 时间:
2020-04-14 09:15:49
阅读次数:
62
题面 题意/解题思路 直接延用 Easy 版本的想法即可 详解见上一篇博客 "Codeforces 1335E1 Three Blocks Palindrome (easy version)" 完整程序 (93ms/2000ms) c++ include using namespace std; i ...
分类:
其他好文 时间:
2020-04-14 09:13:15
阅读次数:
59
Problem : A sequence of number is called arithmetic if it consists of at least three elements and if the difference between any two consecutive elemen ...
分类:
其他好文 时间:
2020-04-12 13:58:48
阅读次数:
67
1 完整代码下载 https://pan.baidu.com/s/1JJyVcP2KqXsd5G6eaYpgHQ 提取码 3fzt (压缩包名: 2020-4-5-demo.zip) 2 图片展示 3 主要代码 1 "use strict" 2 3 class InitControl{ 4 5 co ...
分类:
编程语言 时间:
2020-04-10 19:46:25
阅读次数:
81