码迷,mamicode.com
首页 >  
搜索关键字:indices    ( 788个结果
【leetcode】1464. Maximum Product of Two Elements in an Array
题目如下: Given the array of integers nums, you will choose two different indices i and j of that array. Return the maximum value of (nums[i]-1)*(nums[j]- ...
分类:其他好文   时间:2020-06-22 15:42:18    阅读次数:67
438. Find All Anagrams in a String 438.查找字符串中的所有Anagrams
Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the ...
分类:其他好文   时间:2020-06-08 11:06:25    阅读次数:76
【LeetCode 力扣】1. Two Sum 两数之和 Java 解法
LeetCode的第一题,英文单词书中 Abandon 一般的存在,让我们来看一下题目: Given an array of integers, return indices of the two numbers such that they add up to a specific target. ...
分类:编程语言   时间:2020-05-31 11:10:15    阅读次数:107
[LeetCode] 1442. Count Triplets That Can Form Two Arrays of Equal XOR
Given an array of integers arr. We want to select three indices i, j and k where (0 <= i < j <= k < arr.length). Let's define a and b as follows: a = ...
分类:其他好文   时间:2020-05-12 09:30:41    阅读次数:59
CF873F Forbidden Indices [后缀自动机]
没啥意思的后缀自动机系列,但是难度就很高2333 ...
分类:其他好文   时间:2020-05-02 19:14:16    阅读次数:66
【LeetCode 1. Two Sum】
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:其他好文   时间:2020-04-21 18:36:52    阅读次数:67
[Algo] Find Pair with Given Sum
Given a list of positive integers nums and an int target, return indices of the two numbers such that they add up to a target - 30. Conditions: You wi ...
分类:其他好文   时间:2020-04-06 09:49:05    阅读次数:76
Leetcode 220. 存在重复元素 III (Contains Duplicate III)
题目 Given an array of integers, find out whether there are two distinct indices i and j in the array such that the absolute difference between and is a ...
分类:其他好文   时间:2020-03-31 01:13:11    阅读次数:88
常用Tensor操作
最近在看开发文档们就顺便记录一下。 1: torch.index_select(input, dim, indices,out=None) 沿着指定维度对输入进行切片,取index中指定的相应项(index为一个LongTensor),然后返回到一个新的张量,返回的张量与原始张量_Tensor_有相 ...
分类:其他好文   时间:2020-03-29 22:39:58    阅读次数:171
219. Contains Duplicate II
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums[i] = nums[j] and the  ...
分类:其他好文   时间:2020-03-29 21:16:05    阅读次数:58
788条   上一页 1 2 3 4 5 ... 79 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!