原题链接 考察:贪心 错误思路: 对于每个任务,按d,a顺序排序,如果不能按时完成就付钱使得按时完成. 思路: 不一定要压当前任务的时间,我们可以压花费更小的任务时间,使得超时任务按时完成. ##Code #include <iostream> #include <cstring> #include ...
分类:
其他好文 时间:
2021-06-19 18:48:51
阅读次数:
0
主要记录学习swift;学习网址为:https://www.journaldev.com/15163/swift-closure 基础 1.switch-fallthrough Swift中应用switch时,不再需要使用break结束;如果想继续下个判断,可以用fallthrough结尾。 let ...
分类:
编程语言 时间:
2021-06-18 20:12:06
阅读次数:
0
您需要在二叉树的每一行中找到最大的值。 示例: 输入: 1 / \ 3 2 / \ \ 5 3 9 输出: [1, 3, 9] 解法一:宽度优先搜索 List<Integer> res = new ArrayList<>(); public List<Integer> largestValues(T ...
分类:
其他好文 时间:
2021-06-18 19:10:47
阅读次数:
0
[GWCTF 2019]枯燥的抽奖 知识点: 种子爆破 https://www.openwall.com/php_mt_seed/ PHP的mt_rand函数作为一个随机数生成工具在程序中被广泛使用,但是我们不难发现它生成的随机数不是真正的随机数而是伪随机。既然是伪随机就有可能利用。 安装 php_ ...
分类:
其他好文 时间:
2021-06-18 18:57:56
阅读次数:
0
基础数据类型 int >Integer long >Long float >Float double >Double boolean >Boolean char[] >String 数组 基本类型的一组数据,使用数组来表示 int[] arrs = new int[5]; 数据越界问题--QA需注意 ...
分类:
编程语言 时间:
2021-06-17 16:34:13
阅读次数:
0
public class WeightProcessor { private final Map<Integer, List<String>> map = new HashMap<>(); //保存权重值和地址 private final Integer[] weight; //保存权重值,用于负载 ...
分类:
其他好文 时间:
2021-06-16 18:35:22
阅读次数:
0
class Program { public static long flgVal = 0; static void Main(string[] args) { int n = 100; Task.Run(() => DaMi(n)); Task.Run(() => LaoShu(n)); Cons ...
分类:
编程语言 时间:
2021-06-15 18:31:41
阅读次数:
0
8 种基本数据类型 Java 中有 8 种基本数据类型分为三大类。 字符型 char 布尔型 boolean 数值型 1.整型:byte、short、int、long 2.浮点型:float、double String 不是基本数据类型,是引用类型。 整型中 byte、short、int、long ...
分类:
编程语言 时间:
2021-06-15 18:30:02
阅读次数:
0
mybatis plus技巧,插入数据时,怎么插入自定义的id信息,不走自增策略 在实体类中: @TableId(value = "id", type = IdType.AUTO) private Integer id; 改成 @TableId(value = "id", type = IdType ...
分类:
其他好文 时间:
2021-06-15 18:18:15
阅读次数:
0
在 Java 中,生成随机数的场景有很多,所以本文我们就来盘点一下 4 种生成随机数的方式,以及它们之间的区别和每种生成方式所对应的场景。 ...
分类:
编程语言 时间:
2021-06-15 18:17:10
阅读次数:
0