字典序基础 在字典中,单词是按照首字母在字母表中的顺序进行排列的,比如 alpha 在 beta 之前。而第一个字母相同时,会去比较两个单词的第二个字母在字母表中的顺序,比如 account 在 advanced 之前,以此类推。 字典序法图解 回溯法: import java.util.Array ...
分类:
编程语言 时间:
2020-11-01 21:34:46
阅读次数:
21
Reference: [Dockerfile Security Best Practices] Container security is a broad problem space and there are many low hanging fruits one can harvest to m ...
分类:
其他好文 时间:
2020-10-24 11:48:16
阅读次数:
37
原文链接:https://sites.google.com/site/gsucomputergraphics/educational/advanced-texture-mapping/projective-texture-mapping Example 此示例演示了投影纹理贴图,这是阴影贴图,光照贴 ...
分类:
移动开发 时间:
2020-10-18 16:27:59
阅读次数:
29
题意 统计树中的每一层有多少叶子结点,要求逐层输出 思路 逐层输出,刚好层序遍历是逐层扩展,所以我就直接用BFS了 代码 #include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <v ...
分类:
其他好文 时间:
2020-10-06 20:54:35
阅读次数:
26
题意 供应链有3种人,零售商,经销商和供应商,供应链上的人都可以从自己的供应商那里以P的价格买入,而后以r%的涨幅卖给下一级,问供应链上找零售商买价格最低是多少 思路 每一层的价格涨幅都是一样的,所以这个问题等价于从根结点出发找最短的路到零售商。用BFS和DFS都可以做,DFS代码量少我就用DFS了 ...
分类:
其他好文 时间:
2020-10-05 22:33:38
阅读次数:
48
题意 树的层序遍历的问题,找到结点数最多的一层,输出结点树和对应层号 思路 看到是树层序遍历就立马反应过来用BFS做,可以说是裸模版的题目了 层序遍历在每次扩展状态的时候都是取一层的结点数进行扩展,此时就可以直接比较来找题目要求的解了 代码 #include <algorithm> #include ...
分类:
其他好文 时间:
2020-10-05 21:55:34
阅读次数:
27
Lua5.3 random函数的interval is empty错误 问题记录:math.random函数使用中报错 “interval is empty” 解决方法:math.random的两个参数中,第一个参数 ≤ 第二个参数。 luaL_argcheck(L, low <= up, 1, " ...
分类:
其他好文 时间:
2020-09-18 17:21:14
阅读次数:
58
依赖倒置原则 依赖倒置原则(Dependence Inversion Principle,DIP) 原始定义: 高层模块不应该依赖低层模块,两者都应该依赖其抽象;抽象不应该依赖细节,细节应该依赖抽象 (High level modules shouldnot depend upon low leve ...
分类:
其他好文 时间:
2020-09-18 00:22:40
阅读次数:
29
##C++版本: Tarjan强联通分量 void tarjan(int u) { int v; dfn[u] = low[u] = ++in; instack[u] = true; Stap[++stop] = u; for (int i = head[u]; i; i = eg[i].nex) ...
分类:
移动开发 时间:
2020-09-18 00:10:24
阅读次数:
50
Usage Usage: python sqlmap.py [options] Options: -h, --help Show basic help message and exit -hh Show advanced help message and exit --version Show pr ...
分类:
数据库 时间:
2020-09-17 19:59:29
阅读次数:
36