A. Non zero Description: Guy Manuel and Thomas have an array $a$ of $n$ integers [$a_1, a_2, \dots, a_n$]. In one step they can add $1$ to any element ...
分类:
其他好文 时间:
2020-02-10 22:25:52
阅读次数:
87
Given a positive integer X, an X-factor chain of length m is a sequence of integers, 1 = X0, X1, X2, …, Xm = X satisfying Xi < Xi+1 and Xi | Xi+1 wher ...
分类:
其他好文 时间:
2020-02-10 18:10:40
阅读次数:
107
Given an array nums of integers, return how many of them contain an even number of digits. Example 1: Input: nums = [12,345,2,6,7896]Output: 2Explanat ...
分类:
其他好文 时间:
2020-02-10 17:53:55
阅读次数:
65
1010 Radix (25分) Given a pair of positive integers, for example, $6$ and $110$, can this equation $6 = 110$ be true? The answer is , if 6 is a decimal ...
分类:
其他好文 时间:
2020-02-10 13:52:09
阅读次数:
60
加减乘除不说了,反正就是两幅相同的图片运用cv.add(), cv.substract(),cv.multiply(), cv.divide()等实现 逻辑运算就是cv.bitewise_and(),cv.bitewise_or()等等 #调节亮度 import cv2 as cv import n ...
分类:
其他好文 时间:
2020-02-10 12:08:40
阅读次数:
83
K Integers 参考博客:https://blog.csdn.net/Q755100802/article/details/103664555 【题意】 给定一个1到n的排列,可以交换相邻的两个元素。 现在定义一个函数f(x),表示在原排列中,通过交换操作,形成一个1,2,3....x的排列的 ...
分类:
编程语言 时间:
2020-02-10 11:39:21
阅读次数:
67
Given a non-negative integer num, return the number of steps to reduce it to zero. If the current number is even, you have to divide it by 2, otherwis ...
分类:
其他好文 时间:
2020-02-10 10:02:26
阅读次数:
76
it ('should add two numbers', () => { const logger = jasmine.createSpyObj('LoggerService', ['log']) // logger.log.and.returnValue(); const calculator ...
分类:
其他好文 时间:
2020-02-10 09:52:34
阅读次数:
50
题意:对于一个有序数组,输出和为target的两个元素的下标。题目保证仅有唯一解。 分析: 法一:二分。枚举第一个元素,二分找另一个元素,时间复杂度O(nlogn),非最优解。 class Solution { public: vector<int> twoSum(vector<int>& numb ...
分类:
其他好文 时间:
2020-02-09 22:14:01
阅读次数:
73
"题目" 用hash,比较两个字符串数组的每个字符的hash值 ...
分类:
其他好文 时间:
2020-02-09 20:36:37
阅读次数:
64