题意:E、Maximum Subsequence Value 题意: 给你n 个元素,你挑选k个元素,那么这个 k 集合的值为 ∑2i,其中,若集合内至少有 max(1,k?2)个数二进制下第 i 位为 1,则第 i 位有效,求一个集合可以得到的最大值。 题解: 应该是一种贪心 当k==3的时候,那 ...
分类:
其他好文 时间:
2020-07-16 12:01:31
阅读次数:
44
private static class ParameterizedTypeTest<T extends Number> { private List<T> list = null; public static void main(String[] args) throws NoSuchFieldE ...
分类:
其他好文 时间:
2020-07-16 11:48:00
阅读次数:
52
##基本查看 查看端口,得到连接端口为 0xd3d,转换后为 3389: REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /V PortNumber ...
Description A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit ...
分类:
其他好文 时间:
2020-07-16 00:05:52
阅读次数:
79
1. typescript 中的declare 表示声明 一个类或接口后,可以不引入既可以被编译器识别,做为类型使用 如: 在 a.ts 中 定义了 declare class A{ name:string; age:number; } 在b.ts 中可以使用 let a:A = {name:"12 ...
分类:
其他好文 时间:
2020-07-15 23:48:10
阅读次数:
68
数据类型判断 数据类型有 number string boolean null undefined function object 这些,那如何去判断数据对应的是哪种类型呢 typeof可以判断对应数据类型 写法: typeof data 或者 typeof(data) , 一般习惯写后面这种 返回 ...
分类:
编程语言 时间:
2020-07-15 23:25:22
阅读次数:
72
Description A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. ...
分类:
其他好文 时间:
2020-07-15 23:20:22
阅读次数:
96
地址:https://leetcode-cn.com/problems/maximum-lcci/ <?php /** 编写一个方法,找出两个数字a和b中最大的那一个。不得使用if-else或其他比较运算符。 示例: 输入: a = 1, b = 2 输出: 2 */ class Solution ...
分类:
其他好文 时间:
2020-07-15 22:43:51
阅读次数:
79
1:所有的发布订阅就是一个对象。 class Obersve { event={} //等价于下面的constructor // constructor() { // this.event = {} // } subscribe(type, fn) { //订阅 if (Object.keys(th ...
分类:
其他好文 时间:
2020-07-15 15:47:31
阅读次数:
68
https://medium.com/terra-money/survey-of-automated-market-making-algorithms-951f91ce727a Automated market makers are routinely adopted in a number of ...
分类:
其他好文 时间:
2020-07-15 15:45:37
阅读次数:
60