码迷,mamicode.com
首页 >  
搜索关键字:median of two sor    ( 12209个结果
HDU1525(Euclid's Game)规律博弈
Problem Description Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of t ...
分类:其他好文   时间:2019-09-10 18:03:29    阅读次数:101
两数之和,不一样的
来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/two-sum 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那 两个 整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,你不能重复利用 ...
分类:其他好文   时间:2019-09-10 00:40:40    阅读次数:99
leetcode 1-10 题解记录
1. Two Sum [Easy] 思路 水题 要点 1. map用法: put, get, containsKey 2. 声明数组new int[]{1, 2}; 3. 异常情况还需要返回值的话, 抛IllegalArgumentException 代码 java class Solution { ...
分类:其他好文   时间:2019-09-09 19:11:24    阅读次数:66
so easy(并查集+unordered_map)
There are nn points in an array with index from 11 to nn, and there are two operations to those points. 1: 1 \ x1 x marking the point xx is not availa ...
分类:其他好文   时间:2019-09-09 17:53:50    阅读次数:83
leetcode 1 两数之和
https://leetcode cn.com/problems/two sum/ 暴力,复杂度n的平方 var twoSum = function(nums, target) { let arr = [] for (let i = 0; i ...
分类:其他好文   时间:2019-09-08 19:57:49    阅读次数:105
leetcode第二题:两数相加
1. 题目(题目链接:https://leetcode-cn.com/problems/add-two-numbers) 给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个 ...
分类:其他好文   时间:2019-09-08 09:51:54    阅读次数:72
CF1213E Two Small Strings
"题目链接" 问题分析 由于三个字母是等价的,所以大致可以分为如下几种情况: aa, ab ab, ac ab, ba ab, bc 不难发现,第$3$中情况可能造成无解($n 1$时),而剩下的情况都可以由$aaabbbccc$或$abcabcabc$这样的串解决。所以直接枚举$3$个字母的全排列 ...
分类:其他好文   时间:2019-09-07 10:21:11    阅读次数:60
PAT甲级——A1120 Friend Numbers【20】
Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are fri ...
分类:其他好文   时间:2019-09-05 21:46:42    阅读次数:95
python_取出字符串中出现2次的字符串
#取出字符串中出现2次的字符串,使用count方法统计def two_zifuchuan(str): s=set() for i in str: if str.count(i)==2: s.add(i) return s #取出字符串中出现2次的字符串,使用字典统计 def two_occur(st... ...
分类:编程语言   时间:2019-09-05 13:17:27    阅读次数:71
I Count Two Three(打表+排序+二分查找)
I Count Two Three 二分查找用lower_bound 这道题用cin,cout会超时。。。 AC代码; ...
分类:编程语言   时间:2019-09-05 01:09:20    阅读次数:101
12209条   上一页 1 ... 96 97 98 99 100 ... 1221 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!