题目: 来源: 法一:自己的超时代码 思路:从2开始由小到大遍历判断每一个数是否为丑数,由于到后面丑数越来越稀疏,导致非常费时间. class Solution: def nthUglyNumber(self, n: int) -> int: if n == 1: return 1 ans = [1 ...
分类:
其他好文 时间:
2020-01-31 14:12:15
阅读次数:
75
167. Two Sum II Input array is sorted(两数之和 II 输入有序数组) 链接 https://leetcode cn.com/problems/two sum ii input array is sorted 题目 给定一个已按照升序排列?的有序数组,找到两个数使 ...
分类:
其他好文 时间:
2020-01-31 14:06:24
阅读次数:
72
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
https://zoj.pintia.cn/problem-sets/91827364500/problems/91827369470 题意: n天n个计划,一天完成一个计划,第i个计划不能在第i天和第i+1天完成,第n个计划不能在第n天和第1天完成,求安排计划的方案数。 有禁区的排列问题 在n*n ...
分类:
其他好文 时间:
2020-01-31 10:40:08
阅读次数:
83
ALTER TABLE `dbname`.`tablename` MODIFY COLUMN `userid` int(11) UNIQUE 设置为唯一值,并且允许为空,如果为空,不计算在约束内,就是可以多个为空 ...
分类:
其他好文 时间:
2020-01-31 10:37:45
阅读次数:
80
有时候需要检验下载文件的md5或sha256的值,之前我一直利用软件计算。最近发现系统自带的Windows PowerShell也可以计算。 I) 进入PowerShell: 按Win键+R打开“运行",输入"powershell"并运行之。 II) 如图所示: 利用Get-FileHash命令及- ...
一.使用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
Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 14475 Accepted Submi ...
分类:
其他好文 时间:
2020-01-30 18:48:56
阅读次数:
106