大意: 给定$nm$大小的$01$矩阵, $1\le n\le 20,1\le m\le 1e5$, 可以任选行列翻转, 求最终$1$总数最少为多少. 显然有$O(m2^n)$的暴力算法 也就是枚举翻转哪些行, 然后对于一列, 若$1$的个数多于$0$的个数就翻转. 可以发现对于相同的列, 翻转行对 ...
分类:
其他好文 时间:
2019-07-20 11:34:11
阅读次数:
66
problem 868. Binary Gap 参考1. Leetcode_easy_868. Binary Gap; 完 ...
分类:
其他好文 时间:
2019-07-19 18:52:54
阅读次数:
68
https://docs.microsoft.com/en-us/dotnet/standard/assembly/file-format .NET defines a binary file format - "assembly" - that is used to fully-describe ...
分类:
Web程序 时间:
2019-07-19 18:48:29
阅读次数:
146
Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binar ...
分类:
其他好文 时间:
2019-07-17 18:29:31
阅读次数:
106
目录 神经网络的卷积、池化、拉伸 LeNet网络结构 LeNet在MNIST数据集上应用 参考资料 LeNet是卷积神经网络的祖师爷LeCun在1998年提出,用于解决手写数字识别的视觉任务。自那时起,CNN的最基本的架构就定下来了:卷积层、池化层、全连接层。如今各大深度学习框架中所使用的LeNet ...
分类:
Web程序 时间:
2019-07-15 19:57:35
阅读次数:
328
https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ Medium Medium Medium Given a binary tree, return the zigzag level order traver ...
分类:
其他好文 时间:
2019-07-15 19:55:58
阅读次数:
133
参见 307. Range Sum Query - Mutable Segment Tree Tree Implementation (SegmentTreeNode) https://www.youtube.com/watch?v=rYBtViWXYeI&list=PLLuMmzMTgVK7ug0 ...
分类:
其他好文 时间:
2019-07-15 13:32:03
阅读次数:
112
Given the root of a binary tree, find the maximum average value of any subtree of that tree. (A subtree of a tree is any node of that tree plus all it ...
分类:
其他好文 时间:
2019-07-15 01:07:59
阅读次数:
118
CMAKE_BINARY_DIR CMAKE_SOURCE_DIR CMAKE_CURRENT_BINARY_DIR CMAKE_CURRENT_SOURCE_DIR CMAKE_PROJECT_NAME PROJECT_NAME PROJECT_VERSION PROJECT_BINARY_DIR ...
分类:
其他好文 时间:
2019-07-14 17:48:38
阅读次数:
114
题目描述 输入一个二叉树,将它变换为它的镜像。 解法 将根结点的左右孩子互换,之后递归左右孩子。 ...
分类:
其他好文 时间:
2019-07-14 13:08:37
阅读次数:
82