使用Python内置函数:bin()、oct()、int()、hex()可实现进制转换。 先看Python官方文档中对这几个内置函数的描述: bin(x)Convert an integer number to a binary string. The result is a valid Pytho ...
分类:
编程语言 时间:
2019-10-04 09:43:42
阅读次数:
136
题目描述 36. 有效的数独 判断一个 9x9 的数独是否有效。只需要根据以下规则,验证已经填入的数字是否有效即可。 数字 1-9 在每一行只能出现一次。数字 1-9 在每一列只能出现一次。数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。 上图是一个部分填充的有效的数独。 数独部分空 ...
分类:
编程语言 时间:
2019-10-03 20:15:48
阅读次数:
81
经典backtracing的问题。我们可以记录每行,每列,每个box那些数字出现过,快速判断当前填入的数字是否有重复。 上述方法是dfs(i,j),导致没到一行的末尾要换行,比较繁琐。 可以把所有空格都放到一个vector里,dfs这个vector的下标即可。 ...
分类:
其他好文 时间:
2019-10-01 09:16:35
阅读次数:
96
Difficulty: Hard More:【目录】LeetCode Java实现 Description Given a string containing just the characters '(' and ')', find the length of the longest valid ...
分类:
其他好文 时间:
2019-09-28 23:13:49
阅读次数:
116
以下是官方说明文档链接 "numpy.random.multivariate_normal" + 1.函数定义 numpy.random.multivariate_normal(mean, cov[, size, check_valid, tol]) + 2.参数解释 Parameters: mea ...
分类:
其他好文 时间:
2019-09-24 17:44:08
阅读次数:
184
原英文帮助文档: dir([object]) Without arguments, return the list of names in the current local scope. With an argument, attempt to return a list of valid att ...
分类:
编程语言 时间:
2019-09-21 23:32:15
阅读次数:
134
docker pull 和 docker login 的时候报错 Error response from daemon: Get https://registry-1.docker.io/v2/: x509: certificate is valid for bw-production.space, ...
分类:
Web程序 时间:
2019-09-21 21:45:03
阅读次数:
414
[plugin flannel does not support config version 导致 Unable to update cni config: no valid networks found in /etc/cni/net.d 解决 https://github.com/coreos ...
分类:
其他好文 时间:
2019-09-21 14:49:21
阅读次数:
276
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: No ...
分类:
其他好文 时间:
2019-09-20 00:04:55
阅读次数:
79
Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f ...
分类:
其他好文 时间:
2019-09-19 14:22:15
阅读次数:
86