"传送门" 题意: 给一个n个结点的无权树,三个结点p1,p2,p3,这三个结点组成的三条路径的路径并集(这个意思就是三条路径之间,重复的边算一次)为ans,找出使得ans最大的三个结点,可能答案有多个,输出一种组合即可 思路: 很显然有种最优解的两个结点为直接的端点p1,p2(直接用两次bfs找直 ...
分类:
其他好文 时间:
2020-02-02 01:07:32
阅读次数:
119
1 """ 2 We are given head, the head node of a linked list containing unique integer values. 3 4 We are also given the list G, a subset of the values i ...
分类:
其他好文 时间:
2020-02-01 23:05:58
阅读次数:
64
六大约束: NOT NULL (非空) DEFAULT (默认) UNIQUE (唯一) 【唯一约束可以为空值,但是不能重复】 CHECK (检查)【mysql不起作用】 PRIMARY KEY (主键)【主键约束不能为空值,也不能重复】 FOREIGN KEY (外键) 约束一般分为列级约束和表级 ...
分类:
数据库 时间:
2020-02-01 14:26:49
阅读次数:
483
60. Permutation Sequence The set contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the foll ...
分类:
其他好文 时间:
2020-01-31 12:36:55
阅读次数:
63
ALTER TABLE `dbname`.`tablename` MODIFY COLUMN `userid` int(11) UNIQUE 设置为唯一值,并且允许为空,如果为空,不计算在约束内,就是可以多个为空 ...
分类:
其他好文 时间:
2020-01-31 10:37:45
阅读次数:
80
一.使用ALTER TABLE语句创建索引 语法如下: 其中包括普通索引、UNIQUE索引和PRIMARY KEY索引3种创建索引的格式,table_name是要增加索引的表名,column_list指出对哪些列进行索引,多列时各列之间用逗号分隔。索引名index_name可选,缺省时,MySQL将 ...
分类:
数据库 时间:
2020-01-30 19:26:49
阅读次数:
105
普通索引创建 创建普通索引,即不添加 UNIQUE、FULLTEXT 等任何参数。 【例】创建表名为 score 的数据表,并在该表的 id 字段上建立索引,SQL 语句如下: 此时在id字段上建立的普通索引名字为id,在id字段建立的,索引方法为BTREE,索引类型为normal 创建唯一索引 创 ...
分类:
数据库 时间:
2020-01-30 19:20:07
阅读次数:
360
添加依赖 application.yml配置 additional paths对于多模块也有效,多模块下只要是此目录下的就会重新加载 idea设置 第一步 Preferences Build,Execution,Deployment Compiler找到 Build Project Automati ...
分类:
编程语言 时间:
2020-01-30 19:00:00
阅读次数:
81
Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstuvwxyza ...
分类:
编程语言 时间:
2020-01-30 10:02:05
阅读次数:
76
T1:Colorado Potato Beetle
T2:Distinct Paths
T3:回忆树
半夜硬核更博。 ...
分类:
其他好文 时间:
2020-01-30 09:14:35
阅读次数:
85