###题目 给定一个无序的整数数组,找到其中最长上升子序列的长度。 示例: 输入: [10,9,2,5,3,7,101,18] 输出: 4 解释: 最长的上升子序列是 [2,3,7,101],它的长度是 4。 来源:力扣(LeetCode) 链接:https://leetcode-cn.com/pr ...
分类:
其他好文 时间:
2020-07-21 09:28:50
阅读次数:
55
帮助实现多重继承,实现不相关类的相同行为 定义接口 public interface IStringList { void Add(string s); int Count {get;} string this[int index]{get;set}; } //public abstract被省略了 ...
回溯 利用回溯算法求解八皇后问题 利用回溯算法求解0-1背包问题 利用回溯算法求解八皇后问题 八皇后问题(eight queens problem)是国际西洋棋棋手马克斯·贝瑟尔于1848年提出:在8×8格的国际象棋上摆放八个皇后,使其不能互相攻击,即任意两个皇后都不能处于同一行、同一列或同一斜线上 ...
分类:
其他好文 时间:
2020-07-20 22:52:36
阅读次数:
73
问题描述 : 给定一个整数数组 nums 和一个正整数 k,找出是否有可能把这个数组分成 k 个非空子集,其总和都相等。 示例 1: 输入: nums = [4, 3, 2, 3, 5, 2, 1], k = 4 输出: True 说明: 有可能将其分成 4 个子集(5),(1,4),(2,3),( ...
分类:
其他好文 时间:
2020-07-20 22:34:36
阅读次数:
71
高级树状数组讲解:https://www.cnblogs.com/RabbitHu/p/BIT.html 树状数组 一维树状数组 单点修改,区间查询 https://loj.ac/problem/130 #include<bits/stdc++.h> #define INF 0x3f3f3f3f # ...
分类:
编程语言 时间:
2020-07-20 22:29:48
阅读次数:
77
给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有满足条件且不重复的三元组。 注意:答案中不可以包含重复的三元组。 示例: 给定数组 nums = [-1, 0, 1, 2, -1, -4], 满足要求的三元组 ...
分类:
其他好文 时间:
2020-07-20 15:40:10
阅读次数:
87
?transfomer是谷歌在17年论文 Attention Is All You Need(https://arxiv.org/abs/1706.03762)里提出来的。是为了解决机器翻译问题而生的。在Attention Is All You Need这篇paper中整个模型还是采用encoder ...
分类:
其他好文 时间:
2020-07-20 15:25:03
阅读次数:
110
Split to Be Slim: An Overlooked Redundancy in Vanilla Convolution, IJCAI 2020 论文地址: https://arxiv.org/abs/2006.12085 代码地址: https://github.com/qiulinzh ...
分类:
其他好文 时间:
2020-07-20 10:47:22
阅读次数:
64
##题目 Pasha loves to send strictly positive integers to his friends. Pasha cares about security, therefore when he wants to send an integer n, he encry ...
分类:
其他好文 时间:
2020-07-19 23:37:51
阅读次数:
80
43. 1~n整数中1出现的次数 题意:面试题43. 1~n整数中1出现的次数 思路:找规律。每一位digit上的1出现的次数只与:它前面的数字high、它后面的数字low、当前位的因数$10^$相关。 分情况讨论: 1)第i位上的数字 == 0。1~n中,这一位上1出现的次数只与高位有关。(例如2 ...
分类:
其他好文 时间:
2020-07-19 23:17:43
阅读次数:
55