动态规划类问题主要分为两大类: 1.求最优解(典型的背包问题) 2.计数(统计方案) 以上两类都存在递推性质。 第一类的递推称为最优子结构 -- 当前问题的最优解取决于子问题的最优解。 当前问题的方案数取决于子问题的方案数时,也可以用动态规划解决。 第二类例子: 机器人走方格(leetcode63. ...
分类:
其他好文 时间:
2020-07-06 09:13:38
阅读次数:
54
1、统计出/etc/passwd文件中其默认shell为非/sbin/nologin的用户个数,并将用户都显示出来[root@centos7scripts]#grep-v‘/sbin/nologin$‘/etc/passwd|cut-d:-f1rootsyncshutdownhaltkyletest[root@centos7~]#awk-F:‘{if($NF!="/sbin/nologin"){p
分类:
其他好文 时间:
2020-07-06 00:42:07
阅读次数:
89
CSS 中文开发手册 最小宽度 | @viewport.min-width (Device Adaptation) - CSS 中文开发手册 min-widthCSS描述符指定通过@viewport所定义的文档的视口的最小宽度。 默认情况下,min-width考虑到最小宽度约束,将其设置为尽可能接近... ...
分类:
Web程序 时间:
2020-07-01 22:24:07
阅读次数:
73
grep [选项] PATTERN [文件] 说明:grep(global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。 在每个 ...
分类:
系统相关 时间:
2020-07-01 16:11:56
阅读次数:
90
mysql> show create table table_test;+ + +| Table | Create Table |+ + +| table_test | CREATE TABLE `table_test` ( `id` bigint(20) NOT NULL AUTO_INCREME ...
分类:
数据库 时间:
2020-06-30 12:54:19
阅读次数:
76
Linux下获取CPU内存信息的命令 1. 获取CPU型号信息 cat /proc/cpuinfo | grep name | cut -f2 -d: |uniq -c 2.获取CPU的个数(几核CPU) grep 'physical id' /proc/cpuinfo | sort | uniq ...
分类:
系统相关 时间:
2020-06-30 12:36:40
阅读次数:
112
Given an array of unique integers salary where salary[i] is the salary of the employee i. Return the average salary of employees excluding the minimum ...
分类:
其他好文 时间:
2020-06-29 09:59:02
阅读次数:
56
主库: SQL> alter database commit to switchover to physical standby with session shutdown; Database altered. SQL> startup ORACLE instance started. Total ...
分类:
数据库 时间:
2020-06-28 00:24:55
阅读次数:
120
Mysql加锁过程详解(1)-基本知识 Mysql加锁过程详解(1)-基本知识 Mysql加锁过程详解(2)-关于mysql 幻读理解 Mysql加锁过程详解(3)-关于mysql 幻读理解 Mysql加锁过程详解(4)-select for update/lock in share mode 对事 ...
分类:
数据库 时间:
2020-06-27 21:39:45
阅读次数:
119