题目: 链接:https://leetcode-cn.com/problems/largest-divisible-subset/ 给出一个由无重复的正整数组成的集合,找出其中最大的整除子集,子集中任意一对 (Si,Sj) 都要满足:Si % Sj = 0 或 Sj % Si = 0。 如果有多个目 ...
分类:
其他好文 时间:
2020-02-26 01:33:16
阅读次数:
56
活动安排问题 问题描述 有n个需要使用同一资源的活动,且在同一时段只有一个活动能使用该资源。 每个活动i都有一个起始时间 si 和结束时间 fi ,且 si 设有 n 个任务,其中每个任务有一个起始时间 si 和一个结束时间 ei ,且 si 那么,对于给定的任务时间区间,能互相兼容的最大任务个数是 ...
分类:
编程语言 时间:
2020-02-25 00:23:38
阅读次数:
500
[Codeforces Round 622 (Div. 2)] C2. Skyscrapers (hard version) (单调栈) C2. Skyscrapers (hard version) time limit per test 3 seconds memory limit per tes ...
分类:
其他好文 时间:
2020-02-24 18:17:29
阅读次数:
127
Redis持久化 官方文档: https://redis.io/topics/persistence Redis用户认证 redis默认开启了保护模式,只允许本地回环地址登录并访问数据库 禁止protected mode protected mode yes/no (保护模式,是否只允许本地访问) ...
分类:
其他好文 时间:
2020-02-23 20:24:43
阅读次数:
62
Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to si ...
分类:
其他好文 时间:
2020-02-23 17:59:01
阅读次数:
76
Mike has n strings s1,?s2,?...,?sn each consisting of lowercase English letters. In one move he can choose a string si, erase the first character and ...
分类:
其他好文 时间:
2020-02-23 16:29:53
阅读次数:
69
采用注解的方式 1)定义一个注解 @Retention(RUNTIME) @Target(METHOD) public @interface AccessLimit { int seconds(); int maxCount(); } 2)在需要限流的方法前加这样的注解 @AccessLimit(s ...
分类:
其他好文 时间:
2020-02-23 16:29:08
阅读次数:
173
git 客户端 功能命令可选参数 说明 SSH ssh-keygen 生成密钥(注意要在~/.ssh文件夹执行,或生成后移动到.ssh) 仓库 git clone -b | --branch 克隆指定分支 --depth <depth> 创建一个浅克隆,克隆指定历史提交记录 --shallow-si ...
分类:
其他好文 时间:
2020-02-23 09:29:56
阅读次数:
170
25.01_多线程(单例设计模式) 单例设计模式:保证类在内存中只有一个对象。 如何保证类在内存中只有一个对象呢? (1)控制类的创建,不让其他类来创建本类的对象。private (2)在本类中定义一个本类的对象。Singleton s; (3)提供公共的访问方式。 public static Si ...
分类:
编程语言 时间:
2020-02-21 18:22:44
阅读次数:
62
启动项目的时候报Server Tomcat v8.0 Server at localhost was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in ...
分类:
系统相关 时间:
2020-02-21 12:40:56
阅读次数:
148